vendor: 151,580 bytes, lines 1-2
1import{c as ed,g as id,r as Me,R as sd}from"./react-vendor-Diu8YNKx.js";var nd={exports:{}};(function(n,t){(function(i,o){i._Highcharts=o(),n.exports=i._Highcharts})(typeof window>"u"?ed:window,()=>(()=>{var Hh;let i,o;var a,c,p,g,y,w,C,_,L,D,R,N,W,X,V,K,$,Z,nt={};nt.d=(x,e)=>{for(var s in e)nt.o(e,s)&&!nt.o(x,s)&&Object.defineProperty(x,s,{enumerable:!0,get:e[s]})},nt.o=(x,e)=>Object.prototype.hasOwnProperty.call(x,e);var mt={};nt.d(mt,{default:()=>bx}),function(x){var e,s,r,l,h,d,u;x.SVG_NS="http://www.w3.org/2000/svg",x.product="Highcharts",x.version="12.4.0",x.win=typeof window<"u"?window:{},x.doc=x.win.document,x.svg=!!((r=(s=(e=x.doc)==null?void 0:e.createElementNS)==null?void 0:s.call(e,x.SVG_NS,"svg"))!=null&&r.createSVGRect),x.pageLang=(d=(h=(l=x.doc)==null?void 0:l.documentElement)==null?void 0:h.closest("[lang]"))==null?void 0:d.lang,x.userAgent=((u=x.win.navigator)==null?void 0:u.userAgent)||"",x.isChrome=x.win.chrome,x.isFirefox=x.userAgent.indexOf("Firefox")!==-1,x.isMS=/(edge|msie|trident)/i.test(x.userAgent)&&!x.win.opera,x.isSafari=!x.isChrome&&x.userAgent.indexOf("Safari")!==-1,x.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(x.userAgent),x.isWebKit=x.userAgent.indexOf("AppleWebKit")!==-1,x.deg2rad=2*Math.PI/360,x.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],x.noop=function(){},x.supportsPassiveEvents=function(){let f=!1;if(!x.isMS){let m=Object.defineProperty({},"passive",{get:function(){f=!0}});x.win.addEventListener&&x.win.removeEventListener&&(x.win.addEventListener("testPassive",x.noop,m),x.win.removeEventListener("testPassive",x.noop,m))}return f}(),x.charts=[],x.composed=[],x.dateFormats={},x.seriesTypes={},x.symbolSizes={},x.chartCount=0}(a||(a={}));let Y=a,{charts:St,doc:pt,win:kt}=Y;function Nt(x,e,s,r){let l=e?"Highcharts error":"Highcharts warning";x===32&&(x=`${l}: Deprecated member`);let h=Ui(x),d=h?`${l} #${x}: www.highcharts.com/errors/${x}/`:x.toString();if(r!==void 0){let u="";h&&(d+="?"),di(r,function(f,m){u+=` 2 - ${m}: ${f}`,h&&(d+=encodeURI(m)+"="+encodeURI(f))}),d+=u}wa(Y,"displayError",{chart:s,code:x,message:d,params:r},function(){if(e)throw Error(d);kt.console&&Nt.messages.indexOf(d)===-1&&console.warn(d)}),Nt.messages.push(d)}function Dt(x,e){return parseInt(x,e||10)}function ht(x){return typeof x=="string"}function Vt(x){let e=Object.prototype.toString.call(x);return e==="[object Array]"||e==="[object Array Iterator]"}function Pe(x,e){return!!x&&typeof x=="object"&&(!e||!Vt(x))}function ci(x){return Pe(x)&&typeof x.nodeType=="number"}function Oi(x){let e=x==null?void 0:x.constructor;return!!(Pe(x,!0)&&!ci(x)&&(e!=null&&e.name)&&e.name!=="Object")}function Ui(x){return typeof x=="number"&&!isNaN(x)&&x<1/0&&x>-1/0}function Ge(x){return x!=null}function Ys(x,e,s){let r,l=ht(e)&&!Ge(s),h=(d,u)=>{Ge(d)?x.setAttribute(u,d):l?(r=x.getAttribute(u))||u!=="class"||(r=x.getAttribute(u+"Name")):x.removeAttribute(u)};return ht(e)?h(s,e):di(e,h),r}function Gs(x){return Vt(x)?x:[x]}function Li(x,e){let s;for(s in x||(x={}),e)x[s]=e[s];return x}function Ki(){let x=arguments,e=x.length;for(let s=0;s<e;s++){let r=x[s];if(r!=null)return r}}function Mo(x,e){Li(x.style,e)}function ya(x){return Math.pow(10,Math.floor(Math.log(x)/Math.LN10))}function va(x,e){return x>1e14?x:parseFloat(x.toPrecision(e||14))}(Nt||(Nt={})).messages=[],Math.easeInOutSine=function(x){return-.5*(Math.cos(Math.PI*x)-1)};let eu=Array.prototype.find?function(x,e){return x.find(e)}:function(x,e){let s,r=x.length;for(s=0;s<r;s++)if(e(x[s],s))return x[s]};function di(x,e,s){for(let r in x)Object.hasOwnProperty.call(x,r)&&e.call(s||x[r],x[r],r,x)}function ka(x,e,s){function r(d,u){let f=x.removeEventListener;f&&f.call(x,d,u,!1)}function l(d){let u,f;x.nodeName&&(e?(u={})[e]=!0:u=d,di(u,function(m,v){if(d[v])for(f=d[v].length;f--;)r(v,d[v][f].fn)}))}let h=typeof x=="function"&&x.prototype||x;if(Object.hasOwnProperty.call(h,"hcEvents")){let d=h.hcEvents;if(e){let u=d[e]||[];s?(d[e]=u.filter(function(f){return s!==f.fn}),r(e,s)):(l(d),d[e]=[])}else l(d),delete h.hcEvents}}function wa(x,e,s,r){if(s=s||{},(pt==null?void 0:pt.createEvent)&&(x.dispatchEvent||x.fireEvent&&x!==Y)){let l=pt.createEvent("Events");l.initEvent(e,!0,!0),s=Li(l,s),x.dispatchEvent?x.dispatchEvent(s):x.fireEvent(e,s)}else if(x.hcEvents){s.target||Li(s,{preventDefault:function(){s.defaultPrevented=!0},target:x,type:e});let l=[],h=x,d=!1;for(;h.hcEvents;)Object.hasOwnProperty.call(h,"hcEvents")&&h.hcEvents[e]&&(l.length&&(d=!0),l.unshift.apply(l,h.hcEvents[e])),h=Object.getPrototypeOf(h);d&&l.sort((u,f)=>u.order-f.order),l.forEach(u=>{u.fn.call(x,s)===!1&&s.preventDefault()})}r&&!s.defaultPrevented&&r.call(x,s)}let iu=function(){let x=Math.random().toString(36).substring(2,9)+"-",e=0;return function(){return"highcharts-"+(i?"":x)+e++}}();kt.jQuery&&(kt.jQuery.fn.highcharts=function(){let x=[].slice.call(arguments);if(this[0])return x[0]?(new Y[ht(x[0])?x.shift():"Chart"](this[0],x[0],x[1]),this):St[Ys(this[0],"data-highcharts-chart")]});let ot={addEvent:function(x,e,s,r={}){let l=typeof x=="function"&&x.prototype||x;Object.hasOwnProperty.call(l,"hcEvents")||(l.hcEvents={});let h=l.hcEvents;Y.Point&&x instanceof Y.Point&&x.series&&x.series.chart&&(x.series.chart.runTrackerClick=!0);let d=x.addEventListener;d&&d.call(x,e,s,!!Y.supportsPassiveEvents&&{passive:r.passive===void 0?e.indexOf("touch")!==-1:r.passive,capture:!1}),h[e]||(h[e]=[]);let u={fn:s,order:typeof r.order=="number"?r.order:1/0};return h[e].push(u),h[e].sort((f,m)=>f.order-m.order),function(){ka(x,e,s)}},arrayMax:function(x){let e=x.length,s=x[0];for(;e--;)x[e]>s&&(s=x[e]);return s},arrayMin:function(x){let e=x.length,s=x[0];for(;e--;)x[e]<s&&(s=x[e]);return s},attr:Ys,clamp:function(x,e,s){return x>e?x<s?x:s:e},clearTimeout:function(x){Ge(x)&&clearTimeout(x)},correctFloat:va,createElement:function(x,e,s,r,l){let h=pt.createElement(x);return e&&Li(h,e),l&&Mo(h,{padding:"0",border:"none",margin:"0"}),s&&Mo(h,s),r&&r.appendChild(h),h},crisp:function(x,e=0,s){let r=e%2/2,l=s?-1:1;return(Math.round(x*l-r)+r)*l},css:Mo,defined:Ge,destroyObjectProperties:function(x,e,s){di(x,function(r,l){r!==e&&(r!=null&&r.destroy)&&r.destroy(),(r!=null&&r.destroy||!s)&&delete x[l]})},diffObjects:function(x,e,s,r){let l={};return function h(d,u,f,m){let v=s?u:d;di(d,function(b,k){if(!m&&r&&r.indexOf(k)>-1&&u[k]){b=Gs(b),f[k]=[];for(let M=0;M<Math.max(b.length,u[k].length);M++)u[k][M]&&(b[M]===void 0?f[k][M]=u[k][M]:(f[k][M]={},h(b[M],u[k][M],f[k][M],m+1)))}else Pe(b,!0)&&!b.nodeType?(f[k]=Vt(b)?[]:{},h(b,u[k]||{},f[k],m+1),Object.keys(f[k]).length===0&&(k!=="colorAxis"||m!==0)&&delete f[k]):(d[k]!==u[k]||k in d&&!(k in u))&&k!=="__proto__"&&k!=="constructor"&&(f[k]=v[k])})}(x,e,l,0),l},discardElement:function(x){var e;(e=x==null?void 0:x.parentElement)==null||e.removeChild(x)},erase:function(x,e){let s=x.length;for(;s--;)if(x[s]===e){x.splice(s,1);break}},error:Nt,extend:Li,extendClass:function(x,e){let s=function(){};return s.prototype=new x,Li(s.prototype,e),s},find:eu,fireEvent:wa,getAlignFactor:(x="")=>({center:.5,right:1,middle:.5,bottom:1})[x]||0,getClosestDistance:function(x,e){let s,r,l,h=!e;return x.forEach(d=>{if(d.length>1)for(l=d.length-1;l>0;l--)(r=d[l]-d[l-1])<0&&!h?(e==null||e(),e=void 0):r&&(s===void 0||r<s)&&(s=r)}),s},getMagnitude:ya,getNestedProperty:function(x,e){let s=x.split(".");for(;s.length&&Ge(e);){let r=s.shift();if(r===void 0||r==="__proto__")return;if(r==="this"){let h;return Pe(e)&&(h=e["@this"]),h??e}let l=e[r.replace(/[\\'"]/g,"")];if(!Ge(l)||typeof l=="function"||typeof l.nodeType=="number"||l===kt)return;e=l}return e},getStyle:function x(e,s,r){var d;let l;if(s==="width"){let u=Math.min(e.offsetWidth,e.scrollWidth),f=(d=e.getBoundingClientRect)==null?void 0:d.call(e).width;return f<u&&f>=u-1&&(u=Math.floor(f)),Math.max(0,u-(x(e,"padding-left",!0)||0)-(x(e,"padding-right",!0)||0))}if(s==="height")return Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-(x(e,"padding-top",!0)||0)-(x(e,"padding-bottom",!0)||0));let h=kt.getComputedStyle(e,void 0);return h&&(l=h.getPropertyValue(s),Ki(r,s!=="opacity")&&(l=Dt(l))),l},insertItem:function(x,e){let s,r=x.options.index,l=e.length;for(s=x.options.isInternal?l:0;s<l+1;s++)if(!e[s]||Ui(r)&&r<Ki(e[s].options.index,e[s]._i)||e[s].options.isInternal){e.splice(s,0,x);break}return s},isArray:Vt,isClass:Oi,isDOMElement:ci,isFunction:function(x){return typeof x=="function"},isNumber:Ui,isObject:Pe,isString:ht,merge:function(x,...e){let s,r=[x,...e],l={},h=function(u,f){return typeof u!="object"&&(u={}),di(f,function(m,v){v!=="__proto__"&&v!=="constructor"&&(!Pe(m,!0)||Oi(m)||ci(m)?u[v]=f[v]:u[v]=h(u[v]||{},m))}),u};x===!0&&(l=r[1],r=Array.prototype.slice.call(r,2));let d=r.length;for(s=0;s<d;s++)l=h(l,r[s]);return l},normalizeTickInterval:function(x,e,s,r,l){let h,d=x;s=Ki(s,ya(x));let u=x/s;for(!e&&(e=l?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],r===!1&&(s===1?e=e.filter(function(f){return f%1==0}):s<=.1&&(e=[1/s]))),h=0;h<e.length&&(d=e[h],(!l||!(d*s>=x))&&(l||!(u<=(e[h]+(e[h+1]||e[h]))/2)));h++);return va(d*s,-Math.round(Math.log(.001)/Math.LN10))},objectEach:di,offset:function(x){let e=pt.documentElement,s=x.parentElement||x.parentNode?x.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:s.top+(kt.pageYOffset||e.scrollTop)-(e.clientTop||0),left:s.left+(kt.pageXOffset||e.scrollLeft)-(e.clientLeft||0),width:s.width,height:s.height}},pad:function(x,e,s){return Array((e||2)+1-String(x).replace("-","").length).join(s||"0")+x},pick:Ki,pInt:Dt,pushUnique:function(x,e){return 0>x.indexOf(e)&&!!x.push(e)},relativeLength:function(x,e,s){return/%$/.test(x)?e*parseFloat(x)/100+(s||0):parseFloat(x)},removeEvent:ka,replaceNested:function(x,...e){let s,r;do for(r of(s=x,e))x=x.replace(r[0],r[1]);while(x!==s);return x},splat:Gs,stableSort:function(x,e){let s,r,l=x.length;for(r=0;r<l;r++)x[r].safeI=r;for(x.sort(function(h,d){return(s=e(h,d))===0?h.safeI-d.safeI:s}),r=0;r<l;r++)delete x[r].safeI},syncTimeout:function(x,e,s){return e>0?setTimeout(x,e,s):(x.call(0,s),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},ucfirst:function(x){return ht(x)?x.substring(0,1).toUpperCase()+x.substring(1):String(x)},uniqueKey:iu,useSerialIds:function(x){return i=Ki(x,i)},wrap:function(x,e,s){let r=x[e];x[e]=function(){let l=arguments,h=this;return s.apply(this,[function(){return r.apply(h,arguments.length?arguments:l)}].concat([].slice.call(arguments)))}}},{pageLang:su,win:$s}=Y,{defined:Ma,error:Sa,extend:So,isNumber:Ca,isObject:Co,isString:qi,merge:nu,objectEach:ou,pad:$e,splat:ru,timeUnits:Po,ucfirst:au}=ot,lu=Y.isSafari&&$s.Intl&&!$s.Intl.DateTimeFormat.prototype.formatRange,hu=x=>x.main===void 0,cu=class{constructor(x,e){this.options={timezone:"UTC"},this.variableTimezone=!1,this.Date=$s.Date,this.update(x),this.lang=e}update(x={}){this.dTLCache={},this.options=x=nu(!0,this.options,x);let{timezoneOffset:e,useUTC:s,locale:r}=x;this.Date=x.Date||$s.Date||Date;let l=x.timezone;Ma(s)&&(l=s?"UTC":void 0),e&&e%60==0&&(l="Etc/GMT"+(e>0?"+":"")+e/60),this.variableTimezone=l!=="UTC"&&(l==null?void 0:l.indexOf("Etc/GMT"))!==0,this.timezone=l,this.lang&&r&&(this.lang.locale=r),["months","shortMonths","weekdays","shortWeekdays"].forEach(h=>{let d=/months/i.test(h),u=/short/.test(h),f={timeZone:"UTC"};f[d?"month":"weekday"]=u?"short":"long",this[h]=(d?[0,1,2,3,4,5,6,7,8,9,10,11]:[3,4,5,6,7,8,9]).map(m=>this.dateFormat(f,(d?31:1)*24*36e5*m))})}toParts(x){let[e,s,r,l,h,d,u]=this.dateTimeFormat({weekday:"narrow",day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},x,"es").split(/(?:, | |\/|:)/g);return[l,r-1,s,h,d,u,Math.floor(Number(x)||0)%1e3,"DLMXJVS".indexOf(e)].map(Number)}dateTimeFormat(x,e,s=this.options.locale||su){let r=JSON.stringify(x)+s;qi(x)&&(x=this.str2dtf(x));let l=this.dTLCache[r];if(!l){x.timeZone??(x.timeZone=this.timezone);try{l=new Intl.DateTimeFormat(s,x)}catch(h){/Invalid time zone/i.test(h.message)?(Sa(34),x.timeZone="UTC",l=new Intl.DateTimeFormat(s,x)):Sa(h.message,!1)}}return this.dTLCache[r]=l,(l==null?void 0:l.format(e))||""}str2dtf(x,e={}){let s={L:{fractionalSecondDigits:3},S:{second:"2-digit"},M:{minute:"numeric"},H:{hour:"2-digit"},k:{hour:"numeric"},E:{weekday:"narrow"},a:{weekday:"short"},A:{weekday:"long"},d:{day:"2-digit"},e:{day:"numeric"},b:{month:"short"},B:{month:"long"},m:{month:"2-digit"},o:{month:"numeric"},y:{year:"2-digit"},Y:{year:"numeric"}};return Object.keys(s).forEach(r=>{x.indexOf(r)!==-1&&So(e,s[r])}),e}makeTime(x,e,s=1,r=0,l,h,d){let u=this.Date.UTC(x,e,s,r,l||0,h||0,d||0);if(this.timezone!=="UTC"){let f=this.getTimezoneOffset(u);if(u+=f,[2,3,8,9,10,11].indexOf(e)!==-1&&(r<5||r>20)){let m=this.getTimezoneOffset(u);f!==m?u+=m-f:f-36e5!==this.getTimezoneOffset(u-36e5)||lu||(u-=36e5)}}return u}parse(x){if(!qi(x))return x??void 0;let e=(x=x.replace(/\//g,"-").replace(/(GMT|UTC)/,"")).indexOf("Z")>-1||/([+-][0-9]{2}):?[0-9]{2}$/.test(x),s=/^[0-9]{4}-[0-9]{2}(-[0-9]{2}|)$/.test(x);e||s||(x+="Z");let r=Date.parse(x);if(Ca(r))return r+(!e||s?this.getTimezoneOffset(r):0)}getTimezoneOffset(x){if(this.timezone!=="UTC"){let[e,s,r,l,h=0]=this.dateTimeFormat({timeZoneName:"shortOffset"},x,"en").split(/(GMT|:)/).map(Number),d=-(60*(r+h/60)*6e4);if(Ca(d))return d}return 0}dateFormat(x,e,s){let r=this.lang;if(!Ma(e)||isNaN(e))return(r==null?void 0:r.invalidDate)||"";if(qi(x=x??"%Y-%m-%d %H:%M:%S")){let l,h=/%\[([a-zA-Z]+)\]/g;for(;l=h.exec(x);)x=x.replace(l[0],this.dateTimeFormat(l[1],e,r==null?void 0:r.locale))}if(qi(x)&&x.indexOf("%")!==-1){let l=this,[h,d,u,f,m,v,b,k]=this.toParts(e),M=(r==null?void 0:r.weekdays)||this.weekdays,S=(r==null?void 0:r.shortWeekdays)||this.shortWeekdays,A=(r==null?void 0:r.months)||this.months,T=(r==null?void 0:r.shortMonths)||this.shortMonths;ou(So({a:S?S[k]:M[k].substr(0,3),A:M[k],d:$e(u),e:$e(u,2," "),w:k,v:(r==null?void 0:r.weekFrom)??"",b:T[d],B:A[d],m:$e(d+1),o:d+1,y:h.toString().substr(2,2),Y:h,H:$e(f),k:f,I:$e(f%12||12),l:f%12||12,M:$e(m),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:$e(v),L:$e(b,3)},Y.dateFormats),function(P,O){if(qi(x))for(;x.indexOf("%"+O)!==-1;)x=x.replace("%"+O,typeof P=="function"?P.call(l,e):P)})}else if(Co(x)){let l=(this.getTimezoneOffset(e)||0)/36e5,h=this.timezone||"Etc/GMT"+(l>=0?"+":"")+l,{prefix:d="",suffix:u=""}=x;x=d+this.dateTimeFormat(So({timeZone:h},x),e)+u}return s?au(x):x}resolveDTLFormat(x){return Co(x,!0)?Co(x,!0)&&hu(x)?{main:x}:x:{main:(x=ru(x))[0],from:x[1],to:x[2]}}getDateFormat(x,e,s,r){let l=this.dateFormat("%m-%d %H:%M:%S.%L",e),h="01-01 00:00:00.000",d={millisecond:15,second:12,minute:9,hour:6,day:3},u="millisecond",f=u;for(u in Po){if(x&&x===Po.week&&+this.dateFormat("%w",e)===s&&l.substr(6)===h.substr(6)){u="week";break}if(x&&Po[u]>x){u=f;break}if(d[u]&&l.substr(d[u])!==h.substr(d[u]))break;u!=="week"&&(f=u)}return this.resolveDTLFormat(r[u]).main}},{defined:Pa,extend:du,timeUnits:jt}=ot,To=class extends cu{getTimeTicks(x,e,s,r){let l=this,h=[],d={},{count:u=1,unitRange:f}=x,[m,v,b,k,M,S]=l.toParts(e),A=(e||0)%1e3,T;if(r??(r=1),Pa(e)){if(A=f>=jt.second?0:u*Math.floor(A/u),f>=jt.second&&(S=f>=jt.minute?0:u*Math.floor(S/u)),f>=jt.minute&&(M=f>=jt.hour?0:u*Math.floor(M/u)),f>=jt.hour&&(k=f>=jt.day?0:u*Math.floor(k/u)),f>=jt.day&&(b=f>=jt.month?1:Math.max(1,u*Math.floor(b/u))),f>=jt.month&&(v=f>=jt.year?0:u*Math.floor(v/u)),f>=jt.year&&(m-=m%u),f===jt.week){u&&(e=l.makeTime(m,v,b,k,M,S,A));let E=this.dateTimeFormat({timeZone:this.timezone,weekday:"narrow"},e,"es"),z="DLMXJVS".indexOf(E);b+=-z+r+(z<r?-7:0)}e=l.makeTime(m,v,b,k,M,S,A),l.variableTimezone&&Pa(s)&&(T=s-e>4*jt.month||l.getTimezoneOffset(e)!==l.getTimezoneOffset(s));let P=e,O=1;for(;P<s;)h.push(P),f===jt.year?P=l.makeTime(m+O*u,0):f===jt.month?P=l.makeTime(m,v+O*u):T&&(f===jt.day||f===jt.week)?P=l.makeTime(m,v,b+O*u*(f===jt.day?1:7)):T&&f===jt.hour&&u>1?P=l.makeTime(m,v,b,k+O*u):P+=f*u,O++;h.push(P),f<=jt.hour&&h.length<1e4&&h.forEach(E=>{E%18e5==0&&l.dateFormat("%H%M%S%L",E)==="000000000"&&(d[E]="day")})}return h.info=du(x,{higherRanks:d,totalRange:f*u}),h}},{isTouchDevice:uu}=Y,{fireEvent:fu,merge:pu}=ot,Be={colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{weekFrom:"week from",chartTitle:"Chart title",locale:void 0,loading:"Loading...",months:void 0,seriesName:"Series {add index 1}",shortMonths:void 0,weekdays:void 0,numericSymbols:["k","M","G","T","P","E"],pieSliceName:"Slice",resetZoom:"Reset zoom",yAxisTitle:"Values",resetZoomTitle:"Reset zoom level 1:1"},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,timezone:"UTC",timezoneOffset:0,useUTC:void 0},chart:{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",margin:15,minScale:.67},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:""},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",events:{},layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{color:"#333333",fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:{duration:300,easing:x=>Math.sqrt(1-Math.pow(x-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%[AebHMSL]",second:"%[AebHMS]",minute:"%[AebHM]",hour:"%[AebHM]",day:"%[AebY]",week:"%v %[AebY]",month:"%[BY]",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,position:{x:0,y:3},shared:!1,snap:uu?25:10,headerFormat:'<span style="font-size: 0.8em">{ucfirst point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">â</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:"#ffffff",borderWidth:void 0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}},Ao=new To(Be.time,Be.lang),de={defaultOptions:Be,defaultTime:Ao,getOptions:function(){return Be},setOptions:function(x){var e;return fu(Y,"setOptions",{options:x}),pu(!0,Be,x),x.time&&Ao.update(Be.time),x.lang&&"locale"in x.lang&&Ao.update({locale:x.lang.locale}),(e=x.lang)!=null&&e.chartTitle&&(Be.title={...Be.title,text:x.lang.chartTitle}),Be}},{win:gu}=Y,{isNumber:Zi,isString:mu,merge:xu,pInt:ne,defined:Ta}=ot,Aa=(x,e,s)=>`color-mix(in srgb,${x},${e} ${100*s}%)`,_o=x=>mu(x)&&!!x&&x!=="none";class It{static parse(e){return e?new It(e):It.None}constructor(e){let s,r,l,h;this.rgba=[NaN,NaN,NaN,NaN],this.input=e;let d=Y.Color;if(d&&d!==It)return new d(e);if(typeof e=="object"&&e.stops!==void 0)this.stops=e.stops.map(u=>new It(u[1]));else if(typeof e=="string")for(this.input=e=It.names[e.toLowerCase()]||e,l=It.parsers.length;l--&&!r;)(s=(h=It.parsers[l]).regex.exec(e))&&(r=h.parse(s));r&&(this.rgba=r)}get(e){let s=this.input,r=this.rgba;if(this.output)return this.output;if(typeof s=="object"&&this.stops!==void 0){let l=xu(s);return l.stops=[].slice.call(l.stops),this.stops.forEach((h,d)=>{l.stops[d]=[l.stops[d][0],h.get(e)]}),l}return r&&Zi(r[0])?e!=="rgb"&&(e||r[3]!==1)?e==="a"?`${r[3]}`:"rgba("+r.join(",")+")":"rgb("+r[0]+","+r[1]+","+r[2]+")":s}brighten(e){let s=this.rgba;if(this.stops)this.stops.forEach(function(r){r.brighten(e)});else if(Zi(e)&&e!==0)if(Zi(s[0]))for(let r=0;r<3;r++)s[r]+=ne(255*e),s[r]<0&&(s[r]=0),s[r]>255&&(s[r]=255);else It.useColorMix&&_o(this.input)&&(this.output=Aa(this.input,e>0?"white":"black",Math.abs(e)));return this}setOpacity(e){return this.rgba[3]=e,this}tweenTo(e,s){let r=this.rgba,l=e.rgba;if(!Zi(r[0])||!Zi(l[0]))return It.useColorMix&&_o(this.input)&&_o(e.input)&&s<.99?Aa(this.input,e.input,s):e.input||"none";let h=l[3]!==1||r[3]!==1,d=(f,m)=>f+(r[m]-f)*(1-s),u=l.slice(0,3).map(d).map(Math.round);return h&&u.push(d(l[3],3)),(h?"rgba(":"rgb(")+u.join(",")+")"}}It.names={white:"#ffffff",black:"#000000"},It.parsers=[{regex:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?(?:\.\d+)?)\s*\)/,parse:function(x){return[ne(x[1]),ne(x[2]),ne(x[3]),parseFloat(x[4],10)]}},{regex:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/,parse:function(x){return[ne(x[1]),ne(x[2]),ne(x[3]),1]}},{regex:/^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?$/i,parse:function(x){return[ne(x[1]+x[1],16),ne(x[2]+x[2],16),ne(x[3]+x[3],16),Ta(x[4])?ne(x[4]+x[4],16)/255:1]}},{regex:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?$/i,parse:function(x){return[ne(x[1],16),ne(x[2],16),ne(x[3],16),Ta(x[4])?ne(x[4],16)/255:1]}}],It.useColorMix=(Hh=gu.CSS)==null?void 0:Hh.supports("color","color-mix(in srgb,red,blue 9%)"),It.None=new It("");let{parse:_a}=It,{win:bu}=Y,{isNumber:Oo,objectEach:yu}=ot;class oe{constructor(e,s,r){this.pos=NaN,this.options=s,this.elem=e,this.prop=r}dSetter(){let e=this.paths,s=e==null?void 0:e[0],r=e==null?void 0:e[1],l=this.now||0,h=[];if(l!==1&&s&&r)if(s.length===r.length&&l<1)for(let d=0;d<r.length;d++){let u=s[d],f=r[d],m=[];for(let v=0;v<f.length;v++){let b=u[v],k=f[v];Oo(b)&&Oo(k)&&(f[0]!=="A"||v!==4&&v!==5)?m[v]=b+l*(k-b):m[v]=k}h.push(m)}else h=r;else h=this.toD||[];this.elem.attr("d",h,void 0,!0)}update(){let e=this.elem,s=this.prop,r=this.now,l=this.options.step;this[s+"Setter"]?this[s+"Setter"]():e.attr?e.element&&e.attr(s,r,null,!0):e.style[s]=r+this.unit,l&&l.call(e,r,this)}run(e,s,r){let l=this,h=l.options,d=function(m){return!d.stopped&&l.step(m)},u=bu.requestAnimationFrame||function(m){setTimeout(m,13)},f=function(){for(let m=0;m<oe.timers.length;m++)oe.timers[m]()||oe.timers.splice(m--,1);oe.timers.length&&u(f)};e!==s||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=e,this.end=s,this.unit=r,this.now=this.start,this.pos=0,d.elem=this.elem,d.prop=this.prop,d()&&oe.timers.push(d)===1&&u(f)):(delete h.curAnim[this.prop],h.complete&&Object.keys(h.curAnim).length===0&&h.complete.call(this.elem))}step(e){let s,r,l=+new Date,h=this.options,d=this.elem,u=h.complete,f=h.duration,m=h.curAnim;return d.attr&&!d.element?s=!1:e||l>=f+this.startTime?(this.now=this.end,this.pos=1,this.update(),m[this.prop]=!0,r=!0,yu(m,function(v){v!==!0&&(r=!1)}),r&&u&&u.call(d),s=!1):(this.pos=h.easing((l-this.startTime)/f),this.now=this.start+(this.end-this.start)*this.pos,this.update(),s=!0),s}initPath(e,s,r){let l=e.startX,h=e.endX,d=r.slice(),u=e.isArea,f=u?2:1,m=s&&r.length>s.length&&r.hasStackedCliffs,v,b,k,M,S=s==null?void 0:s.slice();if(!S||m)return[d,d];function A(P,O){for(;P.length<b;){let E=P[0],z=O[b-P.length];if(z&&E[0]==="M"&&(z[0]==="C"?P[0]=["C",E[1],E[2],E[1],E[2],E[1],E[2]]:P[0]=["L",E[1],E[2]]),P.unshift(E),u){let I=P.pop();P.push(P[P.length-1],I)}}}function T(P){for(;P.length<b;){let O=P[Math.floor(P.length/f)-1].slice();if(O[0]==="C"&&(O[1]=O[5],O[2]=O[6]),u){let E=P[Math.floor(P.length/f)].slice();P.splice(P.length/2,0,O,E)}else P.push(O)}}if(l&&h&&h.length){for(k=0;k<l.length;k++)if(l[k]===h[0]){v=k;break}else if(l[0]===h[h.length-l.length+k]){v=k,M=!0;break}else if(l[l.length-1]===h[h.length-l.length+k]){v=l.length-k;break}v===void 0&&(S=[])}return S.length&&Oo(v)&&(b=d.length+v*f,M?(A(S,d),T(d)):(A(d,S),T(S))),[S,d]}fillSetter(){oe.prototype.strokeSetter.apply(this,arguments)}strokeSetter(){this.elem.attr(this.prop,_a(this.start).tweenTo(_a(this.end),this.pos),void 0,!0)}}oe.timers=[];let{defined:vu,getStyle:ku,isArray:wu,isNumber:Mu,isObject:Lo,merge:Oa,objectEach:Su,pick:Cu}=ot;function Eo(x){return Lo(x)?Oa({duration:500,defer:0},x):{duration:500*!!x,defer:0}}function La(x,e){let s=oe.timers.length;for(;s--;)oe.timers[s].elem!==x||e&&e!==oe.timers[s].prop||(oe.timers[s].stopped=!0)}let Jt={animate:function(x,e,s){let r,l="",h,d,u;Lo(s)||(u=arguments,s={duration:u[2],easing:u[3],complete:u[4]}),Mu(s.duration)||(s.duration=400),s.easing=typeof s.easing=="function"?s.easing:Math[s.easing]||Math.easeInOutSine,s.curAnim=Oa(e),Su(e,function(f,m){La(x,m),d=new oe(x,s,m),h=void 0,m==="d"&&wu(e.d)?(d.paths=d.initPath(x,x.pathArray,e.d),d.toD=e.d,r=0,h=1):x.attr?r=x.attr(m):(r=parseFloat(ku(x,m))||0,m!=="opacity"&&(l="px")),h||(h=f),typeof h=="string"&&h.match("px")&&(h=h.replace(/px/g,"")),d.run(r,h,l)})},animObject:Eo,getDeferredAnimation:function(x,e,s){let r=Eo(e),l=s?[s]:x.series,h=0,d=0;return l.forEach(u=>{let f=Eo(u.options.animation);h=Lo(e)&&vu(e.defer)?r.defer:Math.max(h,f.duration+f.defer),d=Math.min(r.duration,f.duration)}),x.renderer.forExport&&(h=0),{defer:Math.max(0,h-d),duration:Math.min(h,d)}},setAnimation:function(x,e){e.renderer.globalAnimation=Cu(x,e.options.chart.animation,!0)},stop:La},{SVG_NS:Ea,win:Pu}=Y,{attr:Tu,createElement:Au,css:_u,error:Da,isFunction:Ou,isString:Ia,objectEach:Ra,splat:Lu}=ot,{trustedTypes:Do}=Pu,Us=Do&&Ou(Do.createPolicy)&&Do.createPolicy("highcharts",{createHTML:x=>x}),Eu=Us?Us.createHTML(""):"";class Lt{static filterUserAttributes(e){return Ra(e,(s,r)=>{let l=!0;Lt.allowedAttributes.indexOf(r)===-1&&(l=!1),["background","dynsrc","href","lowsrc","src"].indexOf(r)!==-1&&(l=Ia(s)&&Lt.allowedReferences.some(h=>s.indexOf(h)===0)),l||(Da(33,!1,void 0,{"Invalid attribute in config":`${r}`}),delete e[r]),Ia(s)&&e[r]&&(e[r]=s.replace(/</g,"<"))}),e}static parseStyle(e){return e.split(";").reduce((s,r)=>{let l=r.split(":").map(d=>d.trim()),h=l.shift();return h&&l.length&&(s[h.replace(/-([a-z])/g,d=>d[1].toUpperCase())]=l.join(":")),s},{})}static setElementHTML(e,s){e.innerHTML=Lt.emptyHTML,s&&new Lt(s).addToDOM(e)}constructor(e){this.nodes=typeof e=="string"?this.parseMarkup(e):e}addToDOM(e){return function s(r,l){let h;return Lu(r).forEach(function(d){let u,f=d.tagName,m=d.textContent?Y.doc.createTextNode(d.textContent):void 0,v=Lt.bypassHTMLFiltering;if(f)if(f==="#text")u=m;else if(Lt.allowedTags.indexOf(f)!==-1||v){let b=f==="svg"?Ea:l.namespaceURI||Ea,k=Y.doc.createElementNS(b,f),M=d.attributes||{};Ra(d,function(S,A){A!=="tagName"&&A!=="attributes"&&A!=="children"&&A!=="style"&&A!=="textContent"&&(M[A]=S)}),Tu(k,v?M:Lt.filterUserAttributes(M)),d.style&&_u(k,d.style),m&&k.appendChild(m),s(d.children||[],k),u=k}else Da(33,!1,void 0,{"Invalid tagName in config":f});u&&l.appendChild(u),h=u}),h}(this.nodes,e)}parseMarkup(e){let s,r=[];e=e.trim().replace(/ style=(["'])/g," data-style=$1");try{s=new DOMParser().parseFromString(Us?Us.createHTML(e):e,"text/html")}catch{}if(!s){let h=Au("div");h.innerHTML=e,s={body:h}}let l=(h,d)=>{let u=h.nodeName.toLowerCase(),f={tagName:u};u==="#text"&&(f.textContent=h.textContent||"");let m=h.attributes;if(m){let v={};[].forEach.call(m,b=>{b.name==="data-style"?f.style=Lt.parseStyle(b.value):v[b.name]=b.value}),f.attributes=v}if(h.childNodes.length){let v=[];[].forEach.call(h.childNodes,b=>{l(b,v)}),v.length&&(f.children=v)}d.push(f)};return[].forEach.call(s.body.childNodes,h=>l(h,r)),r}}Lt.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","disabled","dx","dy","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","in2","markerHeight","markerWidth","offset","opacity","operator","orient","padding","paddingLeft","paddingRight","patternUnits","r","radius","refX","refY","result","role","rowspan","scope","slope","src","startOffset","stdDeviation","stroke-linecap","stroke-width","stroke","style","summary","tabindex","tableValues","target","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],Lt.allowedReferences=["https://","http://","mailto:","/","../","./","#"],Lt.allowedTags=["#text","a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feComposite","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","tbody","td","text","textPath","th","thead","title","tr","tspan","u","ul"],Lt.emptyHTML=Eu,Lt.bypassHTMLFiltering=!1;let{defaultOptions:Ba,defaultTime:za}=de,{pageLang:Du}=Y,{extend:Iu,getNestedProperty:Ru,isArray:Bu,isNumber:Fa,isObject:zu,isString:Fu,pick:Nu,ucfirst:Wu}=ot,Ks={add:(x,e)=>x+e,divide:(x,e)=>e!==0?x/e:"",eq:(x,e)=>x==e,each:function(x){let e=arguments[arguments.length-1];return!!Bu(x)&&x.map((s,r)=>qs(e.body,Iu(zu(s)?s:{"@this":s},{"@index":r,"@first":r===0,"@last":r===x.length-1}))).join("")},ge:(x,e)=>x>=e,gt:(x,e)=>x>e,if:x=>!!x,le:(x,e)=>x<=e,lt:(x,e)=>x<e,multiply:(x,e)=>x*e,ne:(x,e)=>x!=e,subtract:(x,e)=>x-e,ucfirst:Wu,unless:x=>!x},Na={},Wa=x=>/^["'].+["']$/.test(x);function qs(x="",e,s){var T;let r=/\{([a-zA-Z\u00C0-\u017F\d:\.,;\-\/<>\[\]%_@+"'â= #\(\)]+)\}/g,l=/\(([a-zA-Z\u00C0-\u017F\d:\.,;\-\/<>\[\]%_@+"'= ]+)\)/g,h=[],d=/f$/,u=/\.(\d)/,f=((T=s==null?void 0:s.options)==null?void 0:T.lang)||Ba.lang,m=(s==null?void 0:s.time)||za,v=(s==null?void 0:s.numberFormatter)||Ha.bind(s),b=(P="")=>{let O;return P==="true"||P!=="false"&&((O=Number(P)).toString()===P?O:Wa(P)?P.slice(1,-1):Ru(P,e))},k,M,S=0,A;for(;(k=r.exec(x))!==null;){let P=k,O=l.exec(k[1]);O&&(k=O,A=!0),M!=null&&M.isBlock||(M={ctx:e,expression:k[1],find:k[0],isBlock:k[1].charAt(0)==="#",start:k.index,startInner:k.index+k[0].length,length:k[0].length});let E=(M.isBlock?P:k)[1].split(" ")[0].replace("#","");Ks[E]&&(M.isBlock&&E===M.fn&&S++,M.fn||(M.fn=E));let z=k[1]==="else";if(M.isBlock&&M.fn&&(k[1]===`/${M.fn}`||z))if(S)!z&&S--;else{let I=M.startInner,B=x.substr(I,k.index-I);M.body===void 0?(M.body=B,M.startInner=k.index+k[0].length):M.elseBody=B,M.find+=B+k[0],z||(h.push(M),M=void 0)}else M.isBlock||h.push(M);if(O&&!(M!=null&&M.isBlock))break}return h.forEach(P=>{let O,E,{body:z,elseBody:I,expression:B,fn:j}=P;if(j){let F=[P],H=[],G=B.length,U=0,q;for(E=0;E<=G;E++){let Q=B.charAt(E);q||Q!=='"'&&Q!=="'"?q===Q&&(q=""):q=Q,q||Q!==" "&&E!==G||(H.push(B.substr(U,E-U)),U=E+1)}for(E=Ks[j].length;E--;)F.unshift(b(H[E+1]));O=Ks[j].apply(e,F),P.isBlock&&typeof O=="boolean"&&(O=qs(O?z:I,e,s))}else{let F=Wa(B)?[B]:B.split(":"),H=(O=b(F.shift()||""))%1!=0;if(typeof O=="number"&&(F.length||H)){let G=F.join(":");if(d.test(G)||H){let U=parseInt((G.match(u)||["","-1"])[1],10);O!==null&&(O=v(O,U,f.decimalPoint,G.indexOf(",")>-1?f.thousandsSep:""))}else O=m.dateFormat(G,O)}l.lastIndex=0,l.test(P.find)&&Fu(O)&&(O=`"${O}"`)}x=x.replace(P.find,Nu(O,""))}),A?qs(x,e,s):x}function Ha(x,e,s,r){var A;e*=1;let l,h,[d,u]=(x=+x||0).toString().split("e").map(Number),f=((A=this==null?void 0:this.options)==null?void 0:A.lang)||Ba.lang,m=(x.toString().split(".")[1]||"").split("e")[0].length,v=e,b={};s??(s=f.decimalPoint),r??(r=f.thousandsSep),e===-1?e=Math.min(m,20):Fa(e)?e&&u<0&&((h=e+u)>=0?(d=+d.toExponential(h).split("e")[0],e=h):(d=Math.floor(d),x=e<20?+(d*Math.pow(10,u)).toFixed(e):0,u=0)):e=2,u&&(e??(e=2),x=d),Fa(e)&&e>=0&&(b.minimumFractionDigits=e,b.maximumFractionDigits=e),r===""&&(b.useGrouping=!1);let k=r||s,M=k?"en":(this==null?void 0:this.locale)||f.locale||Du,S=JSON.stringify(b)+M;return l=(Na[S]??(Na[S]=new Intl.NumberFormat(M,b))).format(x),k&&(l=l.replace(/([,\.])/g,"_$1").replace(/_\,/g,r??",").replace("_.",s??".")),(e||+l!=0)&&(!(u<0)||v)||(l="0"),u&&+l!=0&&(l+="e"+(u<0?"":"+")+u),l}let ue={dateFormat:function(x,e,s){return za.dateFormat(x,e,s)},format:qs,helpers:Ks,numberFormat:Ha};(function(x){let e;x.rendererTypes={},x.getRendererType=function(s=e){return x.rendererTypes[s]||x.rendererTypes[e]},x.registerRendererType=function(s,r,l){x.rendererTypes[s]=r,(!e||l)&&(e=s,Y.Renderer=r)}})(c||(c={}));let Qi=c,{clamp:Hu,pick:ju,pushUnique:Xu,stableSort:Io}=ot;(p||(p={})).distribute=function x(e,s,r){let l=e,h=l.reducedLen||s,d=(E,z)=>E.target-z.target,u=[],f=e.length,m=[],v=u.push,b,k,M,S=!0,A,T,P=0,O;for(b=f;b--;)P+=e[b].size;if(P>h){for(Io(e,(E,z)=>(z.rank||0)-(E.rank||0)),M=(O=e[0].rank===e[e.length-1].rank)?f/2:-1,k=O?M:f-1;M&&P>h;)A=e[b=Math.floor(k)],Xu(m,b)&&(P-=A.size),k+=M,O&&k>=e.length&&(M/=2,k=M);m.sort((E,z)=>z-E).forEach(E=>v.apply(u,e.splice(E,1)))}for(Io(e,d),e=e.map(E=>({size:E.size,targets:[E.target],align:ju(E.align,.5)}));S;){for(b=e.length;b--;)A=e[b],T=(Math.min.apply(0,A.targets)+Math.max.apply(0,A.targets))/2,A.pos=Hu(T-A.size*A.align,0,s-A.size);for(b=e.length,S=!1;b--;)b>0&&e[b-1].pos+e[b-1].size>e[b].pos&&(e[b-1].size+=e[b].size,e[b-1].targets=e[b-1].targets.concat(e[b].targets),e[b-1].align=.5,e[b-1].pos+e[b-1].size>s&&(e[b-1].pos=s-e[b-1].size),e.splice(b,1),S=!0)}return v.apply(l,u),b=0,e.some(E=>{let z=0;return(E.targets||[]).some(()=>(l[b].pos=E.pos+z,r!==void 0&&Math.abs(l[b].pos-l[b].target)>r?(l.slice(0,b+1).forEach(I=>delete I.pos),l.reducedLen=(l.reducedLen||s)-.1*s,l.reducedLen>.1*s&&x(l,s,r),!0):(z+=l[b].size,b++,!1)))}),Io(l,d),l};let Zs=p,{animate:Vu,animObject:Yu,stop:ja}=Jt,{deg2rad:Xa,doc:Ei,svg:Gu,SVG_NS:Qs,win:$u,isFirefox:Uu}=Y,{addEvent:Ku,attr:Ro,createElement:qu,crisp:Js,css:Va,defined:Te,erase:Zu,extend:Ji,fireEvent:Bo,getAlignFactor:zo,isArray:Ya,isFunction:Ga,isNumber:Qu,isObject:Ju,isString:$a,merge:Fo,objectEach:Di,pick:ze,pInt:tn,pushUnique:tf,replaceNested:ef,syncTimeout:sf,uniqueKey:Ua}=ot;class $t{_defaultGetter(e){let s=ze(this[e+"Value"],this[e],this.element?this.element.getAttribute(e):null,0);return/^-?[\d\.]+$/.test(s)&&(s=parseFloat(s)),s}_defaultSetter(e,s,r){r.setAttribute(s,e)}add(e){let s,r=this.renderer,l=this.element;return e&&(this.parentGroup=e),this.textStr!==void 0&&this.element.nodeName==="text"&&r.buildText(this),this.added=!0,(!e||e.handleZ||this.zIndex)&&(s=this.zIndexSetter()),s||(e?e.element:r.box).appendChild(l),this.onAdd&&this.onAdd(),this}addClass(e,s){let r=s?"":this.attr("class")||"";return(e=(e||"").split(/ /g).reduce(function(l,h){return r.indexOf(h)===-1&&l.push(h),l},r?[r]:[]).join(" "))!==r&&this.attr("class",e),this}afterSetters(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)}align(e,s,r,l=!0){let h=this.renderer,d=h.alignedObjects,u=!!e;e?(this.alignOptions=e,this.alignByTranslate=s,this.alignTo=r):(e=this.alignOptions||{},s=this.alignByTranslate,r=this.alignTo);let f=!r||$a(r)?r||"renderer":void 0;f&&(u&&tf(d,this),r=void 0);let m=ze(r,h[f],h),v=(m.x||0)+(e.x||0)+((m.width||0)-(e.width||0))*zo(e.align),b=(m.y||0)+(e.y||0)+((m.height||0)-(e.height||0))*zo(e.verticalAlign),k={"text-align":e==null?void 0:e.align};return k[s?"translateX":"x"]=Math.round(v),k[s?"translateY":"y"]=Math.round(b),l&&(this[this.placed?"animate":"attr"](k),this.placed=!0),this.alignAttr=k,this}alignSetter(e){let s={left:"start",center:"middle",right:"end"};s[e]&&(this.alignValue=e,this.element.setAttribute("text-anchor",s[e]))}animate(e,s,r){let l=Yu(ze(s,this.renderer.globalAnimation,!0)),h=l.defer;return Ei.hidden&&(l.duration=0),l.duration!==0?(r&&(l.complete=r),sf(()=>{this.element&&Vu(this,e,l)},h)):(this.attr(e,void 0,r||l.complete),Di(e,function(d,u){l.step&&l.step.call(this,d,{prop:u,pos:1,elem:this})},this)),this}applyTextOutline(e){let s=this.element;e.indexOf("contrast")!==-1&&(e=e.replace(/contrast/g,this.renderer.getContrast(s.style.fill)));let r=e.indexOf(" "),l=e.substring(r+1),h=e.substring(0,r);if(h&&h!=="none"&&Y.svg){this.fakeTS=!0,h=h.replace(/(^[\d\.]+)(.*?)$/g,function(v,b,k){return 2*Number(b)+k}),this.removeTextOutline();let d=Ei.createElementNS(Qs,"tspan");Ro(d,{class:"highcharts-text-outline",fill:l,stroke:l,"stroke-width":h,"stroke-linejoin":"round"});let u=s.querySelector("textPath")||s;[].forEach.call(u.childNodes,v=>{let b=v.cloneNode(!0);b.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(k=>b.removeAttribute(k)),d.appendChild(b)});let f=0;[].forEach.call(u.querySelectorAll("text tspan"),v=>{f+=Number(v.getAttribute("dy"))});let m=Ei.createElementNS(Qs,"tspan");m.textContent="â",Ro(m,{x:Number(s.getAttribute("x")),dy:-f}),d.appendChild(m),u.insertBefore(d,u.firstChild)}}attr(e,s,r,l){let{element:h}=this,d=$t.symbolCustomAttribs,u,f,m=this,v;return typeof e=="string"&&s!==void 0&&(u=e,(e={})[u]=s),typeof e=="string"?m=(this[e+"Getter"]||this._defaultGetter).call(this,e,h):(Di(e,function(b,k){v=!1,l||ja(this,k),this.symbolName&&d.indexOf(k)!==-1&&(f||(this.symbolAttr(e),f=!0),v=!0),this.rotation&&(k==="x"||k==="y")&&(this.doTransform=!0),v||(this[k+"Setter"]||this._defaultSetter).call(this,b,k,h)},this),this.afterSetters()),r&&r.call(this),m}clip(e){if(e&&!e.clipPath){let s=Ua()+"-",r=this.renderer.createElement("clipPath").attr({id:s}).add(this.renderer.defs);Ji(e,{clipPath:r,id:s,count:0}),e.add(r)}return this.attr("clip-path",e?`url(${this.renderer.url}#${e.id})`:"none")}crisp(e,s){s=Math.round(s||e.strokeWidth||0);let r=e.x||this.x||0,l=e.y||this.y||0,h=(e.width||this.width||0)+r,d=(e.height||this.height||0)+l,u=Js(r,s),f=Js(l,s);return Ji(e,{x:u,y:f,width:Js(h,s)-u,height:Js(d,s)-f}),Te(e.strokeWidth)&&(e.strokeWidth=s),e}complexColor(e,s,r){let l=this.renderer,h,d,u,f,m,v,b,k,M,S,A=[],T;Bo(this.renderer,"complexColor",{args:arguments},function(){if(e.radialGradient?d="radialGradient":e.linearGradient&&(d="linearGradient"),d){if(u=e[d],m=l.gradients,v=e.stops,M=r.radialReference,Ya(u)&&(e[d]=u={x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientUnits:"userSpaceOnUse"}),d==="radialGradient"&&M&&!Te(u.gradientUnits)&&(f=u,u=Fo(u,l.getRadialAttr(M,f),{gradientUnits:"userSpaceOnUse"})),Di(u,function(P,O){O!=="id"&&A.push(O,P)}),Di(v,function(P){A.push(P)}),m[A=A.join(",")])S=m[A].attr("id");else{u.id=S=Ua();let P=m[A]=l.createElement(d).attr(u).add(l.defs);P.radAttr=f,P.stops=[],v.forEach(function(O){O[1].indexOf("rgba")===0?(b=(h=It.parse(O[1])).get("rgb"),k=h.get("a")):(b=O[1],k=1);let E=l.createElement("stop").attr({offset:O[0],"stop-color":b,"stop-opacity":k}).add(P);P.stops.push(E)})}T="url("+l.url+"#"+S+")",r.setAttribute(s,T),r.gradient=A,e.toString=function(){return T}}})}css(e){let s=this.styles,r={},l=this.element,h,d=!s;if(s&&Di(e,function(u,f){s&&s[f]!==u&&(r[f]=u,d=!0)}),d){s&&(e=Ji(s,r)),e.width===null||e.width==="auto"?delete this.textWidth:l.nodeName.toLowerCase()==="text"&&e.width&&(h=this.textWidth=tn(e.width)),Ji(this.styles,e),h&&!Gu&&this.renderer.forExport&&delete e.width;let u=Uu&&e.fontSize||null;u&&(Qu(u)||/^\d+$/.test(u))&&(e.fontSize+="px");let f=Fo(e);l.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","whiteSpace","width"].forEach(m=>f&&delete f[m]),f.color&&(f.fill=f.color,delete f.color)),Va(l,f)}return this.added&&(this.element.nodeName==="text"&&this.renderer.buildText(this),e.textOutline&&this.applyTextOutline(e.textOutline)),this}dashstyleSetter(e){let s,r=this["stroke-width"];if(r==="inherit"&&(r=1),e){let l=(e=e.toLowerCase()).replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(s=l.length;s--;)l[s]=""+tn(l[s])*ze(r,NaN);e=l.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",e)}}destroy(){let e=this,s=e.element||{},r=e.renderer,l=s.ownerSVGElement,h=s.nodeName==="SPAN"&&e.parentGroup||void 0,d,u;if(s.onclick=s.onmouseout=s.onmouseover=s.onmousemove=s.point=null,ja(e),e.clipPath&&l){let f=e.clipPath;[].forEach.call(l.querySelectorAll("[clip-path],[CLIP-PATH]"),function(m){m.getAttribute("clip-path").indexOf(f.element.id)>-1&&m.removeAttribute("clip-path")}),e.clipPath=f.destroy()}if(e.stops){for(u=0;u<e.stops.length;u++)e.stops[u].destroy();e.stops.length=0,e.stops=void 0}for(e.safeRemoveChild(s);h!=null&&h.div&&h.div.childNodes.length===0;)d=h.parentGroup,e.safeRemoveChild(h.div),delete h.div,h=d;e.alignOptions&&Zu(r.alignedObjects,e),Di(e,(f,m)=>{var v,b,k;(((v=e[m])==null?void 0:v.parentGroup)===e||["connector","foreignObject"].indexOf(m)!==-1)&&((k=(b=e[m])==null?void 0:b.destroy)==null||k.call(b)),delete e[m]})}dSetter(e,s,r){Ya(e)&&(typeof e[0]=="string"&&(e=this.renderer.pathToSegments(e)),this.pathArray=e,e=e.reduce((l,h,d)=>h!=null&&h.join?(d?l+" ":"")+h.join(" "):(h||"").toString(),"")),/(NaN| {2}|^$)/.test(e)&&(e="M 0 0"),this[s]!==e&&(r.setAttribute(s,e),this[s]=e)}fillSetter(e,s,r){typeof e=="string"?r.setAttribute(s,e):e&&this.complexColor(e,s,r)}hrefSetter(e,s,r){r.setAttributeNS("http://www.w3.org/1999/xlink",s,e)}getBBox(e,s){let r,l,h,d,{alignValue:u,element:f,renderer:m,styles:v,textStr:b}=this,{cache:k,cacheKeys:M}=m,S=f.namespaceURI===this.SVG_NS,A=ze(s,this.rotation,0),T=m.styledMode?f&&$t.prototype.getStyle.call(f,"font-size"):v.fontSize;if(Te(b)&&((d=b.toString()).indexOf("<")===-1&&(d=d.replace(/\d/g,"0")),d+=["",m.rootFontSize,T,A,this.textWidth,u,v.lineClamp,v.textOverflow,v.fontWeight].join(",")),d&&!e&&(r=k[d]),!r||r.polygon){if(S||m.forExport){try{h=this.fakeTS&&function(O){let E=f.querySelector(".highcharts-text-outline");E&&Va(E,{display:O})},Ga(h)&&h("none"),r=f.getBBox?Ji({},f.getBBox()):{width:f.offsetWidth,height:f.offsetHeight,x:0,y:0},Ga(h)&&h("")}catch{}(!r||r.width<0)&&(r={x:0,y:0,width:0,height:0})}else r=this.htmlGetBBox();l=r.height,S&&(r.height=l={"11px,17":14,"13px,20":16}[`${T||""},${Math.round(l)}`]||l),A&&(r=this.getRotatedBox(r,A));let P={bBox:r};Bo(this,"afterGetBBox",P),r=P.bBox}if(d&&(b===""||r.height>0)){for(;M.length>250;)delete k[M.shift()];k[d]||M.push(d),k[d]=r}return r}getRotatedBox(e,s){let{x:r,y:l,width:h,height:d}=e,{alignValue:u,translateY:f,rotationOriginX:m=0,rotationOriginY:v=0}=this,b=zo(u),k=Number(this.element.getAttribute("y")||0)-(f?0:l),M=s*Xa,S=(s-90)*Xa,A=Math.cos(M),T=Math.sin(M),P=h*A,O=h*T,E=Math.cos(S),z=Math.sin(S),[[I,B],[j,F]]=[m,v].map(gt=>[gt-gt*A,gt*T]),H=r+b*(h-P)+I+F+k*E,G=H+P,U=G-d*E,q=U-P,Q=l+k-b*O-B+j+k*z,et=Q+O,tt=et-d*z,it=tt-O,J=Math.min(H,G,U,q),st=Math.min(Q,et,tt,it),ct=Math.max(H,G,U,q)-J,ft=Math.max(Q,et,tt,it)-st;return{x:J,y:st,width:ct,height:ft,polygon:[[H,Q],[G,et],[U,tt],[q,it]]}}getStyle(e){return $u.getComputedStyle(this.element||this,"").getPropertyValue(e)}hasClass(e){return(""+this.attr("class")).split(" ").indexOf(e)!==-1}hide(){return this.attr({visibility:"hidden"})}htmlGetBBox(){return{height:0,width:0,x:0,y:0}}constructor(e,s){this.onEvents={},this.opacity=1,this.SVG_NS=Qs,this.element=s==="span"||s==="body"?qu(s):Ei.createElementNS(this.SVG_NS,s),this.renderer=e,this.styles={},Bo(this,"afterInit")}on(e,s){let{onEvents:r}=this;return r[e]&&r[e](),r[e]=Ku(this.element,e,s),this}opacitySetter(e,s,r){let l=Number(Number(e).toFixed(3));this.opacity=l,r.setAttribute(s,l)}reAlign(){var e;(e=this.alignOptions)!=null&&e.width&&this.alignOptions.align!=="left"&&(this.alignOptions.width=this.getBBox().width,this.placed=!1,this.align())}removeClass(e){return this.attr("class",(""+this.attr("class")).replace($a(e)?RegExp(`(^| )${e}( |$)`):e," ").replace(/ +/g," ").trim())}removeTextOutline(){let e=this.element.querySelector("tspan.highcharts-text-outline");e&&this.safeRemoveChild(e)}safeRemoveChild(e){let s=e.parentNode;s&&s.removeChild(e)}setRadialReference(e){let s=this.element.gradient&&this.renderer.gradients[this.element.gradient]||void 0;return this.element.radialReference=e,s!=null&&s.radAttr&&s.animate(this.renderer.getRadialAttr(e,s.radAttr)),this}shadow(e){var h;let{renderer:s}=this,r=Fo(((h=this.parentGroup)==null?void 0:h.rotation)===90?{offsetX:-1,offsetY:-1}:{},Ju(e)?e:{}),l=s.shadowDefinition(r);return this.attr({filter:e?`url(${s.url}#${l})`:"none"})}show(e=!0){return this.attr({visibility:e?"inherit":"visible"})}"stroke-widthSetter"(e,s,r){this[s]=e,r.setAttribute(s,e)}strokeWidth(){if(!this.renderer.styledMode)return this["stroke-width"]||0;let e=this.getStyle("stroke-width"),s=0,r;return/px$/.test(e)?s=tn(e):e!==""&&(Ro(r=Ei.createElementNS(Qs,"rect"),{width:e,"stroke-width":0}),this.element.parentNode.appendChild(r),s=r.getBBox().width,r.parentNode.removeChild(r)),s}symbolAttr(e){let s=this;$t.symbolCustomAttribs.forEach(function(r){s[r]=ze(e[r],s[r])}),s.attr({d:s.renderer.symbols[s.symbolName](s.x,s.y,s.width,s.height,s)})}textSetter(e){e!==this.textStr&&(delete this.textPxLength,this.textStr=e,this.added&&this.renderer.buildText(this),this.reAlign())}titleSetter(e){let s=this.element,r=s.getElementsByTagName("title")[0]||Ei.createElementNS(this.SVG_NS,"title");s.insertBefore?s.insertBefore(r,s.firstChild):s.appendChild(r),r.textContent=ef(ze(e,""),[/<[^>]*>/g,""]).replace(/</g,"<").replace(/>/g,">")}toFront(){let e=this.element;return e.parentNode.appendChild(e),this}translate(e,s){return this.attr({translateX:e,translateY:s})}updateTransform(e="transform"){let{element:s,foreignObject:r,matrix:l,padding:h,rotation:d=0,rotationOriginX:u,rotationOriginY:f,scaleX:m,scaleY:v,text:b,translateX:k=0,translateY:M=0}=this,S=["translate("+k+","+M+")"];Te(l)&&S.push("matrix("+l.join(",")+")"),d&&(S.push("rotate("+d+" "+(u??s.getAttribute("x")??this.x??0)+" "+(f??s.getAttribute("y")??this.y??0)+")"),(b==null?void 0:b.element.tagName)!=="SPAN"||b!=null&&b.foreignObject||b.attr({rotation:d,rotationOriginX:(u||0)-h,rotationOriginY:(f||0)-h})),(Te(m)||Te(v))&&S.push("scale("+ze(m,1)+" "+ze(v,1)+")"),S.length&&!(b||this).textPath&&((r==null?void 0:r.element)||s).setAttribute(e,S.join(" "))}visibilitySetter(e,s,r){e==="inherit"?r.removeAttribute(s):this[s]!==e&&r.setAttribute(s,e),this[s]=e}xGetter(e){return this.element.nodeName==="circle"&&(e==="x"?e="cx":e==="y"&&(e="cy")),this._defaultGetter(e)}zIndexSetter(e,s){let r=this.renderer,l=this.parentGroup,h=(l||r).element||r.box,d=this.element,u=h===r.box,f,m,v,b=!1,k,M=this.added,S;if(Te(e)?(d.setAttribute("data-z-index",e),e*=1,this[s]===e&&(M=!1)):Te(this[s])&&d.removeAttribute("data-z-index"),this[s]=e,M){for((e=this.zIndex)&&l&&(l.handleZ=!0),S=(f=h.childNodes).length-1;S>=0&&!b;S--)k=!Te(v=(m=f[S]).getAttribute("data-z-index")),m!==d&&(e<0&&k&&!u&&!S?(h.insertBefore(d,f[S]),b=!0):(tn(v)<=e||k&&(!Te(e)||e>=0))&&(h.insertBefore(d,f[S+1]),b=!0));b||(h.insertBefore(d,f[3*!!u]),b=!0)}return b}}$t.symbolCustomAttribs=["anchorX","anchorY","clockwise","end","height","innerR","r","start","width","x","y"],$t.prototype.strokeSetter=$t.prototype.fillSetter,$t.prototype.yGetter=$t.prototype.xGetter,$t.prototype.matrixSetter=$t.prototype.rotationOriginXSetter=$t.prototype.rotationOriginYSetter=$t.prototype.rotationSetter=$t.prototype.scaleXSetter=$t.prototype.scaleYSetter=$t.prototype.translateXSetter=$t.prototype.translateYSetter=$t.prototype.verticalAlignSetter=function(x,e){this[e]=x,this.doTransform=!0};let Ae=$t,{defined:Ka,extend:nf,getAlignFactor:qa,isNumber:ts,merge:of,pick:en,removeEvent:Za}=ot;class ui extends Ae{constructor(e,s,r,l,h,d,u,f,m,v){let b;super(e,"g"),this.paddingLeftSetter=this.paddingSetter,this.paddingRightSetter=this.paddingSetter,this.doUpdate=!1,this.textStr=s,this.x=r,this.y=l,this.anchorX=d,this.anchorY=u,this.baseline=m,this.className=v,this.addClass(v==="button"?"highcharts-no-tooltip":"highcharts-label"),v&&this.addClass("highcharts-"+v),this.text=e.text(void 0,0,0,f).attr({zIndex:1}),typeof h=="string"&&((b=/^url\((.*?)\)$/.test(h))||this.renderer.symbols[h])&&(this.symbolKey=h),this.bBox=ui.emptyBBox,this.padding=3,this.baselineOffset=0,this.needsBox=e.styledMode||b,this.deferredAttr={},this.alignFactor=0}alignSetter(e){let s=qa(e);this.textAlign=e,s!==this.alignFactor&&(this.alignFactor=s,this.bBox&&ts(this.xSetting)&&this.attr({x:this.xSetting}))}anchorXSetter(e,s){this.anchorX=e,this.boxAttr(s,Math.round(e)-this.getCrispAdjust()-this.xSetting)}anchorYSetter(e,s){this.anchorY=e,this.boxAttr(s,e-this.ySetting)}boxAttr(e,s){this.box?this.box.attr(e,s):this.deferredAttr[e]=s}css(e){if(e){let s={};e=of(e),ui.textProps.forEach(r=>{e[r]!==void 0&&(s[r]=e[r],delete e[r])}),this.text.css(s),"fontSize"in s||"fontWeight"in s?this.updateTextPadding():("width"in s||"textOverflow"in s)&&this.updateBoxSize()}return Ae.prototype.css.call(this,e)}destroy(){Za(this.element,"mouseenter"),Za(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),Ae.prototype.destroy.call(this)}fillSetter(e,s){e&&(this.needsBox=!0),this.fill=e,this.boxAttr(s,e)}getBBox(e,s){this.textStr&&this.bBox.width===0&&this.bBox.height===0&&this.updateBoxSize();let{padding:r,height:l=0,translateX:h=0,translateY:d=0,width:u=0}=this,f=en(this.paddingLeft,r),m=s??(this.rotation||0),v={width:u,height:l,x:h+this.bBox.x-f,y:d+this.bBox.y-r+this.baselineOffset};return m&&(v=this.getRotatedBox(v,m)),v}getCrispAdjust(){return(this.renderer.styledMode&&this.box?this.box.strokeWidth():this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2}heightSetter(e){this.heightSetting=e,this.doUpdate=!0}afterSetters(){super.afterSetters(),this.doUpdate&&(this.updateBoxSize(),this.doUpdate=!1)}onAdd(){this.text.add(this),this.attr({text:en(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&Ka(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})}paddingSetter(e,s){ts(e)?e!==this[s]&&(this[s]=e,this.updateTextPadding()):this[s]=void 0}rSetter(e,s){this.boxAttr(s,e)}strokeSetter(e,s){this.stroke=e,this.boxAttr(s,e)}"stroke-widthSetter"(e,s){e&&(this.needsBox=!0),this["stroke-width"]=e,this.boxAttr(s,e)}"text-alignSetter"(e){this.textAlign=this["text-align"]=e,this.updateTextPadding()}textSetter(e){e!==void 0&&this.text.attr({text:e}),this.updateTextPadding(),this.reAlign()}updateBoxSize(){let e,s=this.text,r={},l=this.padding,h=this.bBox=(!ts(this.widthSetting)||!ts(this.heightSetting)||this.textAlign)&&Ka(s.textStr)?s.getBBox(void 0,0):ui.emptyBBox;this.width=this.getPaddedWidth(),this.height=(this.heightSetting||h.height||0)+2*l;let d=this.renderer.fontMetrics(s);if(this.baselineOffset=l+Math.min((this.text.firstLineMetrics||d).b,h.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-d.h)/2),this.needsBox&&!s.textPath){if(!this.box){let u=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect();u.addClass((this.className==="button"?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),u.add(this)}r.x=e=this.getCrispAdjust(),r.y=(this.baseline?-this.baselineOffset:0)+e,r.width=Math.round(this.width),r.height=Math.round(this.height),this.box.attr(nf(r,this.deferredAttr)),this.deferredAttr={}}}updateTextPadding(){let e=this.text,s=e.styles.textAlign||this.textAlign;if(!e.textPath){this.updateBoxSize();let r=this.baseline?0:this.baselineOffset,l=(this.paddingLeft??this.padding)+qa(s)*(this.widthSetting??this.bBox.width);(l!==e.x||r!==e.y)&&(e.attr({align:s,x:l}),r!==void 0&&e.attr("y",r)),e.x=l,e.y=r}}widthSetter(e){this.widthSetting=ts(e)?e:void 0,this.doUpdate=!0}getPaddedWidth(){let e=this.padding,s=en(this.paddingLeft,e),r=en(this.paddingRight,e);return(this.widthSetting||this.bBox.width||0)+s+r}xSetter(e){this.x=e,this.alignFactor&&(e-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.anchorX&&(this["forceAnimate:anchorX"]=!0),this.xSetting=Math.round(e),this.attr("translateX",this.xSetting)}ySetter(e){this.anchorY&&(this["forceAnimate:anchorY"]=!0),this.ySetting=this.y=Math.round(e),this.attr("translateY",this.ySetting)}}ui.emptyBBox={width:0,height:0,x:0,y:0},ui.textProps=["color","direction","fontFamily","fontSize","fontStyle","fontWeight","lineClamp","lineHeight","textAlign","textDecoration","textOutline","textOverflow","whiteSpace","width"];let{defined:Qa,isNumber:rf,pick:es}=ot;function Ja(x,e,s,r,l){let h=[];if(l){let d=l.start||0,u=l.end||0,f=es(l.r,s),m=es(l.r,r||s),v=2e-4/(l.borderRadius?1:Math.max(f,1)),b=Math.abs(u-d-2*Math.PI)<v;b&&(d=Math.PI/2,u=2.5*Math.PI-v);let k=l.innerR,M=es(l.open,b),S=Math.cos(d),A=Math.sin(d),T=Math.cos(u),P=Math.sin(u),O=es(l.longArc,u-d-Math.PI<v?0:1),E=["A",f,m,0,O,es(l.clockwise,1),x+f*T,e+m*P];E.params={start:d,end:u,cx:x,cy:e},h.push(["M",x+f*S,e+m*A],E),Qa(k)&&((E=["A",k,k,0,O,Qa(l.clockwise)?1-l.clockwise:0,x+k*S,e+k*A]).params={start:u,end:d,cx:x,cy:e},h.push(M?["M",x+k*T,e+k*P]:["L",x+k*T,e+k*P],E)),M||h.push(["Z"])}return h}function tl(x,e,s,r,l){return l!=null&&l.r?No(x,e,s,r,l):[["M",x,e],["L",x+s,e],["L",x+s,e+r],["L",x,e+r],["Z"]]}function No(x,e,s,r,l){let h=(l==null?void 0:l.r)||0;return[["M",x+h,e],["L",x+s-h,e],["A",h,h,0,0,1,x+s,e+h],["L",x+s,e+r-h],["A",h,h,0,0,1,x+s-h,e+r],["L",x+h,e+r],["A",h,h,0,0,1,x,e+r-h],["L",x,e+h],["A",h,h,0,0,1,x+h,e],["Z"]]}let el={arc:Ja,callout:function(x,e,s,r,l){let h=Math.min((l==null?void 0:l.r)||0,s,r),d=h+6,u=l==null?void 0:l.anchorX,f=(l==null?void 0:l.anchorY)||0,m=No(x,e,s,r,{r:h});if(!rf(u)||u<s&&u>0&&f<r&&f>0)return m;if(x+u>s-d)if(f>e+d&&f<e+r-d)m.splice(3,1,["L",x+s,f-6],["L",x+s+6,f],["L",x+s,f+6],["L",x+s,e+r-h]);else if(u<s){let v=f<e+d,b=v?e:e+r;m.splice(v?2:5,0,["L",u,f],["L",x+s-h,b])}else m.splice(3,1,["L",x+s,r/2],["L",u,f],["L",x+s,r/2],["L",x+s,e+r-h]);else if(x+u<d)if(f>e+d&&f<e+r-d)m.splice(7,1,["L",x,f+6],["L",x-6,f],["L",x,f-6],["L",x,e+h]);else if(u>0){let v=f<e+d,b=v?e:e+r;m.splice(v?1:6,0,["L",u,f],["L",x+h,b])}else m.splice(7,1,["L",x,r/2],["L",u,f],["L",x,r/2],["L",x,e+h]);else f>r&&u<s-d?m.splice(5,1,["L",u+6,e+r],["L",u,e+r+6],["L",u-6,e+r],["L",x+h,e+r]):f<0&&u>d&&m.splice(1,1,["L",u-6,e],["L",u,e-6],["L",u+6,e],["L",s-h,e]);return m},circle:function(x,e,s,r){return Ja(x+s/2,e+r/2,s/2,r/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(x,e,s,r){return[["M",x+s/2,e],["L",x+s,e+r/2],["L",x+s/2,e+r],["L",x,e+r/2],["Z"]]},rect:tl,roundedRect:No,square:tl,triangle:function(x,e,s,r){return[["M",x+s/2,e],["L",x+s,e+r],["L",x,e+r],["Z"]]},"triangle-down":function(x,e,s,r){return[["M",x,e],["L",x+s,e],["L",x+s/2,e+r],["Z"]]}},{doc:Wo,SVG_NS:af,win:il}=Y,{attr:Ho,extend:lf,fireEvent:hf,isString:cf,objectEach:df,pick:uf}=ot,jo=(x,e)=>x.substring(0,e)+"â¦",ff=class{constructor(x){let e=x.styles;this.renderer=x.renderer,this.svgElement=x,this.width=x.textWidth,this.textLineHeight=e==null?void 0:e.lineHeight,this.textOutline=e==null?void 0:e.textOutline,this.ellipsis=(e==null?void 0:e.textOverflow)==="ellipsis",this.lineClamp=e==null?void 0:e.lineClamp,this.noWrap=(e==null?void 0:e.whiteSpace)==="nowrap"}buildSVG(){let x=this.svgElement,e=x.element,s=x.renderer,r=uf(x.textStr,"").toString(),l=r.indexOf("<")!==-1,h=e.childNodes,d=!x.added&&s.box,u=[r,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,x.getStyle("font-size"),x.styles.lineClamp,this.width].join(",");if(u!==x.textCache){x.textCache=u,delete x.actualWidth;for(let f=h.length;f--;)e.removeChild(h[f]);if(l||this.ellipsis||this.width||x.textPath||r.indexOf(" ")!==-1&&(!this.noWrap||/<br.*?>/g.test(r))){if(r!==""){d&&d.appendChild(e);let f=new Lt(r);this.modifyTree(f.nodes),f.addToDOM(e),this.modifyDOM(),this.ellipsis&&(e.textContent||"").indexOf("â¦")!==-1&&x.attr("title",this.unescapeEntities(x.textStr||"",["<",">"])),d&&d.removeChild(e)}}else e.appendChild(Wo.createTextNode(this.unescapeEntities(r)));cf(this.textOutline)&&x.applyTextOutline&&x.applyTextOutline(this.textOutline)}}modifyDOM(){let x,e=this.svgElement,s=Ho(e.element,"x");for(e.firstLineMetrics=void 0;(x=e.element.firstChild)&&/^[\s\u200B]*$/.test(x.textContent||" ");)e.element.removeChild(x);[].forEach.call(e.element.querySelectorAll("tspan.highcharts-br"),(d,u)=>{d.nextSibling&&d.previousSibling&&(u===0&&d.previousSibling.nodeType===1&&(e.firstLineMetrics=e.renderer.fontMetrics(d.previousSibling)),Ho(d,{dy:this.getLineHeight(d.nextSibling),x:s}))});let r=this.width||0;if(!r)return;let l=(d,u)=>{var A;let f=d.textContent||"",m=f.replace(/([^\^])-/g,"$1- ").split(" "),v=!this.noWrap&&(m.length>1||e.element.childNodes.length>1),b=this.getLineHeight(u),k=Math.max(0,r-.8*b),M=0,S=e.actualWidth;if(v){let T=[],P=[];for(;u.firstChild&&u.firstChild!==d;)P.push(u.firstChild),u.removeChild(u.firstChild);for(;m.length;)if(m.length&&!this.noWrap&&M>0&&(T.push(d.textContent||""),d.textContent=m.join(" ").replace(/- /g,"-")),this.truncate(d,void 0,m,M===0&&S||0,r,k,(O,E)=>m.slice(0,E).join(" ").replace(/- /g,"-")),S=e.actualWidth,M++,this.lineClamp&&M>=this.lineClamp){m.length&&(this.truncate(d,d.textContent||"",void 0,0,r,k,jo),d.textContent=((A=d.textContent)==null?void 0:A.replace("â¦",""))+"â¦");break}P.forEach(O=>{u.insertBefore(O,d)}),T.forEach(O=>{u.insertBefore(Wo.createTextNode(O),d);let E=Wo.createElementNS(af,"tspan");E.textContent="â",Ho(E,{dy:b,x:s}),u.insertBefore(E,d)})}else this.ellipsis&&f&&this.truncate(d,f,void 0,0,r,k,jo)},h=d=>{[].slice.call(d.childNodes).forEach(u=>{u.nodeType===il.Node.TEXT_NODE?l(u,d):(u.className.baseVal.indexOf("highcharts-br")!==-1&&(e.actualWidth=0),h(u))})};h(e.element)}getLineHeight(x){let e=x.nodeType===il.Node.TEXT_NODE?x.parentElement:x;return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(e||this.svgElement.element).h}modifyTree(x){let e=(s,r)=>{let{attributes:l={},children:h,style:d={},tagName:u}=s,f=this.renderer.styledMode;if(u==="b"||u==="strong"?f?l.class="highcharts-strong":d.fontWeight="bold":(u==="i"||u==="em")&&(f?l.class="highcharts-emphasized":d.fontStyle="italic"),d!=null&&d.color&&(d.fill=d.color),u==="br"){l.class="highcharts-br",s.textContent="â";let m=x[r+1];m!=null&&m.textContent&&(m.textContent=m.textContent.replace(/^ +/gm,""))}else u==="a"&&h&&h.some(m=>m.tagName==="#text")&&(s.children=[{children:h,tagName:"tspan"}]);u!=="#text"&&u!=="a"&&(s.tagName="tspan"),lf(s,{attributes:l,style:d}),h&&h.filter(m=>m.tagName!=="#text").forEach(e)};x.forEach(e),hf(this.svgElement,"afterModifyTree",{nodes:x})}truncate(x,e,s,r,l,h,d){let u,f,m=this.svgElement,{rotation:v}=m,b=[],k=s&&!r?1:0,M=(e||s||"").length,S=M;s||(l=h);let A=function(T,P){let O=P||T,E=x.parentNode;if(E&&b[O]===void 0&&E.getSubStringLength)try{b[O]=r+E.getSubStringLength(0,s?O+1:O)}catch{}return b[O]};if(m.rotation=0,r+(f=A(x.textContent.length))>l){for(;k<=M;)S=Math.ceil((k+M)/2),s&&(u=d(s,S)),f=A(S,u&&u.length-1),k===M?k=M+1:f>l?M=S-1:k=S;M===0?x.textContent="":e&&M===e.length-1||(x.textContent=u||d(e||s,S)),this.ellipsis&&f>l&&this.truncate(x,x.textContent||"",void 0,0,l,h,jo)}s&&s.splice(0,S),m.actualWidth=f,m.rotation=v}unescapeEntities(x,e){return df(this.renderer.escapes,function(s,r){e&&e.indexOf(s)!==-1||(x=x.toString().replace(RegExp(s,"g"),r))}),x}},{defaultOptions:pf}=de,{charts:gf,deg2rad:sl,doc:Ii,isFirefox:nl,isMS:ol,isWebKit:mf,noop:xf,SVG_NS:bf,symbolSizes:Xo,win:Vo}=Y,{addEvent:sn,attr:nn,createElement:yf,crisp:rl,css:on,defined:fi,destroyObjectProperties:vf,extend:pi,isArray:kf,isNumber:gi,isObject:is,isString:wf,merge:Yo,pick:Go,pInt:Mf,replaceNested:Sf,uniqueKey:Cf}=ot;class rn{constructor(e,s,r,l,h,d,u){let f,m;this.x=0,this.y=0;let v=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),b=v.element;u||v.css(this.getStyle(l||{})),e.appendChild(b),nn(e,"dir","ltr"),e.innerHTML.indexOf("xmlns")===-1&&nn(b,"xmlns",this.SVG_NS),this.box=b,this.boxWrapper=v,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(Ii.createTextNode("Created with Highcharts 12.4.0")),this.defs=this.createElement("defs").add(),this.allowHTML=d,this.forExport=h,this.styledMode=u,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.rootFontSize=v.getStyle("font-size"),this.setSize(s,r,!1),nl&&e.getBoundingClientRect&&((f=function(){on(e,{left:0,top:0}),m=e.getBoundingClientRect(),on(e,{left:Math.ceil(m.left)-m.left+"px",top:Math.ceil(m.top)-m.top+"px"})})(),this.unSubPixelFix=sn(Vo,"resize",f))}definition(e){return new Lt([e]).addToDOM(this.defs.element)}getReferenceURL(){if((nl||mf)&&Ii.getElementsByTagName("base").length){if(!fi(o)){let e=Cf(),s=new Lt([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:e},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":`url(#${e})`,fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(Ii.body);on(s,{position:"fixed",top:0,left:0,zIndex:9e5});let r=Ii.elementFromPoint(6,6);o=(r==null?void 0:r.id)==="hitme",Ii.body.removeChild(s)}if(o)return Sf(Vo.location.href.split("#")[0],[/<[^>]*>/g,""],[/([\('\)])/g,"\\$1"],[/ /g,"%20"])}return""}getStyle(e){return this.style=pi({fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif',fontSize:"1rem"},e),this.style}setStyle(e){this.boxWrapper.css(this.getStyle(e))}isHidden(){return!this.boxWrapper.getBBox().width}destroy(){let e=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),vf(this.gradients||{}),this.gradients=null,this.defs=e.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null,null}createElement(e){return new this.Element(this,e)}getRadialAttr(e,s){return{cx:e[0]-e[2]/2+(s.cx||0)*e[2],cy:e[1]-e[2]/2+(s.cy||0)*e[2],r:(s.r||0)*e[2]}}shadowDefinition(e){let s=[`highcharts-drop-shadow-${this.chartIndex}`,...Object.keys(e).map(l=>`${l}-${e[l]}`)].join("-").toLowerCase().replace(/[^a-z\d\-]/g,""),r=Yo({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},e);return this.defs.element.querySelector(`#${s}`)||this.definition({tagName:"filter",attributes:{id:s,filterUnits:r.filterUnits},children:this.getShadowFilterContent(r)}),s}getShadowFilterContent(e){return[{tagName:"feDropShadow",attributes:{dx:e.offsetX,dy:e.offsetY,"flood-color":e.color,"flood-opacity":Math.min(5*e.opacity,1),stdDeviation:e.width/2}}]}buildText(e){new ff(e).buildSVG()}getContrast(e){if(e==="transparent")return"#000000";let s=It.parse(e).rgba,r=" clamp(0,calc(9e9*(0.5 - (0.2126*r + 0.7152*g + 0.0722*b))),1)";if(gi(s[0])||!It.useColorMix){let l=s.map(d=>{let u=d/255;return u<=.04?u/12.92:Math.pow((u+.055)/1.055,2.4)}),h=.2126*l[0]+.7152*l[1]+.0722*l[2];return 1.05/(h+.05)>(h+.05)/.05?"#FFFFFF":"#000000"}return"color(from "+e+" srgb"+r+r+r+")"}button(e,s,r,l,h={},d,u,f,m,v){let b=this.label(e,s,r,m,void 0,void 0,v,void 0,"button"),k=this.styledMode,M=arguments,S=0;h=Yo(pf.global.buttonTheme,h),k&&(delete h.fill,delete h.stroke,delete h["stroke-width"]);let A=h.states||{},T=h.style||{};delete h.states,delete h.style;let P=[Lt.filterUserAttributes(h)],O=[T];return k||["hover","select","disabled"].forEach((E,z)=>{P.push(Yo(P[0],Lt.filterUserAttributes(M[z+5]||A[E]||{}))),O.push(P[z+1].style),delete P[z+1].style}),sn(b.element,ol?"mouseover":"mouseenter",function(){S!==3&&b.setState(1)}),sn(b.element,ol?"mouseout":"mouseleave",function(){S!==3&&b.setState(S)}),b.setState=(E=0)=>{if(E!==1&&(b.state=S=E),b.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][E]),!k){b.attr(P[E]);let z=O[E];is(z)&&b.css(z)}},b.attr(P[0]),!k&&(b.css(pi({cursor:"default"},T)),v&&b.text.css({pointerEvents:"none"})),b.on("touchstart",E=>E.stopPropagation()).on("click",function(E){S!==3&&(l==null||l.call(b,E))})}crispLine(e,s){let[r,l]=e;return fi(r[1])&&r[1]===l[1]&&(r[1]=l[1]=rl(r[1],s)),fi(r[2])&&r[2]===l[2]&&(r[2]=l[2]=rl(r[2],s)),e}path(e){let s=this.styledMode?{}:{fill:"none"};return kf(e)?s.d=e:is(e)&&pi(s,e),this.createElement("path").attr(s)}circle(e,s,r){let l=is(e)?e:e===void 0?{}:{x:e,y:s,r},h=this.createElement("circle");return h.xSetter=h.ySetter=function(d,u,f){f.setAttribute("c"+u,d)},h.attr(l)}arc(e,s,r,l,h,d){let u;is(e)?(s=(u=e).y,r=u.r,l=u.innerR,h=u.start,d=u.end,e=u.x):u={innerR:l,start:h,end:d};let f=this.symbol("arc",e,s,r,r,u);return f.r=r,f}rect(e,s,r,l,h,d){let u=is(e)?e:e===void 0?{}:{x:e,y:s,r:h,width:Math.max(r||0,0),height:Math.max(l||0,0)},f=this.createElement("rect");return this.styledMode||(d!==void 0&&(u["stroke-width"]=d,pi(u,f.crisp(u))),u.fill="none"),f.rSetter=function(m,v,b){f.r=m,nn(b,{rx:m,ry:m})},f.rGetter=function(){return f.r||0},f.attr(u)}roundedRect(e){return this.symbol("roundedRect").attr(e)}setSize(e,s,r){this.width=e,this.height=s,this.boxWrapper.animate({width:e,height:s},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:Go(r,!0)?void 0:0}),this.alignElements()}g(e){let s=this.createElement("g");return e?s.attr({class:"highcharts-"+e}):s}image(e,s,r,l,h,d){let u={preserveAspectRatio:"none"};gi(s)&&(u.x=s),gi(r)&&(u.y=r),gi(l)&&(u.width=l),gi(h)&&(u.height=h);let f=this.createElement("image").attr(u),m=function(v){f.attr({href:e}),d.call(f,v)};if(d){f.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="});let v=new Vo.Image;sn(v,"load",m),v.src=e,v.complete&&m({})}else f.attr({href:e});return f}symbol(e,s,r,l,h,d){var T,P;let u,f,m,v,b=this,k=/^url\((.*?)\)$/,M=k.test(e),S=!M&&(this.symbols[e]?e:"circle"),A=S&&this.symbols[S];if(A)typeof s=="number"&&(f=A.call(this.symbols,s||0,r||0,l||0,h||0,d)),u=this.path(f),b.styledMode||u.attr("fill","none"),pi(u,{symbolName:S||void 0,x:s,y:r,width:l,height:h}),d&&pi(u,d);else if(M){m=e.match(k)[1];let O=u=this.image(m);O.imgwidth=Go(d==null?void 0:d.width,(T=Xo[m])==null?void 0:T.width),O.imgheight=Go(d==null?void 0:d.height,(P=Xo[m])==null?void 0:P.height),v=E=>E.attr({width:E.width,height:E.height}),["width","height"].forEach(E=>{O[`${E}Setter`]=function(z,I){this[I]=z;let{alignByTranslate:B,element:j,width:F,height:H,imgwidth:G,imgheight:U}=this,q=I==="width"?G:U,Q=1;d&&d.backgroundSize==="within"&&F&&H&&G&&U?(Q=Math.min(F/G,H/U),nn(j,{width:Math.round(G*Q),height:Math.round(U*Q)})):j&&q&&j.setAttribute(I,q),!B&&G&&U&&this.translate(((F||0)-G*Q)/2,((H||0)-U*Q)/2)}}),fi(s)&&O.attr({x:s,y:r}),O.isImg=!0,O.symbolUrl=e,fi(O.imgwidth)&&fi(O.imgheight)?v(O):(O.attr({width:0,height:0}),yf("img",{onload:function(){let E=gf[b.chartIndex];this.width===0&&(on(this,{position:"absolute",top:"-999em"}),Ii.body.appendChild(this)),Xo[m]={width:this.width,height:this.height},O.imgwidth=this.width,O.imgheight=this.height,O.element&&v(O),this.parentNode&&this.parentNode.removeChild(this),b.imgCount--,b.imgCount||!E||E.hasLoaded||E.onload()},src:m}),this.imgCount++)}return u}clipRect(e,s,r,l){return this.rect(e,s,r,l,0)}text(e,s,r,l){let h={};if(l&&(this.allowHTML||!this.forExport))return this.html(e,s,r);h.x=Math.round(s||0),r&&(h.y=Math.round(r)),fi(e)&&(h.text=e);let d=this.createElement("text").attr(h);return l&&(!this.forExport||this.allowHTML)||(d.xSetter=function(u,f,m){let v=m.getElementsByTagName("tspan"),b=m.getAttribute(f);for(let k=0,M;k<v.length;k++)(M=v[k]).getAttribute(f)===b&&M.setAttribute(f,u);m.setAttribute(f,u)}),d}fontMetrics(e){let s=gi(e)?e:Mf(Ae.prototype.getStyle.call(e,"font-size")||0),r=s<24?s+3:Math.round(1.2*s),l=Math.round(.8*r);return{h:r,b:l,f:s}}rotCorr(e,s,r){let l=e;return s&&r&&(l=Math.max(l*Math.cos(s*sl),4)),{x:-e/3*Math.sin(s*sl),y:l}}pathToSegments(e){let s=[],r=[],l={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2};for(let h=0;h<e.length;h++)wf(r[0])&&gi(e[h])&&r.length===l[r[0].toUpperCase()]&&e.splice(h,0,r[0].replace("M","L").replace("m","l")),typeof e[h]=="string"&&(r.length&&s.push(r.slice(0)),r.length=0),r.push(e[h]);return s.push(r.slice(0)),s}label(e,s,r,l,h,d,u,f,m){return new ui(this,e,s,r,l,h,d,u,f,m)}alignElements(){this.alignedObjects.forEach(e=>e.align())}}pi(rn.prototype,{Element:Ae,SVG_NS:bf,escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},symbols:el,draw:xf}),Qi.registerRendererType("svg",rn,!0);let{composed:Pf,isFirefox:Tf}=Y,{attr:Af,css:Ue,createElement:_f,defined:al,extend:Of,getAlignFactor:Lf,isNumber:an,pInt:Ef,pushUnique:Df}=ot;function ll(x,e,s){var l;let r=(l=this.div)==null?void 0:l.style;Ae.prototype[`${e}Setter`].call(this,x,e,s),r&&(s.style[e]=r[e]=x)}let If=(x,e)=>{var s;if(!x.div){let r=Af(x.element,"class"),l=x.css,h=_f("div",r?{className:r}:void 0,{position:"absolute",left:`${x.translateX||0}px`,top:`${x.translateY||0}px`,...x.styles,display:x.display,opacity:x.opacity,visibility:x.visibility},((s=x.parentGroup)==null?void 0:s.div)||e);x.classSetter=(d,u,f)=>{f.setAttribute("class",d),h.className=d},x.translateXSetter=x.translateYSetter=(d,u)=>{x[u]=d,h.style[u==="translateX"?"left":"top"]=`${d}px`,x.doTransform=!0},x.scaleXSetter=x.scaleYSetter=(d,u)=>{x[u]=d,x.doTransform=!0},x.opacitySetter=x.visibilitySetter=ll,x.css=d=>(l.call(x,d),d.cursor&&(h.style.cursor=d.cursor),d.pointerEvents&&(h.style.pointerEvents=d.pointerEvents),x),x.on=function(){return Ae.prototype.on.apply({element:h,onEvents:x.onEvents},arguments),x},x.div=h}return x.div};class Ri extends Ae{static compose(e){Df(Pf,this.compose)&&(e.prototype.html=function(s,r,l){return new Ri(this,"span").attr({text:s,x:Math.round(r),y:Math.round(l)})})}constructor(e,s){super(e,s),Ri.useForeignObject?this.foreignObject=e.createElement("foreignObject").attr({zIndex:2}):this.css({position:"absolute",...e.styledMode?{}:{fontFamily:e.style.fontFamily,fontSize:e.style.fontSize}}),this.element.style.whiteSpace="nowrap"}getSpanCorrection(e,s,r){this.xCorr=-e*r,this.yCorr=-s}css(e){let s,{element:r}=this,l=r.tagName==="SPAN"&&e&&"width"in e,h=l&&e.width;return l&&(delete e.width,this.textWidth=Ef(h)||void 0,s=!0),(e==null?void 0:e.textOverflow)==="ellipsis"&&(e.overflow="hidden",e.whiteSpace="nowrap"),e!=null&&e.lineClamp&&(e.display="-webkit-box",e.WebkitLineClamp=e.lineClamp,e.WebkitBoxOrient="vertical",e.overflow="hidden"),an(Number(e==null?void 0:e.fontSize))&&(e.fontSize+="px"),Of(this.styles,e),Ue(r,e),s&&this.updateTransform(),this}htmlGetBBox(){let{element:e}=this;return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}updateTransform(){var O;if(!this.added){this.alignOnAdd=!0;return}let{element:e,foreignObject:s,oldTextWidth:r,renderer:l,rotation:h,rotationOriginX:d,rotationOriginY:u,scaleX:f,scaleY:m,styles:{display:v="inline-block",whiteSpace:b},textAlign:k="left",textWidth:M,translateX:S=0,translateY:A=0,x:T=0,y:P=0}=this;if(s||Ue(e,{marginLeft:`${S}px`,marginTop:`${A}px`}),e.tagName==="SPAN"){let E,z=[h,k,e.innerHTML,M,this.textAlign].join(","),I=-(((O=this.parentGroup)==null?void 0:O.padding)*1)||0;if(M!==r){let H=this.textPxLength?this.textPxLength:(Ue(e,{width:"",whiteSpace:b||"nowrap"}),e.offsetWidth),G=M||0,U=!l.styledMode&&e.style.textOverflow===""&&e.style.webkitLineClamp;(G>r||H>G||U)&&(/[\-\s\u00AD]/.test(e.textContent||e.innerText)||e.style.textOverflow==="ellipsis")&&(Ue(e,{width:(h||f||H>G||U)&&an(M)?M+"px":"auto",display:v,whiteSpace:b||"normal"}),this.oldTextWidth=M)}s&&(Ue(e,{display:"inline-block",verticalAlign:"top"}),s.attr({width:l.width,height:l.height})),z!==this.cTT&&(E=l.fontMetrics(e).b,al(h)&&!s&&(h!==(this.oldRotation||0)||k!==this.oldAlign)&&Ue(e,{transform:`rotate(${h}deg)`,transformOrigin:`${I}% ${I}px`}),this.getSpanCorrection(!al(h)&&!this.textWidth&&this.textPxLength||e.offsetWidth,E,Lf(k)));let{xCorr:B=0,yCorr:j=0}=this,F={left:`${T+B}px`,top:`${P+j}px`,textAlign:k,transformOrigin:`${(d??T)-B-T-I}px ${(u??P)-j-P-I}px`};(f||m)&&(F.transform=`scale(${f??1},${m??1})`),s?(super.updateTransform(),an(T)&&an(P)?(s.attr({x:T+B,y:P+j,width:e.offsetWidth+3,height:e.offsetHeight,"transform-origin":e.getAttribute("transform-origin")||"0 0"}),Ue(e,{display:v,textAlign:k})):Tf&&s.attr({width:0,height:0})):Ue(e,F),this.cTT=z,this.oldRotation=h,this.oldAlign=k}}add(e){let{foreignObject:s,renderer:r}=this,l=r.box.parentNode,h=[];if(s)s.add(e),super.add(r.createElement("body").attr({xmlns:"http://www.w3.org/1999/xhtml"}).css({background:"transparent",margin:"0 3px 0 0"}).add(s));else{let d;if(this.parentGroup=e,e&&!(d=e.div)){let u=e;for(;u;)h.push(u),u=u.parentGroup;for(let f of h.reverse())d=If(f,l)}(d||l).appendChild(this.element)}return this.added=!0,this.alignOnAdd&&this.updateTransform(),this}textSetter(e){e!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,Lt.setElementHTML(this.element,e??""),this.textStr=e,this.doTransform=!0)}alignSetter(e){this.alignValue=this.textAlign=e,this.doTransform=!0}xSetter(e,s){this[s]=e,this.doTransform=!0}}let mi=Ri.prototype;mi.visibilitySetter=mi.opacitySetter=ll,mi.ySetter=mi.rotationSetter=mi.rotationOriginXSetter=mi.rotationOriginYSetter=mi.xSetter,function(x){x.xAxis={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%[HMSL]",range:!1},second:{main:"%[HMS]",range:!1},minute:{main:"%[HM]",range:!1},hour:{main:"%[HM]",range:!1},day:{main:"%[eb]"},week:{main:"%[eb]"},month:{main:"%[bY]"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotationLimit:80,distance:15,enabled:!0,indentation:10,overflow:"justify",reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em",textOverflow:"ellipsis"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",useHTML:!1,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},x.yAxis={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:void 0},startOnTick:!0,title:{},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){let{numberFormatter:e}=this.axis.chart;return e(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0}}(g||(g={}));let Rf=g,{addEvent:Bf,isFunction:zf,objectEach:Ff,removeEvent:Nf}=ot;(y||(y={})).registerEventOptions=function(x,e){x.eventOptions=x.eventOptions||{},Ff(e.events,function(s,r){x.eventOptions[r]!==s&&(x.eventOptions[r]&&(Nf(x,r,x.eventOptions[r]),delete x.eventOptions[r]),zf(s)&&(x.eventOptions[r]=s,Bf(x,r,s,{order:0})))})};let ln=y,{deg2rad:$o}=Y,{clamp:Wf,correctFloat:hn,defined:Uo,destroyObjectProperties:Hf,extend:hl,fireEvent:ss,getAlignFactor:jf,isNumber:cn,merge:Xf,objectEach:Vf,pick:_e}=ot,Bi=class{constructor(x,e,s,r,l){this.isNew=!0,this.isNewLabel=!0,this.axis=x,this.pos=e,this.type=s||"",this.parameters=l||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,ss(this,"init"),s||r||this.addLabel()}addLabel(){var j,F;let x=this,e=x.axis,s=e.options,r=e.chart,l=e.categories,h=e.logarithmic,d=e.names,u=x.pos,f=_e((j=x.options)==null?void 0:j.labels,s.labels),m=e.tickPositions,v=u===m[0],b=u===m[m.length-1],k=(!f.step||f.step===1)&&e.tickInterval===1,M=m.info,S=x.label,A,T,P,O=this.parameters.category||(l?_e(l[u],d[u],u):u);h&&cn(O)&&(O=hn(h.lin2log(O))),e.dateTime&&(M?A=(T=r.time.resolveDTLFormat(s.dateTimeLabelFormats[!((F=s.grid)!=null&&F.enabled)&&M.higherRanks[u]||M.unitName])).main:cn(O)&&(A=e.dateTime.getXDateFormat(O,s.dateTimeLabelFormats||{}))),x.isFirst=v,x.isLast=b;let E={axis:e,chart:r,dateTimeLabelFormat:A,isFirst:v,isLast:b,pos:u,tick:x,tickPositionInfo:M,value:O};ss(this,"labelFormat",E);let z=H=>f.formatter?f.formatter.call(H,H):f.format?(H.text=e.defaultLabelFormatter.call(H),ue.format(f.format,H,r)):e.defaultLabelFormatter.call(H),I=z.call(E,E),B=T==null?void 0:T.list;B?x.shortenLabel=function(){for(P=0;P<B.length;P++)if(hl(E,{dateTimeLabelFormat:B[P]}),S.attr({text:z.call(E,E)}),S.getBBox().width<e.getSlotWidth(x)-2*(f.padding||0))return;S.attr({text:""})}:x.shortenLabel=void 0,k&&e._addedPlotLB&&x.moveLabel(I,f),Uo(S)||x.movedLabel?S&&S.textStr!==I&&!k&&(!S.textWidth||f.style.width||S.styles.width||S.css({width:null}),S.attr({text:I}),S.textPxLength=S.getBBox().width):(x.label=S=x.createLabel(I,f),x.rotation=0)}createLabel(x,e,s){let r=this.axis,{renderer:l,styledMode:h}=r.chart,d=e.style.whiteSpace,u=Uo(x)&&e.enabled?l.text(x,s==null?void 0:s.x,s==null?void 0:s.y,e.useHTML).add(r.labelGroup):void 0;return u&&(h||u.css(Xf(e.style)),u.textPxLength=u.getBBox().width,!h&&d&&u.css({whiteSpace:d})),u}destroy(){Hf(this,this.axis)}getPosition(x,e,s,r){let l=this.axis,h=l.chart,d=r&&h.oldChartHeight||h.chartHeight,u={x:x?hn(l.translate(e+s,void 0,void 0,r)+l.transB):l.left+l.offset+(l.opposite?(r&&h.oldChartWidth||h.chartWidth)-l.right-l.left:0),y:x?d-l.bottom+l.offset-(l.opposite?l.height:0):hn(d-l.translate(e+s,void 0,void 0,r)-l.transB)};return u.y=Wf(u.y,-1e9,1e9),ss(this,"afterGetPosition",{pos:u}),u}getLabelPosition(x,e,s,r,l,h,d,u){let f,m,v=this.axis,b=v.transA,k=v.isLinked&&v.linkedParent?v.linkedParent.reversed:v.reversed,M=v.staggerLines,S=v.tickRotCorr||{x:0,y:0},A=r||v.reserveSpaceDefault?0:-v.labelOffset*(v.labelAlign==="center"?.5:1),T=l.distance,P={};return f=v.side===0?s.rotation?-T:-s.getBBox().height:v.side===2?S.y+T:Math.cos(s.rotation*$o)*(S.y-s.getBBox(!1,0).height/2),Uo(l.y)&&(f=v.side===0&&v.horiz?l.y+f:l.y),x=x+_e(l.x,[0,1,0,-1][v.side]*T)+A+S.x-(h&&r?h*b*(k?-1:1):0),e=e+f-(h&&!r?h*b*(k?1:-1):0),M&&(m=d/(u||1)%M,v.opposite&&(m=M-m-1),e+=m*(v.labelOffset/M)),P.x=x,P.y=Math.round(e),ss(this,"afterGetLabelPosition",{pos:P,tickmarkOffset:h,index:d}),P}getLabelSize(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0}getMarkPath(x,e,s,r,l=!1,h){return h.crispLine([["M",x,e],["L",x+(l?0:-s),e+(l?s:0)]],r)}handleOverflow(x){var T;let e=this.axis,s=e.options.labels,r=x.x,l=e.chart.chartWidth,h=e.chart.spacing,d=_e(e.labelLeft,Math.min(e.pos,h[3])),u=_e(e.labelRight,Math.max(e.isRadial?0:e.pos+e.len,l-h[1])),f=this.label,m=this.rotation,v=jf(e.labelAlign||f.attr("align")),b=f.getBBox().width,k=e.getSlotWidth(this),M=k,S=1,A;m||s.overflow!=="justify"?m<0&&r-v*b<d?A=Math.round(r/Math.cos(m*$o)-d):m>0&&r+v*b>u&&(A=Math.round((l-r)/Math.cos(m*$o))):(r-v*b<d?M=x.x+M*(1-v)-d:r+(1-v)*b>u&&(M=u-x.x+M*v,S=-1),(M=Math.min(k,M))<k&&e.labelAlign==="center"&&(x.x+=S*(k-M-v*(k-Math.min(b,M)))),(b>M||e.autoRotation&&((T=f==null?void 0:f.styles)!=null&&T.width))&&(A=M)),A&&f&&(this.shortenLabel?this.shortenLabel():f.css(hl({},{width:Math.floor(A)+"px",lineClamp:+!e.isRadial})))}moveLabel(x,e){let s=this,r=s.label,l=s.axis,h=!1,d;r&&r.textStr===x?(s.movedLabel=r,h=!0,delete s.label):Vf(l.ticks,function(u){h||u.isNew||u===s||!u.label||u.label.textStr!==x||(s.movedLabel=u.label,h=!0,u.labelPos=s.movedLabel.xy,delete u.label)}),!h&&(s.labelPos||r)&&(d=s.labelPos||r.xy,s.movedLabel=s.createLabel(x,e,d),s.movedLabel&&s.movedLabel.attr({opacity:0}))}render(x,e,s){var S;let r=this.axis,l=r.horiz,h=this.pos,d=_e(this.tickmarkOffset,r.tickmarkOffset),u=this.getPosition(l,h,d,e),f=u.x,m=u.y,v=r.pos,b=v+r.len,k=l?f:m,M=_e(s,(S=this.label)==null?void 0:S.newOpacity,1);!r.chart.polar&&(hn(k)<v||k>b)&&(s=0),s??(s=1),this.isActive=!0,this.renderGridLine(e,s),this.renderMark(u,s),this.renderLabel(u,e,M,x),this.isNew=!1,ss(this,"afterRender")}renderGridLine(x,e){let s=this.axis,r=s.options,l={},h=this.pos,d=this.type,u=_e(this.tickmarkOffset,s.tickmarkOffset),f=s.chart.renderer,m=this.gridLine,v,b=r.gridLineWidth,k=r.gridLineColor,M=r.gridLineDashStyle;this.type==="minor"&&(b=r.minorGridLineWidth,k=r.minorGridLineColor,M=r.minorGridLineDashStyle),m||(s.chart.styledMode||(l.stroke=k,l["stroke-width"]=b||0,l.dashstyle=M),d||(l.zIndex=1),x&&(e=0),this.gridLine=m=f.path().attr(l).addClass("highcharts-"+(d?d+"-":"")+"grid-line").add(s.gridGroup)),m&&(v=s.getPlotLinePath({value:h+u,lineWidth:m.strokeWidth(),force:"pass",old:x,acrossPanes:!1}))&&m[x||this.isNew?"attr":"animate"]({d:v,opacity:e})}renderMark(x,e){let s=this.axis,r=s.options,l=s.chart.renderer,h=this.type,d=s.tickSize(h?h+"Tick":"tick"),u=x.x,f=x.y,m=_e(r[h!=="minor"?"tickWidth":"minorTickWidth"],!h&&s.isXAxis?1:0),v=r[h!=="minor"?"tickColor":"minorTickColor"],b=this.mark,k=!b;d&&(s.opposite&&(d[0]=-d[0]),!b&&(this.mark=b=l.path().addClass("highcharts-"+(h?h+"-":"")+"tick").add(s.axisGroup),s.chart.styledMode||b.attr({stroke:v,"stroke-width":m})),b[k?"attr":"animate"]({d:this.getMarkPath(u,f,d[0],b.strokeWidth(),s.horiz,l),opacity:e}))}renderLabel(x,e,s,r){let l=this.axis,h=l.horiz,d=l.options,u=this.label,f=d.labels,m=f.step,v=_e(this.tickmarkOffset,l.tickmarkOffset),b=x.x,k=x.y,M=!0;u&&cn(b)&&(u.xy=x=this.getLabelPosition(b,k,u,h,f,v,r,m),(!this.isFirst||this.isLast||d.showFirstLabel)&&(!this.isLast||this.isFirst||d.showLastLabel)?!h||f.step||f.rotation||e||s===0||this.handleOverflow(x):M=!1,m&&r%m&&(M=!1),M&&cn(x.y)?(x.opacity=s,u[this.isNewLabel?"attr":"animate"](x).show(!0),this.isNewLabel=!1):(u.hide(),this.isNewLabel=!0))}replaceMovedLabel(){let x=this.label,e=this.axis;x&&!this.isNew&&(x.animate({opacity:0},void 0,x.destroy),delete this.label),e.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel}},{animObject:Yf}=Jt,{xAxis:cl,yAxis:Gf}=Rf,{defaultOptions:Ko}=de,{registerEventOptions:$f}=ln,{deg2rad:Uf}=Y,{arrayMax:dl,arrayMin:Kf,clamp:qo,correctFloat:ce,defined:Ct,destroyObjectProperties:qf,erase:ul,error:Zo,extend:dn,fireEvent:Rt,getClosestDistance:fl,insertItem:Zf,isArray:pl,isNumber:rt,isString:gl,merge:un,normalizeTickInterval:Qf,objectEach:fn,pick:dt,relativeLength:pn,removeEvent:Jf,splat:tp,syncTimeout:ep}=ot,ml=(x,e)=>Qf(e,void 0,void 0,dt(x.options.allowDecimals,e<.5||x.tickAmount!==void 0),!!x.tickAmount);dn(Ko,{xAxis:cl,yAxis:un(cl,Gf)});class zi{constructor(e,s,r){this.init(e,s,r)}init(e,s,r=this.coll){let l=r==="xAxis",h=this.isZAxis||(e.inverted?!l:l);this.chart=e,this.horiz=h,this.isXAxis=l,this.coll=r,Rt(this,"init",{userOptions:s}),this.opposite=dt(s.opposite,this.opposite),this.side=dt(s.side,this.side,h?2*!this.opposite:this.opposite?1:3),this.setOptions(s);let d=this.options,u=d.labels;this.type??(this.type=d.type||"linear"),this.uniqueNames??(this.uniqueNames=d.uniqueNames??!0),Rt(this,"afterSetType"),this.userOptions=s,this.minPixelPadding=0,this.reversed=dt(d.reversed,this.reversed),this.visible=d.visible,this.zoomEnabled=d.zoomEnabled,this.hasNames=this.type==="category"||d.categories===!0,this.categories=pl(d.categories)&&d.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=Ct(d.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len??(this.len=0),this.minRange=this.userMinRange=d.minRange||d.maxZoom,this.range=d.range,this.offset=d.offset||0,this.max=void 0,this.min=void 0;let f=dt(d.crosshair,tp(e.options.tooltip.crosshairs)[+!l]);this.crosshair=f===!0?{}:f,e.axes.indexOf(this)===-1&&(l?e.axes.splice(e.xAxis.length,0,this):e.axes.push(this),Zf(this,e[this.coll])),e.orderItems(this.coll),this.series=this.series||[],e.inverted&&!this.isZAxis&&l&&!Ct(this.reversed)&&(this.reversed=!0),this.labelRotation=rt(u.rotation)?u.rotation:void 0,$f(this,d),Rt(this,"afterInit")}setOptions(e){let s=this.horiz?{labels:{autoRotation:[-45],padding:3},margin:15}:{labels:{padding:1},title:{rotation:90*this.side}};this.options=un(s,this.coll==="yAxis"?{title:{text:this.chart.options.lang.yAxisTitle}}:{},Ko[this.coll],e),Rt(this,"afterSetOptions",{userOptions:e})}defaultLabelFormatter(){let e=this.axis,{numberFormatter:s}=this.chart,r=rt(this.value)?this.value:NaN,l=e.chart.time,h=e.categories,d=this.dateTimeLabelFormat,u=Ko.lang,f=u.numericSymbols,m=u.numericSymbolMagnitude||1e3,v=e.logarithmic?Math.abs(r):e.tickInterval,b=f==null?void 0:f.length,k,M;if(h)M=`${this.value}`;else if(d)M=l.dateFormat(d,r,!0);else if(b&&f&&v>=1e3)for(;b--&&M===void 0;)v>=(k=Math.pow(m,b+1))&&10*r%k==0&&f[b]!==null&&r!==0&&(M=s(r/k,-1)+f[b]);return M===void 0&&(M=Math.abs(r)>=1e4?s(r,-1):s(r,-1,void 0,"")),M}getSeriesExtremes(){let e,s=this;Rt(this,"getSeriesExtremes",null,function(){s.hasVisibleSeries=!1,s.dataMin=s.dataMax=s.threshold=void 0,s.softThreshold=!s.isXAxis,s.series.forEach(r=>{if(r.reserveSpace()){let l=r.options,h,d=l.threshold,u,f;if(s.hasVisibleSeries=!0,s.positiveValuesOnly&&0>=(d||0)&&(d=void 0),s.isXAxis)(h=r.getColumn("x")).length&&(h=s.logarithmic?h.filter(m=>m>0):h,u=(e=r.getXExtremes(h)).min,f=e.max,rt(u)||u instanceof Date||(h=h.filter(rt),u=(e=r.getXExtremes(h)).min,f=e.max),h.length&&(s.dataMin=Math.min(dt(s.dataMin,u),u),s.dataMax=Math.max(dt(s.dataMax,f),f)));else{let m=r.applyExtremes();rt(m.dataMin)&&(u=m.dataMin,s.dataMin=Math.min(dt(s.dataMin,u),u)),rt(m.dataMax)&&(f=m.dataMax,s.dataMax=Math.max(dt(s.dataMax,f),f)),Ct(d)&&(s.threshold=d),(!l.softThreshold||s.positiveValuesOnly)&&(s.softThreshold=!1)}}})}),Rt(this,"afterGetSeriesExtremes")}translate(e,s,r,l,h,d){var A;let u=this.linkedParent||this,f=l&&u.old?u.old.min:u.min;if(!rt(f))return NaN;let m=u.minPixelPadding,v=(u.isOrdinal||((A=u.brokenAxis)==null?void 0:A.hasBreaks)||u.logarithmic&&h)&&!!u.lin2val,b=1,k=0,M=l&&u.old?u.old.transA:u.transA,S=0;return M||(M=u.transA),r&&(b*=-1,k=u.len),u.reversed&&(b*=-1,k-=b*(u.sector||u.len)),s?(S=(e=e*b+k-m)/M+f,v&&(S=u.lin2val(S))):(v&&(e=u.val2lin(e)),S=b*(e-f)*M+k+b*m+(rt(d)?M*d:0),u.isRadial||(S=ce(S))),S}toPixels(e,s){var r;return this.translate(((r=this.chart)==null?void 0:r.time.parse(e))??NaN,!1,!this.horiz,void 0,!0)+(s?0:this.pos)}toValue(e,s){return this.translate(e-(s?0:this.pos),!0,!this.horiz,void 0,!0)}getPlotLinePath(e){let s=this,r=s.chart,l=s.left,h=s.top,d=e.old,u=e.value,f=e.lineWidth,m=d&&r.oldChartHeight||r.chartHeight,v=d&&r.oldChartWidth||r.chartWidth,b=s.transB,k=e.translatedValue,M=e.force,S,A,T,P,O;function E(I,B,j){return M!=="pass"&&(I<B||I>j)&&(M?I=qo(I,B,j):O=!0),I}let z={value:u,lineWidth:f,old:d,force:M,acrossPanes:e.acrossPanes,translatedValue:k};return Rt(this,"getPlotLinePath",z,function(I){S=T=(k=qo(k=dt(k,s.translate(u,void 0,void 0,d)),-1e9,1e9))+b,A=P=m-k-b,rt(k)?s.horiz?(A=h,P=m-s.bottom+(s.options.isInternal?0:r.scrollablePixelsY||0),S=T=E(S,l,l+s.width)):(S=l,T=v-s.right+(r.scrollablePixelsX||0),A=P=E(A,h,h+s.height)):(O=!0,M=!1),I.path=O&&!M?void 0:r.renderer.crispLine([["M",S,A],["L",T,P]],f||1)}),z.path}getLinearTickPositions(e,s,r){let l,h,d,u=ce(Math.floor(s/e)*e),f=ce(Math.ceil(r/e)*e),m=[];if(ce(u+e)===u&&(d=20),this.single)return[s];for(l=u;l<=f&&(m.push(l),(l=ce(l+e,d))!==h);)h=l;return m}getMinorTickInterval(){let{minorTicks:e,minorTickInterval:s}=this.options;return e===!0?dt(s,"auto"):e!==!1?s:void 0}getMinorTickPositions(){var v;let e=this.options,s=this.tickPositions,r=this.minorTickInterval,l=this.pointRangePadding||0,h=(this.min||0)-l,d=(this.max||0)+l,u=(v=this.brokenAxis)!=null&&v.hasBreaks?this.brokenAxis.unitLength:d-h,f=[],m;if(u&&u/r<this.len/3){let b=this.logarithmic;if(b)this.paddedTicks.forEach(function(k,M,S){M&&f.push.apply(f,b.getLogTickPositions(r,S[M-1],S[M],!0))});else if(this.dateTime&&this.getMinorTickInterval()==="auto")f=f.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(r),h,d,e.startOfWeek));else for(m=h+(s[0]-h)%r;m<=d&&m!==f[0];m+=r)f.push(m)}return f.length!==0&&this.trimTicks(f),f}adjustForMinRange(){let e=this.options,s=this.logarithmic,r=this.chart.time,{max:l,min:h,minRange:d}=this,u,f,m,v;this.isXAxis&&d===void 0&&!s&&(d=Ct(e.min)||Ct(e.max)||Ct(e.floor)||Ct(e.ceiling)?null:Math.min(5*(fl(this.series.map(b=>{let k=b.getColumn("x");return b.xIncrement?k.slice(0,2):k}))||0),this.dataMax-this.dataMin)),rt(l)&&rt(h)&&rt(d)&&l-h<d&&(f=this.dataMax-this.dataMin>=d,u=(d-l+h)/2,m=[h-u,r.parse(e.min)??h-u],f&&(m[2]=s?s.log2lin(this.dataMin):this.dataMin),v=[(h=dl(m))+d,r.parse(e.max)??h+d],f&&(v[2]=s?s.log2lin(this.dataMax):this.dataMax),(l=Kf(v))-h<d&&(m[0]=l-d,m[1]=r.parse(e.min)??l-d,h=dl(m))),this.minRange=d,this.min=h,this.max=l}getClosest(){let e,s;if(this.categories)s=1;else{let r=[];this.series.forEach(function(l){let h=l.closestPointRange,d=l.getColumn("x");d.length===1?r.push(d[0]):l.sorted&&Ct(h)&&l.reserveSpace()&&(s=Ct(s)?Math.min(s,h):h)}),r.length&&(r.sort((l,h)=>l-h),e=fl([r]))}return e&&s?Math.min(e,s):e||s}nameToX(e){let s=pl(this.options.categories),r=s?this.categories:this.names,l=e.options.x,h;return e.series.requireSorting=!1,Ct(l)||(l=this.uniqueNames&&r?s?r.indexOf(e.name):dt(r.keys[e.name],-1):e.series.autoIncrement()),l===-1?!s&&r&&(h=r.length):rt(l)&&(h=l),h!==void 0?(this.names[h]=e.name,this.names.keys[e.name]=h):e.x&&(h=e.x),h}updateNames(){let e=this,s=this.names;s.length>0&&(Object.keys(s.keys).forEach(function(r){delete s.keys[r]}),s.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(r=>{r.xIncrement=null,(!r.points||r.isDirtyData)&&(e.max=Math.max(e.max||0,r.dataTable.rowCount-1),r.processData(),r.generatePoints());let l=r.getColumn("x").slice();r.data.forEach((h,d)=>{let u=l[d];h!=null&&h.options&&h.name!==void 0&&(u=e.nameToX(h))!==void 0&&u!==h.x&&(l[d]=h.x=u)}),r.dataTable.setColumn("x",l)}))}setAxisTranslation(){var k;let e=this,s=e.max-e.min,r=e.linkedParent,l=!!e.categories,h=e.isXAxis,d=e.axisPointRange||0,u,f=0,m=0,v,b=e.transA;(h||l||d)&&(u=e.getClosest(),r?(f=r.minPointOffset,m=r.pointRangePadding):e.series.forEach(function(M){let S=l?1:h?dt(M.options.pointRange,u,0):e.axisPointRange||0,A=M.options.pointPlacement;if(d=Math.max(d,S),!e.single||l){let T=M.is("xrange")?!h:h;f=Math.max(f,T&&gl(A)?0:S/2),m=Math.max(m,T&&A==="on"?0:S)}}),v=(k=e.ordinal)!=null&&k.slope&&u?e.ordinal.slope/u:1,e.minPointOffset=f*=v,e.pointRangePadding=m*=v,e.pointRange=Math.min(d,e.single&&l?1:s),h&&(e.closestPointRange=u)),e.translationSlope=e.transA=b=e.staticScale||e.len/(s+m||1),e.transB=e.horiz?e.left:e.bottom,e.minPixelPadding=b*f,Rt(this,"afterSetAxisTranslation")}minFromRange(){let{max:e,min:s}=this;return rt(e)&&rt(s)&&e-s||void 0}setTickInterval(e){var tt,it,J,st;let{categories:s,chart:r,dataMax:l,dataMin:h,dateTime:d,isXAxis:u,logarithmic:f,options:m,softThreshold:v}=this,b=r.time,k=rt(this.threshold)?this.threshold:void 0,M=this.minRange||0,{ceiling:S,floor:A,linkedTo:T,softMax:P,softMin:O}=m,E=rt(T)&&((tt=r[this.coll])==null?void 0:tt[T]),z=m.tickPixelInterval,I=m.maxPadding,B=m.minPadding,j=0,F,H=rt(m.tickInterval)&&m.tickInterval>=0?m.tickInterval:void 0,G,U,q,Q;if(d||s||E||this.getTickAmount(),q=dt(this.userMin,b.parse(m.min)),Q=dt(this.userMax,b.parse(m.max)),E?(this.linkedParent=E,F=E.getExtremes(),this.min=dt(F.min,F.dataMin),this.max=dt(F.max,F.dataMax),this.type!==E.type&&Zo(11,!0,r)):(v&&Ct(k)&&rt(l)&&rt(h)&&(h>=k?(G=k,B=0):l<=k&&(U=k,I=0)),this.min=dt(q,G,h),this.max=dt(Q,U,l)),rt(this.max)&&rt(this.min)&&(f&&(this.positiveValuesOnly&&!e&&0>=Math.min(this.min,dt(h,this.min))&&Zo(10,!0,r),this.min=ce(f.log2lin(this.min),16),this.max=ce(f.log2lin(this.max),16)),this.range&&rt(h)&&(this.userMin=this.min=q=Math.max(h,this.minFromRange()||0),this.userMax=Q=this.max,this.range=void 0)),Rt(this,"foundExtremes"),this.adjustForMinRange(),rt(this.min)&&rt(this.max)){if(!rt(this.userMin)&&rt(O)&&O<this.min&&(this.min=q=O),!rt(this.userMax)&&rt(P)&&P>this.max&&(this.max=Q=P),s||this.axisPointRange||(it=this.stacking)!=null&&it.usePercentage||E||(j=this.max-this.min)&&(!Ct(q)&&B&&(this.min-=j*B),!Ct(Q)&&I&&(this.max+=j*I)),!rt(this.userMin)&&rt(A)&&(this.min=Math.max(this.min,A)),!rt(this.userMax)&&rt(S)&&(this.max=Math.min(this.max,S)),v&&rt(h)&&rt(l)){let ct=k||0;!Ct(q)&&this.min<ct&&h>=ct?this.min=m.minRange?Math.min(ct,this.max-M):ct:!Ct(Q)&&this.max>ct&&l<=ct&&(this.max=m.minRange?Math.max(ct,this.min+M):ct)}!r.polar&&this.min>this.max&&(Ct(m.min)?this.max=this.min:Ct(m.max)&&(this.min=this.max)),j=this.max-this.min}if(this.min!==this.max&&rt(this.min)&&rt(this.max)?E&&!H&&z===E.options.tickPixelInterval?this.tickInterval=H=E.tickInterval:this.tickInterval=dt(H,this.tickAmount?j/Math.max(this.tickAmount-1,1):void 0,s?1:j*z/Math.max(this.len,z)):this.tickInterval=1,u&&!e){let ct=this.min!==((J=this.old)==null?void 0:J.min)||this.max!==((st=this.old)==null?void 0:st.max);this.series.forEach(function(ft){var gt;ft.forceCrop=(gt=ft.forceCropping)==null?void 0:gt.call(ft),ft.processData(ct)}),Rt(this,"postProcessData",{hasExtremesChanged:ct})}this.setAxisTranslation(),Rt(this,"initialAxisTranslation"),this.pointRange&&!H&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));let et=dt(m.minTickInterval,d&&!this.series.some(ct=>!ct.sorted)?this.closestPointRange:0);!H&&et&&this.tickInterval<et&&(this.tickInterval=et),d||f||H||(this.tickInterval=ml(this,this.tickInterval)),this.tickAmount||(this.tickInterval=this.unsquish()),this.setTickPositions()}setTickPositions(){var v,b;let e=this.options,s=e.tickPositions,r=e.tickPositioner,l=this.getMinorTickInterval(),h=!this.isPanning,d=h&&e.startOnTick,u=h&&e.endOnTick,f=[],m;if(this.tickmarkOffset=this.categories&&e.tickmarkPlacement==="between"&&this.tickInterval===1?.5:0,this.single=this.min===this.max&&Ct(this.min)&&!this.tickAmount&&(this.min%1==0||e.allowDecimals!==!1),s)f=s.slice();else if(rt(this.min)&&rt(this.max)){if(!((v=this.ordinal)!=null&&v.positions)&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200))f=[this.min,this.max],Zo(19,!1,this.chart);else if(this.dateTime)f=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,e.units),this.min,this.max,e.startOfWeek,(b=this.ordinal)==null?void 0:b.positions,this.closestPointRange,!0);else if(this.logarithmic)f=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else{let k=this.tickInterval,M=k;for(;M<=2*k&&(f=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&f.length>this.tickAmount);)this.tickInterval=ml(this,M*=1.1)}f.length>this.len&&(f=[f[0],f[f.length-1]])[0]===f[1]&&(f.length=1),r&&(this.tickPositions=f,(m=r.apply(this,[this.min,this.max]))&&(f=m))}this.tickPositions=f,this.minorTickInterval=l==="auto"&&this.tickInterval?this.tickInterval/e.minorTicksPerMajor:l,this.paddedTicks=f.slice(0),this.trimTicks(f,d,u),!this.isLinked&&rt(this.min)&&rt(this.max)&&(this.single&&f.length<2&&!this.categories&&!this.series.some(k=>k.is("heatmap")&&k.options.pointPlacement==="between")&&(this.min-=.5,this.max+=.5),s||m||this.adjustTickAmount()),Rt(this,"afterSetTickPositions")}trimTicks(e,s,r){let l=e[0],h=e[e.length-1],d=!this.isOrdinal&&this.minPointOffset||0;if(Rt(this,"trimTicks"),!this.isLinked||!this.grid){if(s&&l!==-1/0)this.min=l;else for(;this.min-d>e[0];)e.shift();if(r)this.max=h;else for(;this.max+d<e[e.length-1];)e.pop();e.length===0&&Ct(l)&&!this.options.tickPositions&&e.push((h+l)/2)}}alignToOthers(){let e,s=this,r=s.chart,l=[this],h=s.options,d=r.options.chart,u=this.coll==="yAxis"&&d.alignThresholds,f=[];if(s.thresholdAlignment=void 0,(d.alignTicks!==!1&&h.alignTicks||u)&&h.startOnTick!==!1&&h.endOnTick!==!1&&!s.logarithmic){let m=b=>{let{horiz:k,options:M}=b;return[k?M.left:M.top,M.width,M.height,M.pane].join(",")},v=m(this);r[this.coll].forEach(function(b){let{series:k}=b;k.length&&k.some(M=>M.visible)&&b!==s&&m(b)===v&&(e=!0,l.push(b))})}if(e&&u){l.forEach(v=>{let b=v.getThresholdAlignment(s);rt(b)&&f.push(b)});let m=f.length>1?f.reduce((v,b)=>v+=b,0)/f.length:void 0;l.forEach(v=>{v.thresholdAlignment=m})}return e}getThresholdAlignment(e){if((!rt(this.dataMin)||this!==e&&this.series.some(s=>s.isDirty||s.isDirtyData))&&this.getSeriesExtremes(),rt(this.threshold)){let s=qo((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1);return this.options.reversed&&(s=1-s),s}}getTickAmount(){let e=this.options,s=e.tickPixelInterval,r=e.tickAmount;Ct(e.tickInterval)||r||!(this.len<s)||this.isRadial||this.logarithmic||!e.startOnTick||!e.endOnTick||(r=2),!r&&this.alignToOthers()&&(r=Math.ceil(this.len/s)+1),r<4&&(this.finalTickAmt=r,r=5),this.tickAmount=r}adjustTickAmount(){let e=this,{finalTickAmt:s,max:r,min:l,options:h,tickPositions:d,tickAmount:u,thresholdAlignment:f}=e,m=d==null?void 0:d.length,v=dt(e.threshold,e.softThreshold?0:null),b,k,M=e.tickInterval,S,A=()=>d.push(ce(d[d.length-1]+M)),T=()=>d.unshift(ce(d[0]-M));if(rt(f)&&(S=f<.5?Math.ceil(f*(u-1)):Math.floor(f*(u-1)),h.reversed&&(S=u-1-S)),e.hasData()&&rt(l)&&rt(r)){let P=()=>{e.transA*=(m-1)/(u-1),e.min=h.startOnTick?d[0]:Math.min(l,d[0]),e.max=h.endOnTick?d[d.length-1]:Math.max(r,d[d.length-1])};if(rt(S)&&rt(e.threshold)){for(;d[S]!==v||d.length!==u||d[0]>l||d[d.length-1]<r;){for(d.length=0,d.push(e.threshold);d.length<u;)d[S]===void 0||d[S]>e.threshold?T():A();if(M>8*e.tickInterval)break;M*=2}P()}else if(m<u){for(;d.length<u;)d.length%2||l===v?A():T();P()}if(Ct(s)){for(k=b=d.length;k--;)(s===3&&k%2==1||s<=2&&k>0&&k<b-1)&&d.splice(k,1);e.finalTickAmt=void 0}}}setScale(){var d,u,f,m,v;let{coll:e,stacking:s}=this,r=!1,l=!1;this.series.forEach(b=>{var k;r=r||b.isDirtyData||b.isDirty,l=l||((k=b.xAxis)==null?void 0:k.isDirty)||!1}),this.setAxisSize();let h=this.len!==((d=this.old)==null?void 0:d.len);h||r||l||this.isLinked||this.forceRedraw||this.userMin!==((u=this.old)==null?void 0:u.userMin)||this.userMax!==((f=this.old)==null?void 0:f.userMax)||this.alignToOthers()?(s&&e==="yAxis"&&s.buildStacks(),this.forceRedraw=!1,this.userMinRange||(this.minRange=void 0),this.getSeriesExtremes(),this.setTickInterval(),s&&e==="xAxis"&&s.buildStacks(),this.isDirty||(this.isDirty=h||this.min!==((m=this.old)==null?void 0:m.min)||this.max!==((v=this.old)==null?void 0:v.max))):s&&s.cleanStacks(),r&&delete this.allExtremes,Rt(this,"afterSetScale")}setExtremes(e,s,r=!0,l,h){let d=this.chart;this.series.forEach(u=>{delete u.kdTree}),e=d.time.parse(e),s=d.time.parse(s),Rt(this,"setExtremes",h=dn(h,{min:e,max:s}),u=>{this.userMin=u.min,this.userMax=u.max,this.eventArgs=u,r&&d.redraw(l)})}setAxisSize(){let e=this.chart,s=this.options,r=s.offsets||[0,0,0,0],l=this.horiz,h=this.width=Math.round(pn(dt(s.width,e.plotWidth-r[3]+r[1]),e.plotWidth)),d=this.height=Math.round(pn(dt(s.height,e.plotHeight-r[0]+r[2]),e.plotHeight)),u=this.top=Math.round(pn(dt(s.top,e.plotTop+r[0]),e.plotHeight,e.plotTop)),f=this.left=Math.round(pn(dt(s.left,e.plotLeft+r[3]),e.plotWidth,e.plotLeft));this.bottom=e.chartHeight-d-u,this.right=e.chartWidth-h-f,this.len=Math.max(l?h:d,0),this.pos=l?f:u}getExtremes(){let e=this.logarithmic;return{min:e?ce(e.lin2log(this.min)):this.min,max:e?ce(e.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}}getThreshold(e){let s=this.logarithmic,r=s?s.lin2log(this.min):this.min,l=s?s.lin2log(this.max):this.max;return e===null||e===-1/0?e=r:e===1/0?e=l:r>e?e=r:l<e&&(e=l),this.translate(e,0,1,0,1)}autoLabelAlign(e){let s=(dt(e,0)-90*this.side+720)%360,r={align:"center"};return Rt(this,"autoLabelAlign",r,function(l){s>15&&s<165?l.align="right":s>195&&s<345&&(l.align="left")}),r.align}tickSize(e){let s=this.options,r=dt(s[e==="tick"?"tickWidth":"minorTickWidth"],e==="tick"&&this.isXAxis&&!this.categories?1:0),l=s[e==="tick"?"tickLength":"minorTickLength"],h;r&&l&&(s[e+"Position"]==="inside"&&(l=-l),h=[l,r]);let d={tickSize:h};return Rt(this,"afterTickSize",d),d.tickSize}labelMetrics(){let e=this.chart.renderer,s=this.ticks,r=s[Object.keys(s)[0]]||{};return this.chart.renderer.fontMetrics(r.label||r.movedLabel||e.box)}unsquish(){let e=this.options.labels,s=e.padding||0,r=this.horiz,l=this.tickInterval,h=this.len/((+!!this.categories+this.max-this.min)/l),d=e.rotation,u=ce(.8*this.labelMetrics().h),f=Math.max(this.max-this.min,0),m=function(S){let A=(S+2*s)/(h||1);return(A=A>1?Math.ceil(A):1)*l>f&&S!==1/0&&h!==1/0&&f&&(A=Math.ceil(f/l)),ce(A*l)},v=l,b,k=Number.MAX_VALUE,M;if(r){if(!e.staggerLines&&(rt(d)?M=[d]:h<e.autoRotationLimit&&(M=e.autoRotation)),M){let S,A;for(let T of M)(T===d||T&&T>=-90&&T<=90)&&(A=(S=m(Math.abs(u/Math.sin(Uf*T))))+Math.abs(T/360))<k&&(k=A,b=T,v=S)}}else v=m(.75*u);return this.autoRotation=M,this.labelRotation=dt(b,rt(d)?d:0),e.step?l:v}getSlotWidth(e){let s=this.chart,r=this.horiz,l=this.options.labels,h=Math.max(this.tickPositions.length-!this.categories,1),d=s.margin[3];if(e&&rt(e.slotWidth))return e.slotWidth;if(r&&l.step<2&&!this.isRadial)return l.rotation?0:(this.staggerLines||1)*this.len/h;if(!r){let u=l.style.width;if(u!==void 0)return parseInt(String(u),10);if(!this.opposite&&d)return d-s.spacing[3]}return .33*s.chartWidth}renderUnsquish(){let e=this.chart,s=e.renderer,r=this.tickPositions,l=this.ticks,h=this.options.labels,d=h.style,u=this.horiz,f=this.getSlotWidth(),m=Math.max(1,Math.round(f-(u?2*(h.padding||0):h.distance||0))),v={},b=this.labelMetrics(),k=d.lineClamp,M,S=k??(Math.floor(this.len/(r.length*b.h))||1),A=0;gl(h.rotation)||(v.rotation=h.rotation||0),r.forEach(function(T){var E;let P=l[T];P.movedLabel&&P.replaceMovedLabel();let O=((E=P.label)==null?void 0:E.textPxLength)||0;O>A&&(A=O)}),this.maxLabelLength=A,this.autoRotation?A>m&&A>b.h?v.rotation=this.labelRotation:this.labelRotation=0:f&&(M=m),v.rotation&&(M=A>.5*e.chartHeight?.33*e.chartHeight:A,k||(S=1)),this.labelAlign=h.align||this.autoLabelAlign(this.labelRotation),this.labelAlign&&(v.align=this.labelAlign),r.forEach(function(T){let P=l[T],O=P==null?void 0:P.label,E=d.width,z={};O&&(O.attr(v),P.shortenLabel?P.shortenLabel():M&&!E&&d.whiteSpace!=="nowrap"&&(M<(O.textPxLength||0)||O.element.tagName==="SPAN")?O.css(dn(z,{width:`${M}px`,lineClamp:S})):!O.styles.width||z.width||E||O.css({width:"auto"}),P.rotation=v.rotation)},this),this.tickRotCorr=s.rotCorr(b.b,this.labelRotation||0,this.side!==0)}hasData(){return this.series.some(function(e){return e.hasData()})||this.options.showEmpty&&Ct(this.min)&&Ct(this.max)}addTitle(e){let s,r=this.chart.renderer,l=this.horiz,h=this.opposite,d=this.options.title,u=this.chart.styledMode;this.axisTitle||((s=d.textAlign)||(s=(l?{low:"left",middle:"center",high:"right"}:{low:h?"right":"left",middle:"center",high:h?"left":"right"})[d.align]),this.axisTitle=r.text(d.text||"",0,0,d.useHTML).attr({zIndex:7,rotation:d.rotation||0,align:s}).addClass("highcharts-axis-title"),u||this.axisTitle.css(un(d.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),u||d.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[e?"show":"hide"](e)}generateTick(e){let s=this.ticks;s[e]?s[e].addLabel():s[e]=new Bi(this,e)}createGroups(){let{axisParent:e,chart:s,coll:r,options:l}=this,h=s.renderer,d=(u,f,m)=>h.g(u).attr({zIndex:m}).addClass(`highcharts-${r.toLowerCase()}${f} `+(this.isRadial?`highcharts-radial-axis${f} `:"")+(l.className||"")).add(e);this.axisGroup||(this.gridGroup=d("grid","-grid",l.gridZIndex),this.axisGroup=d("axis","",l.zIndex),this.labelGroup=d("axis-labels","-labels",l.labels.zIndex))}getOffset(){let e=this,{chart:s,horiz:r,options:l,side:h,ticks:d,tickPositions:u,coll:f}=e,m=s.inverted&&!e.isZAxis?[1,0,3,2][h]:h,v=e.hasData(),b=l.title,k=l.labels,M=rt(l.crossing),S=s.axisOffset,A=s.clipOffset,T=[-1,1,1,-1][h],P,O=0,E,z=0,I=0,B,j;if(e.showAxis=P=v||l.showEmpty,e.staggerLines=e.horiz&&k.staggerLines||void 0,e.createGroups(),v||e.isLinked?(u.forEach(function(F){e.generateTick(F)}),e.renderUnsquish(),e.reserveSpaceDefault=h===0||h===2||{1:"left",3:"right"}[h]===e.labelAlign,dt(k.reserveSpace,!M&&null,e.labelAlign==="center"||null,e.reserveSpaceDefault)&&u.forEach(function(F){I=Math.max(d[F].getLabelSize(),I)}),e.staggerLines&&(I*=e.staggerLines),e.labelOffset=I*(e.opposite?-1:1)):fn(d,function(F,H){F.destroy(),delete d[H]}),b!=null&&b.text&&b.enabled!==!1&&(e.addTitle(P),P&&!M&&b.reserveSpace!==!1&&(e.titleOffset=O=e.axisTitle.getBBox()[r?"height":"width"],z=Ct(E=b.offset)?0:dt(b.margin,r?5:10))),e.renderLine(),e.offset=T*dt(l.offset,S[h]?S[h]+(l.margin||0):0),e.tickRotCorr=e.tickRotCorr||{x:0,y:0},j=h===0?-e.labelMetrics().h:h===2?e.tickRotCorr.y:0,B=Math.abs(I)+z,I&&(B-=j,B+=T*(r?dt(k.y,e.tickRotCorr.y+T*k.distance):dt(k.x,T*k.distance))),e.axisTitleMargin=dt(E,B),e.getMaxLabelDimensions&&(e.maxLabelDimensions=e.getMaxLabelDimensions(d,u)),f!=="colorAxis"&&A){let F=this.tickSize("tick");S[h]=Math.max(S[h],(e.axisTitleMargin||0)+O+T*e.offset,B,u!=null&&u.length&&F?F[0]+T*e.offset:0);let H=!e.axisLine||l.offset?0:e.axisLine.strokeWidth()/2;A[m]=Math.max(A[m],H)}Rt(this,"afterGetOffset")}getLinePath(e){let s=this.chart,r=this.opposite,l=this.offset,h=this.horiz,d=this.left+(r?this.width:0)+l,u=s.chartHeight-this.bottom-(r?this.height:0)+l;return r&&(e*=-1),s.renderer.crispLine([["M",h?this.left:d,h?u:this.top],["L",h?s.chartWidth-this.right:d,h?u:s.chartHeight-this.bottom]],e)}renderLine(){!this.axisLine&&(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))}getTitlePosition(e){let s=this.horiz,r=this.left,l=this.top,h=this.len,d=this.options.title,u=s?r:l,f=this.opposite,m=this.offset,v=d.x,b=d.y,k=this.chart.renderer.fontMetrics(e),M=e?Math.max(e.getBBox(!1,0).height-k.h-1,0):0,S={low:u+(s?0:h),middle:u+h/2,high:u+(s?h:0)}[d.align],A=(s?l+this.height:r)+(s?1:-1)*(f?-1:1)*(this.axisTitleMargin||0)+[-M,M,k.f,-M][this.side],T={x:s?S+v:A+(f?this.width:0)+m+v,y:s?A+b-(f?this.height:0)+m:S+b};return Rt(this,"afterGetTitlePosition",{titlePosition:T}),T}renderMinorTick(e,s){let r=this.minorTicks;r[e]||(r[e]=new Bi(this,e,"minor")),s&&r[e].isNew&&r[e].render(null,!0),r[e].render(null,!1,1)}renderTick(e,s,r){var d;let l=this.isLinked,h=this.ticks;(!l||e>=this.min&&e<=this.max||(d=this.grid)!=null&&d.isColumn)&&(h[e]||(h[e]=new Bi(this,e)),r&&h[e].isNew&&h[e].render(s,!0,-1),h[e].render(s))}render(){let e,s,r=this,l=r.chart,h=r.logarithmic,d=l.renderer,u=r.options,f=r.isLinked,m=r.tickPositions,v=r.axisTitle,b=r.ticks,k=r.minorTicks,M=r.alternateBands,S=u.stackLabels,A=u.alternateGridColor,T=u.crossing,P=r.tickmarkOffset,O=r.axisLine,E=r.showAxis,z=Yf(d.globalAnimation);if(r.labelEdge.length=0,r.overlap=!1,[b,k,M].forEach(function(I){fn(I,function(B){B.isActive=!1})}),rt(T)){let I=this.isXAxis?l.yAxis[0]:l.xAxis[0],B=[1,-1,-1,1][this.side];if(I){let j=I.toPixels(T,!0);r.horiz&&(j=I.len-j),r.offset=B*j}}if(r.hasData()||f){let I=r.chart.hasRendered&&r.old&&rt(r.old.min);r.minorTickInterval&&!r.categories&&r.getMinorTickPositions().forEach(function(B){r.renderMinorTick(B,I)}),m.length&&(m.forEach(function(B,j){r.renderTick(B,j,I)}),P&&(r.min===0||r.single)&&(b[-1]||(b[-1]=new Bi(r,-1,null,!0)),b[-1].render(-1))),A&&m.forEach(function(B,j){s=m[j+1]!==void 0?m[j+1]+P:r.max-P,j%2==0&&B<r.max&&s<=r.max+(l.polar?-P:P)&&(M[B]||(M[B]=new Y.PlotLineOrBand(r,{})),e=B+P,M[B].options={from:h?h.lin2log(e):e,to:h?h.lin2log(s):s,color:A,className:"highcharts-alternate-grid"},M[B].render(),M[B].isActive=!0)}),r._addedPlotLB||(r._addedPlotLB=!0,(u.plotLines||[]).concat(u.plotBands||[]).forEach(function(B){r.addPlotBandOrLine(B)}))}[b,k,M].forEach(function(I){let B=[],j=z.duration;fn(I,function(F,H){F.isActive||(F.render(H,!1,0),F.isActive=!1,B.push(H))}),ep(function(){let F=B.length;for(;F--;)I[B[F]]&&!I[B[F]].isActive&&(I[B[F]].destroy(),delete I[B[F]])},I!==M&&l.hasRendered&&j?j:0)}),O&&(O[O.isPlaced?"animate":"attr"]({d:this.getLinePath(O.strokeWidth())}),O.isPlaced=!0,O[E?"show":"hide"](E)),v&&E&&(v[v.isNew?"attr":"animate"](r.getTitlePosition(v)),v.isNew=!1),S!=null&&S.enabled&&r.stacking&&r.stacking.renderStackTotals(),r.old={len:r.len,max:r.max,min:r.min,transA:r.transA,userMax:r.userMax,userMin:r.userMin},r.isDirty=!1,Rt(this,"afterRender")}redraw(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(e){e.render()})),this.series.forEach(function(e){e.isDirty=!0})}getKeepProps(){return this.keepProps||zi.keepProps}destroy(e){let s=this,r=s.plotLinesAndBands,l=this.eventOptions;if(Rt(this,"destroy",{keepEvents:e}),e||Jf(s),[s.ticks,s.minorTicks,s.alternateBands].forEach(function(h){qf(h)}),r){let h=r.length;for(;h--;)r[h].destroy()}for(let h in["axisLine","axisTitle","axisGroup","gridGroup","labelGroup","cross","scrollbar"].forEach(function(d){s[d]&&(s[d]=s[d].destroy())}),s.plotLinesAndBandsGroups)s.plotLinesAndBandsGroups[h]=s.plotLinesAndBandsGroups[h].destroy();fn(s,function(h,d){s.getKeepProps().indexOf(d)===-1&&delete s[d]}),this.eventOptions=l}drawCrosshair(e,s){var b;let r=this.crosshair,l=(r==null?void 0:r.snap)??!0,h=this.chart,d,u,f,m=this.cross,v;if(Rt(this,"drawCrosshair",{e,point:s}),e||(e=(b=this.cross)==null?void 0:b.e),r&&(Ct(s)||!l)!==!1){if(l?Ct(s)&&(u=dt(this.coll!=="colorAxis"?s.crosshairPos:null,this.isXAxis?s.plotX:this.len-s.plotY)):u=e&&(this.horiz?e.chartX-this.pos:this.len-e.chartY+this.pos),Ct(u)&&(v={value:s&&(this.isXAxis?s.x:dt(s.stackY,s.y)),translatedValue:u},h.polar&&dn(v,{isCrosshair:!0,chartX:e==null?void 0:e.chartX,chartY:e==null?void 0:e.chartY,point:s}),d=this.getPlotLinePath(v)||null),!Ct(d))return void this.hideCrosshair();f=this.categories&&!this.isRadial,m||(this.cross=m=h.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(f?"category ":"thin ")+(r.className||"")).attr({zIndex:dt(r.zIndex,2)}).add(),!h.styledMode&&(m.attr({stroke:r.color||(f?It.parse("#ccd3ff").setOpacity(.25).get():"#cccccc"),"stroke-width":dt(r.width,1)}).css({"pointer-events":"none"}),r.dashStyle&&m.attr({dashstyle:r.dashStyle}))),m.show().attr({d}),f&&!r.width&&m.attr({"stroke-width":this.transA}),this.cross.e=e}else this.hideCrosshair();Rt(this,"afterDrawCrosshair",{e,point:s})}hideCrosshair(){this.cross&&this.cross.hide(),Rt(this,"afterHideCrosshair")}update(e,s){let r=this.chart;e=un(this.userOptions,e),this.destroy(!0),this.init(r,e),r.isDirtyBox=!0,dt(s,!0)&&r.redraw()}remove(e){let s=this.chart,r=this.coll,l=this.series,h=l.length;for(;h--;)l[h]&&l[h].remove(!1);ul(s.axes,this),ul(s[r]||[],this),s.orderItems(r),this.destroy(),s.isDirtyBox=!0,dt(e,!0)&&s.redraw()}setTitle(e,s){this.update({title:e},s)}setCategories(e,s){this.update({categories:e},s)}}zi.keepProps=["coll","extKey","hcEvents","len","names","series","userMax","userMin"];let{addEvent:ip,getMagnitude:sp,normalizeTickInterval:np,timeUnits:gn}=ot;(function(x){function e(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}function s(){if(this.type!=="datetime"){this.dateTime=void 0;return}this.dateTime||(this.dateTime=new r(this))}x.compose=function(l){return l.keepProps.includes("dateTime")||(l.keepProps.push("dateTime"),l.prototype.getTimeTicks=e,ip(l,"afterSetType",s)),l};class r{constructor(h){this.axis=h}normalizeTimeTickInterval(h,d){let u=d||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],f=u[u.length-1],m=gn[f[0]],v=f[1],b;for(b=0;b<u.length&&(m=gn[(f=u[b])[0]],v=f[1],!u[b+1]||!(h<=(m*v[v.length-1]+gn[u[b+1][0]])/2));b++);m===gn.year&&h<5*m&&(v=[1,2,5]);let k=np(h/m,v,f[0]==="year"?Math.max(sp(h/m),1):1);return{unitRange:m,count:k,unitName:f[0]}}getXDateFormat(h,d){let{axis:u}=this,f=u.chart.time;return u.closestPointRange?f.getDateFormat(u.closestPointRange,h,u.options.startOfWeek,d)||f.resolveDTLFormat(d.year).main:f.resolveDTLFormat(d.day).main}}x.Additions=r})(w||(w={}));let op=w,{addEvent:xl,normalizeTickInterval:rp,pick:ap}=ot;(function(x){function e(){this.type!=="logarithmic"?this.logarithmic=void 0:this.logarithmic??(this.logarithmic=new r(this))}function s(){let l=this.logarithmic;l&&(this.lin2val=function(h){return l.lin2log(h)},this.val2lin=function(h){return l.log2lin(h)})}x.compose=function(l){return l.keepProps.includes("logarithmic")||(l.keepProps.push("logarithmic"),xl(l,"afterSetType",e),xl(l,"afterInit",s)),l};class r{constructor(h){this.axis=h}getLogTickPositions(h,d,u,f){let m=this.axis,v=m.len,b=m.options,k=[];if(f||(this.minorAutoInterval=void 0),h>=.5)h=Math.round(h),k=m.getLinearTickPositions(h,d,u);else if(h>=.08){let M,S,A,T,P,O,E,z=Math.floor(d);for(M=h>.3?[1,2,4]:h>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],S=z;S<u+1&&!E;S++)for(A=0,T=M.length;A<T&&!E;A++)(P=this.log2lin(this.lin2log(S)*M[A]))>d&&(!f||O<=u)&&O!==void 0&&k.push(O),O>u&&(E=!0),O=P}else{let M=this.lin2log(d),S=this.lin2log(u),A=f?m.getMinorTickInterval():b.tickInterval,T=b.tickPixelInterval/(f?5:1),P=f?v/m.tickPositions.length:v;h=rp(h=ap(A==="auto"?null:A,this.minorAutoInterval,(S-M)*T/(P||1))),k=m.getLinearTickPositions(h,M,S).map(this.log2lin),f||(this.minorAutoInterval=h/5)}return f||(m.tickInterval=h),k}lin2log(h){return Math.pow(10,h)}log2lin(h){return Math.log(h)/Math.LN10}}x.Additions=r})(C||(C={}));let lp=C,{erase:hp,extend:cp,isNumber:bl}=ot;(function(x){let e;function s(m){return this.addPlotBandOrLine(m,"plotBands")}function r(m,v){let b=this.userOptions,k=new e(this,m);if(this.visible&&(k=k.render()),k){if(this._addedPlotLB||(this._addedPlotLB=!0,(b.plotLines||[]).concat(b.plotBands||[]).forEach(M=>{this.addPlotBandOrLine(M)})),v){let M=b[v]||[];M.push(m),b[v]=M}this.plotLinesAndBands.push(k)}return k}function l(m){return this.addPlotBandOrLine(m,"plotLines")}function h(m,v,b){b=b||this.options;let k=this.getPlotLinePath({value:v,force:!0,acrossPanes:b.acrossPanes}),M=[],S=this.horiz,A=!bl(this.min)||!bl(this.max)||m<this.min&&v<this.min||m>this.max&&v>this.max,T=this.getPlotLinePath({value:m,force:!0,acrossPanes:b.acrossPanes}),P,O=1,E;if(T&&k)for(A&&(E=T.toString()===k.toString(),O=0),P=0;P<T.length;P+=2){let z=T[P],I=T[P+1],B=k[P],j=k[P+1];(z[0]==="M"||z[0]==="L")&&(I[0]==="M"||I[0]==="L")&&(B[0]==="M"||B[0]==="L")&&(j[0]==="M"||j[0]==="L")&&(S&&B[1]===z[1]?(B[1]+=O,j[1]+=O):S||B[2]!==z[2]||(B[2]+=O,j[2]+=O),M.push(["M",z[1],z[2]],["L",I[1],I[2]],["L",j[1],j[2]],["L",B[1],B[2]],["Z"])),M.isFlat=E}return M}function d(m){this.removePlotBandOrLine(m)}function u(m){let v=this.plotLinesAndBands,b=this.options,k=this.userOptions;if(v){let M=v.length;for(;M--;)v[M].id===m&&v[M].destroy();[b.plotLines||[],k.plotLines||[],b.plotBands||[],k.plotBands||[]].forEach(function(S){var A;for(M=S.length;M--;)((A=S[M])==null?void 0:A.id)===m&&hp(S,S[M])})}}function f(m){this.removePlotBandOrLine(m)}x.compose=function(m,v){let b=v.prototype;return b.addPlotBand||(e=m,cp(b,{addPlotBand:s,addPlotLine:l,addPlotBandOrLine:r,getPlotBandPath:h,removePlotBand:d,removePlotLine:f,removePlotBandOrLine:u})),v}})(_||(_={}));let dp=_,{addEvent:up,arrayMax:yl,arrayMin:vl,defined:Oe,destroyObjectProperties:fp,erase:pp,fireEvent:gp,merge:kl,objectEach:mp,pick:xp}=ot;class mn{static compose(e,s){return up(e,"afterInit",function(){this.labelCollectors.push(()=>{var l;let r=[];for(let h of this.axes)for(let{label:d,options:u}of h.plotLinesAndBands)d&&!((l=u==null?void 0:u.label)!=null&&l.allowOverlap)&&r.push(d);return r})}),dp.compose(mn,s)}constructor(e,s){this.axis=e,this.options=s,this.id=s.id}render(){gp(this,"render");let{axis:e,options:s}=this,{horiz:r,logarithmic:l}=e,{color:h,events:d,zIndex:u=0}=s,{renderer:f,time:m}=e.chart,v={},b=m.parse(s.to),k=m.parse(s.from),M=m.parse(s.value),S=s.borderWidth,A=s.label,{label:T,svgElem:P}=this,O=[],E,z=Oe(k)&&Oe(b),I=Oe(M),B=!P,j={class:"highcharts-plot-"+(z?"band ":"line ")+(s.className||"")},F=z?"bands":"lines";if(!e.chart.styledMode&&(I?(j.stroke=h||"#999999",j["stroke-width"]=xp(s.width,1),s.dashStyle&&(j.dashstyle=s.dashStyle)):z&&(j.fill=h||"#e6e9ff",S&&(j.stroke=s.borderColor,j["stroke-width"]=S))),v.zIndex=u,F+="-"+u,(E=e.plotLinesAndBandsGroups[F])||(e.plotLinesAndBandsGroups[F]=E=f.g("plot-"+F).attr(v).add()),P||(this.svgElem=P=f.path().attr(j).add(E)),Oe(M))O=e.getPlotLinePath({value:(l==null?void 0:l.log2lin(M))??M,lineWidth:P.strokeWidth(),acrossPanes:s.acrossPanes});else{if(!(Oe(k)&&Oe(b)))return;O=e.getPlotBandPath((l==null?void 0:l.log2lin(k))??k,(l==null?void 0:l.log2lin(b))??b,s)}return!this.eventsAdded&&d&&(mp(d,(H,G)=>{P==null||P.on(G,U=>{d[G].apply(this,[U])})}),this.eventsAdded=!0),(B||!P.d)&&(O!=null&&O.length)?P.attr({d:O}):P&&(O?(P.show(),P.animate({d:O})):P.d&&(P.hide(),T&&(this.label=T=T.destroy()))),A&&(Oe(A.text)||Oe(A.formatter))&&(O!=null&&O.length)&&e.width>0&&e.height>0&&!O.isFlat?(A=kl({align:r&&z?"center":void 0,x:r?!z&&4:10,verticalAlign:!r&&z?"middle":void 0,y:r?z?16:10:z?6:-4,rotation:r&&!z?90:0,...z?{inside:!0}:{}},A),this.renderLabel(A,O,z,u)):T&&T.hide(),this}renderLabel(e,s,r,l){var S,A,T;let h=this.axis,d=h.chart.renderer,u=e.inside,f=this.label;f||(this.label=f=d.text(this.getLabelText(e),0,0,e.useHTML).attr({align:e.textAlign||e.align,rotation:e.rotation,class:"highcharts-plot-"+(r?"band":"line")+"-label "+(e.className||""),zIndex:l}),h.chart.styledMode||f.css(kl({color:(A=(S=h.chart.options.title)==null?void 0:S.style)==null?void 0:A.color,fontSize:"0.8em",textOverflow:r&&!u?"":"ellipsis"},e.style)),f.add());let m=s.xBounds||[s[0][1],s[1][1],r?s[2][1]:s[0][1]],v=s.yBounds||[s[0][2],s[1][2],r?s[2][2]:s[0][2]],b=vl(m),k=vl(v),M=yl(m)-b;f.align(e,!1,{x:b,y:k,width:M,height:yl(v)-k}),f.alignAttr.y-=d.fontMetrics(f).b,(!f.alignValue||f.alignValue==="left"||Oe(u))&&f.css({width:(((T=e.style)==null?void 0:T.width)||(r&&u?M:f.rotation===90?h.height-(f.alignAttr.y-h.top):(e.clip?h.width:h.chart.chartWidth)-(f.alignAttr.x-h.left)))+"px"}),f.show(!0)}getLabelText(e){return Oe(e.formatter)?e.formatter.call(this):e.text}destroy(){pp(this.axis.plotLinesAndBands,this),delete this.axis,fp(this)}}let{animObject:bp}=Jt,{format:wl}=ue,{composed:yp,dateFormats:vp,doc:Ml,isSafari:kp}=Y,{distribute:wp}=Zs,{addEvent:Mp,clamp:Fi,css:Sl,discardElement:Sp,extend:Cp,fireEvent:Qo,getAlignFactor:Cl,isArray:Pp,isNumber:Tp,isObject:Ap,isString:Jo,merge:_p,pick:Ni,pushUnique:Op,splat:tr,syncTimeout:Lp}=ot;class er{constructor(e,s,r){this.allowShared=!0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.options={},this.outside=!1,this.chart=e,this.init(e,s),this.pointer=r}bodyFormatter(e){return e.map(s=>{let r=s.series.tooltipOptions,l=s.formatPrefix||"point";return(r[l+"Formatter"]||s.tooltipFormatter).call(s,r[l+"Format"]||"")})}cleanSplit(e){this.chart.series.forEach(function(s){let r=s==null?void 0:s.tt;r&&(!r.isActive||e?s.tt=r.destroy():r.isActive=!1)})}defaultFormatter(e){let s,r=this.points||tr(this);return(s=(s=[e.headerFooterFormatter(r[0])]).concat(e.bodyFormatter(r))).push(e.headerFooterFormatter(r[0],!0)),s}destroy(){this.label&&(this.label=this.label.destroy()),this.split&&(this.cleanSplit(!0),this.tt&&(this.tt=this.tt.destroy())),this.renderer&&(this.renderer=this.renderer.destroy(),Sp(this.container)),ot.clearTimeout(this.hideTimer)}getAnchor(e,s){var v;let r,{chart:l,pointer:h}=this,d=l.inverted,u=l.plotTop,f=l.plotLeft;if(e=tr(e),(v=e[0].series)!=null&&v.yAxis&&!e[0].series.yAxis.options.reversedStacks&&(e=e.slice().reverse()),this.followPointer&&s)s.chartX===void 0&&(s=h.normalize(s)),r=[s.chartX-f,s.chartY-u];else if(e[0].tooltipPos)r=e[0].tooltipPos;else{let b=0,k=0;e.forEach(function(M){let S=M.pos(!0);S&&(b+=S[0],k+=S[1])}),b/=e.length,k/=e.length,this.shared&&e.length>1&&s&&(d?b=s.chartX:k=s.chartY),r=[b-f,k-u]}let m={point:e[0],ret:r};return Qo(this,"getAnchor",m),m.ret.map(Math.round)}getClassName(e,s,r){let l=this.options,h=e.series,d=h.options;return[l.className,"highcharts-label",r&&"highcharts-tooltip-header",s?"highcharts-tooltip-box":"highcharts-tooltip",!r&&"highcharts-color-"+Ni(e.colorIndex,h.colorIndex),d==null?void 0:d.className].filter(Jo).join(" ")}getLabel({anchorX:e,anchorY:s}={anchorX:0,anchorY:0}){let r=this,l=this.chart.styledMode,h=this.options,d=this.split&&this.allowShared,u=this.container,f=this.chart.renderer;if(this.label){let m=!this.label.hasClass("highcharts-label");(!d&&m||d&&!m)&&this.destroy()}if(!this.label){if(this.outside){let m=this.chart,v=m.options.chart.style,b=Qi.getRendererType();this.container=u=Y.doc.createElement("div"),u.className="highcharts-tooltip-container "+(m.renderTo.className.match(/(highcharts[a-zA-Z0-9-]+)\s?/gm)||""),Sl(u,{position:"absolute",top:"1px",pointerEvents:"none",zIndex:Math.max(this.options.style.zIndex||0,((v==null?void 0:v.zIndex)||0)+3)}),this.renderer=f=new b(u,0,0,v,void 0,void 0,f.styledMode)}if(d?this.label=f.g("tooltip"):(this.label=f.label("",e,s,h.shape||"callout",void 0,void 0,h.useHTML,void 0,"tooltip").attr({padding:h.padding,r:h.borderRadius}),l||this.label.attr({fill:h.backgroundColor,"stroke-width":h.borderWidth||0}).css(h.style).css({pointerEvents:h.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none")})),r.outside){let m=this.label;[m.xSetter,m.ySetter].forEach((v,b)=>{m[b?"ySetter":"xSetter"]=k=>{v.call(m,r.distance),m[b?"y":"x"]=k,u&&(u.style[b?"top":"left"]=`${k}px`)}})}this.label.attr({zIndex:8}).shadow(h.shadow??!h.fixed).add()}return u&&!u.parentElement&&Y.doc.body.appendChild(u),this.label}getPlayingField(){let{body:e,documentElement:s}=Ml,{chart:r,distance:l,outside:h}=this;return{width:h?Math.max(e.scrollWidth,s.scrollWidth,e.offsetWidth,s.offsetWidth,s.clientWidth)-2*l-2:r.chartWidth,height:h?Math.max(e.scrollHeight,s.scrollHeight,e.offsetHeight,s.offsetHeight,s.clientHeight):r.chartHeight}}getPosition(e,s,r){var tt,it;let{distance:l,chart:h,outside:d,pointer:u}=this,{inverted:f,plotLeft:m,plotTop:v,polar:b}=h,{plotX:k=0,plotY:M=0}=r,S={},A=f&&r.h||0,{height:T,width:P}=this.getPlayingField(),O=u.getChartPosition(),E=J=>J*O.scaleX,z=J=>J*O.scaleY,I=J=>{let st=J==="x";return[J,st?P:T,st?e:s].concat(d?[st?E(e):z(s),st?O.left-l+E(k+m):O.top-l+z(M+v),0,st?P:T]:[st?e:s,st?k+m:M+v,st?m:v,st?m+h.plotWidth:v+h.plotHeight])},B=I("y"),j=I("x"),F,H=!!r.negative;!b&&((it=(tt=h.hoverSeries)==null?void 0:tt.yAxis)!=null&&it.reversed)&&(H=!H);let G=!this.followPointer&&Ni(r.ttBelow,!b&&!f===H),U=function(J,st,ct,ft,gt,te,ut){let yt=d?J==="y"?z(l):E(l):l,lt=(ct-ft)/2,at=ft<gt-l,Ht=gt+l+ft<st,vt=gt-yt-ct+lt,At=gt+yt-lt;if(G&&Ht)S[J]=At;else if(!G&&at)S[J]=vt;else if(at)S[J]=Math.min(ut-ft,vt-A<0?vt:vt-A);else{if(!Ht)return S[J]=0,!1;S[J]=Math.max(te,At+A+ct>st?At:At+A)}},q=function(J,st,ct,ft,gt){if(gt<l||gt>st-l)return!1;gt<ct/2?S[J]=1:gt>st-ft/2?S[J]=st-ft-2:S[J]=gt-ct/2},Q=function(J){[B,j]=[j,B],F=J},et=()=>{U.apply(0,B)!==!1?q.apply(0,j)!==!1||F||(Q(!0),et()):F?S.x=S.y=0:(Q(!0),et())};return(f&&!b||this.len>1)&&Q(),et(),S}getFixedPosition(e,s,r){var k;let l=r.series,{chart:h,options:d,split:u}=this,f=d.position,m=f.relativeTo,v=d.shared||(k=l==null?void 0:l.yAxis)!=null&&k.isRadial&&(m==="pane"||!m)?"plotBox":m,b=v==="chart"?h.renderer:h[v]||h.getClipBox(l,!0);return{x:b.x+(b.width-e)*Cl(f.align)+f.x,y:b.y+(b.height-s)*Cl(f.verticalAlign)+(!u&&f.y||0)}}hide(e){let s=this;ot.clearTimeout(this.hideTimer),e=Ni(e,this.options.hideDelay),this.isHidden||(this.hideTimer=Lp(function(){let r=s.getLabel();s.getLabel().animate({opacity:0},{duration:e&&150,complete:()=>{r.hide(),s.container&&s.container.remove()}}),s.isHidden=!0},e))}init(e,s){this.chart=e,this.options=s,this.crosshairs=[],this.isHidden=!0,this.split=s.split&&!e.inverted&&!e.polar,this.shared=s.shared||this.split,this.outside=Ni(s.outside,!!(e.scrollablePixelsX||e.scrollablePixelsY))}shouldStickOnContact(e){return!!(!this.followPointer&&this.options.stickOnContact&&(!e||this.pointer.inClass(e.target,"highcharts-tooltip")))}move(e,s,r,l){let{followPointer:h,options:d}=this,u=bp(!h&&!this.isHidden&&!d.fixed&&d.animation),f=h||(this.len||0)>1,m={x:e,y:s};f?m.anchorX=m.anchorY=NaN:(m.anchorX=r,m.anchorY=l),u.step=()=>this.drawTracker(),this.getLabel().animate(m,u)}refresh(e,s){let{chart:r,options:l,pointer:h,shared:d}=this,u=tr(e),f=u[0],m=l.format,v=l.formatter||this.defaultFormatter,b=r.styledMode,k=this.allowShared;if(!l.enabled||!f.series)return;ot.clearTimeout(this.hideTimer),this.allowShared=!(!Pp(e)&&e.series&&e.series.noSharedTooltip),k=k&&!this.allowShared,this.followPointer=!this.split&&f.series.tooltipOptions.followPointer;let M=this.getAnchor(e,s),S=M[0],A=M[1];d&&this.allowShared&&(h.applyInactiveState(u),u.forEach(O=>O.setState("hover")),f.points=u),this.len=u.length;let T=Jo(m)?wl(m,f,r):v.call(f,this);f.points=void 0;let P=f.series;if(this.distance=Ni(P.tooltipOptions.distance,16),T===!1)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(T,u);else{let O=S,E=A;if(s&&h.isDirectTouch&&(O=s.chartX-r.plotLeft,E=s.chartY-r.plotTop),!(r.polar||P.options.clip===!1||u.some(z=>h.isDirectTouch||z.series.shouldShowTooltip(O,E))))return void this.hide();{let z=this.getLabel(k&&this.tt||{});(!l.style.width||b)&&z.css({width:(this.outside?this.getPlayingField():r.spacingBox).width+"px"}),z.attr({class:this.getClassName(f),text:T&&T.join?T.join(""):T}),this.outside&&z.attr({x:Fi(z.x||0,0,this.getPlayingField().width-(z.width||0)-1)}),b||z.attr({stroke:l.borderColor||f.color||P.color||"#666666"}),this.updatePosition({plotX:S,plotY:A,negative:f.negative,ttBelow:f.ttBelow,series:P,h:M[2]||0})}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}Qo(this,"refresh")}renderSplit(e,s){var gt,te;let r=this,{chart:l,chart:{chartWidth:h,chartHeight:d,plotHeight:u,plotLeft:f,plotTop:m,scrollablePixelsY:v=0,scrollablePixelsX:b,styledMode:k},distance:M,options:S,options:{fixed:A,position:T,positioner:P},pointer:O}=r,{scrollLeft:E=0,scrollTop:z=0}=((gt=l.scrollablePlotArea)==null?void 0:gt.scrollingContainer)||{},I=r.outside&&typeof b!="number"?Ml.documentElement.getBoundingClientRect():{left:E,right:E+h},B=r.getLabel(),j=this.renderer||l.renderer,F=!!((te=l.xAxis[0])!=null&&te.opposite),{left:H,top:G}=O.getChartPosition(),U=P||A,q=m+z,Q=0,et=u-v,tt=function(ut,yt,lt,at=[0,0],Ht=!0){let vt,At;if(lt.isHeader)At=F?0:et,vt=Fi(at[0]-ut/2,I.left,I.right-ut-(r.outside?H:0));else if(A&<){let qt=r.getFixedPosition(ut,yt,lt);vt=qt.x,At=qt.y-q}else At=at[1]-q,vt=Fi(vt=Ht?at[0]-ut-M:at[0]+M,Ht?vt:I.left,I.right);return{x:vt,y:At}};Jo(e)&&(e=[!1,e]);let it=e.slice(0,s.length+1).reduce(function(ut,yt,lt){if(yt!==!1&&yt!==""){let at=s[lt-1]||{isHeader:!0,plotX:s[0].plotX,plotY:u,series:{}},Ht=at.isHeader,vt=Ht?r:at.series,At=vt.tt=function(Qt,_t,ms){let ni=Qt,{isHeader:ki,series:xs}=_t,we=xs.tooltipOptions||S;if(!ni){let Xi={padding:we.padding,r:we.borderRadius};k||(Xi.fill=we.backgroundColor,Xi["stroke-width"]=we.borderWidth??(A&&!ki?0:1)),ni=j.label("",0,0,we[ki?"headerShape":"shape"]||(A&&!ki?"rect":"callout"),void 0,void 0,we.useHTML).addClass(r.getClassName(_t,!0,ki)).attr(Xi).add(B)}return ni.isActive=!0,ni.attr({text:ms}),k||ni.css(we.style).attr({stroke:we.borderColor||_t.color||xs.color||"#333333"}),ni}(vt.tt,at,yt.toString()),qt=At.getBBox(),Ne=qt.width+At.strokeWidth();Ht&&(Q=qt.height,et+=Q,F&&(q-=Q));let{anchorX:pe,anchorY:ee}=function(Qt){let _t,ms,{isHeader:ni,plotX:ki=0,plotY:xs=0,series:we}=Qt;if(ni)_t=Math.max(f+ki,f),ms=m+u/2;else{let{xAxis:Xi,yAxis:jh}=we;_t=Xi.pos+Fi(ki,-M,Xi.len+M),we.shouldShowTooltip(0,jh.pos-m+xs,{ignoreX:!0})&&(ms=jh.pos+xs)}return{anchorX:_t=Fi(_t,I.left-M,I.right+M),anchorY:ms}}(at);if(typeof ee=="number"){let Qt=qt.height+1,_t=(P||tt).call(r,Ne,Qt,at,[pe,ee]);ut.push({align:U?0:void 0,anchorX:pe,anchorY:ee,boxWidth:Ne,point:at,rank:Ni(_t.rank,+!!Ht),size:Qt,target:_t.y,tt:At,x:_t.x})}else At.isActive=!1}return ut},[]);!U&&it.some(ut=>{let{outside:yt}=r,lt=(yt?H:0)+ut.anchorX;return lt<I.left&<+ut.boxWidth<I.right||lt<H-I.left+ut.boxWidth&&I.right-lt>lt})&&(it=it.map(ut=>{let{x:yt,y:lt}=tt.call(this,ut.boxWidth,ut.size,ut.point,[ut.anchorX,ut.anchorY],!1);return Cp(ut,{target:lt,x:yt})})),r.cleanSplit(),wp(it,et);let J={left:H,right:H};it.forEach(function(ut){let{x:yt,boxWidth:lt,isHeader:at}=ut;!at&&(r.outside&&H+yt<J.left&&(J.left=H+yt),!at&&r.outside&&J.left+lt>J.right&&(J.right=H+yt))}),it.forEach(function(ut){let{x:yt,anchorX:lt,anchorY:at,pos:Ht,point:{isHeader:vt}}=ut,At={visibility:Ht===void 0?"hidden":"inherit",x:yt,y:(Ht||0)+q+(A&&T.y||0),anchorX:lt,anchorY:at};if(r.outside&&yt<lt){let qt=H-J.left;qt>0&&(vt||(At.x=yt+qt,At.anchorX=lt+qt),vt&&(At.x=(J.right-J.left)/2,At.anchorX=lt+qt))}ut.tt.attr(At)});let{container:st,outside:ct,renderer:ft}=r;if(ct&&st&&ft){let{width:ut,height:yt,x:lt,y:at}=B.getBBox();ft.setSize(ut+lt,yt+at,!1),st.style.left=J.left+"px",st.style.top=G+"px"}kp&&B.attr({opacity:B.opacity===1?.999:1})}drawTracker(){if(!this.shouldStickOnContact()){this.tracker&&(this.tracker=this.tracker.destroy());return}let e=this.chart,s=this.label,r=this.shared?e.hoverPoints:e.hoverPoint;if(!s||!r)return;let l={x:0,y:0,width:0,height:0},h=this.getAnchor(r),d=s.getBBox();h[0]+=e.plotLeft-(s.translateX||0),h[1]+=e.plotTop-(s.translateY||0),l.x=Math.min(0,h[0]),l.y=Math.min(0,h[1]),l.width=h[0]<0?Math.max(Math.abs(h[0]),d.width-h[0]):Math.max(Math.abs(h[0]),d.width),l.height=h[1]<0?Math.max(Math.abs(h[1]),d.height-Math.abs(h[1])):Math.max(Math.abs(h[1]),d.height),this.tracker?this.tracker.attr(l):(this.tracker=s.renderer.rect(l).addClass("highcharts-tracker").add(s),e.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}styledModeFormat(e){return e.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')}headerFooterFormatter(e,s){let r=e.series,l=r.tooltipOptions,h=r.xAxis,d=h==null?void 0:h.dateTime,u={isFooter:s,point:e},f=l.xDateFormat||"",m=l[s?"footerFormat":"headerFormat"];return Qo(this,"headerFormatter",u,function(v){if(d&&!f&&Tp(e.key)&&(f=d.getXDateFormat(e.key,l.dateTimeLabelFormats)),d&&f){if(Ap(f)){let b=f;vp[0]=k=>r.chart.time.dateFormat(b,k),f="%0"}(e.tooltipDateKeys||["key"]).forEach(b=>{m=m.replace(RegExp("point\\."+b+"([ \\)}])"),`(point.${b}:${f})$1`)})}r.chart.styledMode&&(m=this.styledModeFormat(m)),v.text=wl(m,e,this.chart)}),u.text||""}update(e){this.destroy(),this.init(this.chart,_p(!0,this.options,e))}updatePosition(e){var I;let{chart:s,container:r,distance:l,options:h,pointer:d,renderer:u}=this,{height:f=0,width:m=0}=this.getLabel(),{fixed:v,positioner:b}=h,{left:k,top:M,scaleX:S,scaleY:A}=d.getChartPosition(),T=(b||v&&this.getFixedPosition||this.getPosition).call(this,m,f,e),P=Y.doc,O=(e.plotX||0)+s.plotLeft,E=(e.plotY||0)+s.plotTop,z;if(u&&r){if(b||v){let{scrollLeft:B=0,scrollTop:j=0}=((I=s.scrollablePlotArea)==null?void 0:I.scrollingContainer)||{};T.x+=B+k-l,T.y+=j+M-l}z=(h.borderWidth||0)+2*l+2,u.setSize(Fi(m+z,0,P.documentElement.clientWidth)-1,f+z,!1),(S!==1||A!==1)&&(Sl(r,{transform:`scale(${S}, ${A})`}),O*=S,E*=A),O+=k-T.x,E+=M-T.y}this.move(Math.round(T.x),Math.round(T.y||0),O,E)}}(function(x){x.compose=function(e){Op(yp,"Core.Tooltip")&&Mp(e,"afterInit",function(){let s=this.chart;s.options.tooltip&&(s.tooltip=new x(s,s.options.tooltip,this))})}})(er||(er={}));let Pl=er,{animObject:Ep}=Jt,{defaultOptions:Dp}=de,{format:Ip}=ue,{addEvent:Rp,crisp:Bp,erase:zp,extend:xn,fireEvent:ir,getNestedProperty:Fp,isArray:Np,isFunction:Wp,isNumber:Ke,isObject:bn,merge:Tl,pick:qe,syncTimeout:Hp,removeEvent:Al,uniqueKey:jp}=ot;class ns{animateBeforeDestroy(){let e=this,s={x:e.startXPos,opacity:0},r=e.getGraphicalProps();r.singular.forEach(function(l){e[l]=e[l].animate(l==="dataLabel"?{x:e[l].startXPos,y:e[l].startYPos,opacity:0}:s)}),r.plural.forEach(function(l){e[l].forEach(function(h){h.element&&h.animate(xn({x:e.startXPos},h.startYPos?{x:h.startXPos,y:h.startYPos}:{}))})})}applyOptions(e,s){let r=this.series,l=r.options.pointValKey||r.pointValKey;return xn(this,e=ns.prototype.optionsToObject.call(this,e)),this.options=this.options?xn(this.options,e):e,e.group&&delete this.group,e.dataLabels&&delete this.dataLabels,l&&(this.y=ns.prototype.getNestedProperty.call(this,l)),this.selected&&(this.state="select"),"name"in this&&s===void 0&&r.xAxis&&r.xAxis.hasNames&&(this.x=r.xAxis.nameToX(this)),this.x===void 0&&r?this.x=s??r.autoIncrement():Ke(e.x)&&r.options.relativeXValue?this.x=r.autoIncrement(e.x):typeof this.x=="string"&&(s??(s=r.chart.time.parse(this.x)),Ke(s)&&(this.x=s)),this.isNull=this.isValid&&!this.isValid(),this.formatPrefix=this.isNull?"null":"point",this}destroy(){if(!this.destroyed){let e=this,s=e.series,r=s.chart,l=s.options.dataSorting,h=r.hoverPoints,d=Ep(e.series.chart.renderer.globalAnimation),u=()=>{for(let f in(e.graphic||e.graphics||e.dataLabel||e.dataLabels)&&(Al(e),e.destroyElements()),e)delete e[f]};e.legendItem&&r.legend.destroyItem(e),h&&(e.setState(),zp(h,e),h.length||(r.hoverPoints=null)),e===r.hoverPoint&&e.onMouseOut(),l!=null&&l.enabled?(this.animateBeforeDestroy(),Hp(u,d.duration)):u(),r.pointCount--}this.destroyed=!0}destroyElements(e){let s=this,r=s.getGraphicalProps(e);r.singular.forEach(function(l){s[l]=s[l].destroy()}),r.plural.forEach(function(l){s[l].forEach(function(h){h!=null&&h.element&&h.destroy()}),delete s[l]})}firePointEvent(e,s,r){let l=this,h=this.series.options;l.manageEvent(e),e==="click"&&h.allowPointSelect&&(r=function(d){!l.destroyed&&l.select&&l.select(null,d.ctrlKey||d.metaKey||d.shiftKey)}),ir(l,e,s,r)}getClassName(){var e;return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(this.colorIndex!==void 0?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+((e=this.zone)!=null&&e.className?" "+this.zone.className.replace("highcharts-negative",""):"")}getGraphicalProps(e){let s,r,l=this,h=[],d={singular:[],plural:[]};for((e=e||{graphic:1,dataLabel:1}).graphic&&h.push("graphic","connector"),e.dataLabel&&h.push("dataLabel","dataLabelPath","dataLabelUpper"),r=h.length;r--;)l[s=h[r]]&&d.singular.push(s);return["graphic","dataLabel"].forEach(function(u){let f=u+"s";e[u]&&l[f]&&d.plural.push(f)}),d}getNestedProperty(e){if(e)return e.indexOf("custom.")===0?Fp(e,this.options):this[e]}getZone(){let e=this.series,s=e.zones,r=e.zoneAxis||"y",l,h=0;for(l=s[0];this[r]>=l.value;)l=s[++h];return this.nonZonedColor||(this.nonZonedColor=this.color),l!=null&&l.color&&!this.options.color?this.color=l.color:this.color=this.nonZonedColor,l}hasNewShapeType(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType}constructor(e,s,r){this.formatPrefix="point",this.visible=!0,this.point=this,this.series=e,this.applyOptions(s,r),this.id??(this.id=jp()),this.resolveColor(),this.dataLabelOnNull??(this.dataLabelOnNull=e.options.nullInteraction),e.chart.pointCount++,ir(this,"afterInit")}isValid(){return(Ke(this.x)||this.x instanceof Date)&&Ke(this.y)}optionsToObject(e){var v;let s=this.series,r=s.options.keys,l=r||s.pointArrayMap||["y"],h=l.length,d={},u,f=0,m=0;if(Ke(e)||e===null)d[l[0]]=e;else if(Np(e))for(!r&&e.length>h&&((u=typeof e[0])=="string"?(v=s.xAxis)!=null&&v.dateTime?d.x=s.chart.time.parse(e[0]):d.name=e[0]:u==="number"&&(d.x=e[0]),f++);m<h;)r&&e[f]===void 0||(l[m].indexOf(".")>0?ns.prototype.setNestedProperty(d,e[f],l[m]):d[l[m]]=e[f]),f++,m++;else typeof e=="object"&&(d=e,e.dataLabels&&(s.hasDataLabels=()=>!0),e.marker&&(s._hasPointMarkers=!0));return d}pos(e,s=this.plotY){if(!this.destroyed){let{plotX:r,series:l}=this,{chart:h,xAxis:d,yAxis:u}=l,f=0,m=0;if(Ke(r)&&Ke(s))return e&&(f=d?d.pos:h.plotLeft,m=u?u.pos:h.plotTop),h.inverted&&d&&u?[u.len-s+m,d.len-r+f]:[r+f,s+m]}}resolveColor(){let e=this.series,s=e.chart.options.chart,r=e.chart.styledMode,l,h,d=s.colorCount,u;delete this.nonZonedColor,e.options.colorByPoint?(r||(l=(h=e.options.colors||e.chart.options.colors)[e.colorCounter],d=h.length),u=e.colorCounter,e.colorCounter++,e.colorCounter===d&&(e.colorCounter=0)):(r||(l=e.color),u=e.colorIndex),this.colorIndex=qe(this.options.colorIndex,u),this.color=qe(this.options.color,l)}setNestedProperty(e,s,r){return r.split(".").reduce(function(l,h,d,u){let f=u.length-1===d;return l[h]=f?s:bn(l[h],!0)?l[h]:{},l[h]},e),e}shouldDraw(){return!this.isNull}tooltipFormatter(e){var f;let{chart:s,pointArrayMap:r=["y"],tooltipOptions:l}=this.series,{valueDecimals:h="",valuePrefix:d="",valueSuffix:u=""}=l;return s.styledMode&&(e=((f=s.tooltip)==null?void 0:f.styledModeFormat(e))||e),r.forEach(m=>{m="{point."+m,(d||u)&&(e=e.replace(RegExp(m+"}","g"),d+m+"}"+u)),e=e.replace(RegExp(m+"}","g"),m+":,."+h+"f}")}),Ip(e,this,s)}update(e,s,r,l){let h,d=this,u=d.series,f=d.graphic,m=u.chart,v=u.options;function b(){d.applyOptions(e);let k=f&&d.hasMockGraphic,M=d.y===null?!k:k;f&&M&&(d.graphic=f.destroy(),delete d.hasMockGraphic),bn(e,!0)&&(f!=null&&f.element&&e&&e.marker&&e.marker.symbol!==void 0&&(d.graphic=f.destroy()),e!=null&&e.dataLabels&&d.dataLabel&&(d.dataLabel=d.dataLabel.destroy())),h=d.index;let S={};for(let A of u.dataColumnKeys())S[A]=d[A];u.dataTable.setRow(S,h),v.data[h]=bn(v.data[h],!0)||bn(e,!0)?d.options:qe(e,v.data[h]),u.isDirty=u.isDirtyData=!0,!u.fixedBox&&u.hasCartesianSeries&&(m.isDirtyBox=!0),v.legendType==="point"&&(m.isDirtyLegend=!0),s&&m.redraw(r)}s=qe(s,!0),l===!1?b():d.firePointEvent("update",{options:e},b)}remove(e,s){this.series.removePoint(this.series.data.indexOf(this),e,s)}select(e,s){let r=this,l=r.series,h=l.chart;e=qe(e,!r.selected),this.selectedStaging=e,r.firePointEvent(e?"select":"unselect",{accumulate:s},function(){r.selected=r.options.selected=e,l.options.data[l.data.indexOf(r)]=r.options,r.setState(e&&"select"),s||h.getSelectedPoints().forEach(function(d){let u=d.series;d.selected&&d!==r&&(d.selected=d.options.selected=!1,u.options.data[u.data.indexOf(d)]=d.options,d.setState(h.hoverPoints&&u.options.inactiveOtherPoints?"inactive":""),d.firePointEvent("unselect"))})}),delete this.selectedStaging}onMouseOver(e){let{inverted:s,pointer:r}=this.series.chart;r&&(e=e?r.normalize(e):r.getChartCoordinatesFromPoint(this,s),r.runPointActions(e,this))}onMouseOut(){let e=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(e.hoverPoints||[]).forEach(function(s){s.setState()}),e.hoverPoints=e.hoverPoint=null}manageEvent(e){var l,h,d,u,f,m,v;let s=Tl(this.series.options.point,this.options),r=(l=s.events)==null?void 0:l[e];Wp(r)&&(!((h=this.hcEvents)!=null&&h[e])||((u=(d=this.hcEvents)==null?void 0:d[e])==null?void 0:u.map(b=>b.fn).indexOf(r))===-1)?((f=this.importedUserEvent)==null||f.call(this),this.importedUserEvent=Rp(this,e,r),this.hcEvents&&(this.hcEvents[e].userEvent=!0)):this.importedUserEvent&&!r&&((m=this.hcEvents)!=null&&m[e])&&((v=this.hcEvents)!=null&&v[e].userEvent)&&(Al(this,e),delete this.hcEvents[e],Object.keys(this.hcEvents)||delete this.importedUserEvent)}setState(e,s){var B,j;let r=this.series,l=this.state,h=r.options.states[e||"normal"]||{},d=Dp.plotOptions[r.type].marker&&r.options.marker,u=d&&d.enabled===!1,f=((B=d==null?void 0:d.states)==null?void 0:B[e||"normal"])||{},m=f.enabled===!1,v=this.marker||{},b=r.chart,k=d&&r.markerAttribs,M=r.halo,S,A,T,P=r.stateMarkerGraphic,O;if((e=e||"")===this.state&&!s||this.selected&&e!=="select"||h.enabled===!1||e&&(m||u&&f.enabled===!1)||e&&v.states&&v.states[e]&&v.states[e].enabled===!1)return;if(this.state=e,k&&(S=r.markerAttribs(this,e)),this.graphic&&!this.hasMockGraphic){if(l&&this.graphic.removeClass("highcharts-point-"+l),e&&this.graphic.addClass("highcharts-point-"+e),!b.styledMode){A=r.pointAttribs(this,e),T=qe(b.options.chart.animation,h.animation);let F=A.opacity;r.options.inactiveOtherPoints&&Ke(F)&&(this.dataLabels||[]).forEach(function(H){H&&!H.hasClass("highcharts-data-label-hidden")&&(H.animate({opacity:F},T),H.connector&&H.connector.animate({opacity:F},T))}),this.graphic.animate(A,T)}S&&this.graphic.animate(S,qe(b.options.chart.animation,f.animation,d.animation)),P&&P.hide()}else e&&f&&(O=v.symbol||r.symbol,P&&P.currentSymbol!==O&&(P=P.destroy()),S&&(P?P[s?"animate":"attr"]({x:S.x,y:S.y}):O&&(r.stateMarkerGraphic=P=b.renderer.symbol(O,S.x,S.y,S.width,S.height,Tl(d,f)).add(r.markerGroup),P.currentSymbol=O)),!b.styledMode&&P&&this.state!=="inactive"&&P.attr(r.pointAttribs(this,e))),P&&(P[e&&this.isInside?"show":"hide"](),P.element.point=this,P.addClass(this.getClassName(),!0));let E=h.halo,z=this.graphic||P,I=(z==null?void 0:z.visibility)||"inherit";E!=null&&E.size&&z&&I!=="hidden"&&!this.isCluster?(M||(r.halo=M=b.renderer.path().add(z.parentGroup)),M.show()[s?"animate":"attr"]({d:this.haloPath(E.size)}),M.attr({class:"highcharts-halo highcharts-color-"+qe(this.colorIndex,r.colorIndex)+(this.className?" "+this.className:""),visibility:I,zIndex:-1}),M.point=this,b.styledMode||M.attr(xn({fill:this.color||r.color,"fill-opacity":E.opacity},Lt.filterUserAttributes(E.attributes||{})))):(j=M==null?void 0:M.point)!=null&&j.haloPath&&!M.point.destroyed&&M.animate({d:M.point.haloPath(0)},null,M.hide),ir(this,"afterSetState",{state:e})}haloPath(e){let s=this.pos();return s?this.series.chart.renderer.symbols.circle(Bp(s[0],1)-e,s[1]-e,2*e,2*e):[]}}let Ze=ns,{parse:Xp}=It,{charts:sr,composed:Vp,isTouchDevice:Yp}=Y,{addEvent:fe,attr:Gp,css:nr,extend:or,find:_l,fireEvent:Qe,isNumber:yn,isObject:vn,objectEach:$p,offset:Up,pick:Le,pushUnique:Kp,splat:Ol}=ot;class Ut{applyInactiveState(e=[]){var r,l;let s=[];for(let h of(e.forEach(d=>{let u=d.series;s.push(u),u.linkedParent&&s.push(u.linkedParent),u.linkedSeries&&s.push.apply(s,u.linkedSeries),u.navigatorSeries&&s.push(u.navigatorSeries),u.boosted&&u.markerGroup&&s.push.apply(s,this.chart.series.filter(f=>f.markerGroup===u.markerGroup))}),this.chart.series)){let d=h.options;((l=(r=d.states)==null?void 0:r.inactive)==null?void 0:l.enabled)!==!1&&(s.indexOf(h)===-1?h.setState("inactive",!0):d.inactiveOtherPoints&&h.setAllPointsToState("inactive"))}}destroy(){let e=this;this.eventsToUnbind.forEach(s=>s()),this.eventsToUnbind=[],!Y.chartCount&&(Ut.unbindDocumentMouseUp.forEach(s=>s.unbind()),Ut.unbindDocumentMouseUp.length=0,Ut.unbindDocumentTouchEnd&&(Ut.unbindDocumentTouchEnd=Ut.unbindDocumentTouchEnd())),clearInterval(e.tooltipTimeout),$p(e,function(s,r){e[r]=void 0})}getSelectionMarkerAttrs(e,s){let r={args:{chartX:e,chartY:s},attrs:{},shapeType:"rect"};return Qe(this,"getSelectionMarkerAttrs",r,l=>{let h,{chart:d,zoomHor:u,zoomVert:f}=this,{mouseDownX:m=0,mouseDownY:v=0}=d,b=l.attrs;b.x=d.plotLeft,b.y=d.plotTop,b.width=u?1:d.plotWidth,b.height=f?1:d.plotHeight,u&&(b.width=Math.max(1,Math.abs(h=e-m)),b.x=(h>0?0:h)+m),f&&(b.height=Math.max(1,Math.abs(h=s-v)),b.y=(h>0?0:h)+v)}),r}drag(e){let{chart:s}=this,{mouseDownX:r=0,mouseDownY:l=0}=s,{panning:h,panKey:d,selectionMarkerFill:u}=s.options.chart,f=s.plotLeft,m=s.plotTop,v=s.plotWidth,b=s.plotHeight,k=vn(h)?h.enabled:h,M=d&&e[`${d}Key`],S=e.chartX,A=e.chartY,T,P=this.selectionMarker;if((!P||!P.touch)&&(S<f?S=f:S>f+v&&(S=f+v),A<m?A=m:A>m+b&&(A=m+b),this.hasDragged=Math.sqrt(Math.pow(r-S,2)+Math.pow(l-A,2)),this.hasDragged>10)){T=s.isInsidePlot(r-f,l-m,{visiblePlotOnly:!0});let{shapeType:O,attrs:E}=this.getSelectionMarkerAttrs(S,A);this.hasZoom&&T&&!M&&!P&&(this.selectionMarker=P=s.renderer[O](),P.attr({class:"highcharts-selection-marker",zIndex:7}).add(),s.styledMode||P.attr({fill:u||Xp("#334eff").setOpacity(.25).get()})),P&&P.attr(E),T&&!P&&k&&s.pan(e,h)}}dragStart(e){let s=this.chart;s.mouseIsDown=e.type,s.cancelClick=!1,s.mouseDownX=e.chartX,s.mouseDownY=e.chartY}getSelectionBox(e){let s={args:{marker:e},result:e.getBBox()};return Qe(this,"getSelectionBox",s),s.result}drop(e){let s,{chart:r,selectionMarker:l}=this;for(let h of r.axes)h.isPanning&&(h.isPanning=!1,(h.options.startOnTick||h.options.endOnTick||h.series.some(d=>d.boosted))&&(h.forceRedraw=!0,h.setExtremes(h.userMin,h.userMax,!1),s=!0));if(s&&r.redraw(),l&&e){if(this.hasDragged){let h=this.getSelectionBox(l);r.transform({axes:r.axes.filter(d=>d.zoomEnabled&&(d.coll==="xAxis"&&this.zoomX||d.coll==="yAxis"&&this.zoomY)),selection:{originalEvent:e,xAxis:[],yAxis:[],...h},from:h})}yn(r.index)&&(this.selectionMarker=l.destroy())}r&&yn(r.index)&&(nr(r.container,{cursor:r._cursor}),r.cancelClick=this.hasDragged>10,r.mouseIsDown=!1,this.hasDragged=0,this.pinchDown=[],this.hasPinchMoved=!1)}findNearestKDPoint(e,s,r){let l;return e.forEach(function(h){let d=!(h.noSharedTooltip&&s)&&0>h.options.findNearestPointBy.indexOf("y"),u=h.searchPoint(r,d);vn(u,!0)&&u.series&&(!vn(l,!0)||function(f,m){var M,S;let v=f.distX-m.distX,b=f.dist-m.dist,k=((M=m.series.group)==null?void 0:M.zIndex)-((S=f.series.group)==null?void 0:S.zIndex);return v!==0&&s?v:b!==0?b:k!==0?k:f.series.index>m.series.index?-1:1}(l,u)>0)&&(l=u)}),l}getChartCoordinatesFromPoint(e,s){let{xAxis:r,yAxis:l}=e.series,h=e.shapeArgs;if(r&&l){let d=e.clientX??e.plotX??0,u=e.plotY||0;return e.isNode&&h&&yn(h.x)&&yn(h.y)&&(d=h.x,u=h.y),s?{chartX:l.len+l.pos-u,chartY:r.len+r.pos-d}:{chartX:d+r.pos,chartY:u+l.pos}}if(h!=null&&h.x&&h.y)return{chartX:h.x,chartY:h.y}}getChartPosition(){if(this.chartPosition)return this.chartPosition;let{container:e}=this.chart,s=Up(e);this.chartPosition={left:s.left,top:s.top,scaleX:1,scaleY:1};let{offsetHeight:r,offsetWidth:l}=e;return l>2&&r>2&&(this.chartPosition.scaleX=s.width/l,this.chartPosition.scaleY=s.height/r),this.chartPosition}getCoordinates(e){let s={xAxis:[],yAxis:[]};for(let r of this.chart.axes)s[r.isXAxis?"xAxis":"yAxis"].push({axis:r,value:r.toValue(e[r.horiz?"chartX":"chartY"])});return s}getHoverData(e,s,r,l,h,d){let u=[],f=function(M){return M.visible&&!(!h&&M.directTouch)&&Le(M.options.enableMouseTracking,!0)},m=s,v,b={chartX:d?d.chartX:void 0,chartY:d?d.chartY:void 0,shared:h};Qe(this,"beforeGetHoverData",b),v=m&&!m.stickyTracking?[m]:r.filter(M=>M.stickyTracking&&(b.filter||f)(M));let k=l&&e||!d?e:this.findNearestKDPoint(v,h,d);return m=k==null?void 0:k.series,k&&(h&&!m.noSharedTooltip?(v=r.filter(function(M){return b.filter?b.filter(M):f(M)&&!M.noSharedTooltip})).forEach(function(M){var T;let S=(T=M.options)==null?void 0:T.nullInteraction,A=_l(M.points,function(P){return P.x===k.x&&(!P.isNull||!!S)});vn(A)&&(M.boosted&&M.boost&&(A=M.boost.getPoint(A)),u.push(A))}):u.push(k)),Qe(this,"afterGetHoverData",b={hoverPoint:k}),{hoverPoint:b.hoverPoint,hoverSeries:m,hoverPoints:u}}getPointFromEvent(e){let s=e.target,r;for(;s&&!r;)r=s.point,s=s.parentNode;return r}onTrackerMouseOut(e){let s=this.chart,r=e.relatedTarget,l=s.hoverSeries;this.isDirectTouch=!1,!l||!r||l.stickyTracking||this.inClass(r,"highcharts-tooltip")||this.inClass(r,"highcharts-series-"+l.index)&&this.inClass(r,"highcharts-tracker")||l.onMouseOut()}inClass(e,s){let r=e,l;for(;r;){if(l=Gp(r,"class")){if(l.indexOf(s)!==-1)return!0;if(l.indexOf("highcharts-container")!==-1)return!1}r=r.parentElement}}constructor(e,s){var r;this.hasDragged=0,this.pointerCaptureEventsToUnbind=[],this.eventsToUnbind=[],this.options=s,this.chart=e,this.runChartClick=!!((r=s.chart.events)!=null&&r.click),this.pinchDown=[],this.setDOMEvents(),Qe(this,"afterInit")}normalize(e,s){let r=e.touches,l=r?r.length?r.item(0):Le(r.changedTouches,e.changedTouches)[0]:e;s||(s=this.getChartPosition());let h=l.pageX-s.left,d=l.pageY-s.top;return or(e,{chartX:Math.round(h/=s.scaleX),chartY:Math.round(d/=s.scaleY)})}onContainerClick(e){let s=this.chart,r=s.hoverPoint,l=this.normalize(e),h=s.plotLeft,d=s.plotTop;!s.cancelClick&&(r&&this.inClass(l.target,"highcharts-tracker")?(Qe(r.series,"click",or(l,{point:r})),s.hoverPoint&&r.firePointEvent("click",l)):(or(l,this.getCoordinates(l)),s.isInsidePlot(l.chartX-h,l.chartY-d,{visiblePlotOnly:!0})&&Qe(s,"click",l)))}onContainerMouseDown(e){var r;let s=(1&(e.buttons||e.button))==1;e=this.normalize(e),Y.isFirefox&&e.button!==0&&this.onContainerMouseMove(e),(e.button===void 0||s)&&(this.zoomOption(e),s&&((r=e.preventDefault)==null||r.call(e)),this.dragStart(e))}onContainerMouseLeave(e){let{pointer:s}=sr[Le(Ut.hoverChartIndex,-1)]||{};e=this.normalize(e),this.onContainerMouseMove(e),s&&!this.inClass(e.relatedTarget,"highcharts-tooltip")&&(s.reset(),s.chartPosition=void 0)}onContainerMouseEnter(){delete this.chartPosition}onContainerMouseMove(e){var h;let s=this.chart,r=s.tooltip,l=this.normalize(e);this.setHoverChartIndex(e),(s.mouseIsDown==="mousedown"||this.touchSelect(l))&&this.drag(l),!((h=s.exporting)!=null&&h.openMenu)&&(this.inClass(l.target,"highcharts-tracker")||s.isInsidePlot(l.chartX-s.plotLeft,l.chartY-s.plotTop,{visiblePlotOnly:!0}))&&!(r!=null&&r.shouldStickOnContact(l))&&(this.inClass(l.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(l))}onDocumentTouchEnd(e){this.onDocumentMouseUp(e)}onContainerTouchMove(e){this.touchSelect(e)?this.onContainerMouseMove(e):this.touch(e)}onContainerTouchStart(e){this.touchSelect(e)?this.onContainerMouseDown(e):(this.zoomOption(e),this.touch(e,!0))}onDocumentMouseMove(e){let s=this.chart,r=s.tooltip,l=this.chartPosition,h=this.normalize(e,l);!l||s.isInsidePlot(h.chartX-s.plotLeft,h.chartY-s.plotTop,{visiblePlotOnly:!0})||r!=null&&r.shouldStickOnContact(h)||h.target!==s.container.ownerDocument&&this.inClass(h.target,"highcharts-tracker")||this.reset()}onDocumentMouseUp(e){var s,r,l;e!=null&&e.touches&&this.hasPinchMoved&&((s=e==null?void 0:e.preventDefault)==null||s.call(e)),(l=(r=sr[Le(Ut.hoverChartIndex,-1)])==null?void 0:r.pointer)==null||l.drop(e)}pinch(e){let s=this,{chart:r,hasZoom:l,lastTouches:h}=s,d=[].map.call(e.touches||[],b=>s.normalize(b)),u=d.length,f=u===1&&(s.inClass(e.target,"highcharts-tracker")&&r.runTrackerClick||s.runChartClick),m=r.tooltip,v=u===1&&Le(m==null?void 0:m.options.followTouchMove,!0);u>1?s.initiated=!0:v&&(s.initiated=!1),l&&s.initiated&&!f&&e.cancelable!==!1&&e.preventDefault(),e.type==="touchstart"?(s.pinchDown=d,s.res=!0,r.mouseDownX=e.chartX):v?this.runPointActions(s.normalize(e)):h&&(Qe(r,"touchpan",{originalEvent:e,touches:d},()=>{let b=k=>{let M=k[0],S=k[1]||M;return{x:M.chartX,y:M.chartY,width:S.chartX-M.chartX,height:S.chartY-M.chartY}};r.transform({axes:r.axes.filter(k=>k.zoomEnabled&&(this.zoomHor&&k.horiz||this.zoomVert&&!k.horiz)),to:b(d),from:b(h),trigger:e.type})}),s.res&&(s.res=!1,this.reset(!1,0))),s.lastTouches=d}reset(e,s){let r=this.chart,l=r.hoverSeries,h=r.hoverPoint,d=r.hoverPoints,u=r.tooltip,f=u!=null&&u.shared?d:h;e&&f&&Ol(f).forEach(function(m){m.series.isCartesian&&m.plotX===void 0&&(e=!1)}),e?u&&f&&Ol(f).length&&(u.refresh(f),u.shared&&d?d.forEach(function(m){m.setState(m.state,!0),m.series.isCartesian&&(m.series.xAxis.crosshair&&m.series.xAxis.drawCrosshair(null,m),m.series.yAxis.crosshair&&m.series.yAxis.drawCrosshair(null,m))}):h&&(h.setState(h.state,!0),r.axes.forEach(function(m){m.crosshair&&h.series[m.coll]===m&&m.drawCrosshair(null,h)}))):(h&&h.onMouseOut(),d&&d.forEach(function(m){m.setState()}),l&&l.onMouseOut(),u&&u.hide(s),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),r.axes.forEac
2h(function(m){m.hideCrosshair()}),r.hoverPoints=r.hoverPoint=void 0)}runPointActions(e,s,r){var A;let l=this.chart,h=l.series,d=(A=l.tooltip)!=null&&A.options.enabled?l.tooltip:void 0,u=!!d&&d.shared,f=s||l.hoverPoint,m=(f==null?void 0:f.series)||l.hoverSeries,v=(!e||e.type!=="touchmove")&&(!!s||(m==null?void 0:m.directTouch)&&this.isDirectTouch),b=this.getHoverData(f,m,h,v,u,e);f=b.hoverPoint,m=b.hoverSeries;let k=b.hoverPoints,M=(m==null?void 0:m.tooltipOptions.followPointer)&&!m.tooltipOptions.split,S=u&&m&&!m.noSharedTooltip;if(f&&(r||f!==l.hoverPoint||d!=null&&d.isHidden)){if((l.hoverPoints||[]).forEach(function(T){k.indexOf(T)===-1&&T.setState()}),l.hoverSeries!==m&&m.onMouseOver(),this.applyInactiveState(k),(k||[]).forEach(function(T){T.setState("hover")}),l.hoverPoint&&l.hoverPoint.firePointEvent("mouseOut"),!f.series)return;l.hoverPoints=k,l.hoverPoint=f,f.firePointEvent("mouseOver",void 0,()=>{d&&f&&d.refresh(S?k:f,e)})}else if(M&&d&&!d.isHidden){let T=d.getAnchor([{}],e);l.isInsidePlot(T[0],T[1],{visiblePlotOnly:!0})&&d.updatePosition({plotX:T[0],plotY:T[1]})}this.unDocMouseMove||(this.unDocMouseMove=fe(l.container.ownerDocument,"mousemove",T=>{var P,O;return(O=(P=sr[Ut.hoverChartIndex??-1])==null?void 0:P.pointer)==null?void 0:O.onDocumentMouseMove(T)}),this.eventsToUnbind.push(this.unDocMouseMove)),l.axes.forEach(function(T){var E;let P,O=((E=T.crosshair)==null?void 0:E.snap)??!0;O&&((P=l.hoverPoint)&&P.series[T.coll]===T||(P=_l(k,z=>{var I;return((I=z.series)==null?void 0:I[T.coll])===T}))),P||!O?T.drawCrosshair(e,P):T.hideCrosshair()})}setDOMEvents(){let e=this.chart.container,s=e.ownerDocument;e.onmousedown=this.onContainerMouseDown.bind(this),e.onmousemove=this.onContainerMouseMove.bind(this),e.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(fe(e,"mouseenter",this.onContainerMouseEnter.bind(this)),fe(e,"mouseleave",this.onContainerMouseLeave.bind(this))),Ut.unbindDocumentMouseUp.some(l=>l.doc===s)||Ut.unbindDocumentMouseUp.push({doc:s,unbind:fe(s,"mouseup",this.onDocumentMouseUp.bind(this))});let r=this.chart.renderTo.parentElement;for(;r&&r.tagName!=="BODY";)this.eventsToUnbind.push(fe(r,"scroll",()=>{delete this.chartPosition})),r=r.parentElement;this.eventsToUnbind.push(fe(e,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1}),fe(e,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),Ut.unbindDocumentTouchEnd||(Ut.unbindDocumentTouchEnd=fe(s,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})),this.setPointerCapture(),fe(this.chart,"redraw",this.setPointerCapture.bind(this))}setPointerCapture(){var h,d;if(!Yp)return;let e=this.pointerCaptureEventsToUnbind,s=this.chart,r=s.container,l=Le((h=s.options.tooltip)==null?void 0:h.followTouchMove,!0)&&s.series.some(u=>u.options.findNearestPointBy.indexOf("y")>-1);!this.hasPointerCapture&&l?(e.push(fe(r,"pointerdown",u=>{var f,m;(f=u.target)!=null&&f.hasPointerCapture(u.pointerId)&&((m=u.target)==null||m.releasePointerCapture(u.pointerId))}),fe(r,"pointermove",u=>{var f,m;(m=(f=s.pointer)==null?void 0:f.getPointFromEvent(u))==null||m.onMouseOver(u)})),s.styledMode||nr(r,{"touch-action":"none"}),r.className+=" highcharts-no-touch-action",this.hasPointerCapture=!0):this.hasPointerCapture&&!l&&(e.forEach(u=>u()),e.length=0,s.styledMode||nr(r,{"touch-action":Le((d=s.options.chart.style)==null?void 0:d["touch-action"],"manipulation")}),r.className=r.className.replace(" highcharts-no-touch-action",""),this.hasPointerCapture=!1)}setHoverChartIndex(e){var l;let s=this.chart,r=Y.charts[Le(Ut.hoverChartIndex,-1)];if(r&&r!==s){let h={relatedTarget:s.container};e&&!(e!=null&&e.relatedTarget)&&Object.assign({},e,h),(l=r.pointer)==null||l.onContainerMouseLeave(e||h)}r!=null&&r.mouseIsDown||(Ut.hoverChartIndex=s.index)}touch(e,s){var d;let r,{chart:l,pinchDown:h=[]}=this;this.setHoverChartIndex(),(e=this.normalize(e)).touches.length===1?l.isInsidePlot(e.chartX-l.plotLeft,e.chartY-l.plotTop,{visiblePlotOnly:!0})&&!((d=l.exporting)!=null&&d.openMenu)?(s&&this.runPointActions(e),e.type==="touchmove"&&(this.hasPinchMoved=r=!!h[0]&&Math.pow(h[0].chartX-e.chartX,2)+Math.pow(h[0].chartY-e.chartY,2)>=16),Le(r,!0)&&this.pinch(e)):s&&this.reset():e.touches.length===2&&this.pinch(e)}touchSelect(e){return!!(this.chart.zooming.singleTouch&&e.touches&&e.touches.length===1)}zoomOption(e){let s=this.chart,r=s.inverted,l=s.zooming.type||"",h,d;/touch/.test(e.type)&&(l=Le(s.zooming.pinchType,l)),this.zoomX=h=/x/.test(l),this.zoomY=d=/y/.test(l),this.zoomHor=h&&!r||d&&r,this.zoomVert=d&&!r||h&&r,this.hasZoom=h||d}}Ut.unbindDocumentMouseUp=[],function(x){x.compose=function(e){Kp(Vp,"Core.Pointer")&&fe(e,"beforeRender",function(){this.pointer=new x(this,this.options)})}}(Ut||(Ut={}));let Ll=Ut;(function(x){x.setLength=function(e,s,r){return Array.isArray(e)?(e.length=s,e):e[r?"subarray":"slice"](0,s)},x.splice=function(e,s,r,l,h=[]){if(Array.isArray(e))return Array.isArray(h)||(h=Array.from(h)
vendor: 19,150 bytes, line 2
2),{removed:e.splice(s,r,...h),array:e};let d=Object.getPrototypeOf(e).constructor,u=e[l?"subarray":"slice"](s,s+r),f=new d(e.length-r+h.length);return f.set(e.subarray(0,s),0),f.set(h,s),f.set(e.subarray(s+r),s+h.length),{removed:u,array:f}}})(L||(L={}));let{setLength:qp,splice:El}=L,{fireEvent:rr,objectEach:os,uniqueKey:rs}=ot,kn=class{constructor(x={}){this.autoId=!x.id,this.columns={},this.id=x.id||rs(),this.modified=this,this.rowCount=0,this.versionTag=rs();let e=0;os(x.columns||{},(s,r)=>{this.columns[r]=s.slice(),e=Math.max(e,s.length)}),this.applyRowCount(e)}applyRowCount(x){this.rowCount=x,os(this.columns,(e,s)=>{e.length!==x&&(this.columns[s]=qp(e,x))})}deleteRows(x,e=1){if(e>0&&x<this.rowCount){let s=0;os(this.columns,(r,l)=>{this.columns[l]=El(r,x,e).array,s=r.length}),this.rowCount=s}rr(this,"afterDeleteRows",{rowIndex:x,rowCount:e}),this.versionTag=rs()}getColumn(x,e){return this.columns[x]}getColumns(x,e){return(x||Object.keys(this.columns)).reduce((s,r)=>(s[r]=this.columns[r],s),{})}getRow(x,e){return(e||Object.keys(this.columns)).map(s=>{var r;return(r=this.columns[s])==null?void 0:r[x]})}setColumn(x,e=[],s=0,r){this.setColumns({[x]:e},s,r)}setColumns(x,e,s){let r=this.rowCount;os(x,(l,h)=>{this.columns[h]=l.slice(),r=l.length}),this.applyRowCount(r),s!=null&&s.silent||(rr(this,"afterSetColumns"),this.versionTag=rs())}setRow(x,e=this.rowCount,s,r){let{columns:l}=this,h=s?this.rowCount+1:e+1;os(x,(d,u)=>{let f=l[u]||(r==null?void 0:r.addColumns)!==!1&&Array(h);f&&(s?f=El(f,e,0,!0,[d]).array:f[e]=d,l[u]=f)}),h>this.rowCount&&this.applyRowCount(h),r!=null&&r.silent||(rr(this,"afterSetRows"),this.versionTag=rs())}},{extend:Zp,merge:Qp,pick:Dl}=ot;(function(x){function e(s,r,l){var z,I;let h=this.legendItem=this.legendItem||{},{chart:d,options:u}=this,{baseline:f=0,symbolWidth:m,symbolHeight:v}=s,b=this.symbol||"circle",k=v/2,M=d.renderer,S=h.group,A=f-Math.round((((z=s.fontMetrics)==null?void 0:z.b)||v)*(l?.4:.3)),T={},P,O=u.marker,E=0;if(d.styledMode||(T["stroke-width"]=Math.min(u.lineWidth||0,24),u.dashStyle?T.dashstyle=u.dashStyle:u.linecap!=="square"&&(T["stroke-linecap"]="round")),h.line=M.path().addClass("highcharts-graph").attr(T).add(S),l&&(h.area=M.path().addClass("highcharts-area").add(S)),T["stroke-linecap"]&&(E=Math.min(h.line.strokeWidth(),m)/2),m){let B=[["M",E,A],["L",m-E,A]];h.line.attr({d:B}),(I=h.area)==null||I.attr({d:[...B,["L",m-E,f],["L",E,f]]})}if(O&&O.enabled!==!1&&m){let B=Math.min(Dl(O.radius,k),k);b.indexOf("url")===0&&(O=Qp(O,{width:v,height:v}),B=0),h.symbol=P=M.symbol(b,m/2-B,A-B,2*B,2*B,Zp({context:"legend"},O)).addClass("highcharts-point").add(S),P.isMarker=!0}}x.areaMarker=function(s,r){e.call(this,s,r,!0)},x.lineMarker=e,x.rectangle=function(s,r){let l=r.legendItem||{},h=s.options,d=s.symbolHeight,u=h.squareSymbol,f=u?d:s.symbolWidth;l.symbol=this.chart.renderer.rect(u?(s.symbolWidth-d)/2:0,s.baseline-d+1,f,d,Dl(s.options.symbolRadius,d/2)).addClass("highcharts-point").attr({zIndex:3}).add(l.group)}})(D||(D={}));let Il=D,{defaultOptions:Rl}=de,{extend:Jp,extendClass:tg,merge:eg}=ot;(function(x){function e(s,r){let l=Rl.plotOptions||{},h=r.defaultOptions,d=r.prototype;return d.type=s,d.pointClass||(d.pointClass=Ze),!x.seriesTypes[s]&&(h&&(l[s]=h),x.seriesTypes[s]=r,!0)}x.seriesTypes=Y.seriesTypes,x.registerSeriesType=e,x.seriesType=function(s,r,l,h,d){let u=Rl.plotOptions||{};if(r=r||"",u[s]=eg(u[r],l),delete x.seriesTypes[s],e(s,tg(x.seriesTypes[r]||ae,h)),x.seriesTypes[s].prototype.type=s,d){class f extends Ze{}Jp(f.prototype,d),x.seriesTypes[s].prototype.pointClass=f}return x.seriesTypes[s]}})(R||(R={}));let Wt=R,{animObject:Bl,setAnimation:ig}=Jt,{defaultOptions:wn}=de,{registerEventOptions:sg}=ln,{svg:ng,win:og}=Y,{seriesTypes:Wi}=Wt,{format:rg}=ue,{arrayMax:ar,arrayMin:zl,clamp:Fl,correctFloat:Nl,crisp:ag,defined:Yt,destroyObjectProperties:lg,diffObjects:hg,erase:Wl,error:Mn,extend:Hi,find:cg,fireEvent:Bt,getClosestDistance:dg,getNestedProperty:Hl,insertItem:jl,isArray:Xl,isNumber:Kt,isString:ug,merge:as,objectEach:lr,pick:zt,removeEvent:fg,syncTimeout:Vl}=ot;class ye{constructor(){this.zoneAxis="y"}init(e,s){var f,m,v;let r;Bt(this,"init",{options:s}),this.dataTable??(this.dataTable=new kn);let l=e.series;this.eventsToUnbind=[],this.chart=e,this.options=this.setOptions(s);let h=this.options,d=h.visible!==!1;this.linkedSeries=[],this.bindAxes(),Hi(this,{name:h.name,state:"",visible:d,selected:h.selected===!0}),sg(this,h);let u=h.events;(u!=null&&u.click||(m=(f=h.point)==null?void 0:f.events)!=null&&m.click||h.allowPointSelect)&&(e.runTrackerClick=!0),this.getColor(),this.getSymbol(),this.isCartesian&&(e.hasCartesianSeries=!0),l.length&&(r=l[l.length-1]),this._i=zt(r==null?void 0:r._i,-1)+1,this.opacity=this.options.opacity,e.orderItems("series",jl(this,l)),(v=h.dataSorting)!=null&&v.enabled?this.setDataSortingOptions():this.points||this.data||this.setData(h.data,!1),Bt(this,"afterInit")}is(e){return Wi[e]&&this instanceof Wi[e]}bindAxes(){let e,s=this,r=s.options,l=s.chart;Bt(this,"bindAxes",null,function(){(s.axisTypes||[]).forEach(function(h){(l[h]||[]).forEach(function(d){e=d.options,(zt(r[h],0)===d.index||r[h]!==void 0&&r[h]===e.id)&&(jl(s,d.series),s[h]=d,d.isDirty=!0)}),s[h]||s.optionalAxis===h||Mn(18,!0,l)})}),Bt(this,"afterBindAxes")}hasData(){return this.visible&&this.dataMax!==void 0&&this.dataMin!==void 0||this.visible&&this.dataTable.rowCount>0}hasMarkerChanged(e,s){let r=e.marker,l=s.marker||{};return r&&(l.enabled&&!r.enabled||l.symbol!==r.symbol||l.height!==r.height||l.width!==r.width)}autoIncrement(e){let s,r=this.options,{pointIntervalUnit:l,relativeXValue:h}=this.options,d=this.chart.time,u=this.xIncrement??d.parse(r.pointStart)??0;if(this.pointInterval=s=zt(this.pointInterval,r.pointInterval,1),h&&Kt(e)&&(s*=e),l){let f=d.toParts(u);l==="day"?f[2]+=s:l==="month"?f[1]+=s:l==="year"&&(f[0]+=s),s=d.makeTime.apply(d,f)-u}return h&&Kt(e)?u+s:(this.xIncrement=u+s,u)}setDataSortingOptions(){let e=this.options;Hi(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),Yt(e.pointRange)||(e.pointRange=1)}setOptions(e){var T,P;let s,r=this.chart,l=r.options.plotOptions,h=r.userOptions||{},d=as(e),u=r.styledMode,f={plotOptions:l,userOptions:d};Bt(this,"setOptions",f);let m=f.plotOptions[this.type],v=h.plotOptions||{},b=v.series||{},k=wn.plotOptions[this.type]||{},M=v[this.type]||{};m.dataLabels=this.mergeArrays(k.dataLabels,m.dataLabels),this.userOptions=f.userOptions;let S=as(m,l.series,M,d);this.tooltipOptions=as(wn.tooltip,(T=wn.plotOptions.series)==null?void 0:T.tooltip,k==null?void 0:k.tooltip,r.userOptions.tooltip,(P=v.series)==null?void 0:P.tooltip,M.tooltip,d.tooltip),this.stickyTracking=zt(d.stickyTracking,M.stickyTracking,b.stickyTracking,!!this.tooltipOptions.shared&&!this.noSharedTooltip||S.stickyTracking),m.marker===null&&delete S.marker,this.zoneAxis=S.zoneAxis||"y";let A=this.zones=(S.zones||[]).map(O=>({...O}));return(S.negativeColor||S.negativeFillColor)&&!S.zones&&(s={value:S[this.zoneAxis+"Threshold"]||S.threshold||0,className:"highcharts-negative"},u||(s.color=S.negativeColor,s.fillColor=S.negativeFillColor),A.push(s)),A.length&&Yt(A[A.length-1].value)&&A.push(u?{}:{color:this.color,fillColor:this.fillColor}),Bt(this,"afterSetOptions",{options:S}),S}getName(){return this.options.name??rg(this.chart.options.lang.seriesName,this,this.chart)}getCyclic(e,s,r){let l,h,d=this.chart,u=`${e}Index`,f=`${e}Counter`,m=(r==null?void 0:r.length)||d.options.chart.colorCount;!s&&(Yt(h=zt(e==="color"?this.options.colorIndex:void 0,this[u]))?l=h:(d.series.length||(d[f]=0),l=d[f]%m,d[f]+=1),r&&(s=r[l])),l!==void 0&&(this[u]=l),this[e]=s}getColor(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||wn.plotOptions[this.type].color,this.chart.options.colors)}getPointsCollection(){return(this.hasGroupedData?this.points:this.data)||[]}getSymbol(){let e=this.options.marker;this.getCyclic("symbol",e.symbol,this.chart.options.symbols)}getColumn(e,s){return(s?this.dataTable.modified:this.dataTable).getColumn(e,!0)||[]}findPointIndex(e,s){var b;let r,l,h,{id:d,x:u}=e,f=this.points,m=this.options.dataSorting,v=this.cropStart||0;if(d){let k=this.chart.get(d);k instanceof Ze&&(r=k)}else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue){let k=M=>!M.touched&&M.index===e.index;if(m!=null&&m.matchByName?k=M=>!M.touched&&M.name===e.name:this.options.relativeXValue&&(k=M=>!M.touched&&M.options.x===e.x),!(r=cg(f,k)))return}return r&&(h=r==null?void 0:r.index)!==void 0&&(l=!0),h===void 0&&Kt(u)&&(h=this.getColumn("x").indexOf(u,s)),h!==-1&&h!==void 0&&this.cropped&&(h=h>=v?h-v:h),!l&&Kt(h)&&((b=f[h])!=null&&b.touched)&&(h=void 0),h}updateData(e,s){var A;let{options:r,requireSorting:l}=this,h=r.dataSorting,d=this.points,u=[],f=e.length===d.length,m,v,b,k,M=!0;if(this.xIncrement=null,e.forEach((T,P)=>{var B;let O,E=Yt(T)&&this.pointClass.prototype.optionsToObject.call({series:this},T)||{},{id:z,x:I}=E;z||Kt(I)?((O=this.findPointIndex(E,k))===-1||O===void 0?u.push(T):d[O]&&T!==((B=r.data)==null?void 0:B[O])?(d[O].update(T,!1,void 0,!1),d[O].touched=!0,l&&(k=O+1)):d[O]&&(d[O].touched=!0),(!f||P!==O||h!=null&&h.enabled||this.hasDerivedData)&&(m=!0)):u.push(T)},this),m)for(v=d.length;v--;)(b=d[v])&&!b.touched&&((A=b.remove)==null||A.call(b,!1,s));else f&&!(h!=null&&h.enabled)?(e.forEach((T,P)=>{T===d[P].y||d[P].destroyed||d[P].update(T,!1,void 0,!1)}),u.length=0):M=!1;if(d.forEach(T=>{T&&(T.touched=!1)}),!M)return!1;u.forEach(T=>{this.addPoint(T,!1,void 0,void 0,!1)},this);let S=this.getColumn("x");return this.xIncrement===null&&S.length&&(this.xIncrement=ar(S),this.autoIncrement()),!0}dataColumnKeys(){return["x",...this.pointArrayMap||["y"]]}setData(e,s=!0,r,l){var j,F;let h=this.points,d=(h==null?void 0:h.length)||0,u=this.options,f=this.chart,m=u.dataSorting,v=this.xAxis,b=u.turboThreshold,k=this.dataTable,M=this.dataColumnKeys(),S=this.pointValKey||"y",A=(this.pointArrayMap||[]).length,T=u.keys,P,O,E=0,z=1,I;f.options.chart.allowMutatingData||(u.data&&delete this.options.data,this.userOptions.data&&delete this.userOptions.data,I=as(!0,e));let B=(e=I||e||[]).length;if(m!=null&&m.enabled&&(e=this.sortData(e)),f.options.chart.allowMutatingData&&l!==!1&&B&&d&&!this.cropped&&!this.hasGroupedData&&this.visible&&!this.boosted&&(O=this.updateData(e,r)),!O){this.xIncrement=null,this.colorCounter=0;let H=b&&!u.relativeXValue&&B>b;if(H){let G=this.getFirstValidPoint(e),U=this.getFirstValidPoint(e,B-1,-1),q=Q=>!!(Xl(Q)&&(T||Kt(Q[0])));if(Kt(G)&&Kt(U)){let Q=[],et=[];for(let tt of e)Q.push(this.autoIncrement()),et.push(tt);k.setColumns({x:Q,[S]:et})}else if(q(G)&&q(U))if(A){let Q=+(G.length===A),et=Array(M.length).fill(0).map(()=>[]);for(let tt of e){Q&&et[0].push(this.autoIncrement());for(let it=Q;it<=A;it++)(j=et[it])==null||j.push(tt[it-Q])}k.setColumns(M.reduce((tt,it,J)=>(tt[it]=et[J],tt),{}))}else{T&&(E=T.indexOf("x"),z=T.indexOf("y"),E=E>=0?E:0,z=z>=0?z:1),G.length===1&&(z=0);let Q=[],et=[];if(E===z)for(let tt of e)Q.push(this.autoIncrement()),et.push(tt[z]);else for(let tt of e)Q.push(tt[E]),et.push(tt[z]);k.setColumns({x:Q,[S]:et})}else H=!1}if(!H){let G=M.reduce((U,q)=>(U[q]=[],U),{});for(P=0;P<B;P++){let U=this.pointClass.prototype.applyOptions.apply({series:this},[e[P]]);for(let q of M)G[q][P]=U[q]}k.setColumns(G)}for(ug(this.getColumn("y")[0])&&Mn(14,!0,f),this.data=[],this.options.data=this.userOptions.data=e,P=d;P--;)(F=h[P])==null||F.destroy();v&&(v.minRange=v.userMinRange),this.isDirty=f.isDirtyBox=!0,this.isDirtyData=!!h,r=!1}u.legendType==="point"&&(this.processData(),this.generatePoints()),s&&f.redraw(r)}sortData(e){let s=this,r=s.options.dataSorting.sortKey||"y",l=function(h,d){return Yt(d)&&h.pointClass.prototype.optionsToObject.call({series:h},d)||{}};return e.forEach(function(h,d){e[d]=l(s,h),e[d].index=d},this),e.concat().sort((h,d)=>{let u=Hl(r,h),f=Hl(r,d);return f<u?-1:+(f>u)}).forEach(function(h,d){h.x=d},this),s.linkedSeries&&s.linkedSeries.forEach(function(h){var f;let d=h.options,u=d.data;!((f=d.dataSorting)!=null&&f.enabled)&&u&&(u.forEach(function(m,v){u[v]=l(h,m),e[v]&&(u[v].x=e[v].x,u[v].index=v)}),h.setData(u,!1))}),e}getProcessedData(e){let s=this,{dataTable:r,isCartesian:l,options:h,xAxis:d}=s,u=h.cropThreshold,f=e||s.getExtremesFromAll,m=d==null?void 0:d.logarithmic,v=r.rowCount,b,k,M=0,S,A,T,P=s.getColumn("x"),O=r,E=!1;return d&&(A=(S=d.getExtremes()).min,T=S.max,E=!!(d.categories&&!d.names.length),l&&s.sorted&&!f&&(!u||v>u||s.forceCrop)&&(P[v-1]<A||P[0]>T?O=new kn:s.getColumn(s.pointValKey||"y").length&&(P[0]<A||P[v-1]>T)&&(O=(b=this.cropData(r,A,T)).modified,M=b.start,k=!0))),P=O.getColumn("x")||[],{modified:O,cropped:k,cropStart:M,closestPointRange:dg([m?P.map(m.log2lin):P],()=>s.requireSorting&&!E&&Mn(15,!1,s.chart))}}processData(e){let s=this.xAxis,r=this.dataTable;if(this.isCartesian&&!this.isDirty&&!s.isDirty&&!this.yAxis.isDirty&&!e)return!1;let l=this.getProcessedData();r.modified=l.modified,this.cropped=l.cropped,this.cropStart=l.cropStart,this.closestPointRange=this.basePointRange=l.closestPointRange,Bt(this,"afterProcessData")}cropData(e,s,r){let l=e.getColumn("x",!0)||[],h=l.length,d={},u,f,m=0,v=h;for(u=0;u<h;u++)if(l[u]>=s){m=Math.max(0,u-1);break}for(f=u;f<h;f++)if(l[f]>r){v=f+1;break}for(let b of this.dataColumnKeys()){let k=e.getColumn(b,!0);k&&(d[b]=k.slice(m,v))}return{modified:new kn({columns:d}),start:m,end:v}}generatePoints(){var I,B,j;let e=this.options,s=this.processedData||e.data,r=this.dataTable.modified,l=this.getColumn("x",!0),h=this.pointClass,d=r.rowCount,u=this.cropStart||0,f=this.hasGroupedData,m=e.keys,v=[],b=(I=e.dataGrouping)!=null&&I.groupAll?u:0,k=(B=this.xAxis)==null?void 0:B.categories,M=this.pointArrayMap||["y"],S=this.dataColumnKeys(),A,T,P,O,E=this.data,z;if(!E&&!f){let F=[];F.length=(s==null?void 0:s.length)||0,E=this.data=F}for(m&&f&&(this.options.keys=!1),O=0;O<d;O++)T=u+O,f?((P=new h(this,r.getRow(O,S)||[])).dataGroup=this.groupMap[b+O],(j=P.dataGroup)!=null&&j.options&&(P.options=P.dataGroup.options,Hi(P,P.dataGroup.options),delete P.dataLabels)):(P=E[T],z=s?s[T]:r.getRow(O,M),P||z===void 0||(E[T]=P=new h(this,z,l[O]))),P&&(P.index=f?b+O:T,v[O]=P,P.category=(k==null?void 0:k[P.x])??P.x,P.key=P.name??P.category);if(this.options.keys=m,E&&(d!==(A=E.length)||f))for(O=0;O<A;O++)O!==u||f||(O+=d),E[O]&&(E[O].destroyElements(),E[O].plotX=void 0);this.data=E,this.points=v,Bt(this,"afterGeneratePoints")}getXExtremes(e){return{min:zl(e),max:ar(e)}}getExtremes(e,s){var I;let{xAxis:r,yAxis:l}=this,h=s||this.getExtremesFromAll||this.options.getExtremesFromAll,d=h&&this.cropped?this.dataTable:this.dataTable.modified,u=d.rowCount,f=e||this.stackedYData,m=f?[f]:((I=this.keysAffectYAxis||this.pointArrayMap||["y"])==null?void 0:I.map(B=>d.getColumn(B,!0)||[]))||[],v=this.getColumn("x",!0),b=[],k=this.requireSorting&&!this.is("column")?1:0,M=!!l&&l.positiveValuesOnly,S=h||this.cropped||!r,A,T,P,O=0,E=0;for(r&&(O=(A=r.getExtremes()).min,E=A.max),P=0;P<u;P++)if(T=v[P],S||(v[P+k]||T)>=O&&(v[P-k]||T)<=E)for(let B of m){let j=B[P];Kt(j)&&(j>0||!M)&&b.push(j)}let z={activeYData:b,dataMin:zl(b),dataMax:ar(b)};return Bt(this,"afterGetExtremes",{dataExtremes:z}),z}applyExtremes(){let e=this.getExtremes();return this.dataMin=e.dataMin,this.dataMax=e.dataMax,e}getFirstValidPoint(e,s=0,r=1){let l=e.length,h=s;for(;h>=0&&h<l;){if(Yt(e[h]))return e[h];h+=r}}translate(){var E;this.generatePoints();let e=this.options,s=e.stacking,r=this.xAxis,l=this.enabledDataSorting,h=this.yAxis,d=this.points,u=d.length,f=this.pointPlacementToXValue(),m=!!f,v=e.threshold,b=e.startFromThreshold?v:0,k=(e==null?void 0:e.nullInteraction)&&h.len,M,S,A,T,P=Number.MAX_VALUE;function O(z){return Fl(z,-1e9,1e9)}for(M=0;M<u;M++){let z,I=d[M],B=I.x,j,F,H=I.y,G=I.low,U=s&&((E=h.stacking)==null?void 0:E.stacks[(this.negStacks&&H<(b?0:v)?"-":"")+this.stackKey]);I.plotX=Kt(S=r.translate(B,!1,!1,!1,!0,f))?Nl(O(S)):void 0,s&&this.visible&&U&&U[B]&&(T=this.getStackIndicator(T,B,this.index),!I.isNull&&T.key&&(F=(j=U[B]).points[T.key]),j&&Xl(F)&&(G=F[0],H=F[1],G===b&&T.key===U[B].base&&(G=zt(Kt(v)?v:h.min)),h.positiveValuesOnly&&Yt(G)&&G<=0&&(G=void 0),I.total=I.stackTotal=zt(j.total),I.percentage=Yt(I.y)&&j.total?I.y/j.total*100:void 0,I.stackY=H,this.irregularWidths||j.setOffset(this.pointXOffset||0,this.barW||0,void 0,void 0,void 0,this.xAxis))),I.yBottom=Yt(G)?O(h.translate(G,!1,!0,!1,!0)):void 0,this.dataModify&&(H=this.dataModify.modifyValue(H,M)),Kt(H)&&I.plotX!==void 0?z=Kt(z=h.translate(H,!1,!0,!1,!0))?O(z):void 0:!Kt(H)&&k&&(z=k),I.plotY=z,I.isInside=this.isPointInside(I),I.clientX=m?Nl(r.translate(B,!1,!1,!1,!0,f)):S,I.negative=(I.y||0)<(v||0),I.isNull||I.visible===!1||(A!==void 0&&(P=Math.min(P,Math.abs(S-A))),A=S),I.zone=this.zones.length?I.getZone():void 0,!I.graphic&&this.group&&l&&(I.isNew=!0)}this.closestPointRangePx=P,Bt(this,"afterTranslate")}getValidPoints(e,s,r){let l=this.chart;return(e||this.points||[]).filter(function(h){let{plotX:d,plotY:u}=h;return(!!r||!h.isNull&&!!Kt(u))&&(!s||!!l.isInsidePlot(d,u,{inverted:l.inverted}))&&h.visible!==!1})}getSharedClipKey(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0),this.sharedClipKey}setClip(){let{chart:e,group:s,markerGroup:r}=this,l=e.sharedClips,h=e.renderer,d=e.getClipBox(this),u=this.getSharedClipKey(),f=l[u];f?f.animate(d):l[u]=f=h.clipRect(d),s&&s.clip(this.options.clip===!1?void 0:f),r&&r.clip()}animate(e){let{chart:s,group:r,markerGroup:l}=this,h=s.inverted,d=Bl(this.options.animation),u=[this.getSharedClipKey(),d.duration,d.easing,d.defer].join(","),f=s.sharedClips[u],m=s.sharedClips[u+"m"];if(e&&r){let v=s.getClipBox(this);if(f)f.attr("height",v.height);else{v.width=0,h&&(v.x=s.plotHeight),f=s.renderer.clipRect(v),s.sharedClips[u]=f;let b={x:-99,y:-99,width:h?s.plotWidth+199:99,height:h?99:s.plotHeight+199};m=s.renderer.clipRect(b),s.sharedClips[u+"m"]=m}r.clip(f),l==null||l.clip(m)}else if(f&&!f.hasClass("highcharts-animating")){let v=s.getClipBox(this),b=d.step;(l!=null&&l.element.childNodes.length||s.series.length>1)&&(d.step=function(k,M){b&&b.apply(M,arguments),M.prop==="width"&&(m!=null&&m.element)&&m.attr(h?"height":"width",k+99)}),f.addClass("highcharts-animating").animate(v,d)}}afterAnimate(){this.setClip(),lr(this.chart.sharedClips,(e,s,r)=>{e&&!this.chart.container.querySelector(`[clip-path="url(#${e.id})"]`)&&(e.destroy(),delete r[s])}),this.finishedAnimating=!0,Bt(this,"afterAnimate")}drawPoints(e=this.points){let s,r,l,h,d,u,f,m=this.chart,v=m.styledMode,{colorAxis:b,options:k}=this,M=k.marker,S=k.nullInteraction,A=this[this.specialGroup||"markerGroup"],T=this.xAxis,P=zt(M.enabled,!T||!!T.isRadial||null,this.closestPointRangePx>=M.enabledThreshold*M.radius);if(M.enabled!==!1||this._hasPointMarkers)for(s=0;s<e.length;s++){h=(l=(r=e[s]).graphic)?"animate":"attr",d=r.marker||{},u=!!r.marker;let O=r.isNull;if((P&&!Yt(d.enabled)||d.enabled)&&(!O||S)&&r.visible!==!1){let E=zt(d.symbol,this.symbol,"rect");f=this.markerAttribs(r,r.selected&&"select"),this.enabledDataSorting&&(r.startXPos=T.reversed?-(f.
2width||0):T.width);let z=r.isInside!==!1;if(!l&&z&&((f.width||0)>0||r.hasImage)&&(r.graphic=l=m.renderer.symbol(E,f.x,f.y,f.width,f.height,u?d:M).add(A),this.enabledDataSorting&&m.hasRendered&&(l.attr({x:r.startXPos}),h="animate")),l&&h==="animate"&&l[z?"show":"hide"](z).animate(f),l){let I=this.pointAttribs(r,v||!r.selected?void 0:"select");v?b&&l.css({fill:I.fill}):l[h](I)}l&&l.addClass(r.getClassName(),!0)}else l&&(r.graphic=l.destroy())}}markerAttribs(e,s){let r=this.options,l=r.marker,h=e.marker||{},d=h.symbol||l.symbol,u={},f,m,v=zt(h.radius,l==null?void 0:l.radius);s&&(f=l.states[s],m=h.states&&h.states[s],v=zt(m==null?void 0:m.radius,f==null?void 0:f.radius,v&&v+((f==null?void 0:f.radiusPlus)||0))),e.hasImage=d&&d.indexOf("url")===0,e.hasImage&&(v=0);let b=e.pos();return Kt(v)&&b&&(r.crisp&&(b[0]=ag(b[0],e.hasImage?0:d==="rect"?(l==null?void 0:l.lineWidth)||0:1)),u.x=b[0]-v,u.y=b[1]-v),v&&(u.width=u.height=2*v),u}pointAttribs(e,s){var P;let r=this.options,l=r.marker,h=e==null?void 0:e.options,d=(h==null?void 0:h.marker)||{},u=h==null?void 0:h.color,f=e==null?void 0:e.color,m=(P=e==null?void 0:e.zone)==null?void 0:P.color,v,b,k=this.color,M,S,A=zt(d.lineWidth,l.lineWidth),T=e!=null&&e.isNull&&r.nullInteraction?0:1;return k=u||m||f||k,M=d.fillColor||l.fillColor||k,S=d.lineColor||l.lineColor||k,s=s||"normal",v=l.states[s]||{},A=zt((b=d.states&&d.states[s]||{}).lineWidth,v.lineWidth,A+zt(b.lineWidthPlus,v.lineWidthPlus,0)),M=b.fillColor||v.fillColor||M,S=b.lineColor||v.lineColor||S,{stroke:S,"stroke-width":A,fill:M,opacity:T=zt(b.opacity,v.opacity,T)}}destroy(e){var f,m;
vendor: 54,405 bytes, line 2
2let s,r,l=this,h=l.chart,d=/AppleWebKit\/533/.test(og.navigator.userAgent),u=l.data||[];for(Bt(l,"destroy",{keepEventsForUpdate:e}),this.removeEvents(e),(l.axisTypes||[]).forEach(function(v){r=l[v],r!=null&&r.series&&(Wl(r.series,l),r.isDirty=r.forceRedraw=!0)}),l.legendItem&&l.chart.legend.destroyItem(l),s=u.length;s--;)(m=(f=u[s])==null?void 0:f.destroy)==null||m.call(f);for(let v of l.zones)lg(v,void 0,!0);ot.clearTimeout(l.animationTimeout),lr(l,function(v,b){v instanceof Ae&&!v.survive&&v[d&&b==="group"?"hide":"destroy"]()}),h.hoverSeries===l&&(h.hoverSeries=void 0),Wl(h.series,l),h.orderItems("series"),lr(l,function(v,b){e&&b==="hcEvents"||delete l[b]})}applyZones(){let{area:e,chart:s,graph:r,zones:l,points:h,xAxis:d,yAxis:u,zoneAxis:f}=this,{inverted:m,renderer:v}=s,b=this[`${f}Axis`],{isXAxis:k,len:M=0,minPointOffset:S=0}=b||{},A=((r==null?void 0:r.strokeWidth())||0)/2+1,T=(P,O=0,E=0)=>{m&&(E=M-E);let{translated:z=0,lineClip:I}=P,B=E-z;I==null||I.push(["L",O,Math.abs(B)<A?E-A*(B<=0?-1:1):z])};if(l.length&&(r||e)&&b&&Kt(b.min)){let P=b.getExtremes().max+S,O=I=>{I.forEach((B,j)=>{(B[0]==="M"||B[0]==="L")&&(I[j]=[B[0],k?M-B[1]:B[1],k?B[2]:M-B[2]])})};if(l.forEach(I=>{I.lineClip=[],I.translated=Fl(b.toPixels(zt(I.value,P),!0)||0,0,M)}),r&&!this.showLine&&r.hide(),e&&e.hide(),f==="y"&&h.length<d.len)for(let I of h){let{plotX:B,plotY:j,zone:F}=I,H=F&&l[l.indexOf(F)-1];F&&T(F,B,j),H&&T(H,B,j)}let E=[],z=b.toPixels(b.getExtremes().min-S,!0);l.forEach(I=>{var it,J;let B=I.lineClip||[],j=Math.round(I.translated||0);d.reversed&&B.reverse();let{clip:F,simpleClip:H}=I,G=0,U=0,q=d.len,Q=u.len;k?(G=j,q=z):(U=j,Q=z);let et=[["M",G,U],["L",q,U],["L",q,Q],["L",G,Q],["Z"]],tt=[et[0],...B,et[1],et[2],...E,et[3],et[4]];E=B.reverse(),z=j,m&&(O(tt),e&&O(et)),F?(F.animate({d:tt}),H==null||H.animate({d:et})):(F=I.clip=v.path(tt),e&&(H=I.simpleClip=v.path(et))),r&&((it=I.graph)==null||it.clip(F)),e&&((J=I.area)==null||J.clip(H))})}else this.visible&&(r&&r.show(),e&&e.show())}plotGroup(e,s,r,l,h){let d=this[e],u=!d,f={visibility:r,zIndex:l||.1};return Yt(this.opacity)&&!this.chart.styledMode&&this.state!=="inactive"&&(f.opacity=this.opacity),d||(this[e]=d=this.chart.renderer.g().add(h)),d.addClass("highcharts-"+s+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(Yt(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(d.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),d.attr(f)[u?"attr":"animate"](this.getPlotBox(s)),d}getPlotBox(e){let s=this.xAxis,r=this.yAxis,l=this.chart,h=l.inverted&&!l.polar&&s&&this.invertible&&e==="series";l.inverted&&(s=r,r=this.xAxis);let d={scale:1,translateX:s?s.left:l.plotLeft,translateY:r?r.top:l.plotTop,name:e};Bt(this,"getPlotBox",d);let{scale:u,translateX:f,translateY:m}=d;return{translateX:f,translateY:m,rotation:90*!!h,rotationOriginX:h?u*(s.len-r.len)/2:0,rotationOriginY:h?u*(s.len+r.len)/2:0,scaleX:h?-u:u,scaleY:u}}removeEvents(e){let{eventsToUnbind:s}=this;e||fg(this),s.length&&(s.forEach(r=>{r()}),s.length=0)}render(){var v,b,k,M,S;let e=this,{chart:s,options:r,hasRendered:l}=e,h=Bl(r.animation),d=e.visible?"inherit":"hidden",u=r.zIndex,f=s.seriesGroup,m=e.finishedAnimating?0:h.duration;Bt(this,"render"),e.plotGroup("group","series",d,u,f),e.markerGroup=e.plotGroup("markerGroup","markers",d,u,f),r.clip!==!1&&e.setClip(),m&&((v=e.animate)==null||v.call(e,!0)),e.drawGraph&&(e.drawGraph(),e.applyZones()),e.visible&&e.drawPoints(),(b=e.drawDataLabels)==null||b.call(e),(k=e.redrawPoints)==null||k.call(e),r.enableMouseTracking&&((M=e.drawTracker)==null||M.call(e)),m&&((S=e.animate)==null||S.call(e)),l||(m&&h.defer&&(m+=h.defer),e.animationTimeout=Vl(()=>{e.afterAnimate()},m||0)),e.isDirty=!1,e.hasRendered=!0,Bt(e,"afterRender")}redraw(){let e=this.isDirty||this.isDirtyData;this.translate(),this.render(),e&&delete this.kdTree}reserveSpace(){return this.visible||!this.chart.options.chart.ignoreHiddenSeries}searchPoint(e,s){let{xAxis:r,yAxis:l}=this,h=this.chart.inverted;return this.searchKDTree({clientX:h?r.len-e.chartY+r.pos:e.chartX-r.pos,plotY:h?l.len-e.chartX+l.pos:e.chartY-l.pos},s,e)}buildKDTree(e){this.buildingKdTree=!0;let s=this,r=s.options,l=r.findNearestPointBy.indexOf("y")>-1?2:1;delete s.kdTree,Vl(function(){s.kdTree=function h(d,u,f){let m,v,b=d==null?void 0:d.length;if(b)return m=s.kdAxisArray[u%f],d.sort((k,M)=>(k[m]||0)-(M[m]||0)),{point:d[v=Math.floor(b/2)],left:h(d.slice(0,v),u+1,f),right:h(d.slice(v+1),u+1,f)}}(s.getValidPoints(void 0,!s.directTouch,r==null?void 0:r.nullInteraction),l,l),s.buildingKdTree=!1},r.kdNow||(e==null?void 0:e.type)==="touchstart"?0:1)}searchKDTree(e,s,r,l,h){let d=this,[u,f]=this.kdAxisArray,m=s?"distX":"dist",v=(d.options.findNearestPointBy||"").indexOf("y")>-1?2:1,b=!!d.isBubble,k=l||((S,A,T)=>{let P=S[T]||0,O=A[T]||0;return[P===O&&S.index>A.index||P<O?S:A,!1]}),M=h||((S,A)=>S<A);if(this.kdTree||this.buildingKdTree||this.buildKDTree(r),this.kdTree)return function S(A,T,P,O){var G;let E=T.point,z=d.kdAxisArray[P%O],I=E,B=!1;(function(U,q){var ft;let Q=U[u],et=q[u],tt=Yt(Q)&&Yt(et)?Q-et:null,it=U[f],J=q[f],st=Yt(it)&&Yt(J)?it-J:0,ct=b&&((ft=q.marker)==null?void 0:ft.radius)||0;q.dist=Math.sqrt((tt&&tt*tt||0)+st*st)-ct,q.distX=Yt(tt)?Math.abs(tt)-ct:Number.MAX_VALUE})(A,E);let j=(A[z]||0)-(E[z]||0)+(b&&((G=E.marker)==null?void 0:G.radius)||0),F=j<0?"left":"right",H=j<0?"right":"left";return T[F]&&([I,B]=k(E,S(A,T[F],P+1,O),m)),T[H]&&M(Math.sqrt(j*j),I[m],B)&&(I=k(I,S(A,T[H],P+1,O),m)[0]),I}(e,this.kdTree,v,v)}pointPlacementToXValue(){let{options:e,xAxis:s}=this,r=e.pointPlacement;return r==="between"&&(r=s.reversed?-.5:.5),Kt(r)?r*(e.pointRange||s.pointRange):0}isPointInside(e){let{chart:s,xAxis:r,yAxis:l}=this,{plotX:h=-1,plotY:d=-1}=e;return d>=0&&d<=(l?l.len:s.plotHeight)&&h>=0&&h<=(r?r.len:s.plotWidth)}drawTracker(){var k;let e=this,s=e.options,r=s.trackByArea,l=[].concat((r?e.areaPath:e.graphPath)||[]),h=e.chart,d=h.pointer,u=h.renderer,f=((k=h.options.tooltip)==null?void 0:k.snap)||0,m=()=>{s.enableMouseTracking&&h.hoverSeries!==e&&e.onMouseOver()},v="rgba(192,192,192,"+(ng?1e-4:.002)+")",b=e.tracker;b?b.attr({d:l}):e.graph&&(e.tracker=b=u.path(l).attr({visibility:e.visible?"inherit":"hidden",zIndex:2}).addClass(r?"highcharts-tracker-area":"highcharts-tracker-line").add(e.group),h.styledMode||b.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:v,fill:r?v:"none","stroke-width":e.graph.strokeWidth()+(r?0:2*f)}),[e.tracker,e.markerGroup,e.dataLabelsGroup].forEach(M=>{M&&(M.addClass("highcharts-tracker").on("mouseover",m).on("mouseout",S=>{d==null||d.onTrackerMouseOut(S)}),s.cursor&&!h.styledMode&&M.css({cursor:s.cursor}),M.on("touchstart",m))})),Bt(this,"afterDrawTracker")}addPoint(e,s,r,l,h){let d,u,f=this.options,{chart:m,data:v,dataTable:b,xAxis:k}=this,M=(k==null?void 0:k.hasNames)&&k.names,S=f.data,A=this.getColumn("x");s=zt(s,!0);let T={series:this};this.pointClass.prototype.applyOptions.apply(T,[e]);let P=T.x;if(u=A.length,this.requireSorting&&P<A[u-1])for(d=!0;u&&A[u-1]>P;)u--;b.setRow(T,u,!0,{addColumns:!1}),M&&T.name&&(M[P]=T.name),S==null||S.splice(u,0,e),(d||this.processedData)&&(this.data.splice(u,0,null),this.processData()),f.legendType==="point"&&this.generatePoints(),r&&(v[0]&&v[0].remove?v[0].remove(!1):([v,S].filter(Yt).forEach(O=>{O.shift()}),b.deleteRows(0))),h!==!1&&Bt(this,"addPoint",{point:T}),this.isDirty=!0,this.isDirtyData=!0,s&&m.redraw(l)}removePoint(e,s,r){let l=this,{chart:h,data:d,points:u,dataTable:f}=l,m=d[e],v=function(){[(u==null?void 0:u.length)===d.length?u:void 0,d,l.options.data].filter(Yt).forEach(b=>{b.splice(e,1)}),f.deleteRows(e),m==null||m.destroy(),l.isDirty=!0,l.isDirtyData=!0,s&&h.redraw()};ig(r,h),s=zt(s,!0),m?m.firePointEvent("remove",null,v):v()}remove(e,s,r,l){let h=this,d=h.chart;function u(){h.destroy(l),d.isDirtyLegend=d.isDirtyBox=!0,d.linkSeries(l),zt(e,!0)&&d.redraw(s)}r!==!1?Bt(h,"remove",null,u):u()}update(e,s){var P,O;Bt(this,"update",{options:e=hg(e,this.userOptions)});let r=this,l=r.chart,h=r.userOptions,d=r.initialType||r.type,u=l.options.plotOptions,f=Wi[d].prototype,m=r.finishedAnimating&&{animation:!1},v={},b,k,M=ye.keepProps.slice(),S=e.type||h.type||l.options.chart.type,A=!(this.hasDerivedData||S&&S!==this.type||e.keys!==void 0||e.pointStart!==void 0||e.pointInterval!==void 0||e.relativeXValue!==void 0||e.joinBy||e.mapData||["dataGrouping","pointStart","pointInterval","pointIntervalUnit","keys"].some(E=>r.hasOptionChanged(E)));S=S||d,A?(M.push.apply(M,ye.keepPropsForPoints),e.visible!==!1&&M.push("area","graph"),r.parallelArrays.forEach(function(E){M.push(E+"Data")}),e.data&&(e.dataSorting&&Hi(r.options.dataSorting,e.dataSorting),this.setData(e.data,!1))):this.dataTable.modified=this.dataTable,e=as(h,{index:h.index===void 0?r.index:h.index,pointStart:((P=u==null?void 0:u.series)==null?void 0:P.pointStart)??h.pointStart??r.getColumn("x")[0]},!A&&{data:r.options.data},e,m),A&&e.data&&(e.data=r.options.data),(M=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(M)).forEach(function(E){M[E]=r[E],delete r[E]});let T=!1;if(Wi[S]){if(T=S!==r.type,r.remove(!1,!1,!1,!0),T)if(l.propFromSeries(),Object.setPrototypeOf)Object.setPrototypeOf(r,Wi[S].prototype);else{let E=Object.hasOwnProperty.call(r,"hcEvents")&&r.hcEvents;for(k in f)r[k]=void 0;Hi(r,Wi[S].prototype),E?r.hcEvents=E:delete r.hcEvents}}else Mn(17,!0,l,{missingModuleFor:S});if(M.forEach(function(E){r[E]=M[E]}),r.init(l,e),A&&this.points)for(let E of((b=r.options).visible===!1?(v.graphic=1,v.dataLabel=1):(this.hasMarkerChanged(b,h)&&(v.graphic=1),(O=r.hasDataLabels)!=null&&O.call(r)||(v.dataLabel=1)),this.points))E!=null&&E.series&&(E.resolveColor(),Object.keys(v).length&&E.destroyElements(v),b.showInLegend===!1&&E.legendItem&&l.legend.destroyItem(E));r.initialType=d,l.linkSeries(),l.setSortedData(),T&&r.linkedSeries.length&&(r.isDirtyData=!0),Bt(this,"afterUpdate"),zt(s,!0)&&l.redraw(!!A&&void 0)}setName(e){this.name=this.options.name=this.userOptions.name=e,this.chart.isDirtyLegend=!0}hasOptionChanged(e){var u,f;let s=this.chart,r=this.options[e],l=s.options.plotOptions,h=this.userOptions[e],d=zt((u=l==null?void 0:l[this.type])==null?void 0:u[e],(f=l==null?void 0:l.series)==null?void 0:f[e]);return h&&!Yt(d)?r!==h:r!==zt(d,r)}onMouseOver(){let e=this.chart,s=e.hoverSeries,r=e.pointer;r==null||r.setHoverChartIndex(),s&&s!==this&&s.onMouseOut(),this.options.events.mouseOver&&Bt(this,"mouseOver"),this.setState("hover"),e.hoverSeries=this}onMouseOut(){let e=this.options,s=this.chart,r=s.tooltip,l=s.hoverPoint;s.hoverSeries=null,l&&l.onMouseOut(),this&&e.events.mouseOut&&Bt(this,"mouseOut"),r&&!this.stickyTracking&&(!r.shared||this.noSharedTooltip)&&r.hide(),s.series.forEach(function(h){h.setState("",!0)})}setState(e,s){let r=this,l=r.options,h=r.graph,d=l.inactiveOtherPoints,u=l.states,f=zt(u[e||"normal"]&&u[e||"normal"].animation,r.chart.options.chart.animation),m=l.lineWidth,v=l.opacity;if(e=e||"",r.state!==e&&([r.group,r.markerGroup,r.dataLabelsGroup].forEach(function(b){b&&(r.state&&b.removeClass("highcharts-series-"+r.state),e&&b.addClass("highcharts-series-"+e))}),r.state=e,!r.chart.styledMode)){if(u[e]&&u[e].enabled===!1)return;if(e&&(m=u[e].lineWidth||m+(u[e].lineWidthPlus||0),v=zt(u[e].opacity,v)),h&&!h.dashstyle&&Kt(m))for(let b of[h,...this.zones.map(k=>k.graph)])b==null||b.animate({"stroke-width":m},f);d||[r.group,r.markerGroup,r.dataLabelsGroup,r.labelBySeries].forEach(function(b){b&&b.animate({opacity:v},f)})}s&&d&&r.points&&r.setAllPointsToState(e||void 0)}setAllPointsToState(e){this.points.forEach(function(s){s.setState&&s.setState(e)})}setVisible(e,s){var f;let r=this,l=r.chart,h=l.options.chart.ignoreHiddenSeries,d=r.visible;r.visible=e=r.options.visible=r.userOptions.visible=e===void 0?!d:e;let u=e?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(m=>{var v;(v=r[m])==null||v[u]()}),(l.hoverSeries===r||((f=l.hoverPoint)==null?void 0:f.series)===r)&&r.onMouseOut(),r.legendItem&&l.legend.colorizeItem(r,e),r.isDirty=!0,r.options.stacking&&l.series.forEach(m=>{m.options.stacking&&m.visible&&(m.isDirty=!0)}),r.linkedSeries.forEach(m=>{m.setVisible(e,!1)}),h&&(l.isDirtyBox=!0),Bt(r,u),s!==!1&&l.redraw()}show(){this.setVisible(!0)}hide(){this.setVisible(!1)}select(e){this.selected=e=this.options.selected=e===void 0?!this.selected:e,this.checkbox&&(this.checkbox.checked=e),Bt(this,e?"select":"unselect")}shouldShowTooltip(e,s,r={}){return r.series=this,r.visiblePlotOnly=!0,this.chart.isInsidePlot(e,s,r)}drawLegendSymbol(e,s){var r;(r=Il[this.options.legendSymbol||"rectangle"])==null||r.call(this,e,s)}}ye.defaultOptions={lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},enableMouseTracking:!0,events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:150},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",borderWidth:0,defer:!0,formatter:function(){let{numberFormatter:x}=this.series.chart;return typeof this.y!="number"?"":x(this.y,-1)},padding:5,style:{fontSize:"0.7em",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:150},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:150},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"},ye.types=Wt.seriesTypes,ye.registerType=Wt.registerSeriesType,ye.keepProps=["colorIndex","eventOptions","navigatorSeries","symbolIndex","baseSeries"],ye.keepPropsForPoints=["data","isDirtyData","isDirtyCanvas","points","dataTable","processedData","xIncrement","cropped","_hasPointMarkers","hasDataLabels","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX","transformGroups"],Hi(ye.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,directTouch:!1,invertible:!0,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:Ze,requireSorting:!0,sorted:!0}),Wt.series=ye;let ae=ye,{animObject:pg,setAnimation:gg}=Jt,{registerEventOptions:Yl}=ln,{composed:mg,marginNames:Gl}=Y,{distribute:xg}=Zs,{format:bg}=ue,{addEvent:Sn,createElement:yg,css:vg,defined:hr,discardElement:kg,find:wg,fireEvent:Fe,isNumber:$l,merge:xi,pick:ve,pushUnique:Mg,relativeLength:Sg,stableSort:Cg,syncTimeout:Pg}=ot;class cr{constructor(e,s){this.allItems=[],this.initialItemY=0,this.itemHeight=0,this.itemMarginBottom=0,this.itemMarginTop=0,this.itemX=0,this.itemY=0,this.lastItemY=0,this.lastLineHeight=0,this.legendHeight=0,this.legendWidth=0,this.maxItemWidth=0,this.maxLegendWidth=0,this.offsetWidth=0,this.padding=0,this.pages=[],this.symbolHeight=0,this.symbolWidth=0,this.titleHeight=0,this.totalItemWidth=0,this.widthOption=0,this.chart=e,this.setOptions(s),s.enabled&&(this.render(),Yl(this,s),Sn(this.chart,"endResize",function(){this.legend.positionCheckboxes()})),Sn(this.chart,"render",()=>{this.options.enabled&&this.proximate&&(this.proximatePositions(),this.positionItems())})}setOptions(e){let s=ve(e.padding,8);this.options=e,this.chart.styledMode||(this.itemStyle=e.itemStyle,this.itemHiddenStyle=xi(this.itemStyle,e.itemHiddenStyle)),this.itemMarginTop=e.itemMarginTop,this.itemMarginBottom=e.itemMarginBottom,this.padding=s,this.initialItemY=s-5,this.symbolWidth=ve(e.symbolWidth,16),this.pages=[],this.proximate=e.layout==="proximate"&&!this.chart.inverted,this.baseline=void 0}update(e,s){let r=this.chart;this.setOptions(xi(!0,this.options,e)),"events"in this.options&&Yl(this,this.options),this.destroy(),r.isDirtyLegend=r.isDirtyBox=!0,ve(s,!0)&&r.redraw(),Fe(this,"afterUpdate",{redraw:s})}colorizeItem(e,s){var m;let r=e.color,{area:l,group:h,label:d,line:u,symbol:f}=e.legendItem||{};if((e instanceof ae||e instanceof Ze)&&(e.color=((m=e.options)==null?void 0:m.legendSymbolColor)||r),h==null||h[s?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){let{itemHiddenStyle:v={}}=this,b=v.color,{fillColor:k,fillOpacity:M,lineColor:S,marker:A}=e.options,T=P=>(!s&&(P.fill&&(P.fill=b),P.stroke&&(P.stroke=b)),P);d==null||d.css(xi(s?this.itemStyle:v)),u==null||u.attr(T({stroke:S||e.color})),f&&f.attr(T(A&&f.isMarker?e.pointAttribs():{fill:e.color})),l==null||l.attr(T({fill:k||e.color,"fill-opacity":k?1:M??.75}))}e.color=r,Fe(this,"afterColorizeItem",{item:e,visible:s})}positionItems(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()}positionItem(e){let{group:s,x:r=0,y:l=0}=e.legendItem||{},h=this.options,d=h.symbolPadding,u=!h.rtl,f=e.checkbox;if(s!=null&&s.element){let m={translateX:u?r:this.legendWidth-r-2*d-4,translateY:l};s[hr(s.translateY)?"animate":"attr"](m,void 0,()=>{Fe(this,"afterPositionItem",{item:e})})}f&&(f.x=r,f.y=l)}destroyItem(e){let s=e.legendItem||{};for(let r of["group","label","line","symbol"])s[r]&&(s[r]=s[r].destroy());e.checkbox=kg(e.checkbox),e.legendItem=void 0}destroy(){for(let e of this.getAllItems())this.destroyItem(e);for(let e of["clipRect","up","down","pager","nav","box","title","group"])this[e]&&(this[e]=this[e].destroy());this.display=null}positionCheckboxes(){var h;let e,s=(h=this.group)==null?void 0:h.alignAttr,r=this.clipHeight||this.legendHeight,l=this.titleHeight;s&&(e=s.translateY,this.allItems.forEach(function(d){let u,f=d.checkbox;f&&(u=e+l+f.y+(this.scrollOffset||0)+3,vg(f,{left:s.translateX+d.checkboxOffset+f.x-20+"px",top:u+"px",display:this.proximate||u>e-6&&u<e+r-6?"":"none"}))},this))}renderTitle(){let e=this.options,s=this.padding,r=e.title,l,h=0;r.text&&(this.title||(this.title=this.chart.renderer.label(r.text,s-3,s-4,void 0,void 0,void 0,e.useHTML,void 0,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(r.style),this.title.add(this.group)),r.width||this.title.css({width:this.maxLegendWidth+"px"}),h=(l=this.title.getBBox()).height,this.offsetWidth=l.width,this.contentGroup.attr({translateY:h})),this.titleHeight=h}setText(e){let s=this.options;e.legendItem.label.attr({text:s.labelFormat?bg(s.labelFormat,e,this.chart):s.labelFormatter.call(e)})}renderItem(e){var j;let s=e.legendItem=e.legendItem||{},r=this.chart,l=r.renderer,h=this.options,d=h.layout==="horizontal",u=this.symbolWidth,f=h.symbolPadding||0,m=this.itemStyle,v=this.itemHiddenStyle,b=d?ve(h.itemDistance,20):0,k=!h.rtl,M=!e.series,S=!M&&e.series.drawLegendSymbol?e.series:e,A=S.options,T=!!this.createCheckboxForItem&&A&&A.showCheckbox,P=h.useHTML,O=e.options.className,E=s.label,z=u+f+b+20*!!T;!E&&(s.group=l.g("legend-item").addClass("highcharts-"+S.type+"-series highcharts-color-"+e.colorIndex+(O?" "+O:"")+(M?" highcharts-series-"+e.index:"")).attr({zIndex:1}).add(this.scrollGroup),s.label=E=l.text("",k?u+f:-f,this.baseline||0,P),r.styledMode||E.css(xi(e.visible?m:v)),E.attr({align:k?"left":"right",zIndex:2}).add(s.group),!this.baseline&&(this.fontMetrics=l.fontMetrics(E),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,E.attr("y",this.baseline),this.symbolHeight=ve(h.symbolHeight,this.fontMetrics.f),h.squareSymbol&&(this.symbolWidth=ve(h.symbolWidth,Math.max(this.symbolHeight,16)),z=this.symbolWidth+f+b+20*!!T,k&&E.attr("x",this.symbolWidth+f))),S.drawLegendSymbol(this,e),this.setItemEvents&&this.setItemEvents(e,E,P)),T&&!e.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(e),this.colorizeItem(e,e.visible),(r.styledMode||!m.width)&&E.css({width:(h.itemWidth||this.widthOption||r.spacingBox.width)-z+"px"}),this.setText(e);let I=E.getBBox(),B=((j=this.fontMetrics)==null?void 0:j.h)||0;e.itemWidth=e.checkboxOffset=h.itemWidth||s.labelWidth||I.width+z,this.maxItemWidth=Math.max(this.maxItemWidth,e.itemWidth),this.totalItemWidth+=e.itemWidth,this.itemHeight=e.itemHeight=Math.round(s.labelHeight||(I.height>1.5*B?I.height:B))}layoutItem(e){let s=this.options,r=this.padding,l=s.layout==="horizontal",h=e.itemHeight,d=this.itemMarginBottom,u=this.itemMarginTop,f=l?ve(s.itemDistance,20):0,m=this.maxLegendWidth,v=s.alignColumns&&this.totalItemWidth>m?this.maxItemWidth:e.itemWidth,b=e.legendItem||{};l&&this.itemX-r+v>m&&(this.itemX=r,this.lastLineHeight&&(this.itemY+=u+this.lastLineHeight+d),this.lastLineHeight=0),this.lastItemY=u+this.itemY+d,this.lastLineHeight=Math.max(h,this.lastLineHeight),b.x=this.itemX,b.y=this.itemY,l?this.itemX+=v:(this.itemY+=u+h+d,this.lastLineHeight=h),this.offsetWidth=this.widthOption||Math.max((l?this.itemX-r-(e.checkbox?0:f):v)+r,this.offsetWidth)}getAllItems(){let e=[];return this.chart.series.forEach(function(s){var l;let r=s==null?void 0:s.options;s&&ve(r.showInLegend,!hr(r.linkedTo)&&void 0,!0)&&(e=e.concat(((l=s.legendItem)==null?void 0:l.labels)||(r.legendType==="point"?s.data:s)))}),Fe(this,"afterGetAllItems",{allItems:e}),e}getAlignment(){let e=this.options;return this.proximate?e.align.charAt(0)+"tv":e.floating?"":e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0)}adjustMargins(e,s){let r=this.chart,l=this.options,h=this.getAlignment();h&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach((d,u)=>{d.test(h)&&!hr(e[u])&&(r[Gl[u]]=Math.max(r[Gl[u]],r.legend[(u+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][u]*l[u%2?"x":"y"]+(l.margin??12)+s[u]+(r.titleOffset[u]||0)))})}proximatePositions(){let e,s=this.chart,r=[],l=this.options.align==="left";for(let h of(this.allItems.forEach(function(d){let u,f,m=l,v,b;d.yAxis&&(d.xAxis.options.reversed&&(m=!m),d.points&&(u=wg(m?d.points:d.points.slice(0).reverse(),function(k){return $l(k.plotY)})),f=this.itemMarginTop+d.legendItem.label.getBBox().height+this.itemMarginBottom,b=d.yAxis.top-s.plotTop,v=d.visible?(u?u.plotY:d.yAxis.height)+(b-.3*f):b+d.yAxis.height,r.push({target:v,size:f,item:d}))},this),xg(r,s.plotHeight)))e=h.item.legendItem||{},$l(h.pos)&&(e.y=s.plotTop-s.spacing[0]+h.pos)}render(){let e=this.chart,s=e.renderer,r=this.options,l=this.padding,h=this.getAllItems(),d,u,f,m=this.group,v,b=this.box;this.itemX=l,this.itemY=this.initialItemY,this.offsetWidth=0,this.lastItemY=0,this.widthOption=Sg(r.width,e.spacingBox.width-l),v=e.spacingBox.width-2*l-r.x,["rm","lm"].indexOf(this.getAlignment().substring(0,2))>-1&&(v/=2),this.maxLegendWidth=this.widthOption||v,m||(this.group=m=s.g("legend").addClass(r.className||"").attr({zIndex:7}).add(),this.contentGroup=s.g().attr({zIndex:1}).add(m),this.scrollGroup=s.g().add(this.contentGroup)),this.renderTitle(),Cg(h,(k,M)=>{var S,A;return(((S=k.options)==null?void 0:S.legendIndex)||0)-(((A=M.options)==null?void 0:A.legendIndex)||0)}),r.reversed&&h.reverse(),this.allItems=h,this.display=d=!!h.length,this.lastLineHeight=0,this.maxItemWidth=0,this.totalItemWidth=0,this.itemHeight=0,h.forEach(this.renderItem,this),h.forEach(this.layoutItem,this),u=(this.widthOption||this.offsetWidth)+l,f=this.lastItemY+this.lastLineHeight+this.titleHeight,f=this.handleOverflow(f)+l,b||(this.box=b=s.rect().addClass("highcharts-legend-box").attr({r:r.borderRadius}).add(m)),e.styledMode||b.attr({stroke:r.borderColor,"stroke-width":r.borderWidth||0,fill:r.backgroundColor||"none"}).shadow(r.shadow),u>0&&f>0&&b[b.placed?"animate":"attr"](b.crisp.call({},{x:0,y:0,width:u,height:f},b.strokeWidth())),m[d?"show":"hide"](),e.styledMode&&m.getStyle("display")==="none"&&(u=f=0),this.legendWidth=u,this.legendHeight=f,d&&this.align(),this.proximate||this.positionItems(),Fe(this,"afterRender")}align(e=this.chart.spacingBox){let s=this.chart,r=this.options,l=e.y;/(lth|ct|rth)/.test(this.getAlignment())&&s.titleOffset[0]>0?l+=s.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&s.titleOffset[2]>0&&(l-=s.titleOffset[2]),l!==e.y&&(e=xi(e,{y:l})),s.hasRendered||(this.group.placed=!1),this.group.align(xi(r,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":r.verticalAlign}),!0,e)}handleOverflow(e){let s=this,r=this.chart,l=r.renderer,h=this.options,d=h.y,u=h.verticalAlign==="top",f=this.padding,m=h.maxHeight,v=h.navigation,b=ve(v.animation,!0),k=v.arrowSize||12,M=this.pages,S=this.allItems,A=function(F){typeof F=="number"?j.attr({height:F}):j&&(s.clipRect=j.destroy(),s.contentGroup.clip()),s.contentGroup.div&&(s.contentGroup.div.style.clip=F?"rect("+f+"px,9999px,"+(f+F)+"px,0)":"auto")},T=function(F){return s[F]=l.circle(0,0,1.3*k).translate(k/2,k/2).add(B),r.styledMode||s[F].attr("fill","rgba(0,0,0,0.0001)"),s[F]},P,O,E,z,I=r.spacingBox.height+(u?-d:d)-f,B=this.nav,j=this.clipRect;return h.layout!=="horizontal"||h.verticalAlign==="middle"||h.floating||(I/=2),m&&(I=Math.min(I,m)),M.length=0,e&&I>0&&e>I&&v.enabled!==!1?(this.clipHeight=P=Math.max(I-20-this.titleHeight-f,0),this.currentPage=ve(this.currentPage,1),this.fullHeight=e,S.forEach((F,H)=>{let G=(E=F.legendItem||{}).y||0,U=Math.round(E.label.getBBox().height),q=M.length;(!q||G-M[q-1]>P&&(O||G)!==M[q-1])&&(M.push(O||G),q++),E.pageIx=q-1,O&&z&&(z.pageIx=q-1),H===S.length-1&&G+U-M[q-1]>P&&G>M[q-1]&&(M.push(G),E.pageIx=q),G!==O&&(O=G),z=E}),j||(j=s.clipRect=l.clipRect(0,f-2,9999,0),s.contentGroup.clip(j)),A(P),B||(this.nav=B=l.g().attr({zIndex:1}).add(this.group),this.up=l.symbol("triangle",0,0,k,k).add(B),T("upTracker").on("click",function(){s.scroll(-1,b)}),this.pager=l.text("",15,10).addClass("highcharts-legend-navigation"),!r.styledMode&&v.style&&this.pager.css(v.style),this.pager.add(B),this.down=l.symbol("triangle-down",0,0,k,k).add(B),T("downTracker").on("click",function(){s.scroll(1,b)})),s.scroll(0),e=I):B&&(A(),this.nav=B.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),e}scroll(e,s){let r=this.chart,l=this.pages,h=l.length,d=this.clipHeight,u=this.options.navigation,f=this.pager,m=this.padding,v=this.currentPage+e;v>h&&(v=h),v>0&&(s!==void 0&&gg(s,r),this.nav.attr({translateX:m,translateY:d+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach(function(b){b.attr({class:v===1?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),f.attr({text:v+"/"+h}),[this.down,this.downTracker].forEach(function(b){b.attr({x:18+this.pager.getBBox().width,class:v===h?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),r.styledMode||(this.up.attr({fill:v===1?u.inactiveColor:u.activeColor}),this.upTracker.css({cursor:v===1?"default":"pointer"}),this.down.attr({fill:v===h?u.inactiveColor:u.activeColor}),this.downTracker.css({cursor:v===h?"default":"pointer"})),this.scrollOffset=-l[v-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=v,this.positionCheckboxes(),Pg(()=>{Fe(this,"afterScroll",{currentPage:v})},pg(ve(s,r.renderer.globalAnimation,!0)).duration))}setItemEvents(e,s,r){let l=this,h=e.legendItem||{},d=l.chart.renderer.boxWrapper,u=e instanceof Ze,f=e instanceof ae,m="highcharts-legend-"+(u?"point":"series")+"-active",v=l.chart.styledMode,b=r?[s,h.symbol]:[h.group],k=M=>{l.allItems.forEach(S=>{e!==S&&[S].concat(S.linkedSeries||[]).forEach(A=>{A.setState(M,!u)})})};for(let M of b)M&&M.on("mouseover",function(){e.visible&&k("inactive"),e.setState("hover"),e.visible&&d.addClass(m),v||s.css(l.options.itemHoverStyle)}).on("mouseout",function(){l.chart.styledMode||s.css(xi(e.visible?l.itemStyle:l.itemHiddenStyle)),k(""),d.removeClass(m),e.setState()}).on("click",function(S){let A=function(){e.setVisible&&e.setVisible(),k(e.visible?"inactive":"")};d.removeClass(m),Fe(l,"itemClick",{browserEvent:S,legendItem:e},A),u?e.firePointEvent("legendItemClick",{browserEvent:S}):f&&Fe(e,"legendItemClick",{browserEvent:S})})}createCheckboxForItem(e){e.checkbox=yg("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:e.selected,defaultChecked:e.selected},this.options.itemCheckboxStyle,this.chart.container),Sn(e.checkbox,"click",function(s){let r=s.target;Fe(e.series||e,"checkboxClick",{checked:r.checked,item:e},function(){e.select()})})}}(function(x){x.compose=function(e){Mg(mg,"Core.Legend")&&Sn(e,"beforeMargins",function(){this.legend=new x(this,this.options.legend)})}})(cr||(cr={}));let Ul=cr,{animate:dr,animObject:Tg,setAnimation:ur}=Jt,{defaultOptions:fr}=de,{numberFormat:Ag}=ue,{registerEventOptions:Kl}=ln,{charts:bi,doc:ls,marginNames:ql,svg:_g,win:Zl}=Y,{seriesTypes:pr}=Wt,{addEvent:gr,attr:Ql,createElement:mr,css:ke,defined:Je,diffObjects:Jl,discardElement:Og,erase:Lg,error:xr,extend:ti,find:br,fireEvent:xt,getAlignFactor:Eg,getStyle:yr,isArray:Dg,isNumber:ji,isObject:Ig,isString:Cn,merge:Ee,objectEach:vr,pick:re,pInt:Rg,relativeLength:th,removeEvent:eh,splat:Pn,syncTimeout:Bg,uniqueKey:zg}=ot;class ei{static chart(e,s,r){return new ei(e,s,r)}constructor(e,s,r){this.sharedClips={};let l=[...arguments];(Cn(e)||e.nodeName)&&(this.renderTo=l.shift()),this.init(l[0],l[1])}setZoomOptions(){let e=this.options.chart,s=e.zooming;this.zooming={...s,type:re(e.zoomType,s.type),key:re(e.zoomKey,s.key),pinchType:re(e.pinchType,s.pinchType),singleTouch:re(e.zoomBySingleTouch,s.singleTouch,!1),resetButton:Ee(s.resetButton,e.resetZoomButton)}}init(e,s){xt(this,"init",{args:arguments},function(){var d;let r=Ee(fr,e),l=r.chart,h=this.renderTo||l.renderTo;this.userOptions=ti({},e),(this.renderTo=Cn(h)?ls.getElementById(h):h)||xr(13,!0,this),this.margin=[],this.spacing=[],this.labelCollectors=[],this.callback=s,this.isResizing=0,this.options=r,this.axes=[],this.series=[],this.locale=r.lang.locale??((d=this.renderTo.closest("[lang]"))==null?void 0:d.lang),this.time=new To(ti(r.time||{},{locale:this.locale}),r.lang),r.time=this.time.options,this.numberFormatter=(l.numberFormatter||Ag).bind(this),this.styledMode=l.styledMode,this.hasCartesianSeries=l.showAxes,this.index=bi.length,bi.push(this),Y.chartCount++,Kl(this,l),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,this.setZoomOptions(),xt(this,"afterInit"),this.firstRender()})}initSeries(e){let s=this.options.chart,r=e.type||s.type,l=pr[r];l||xr(17,!0,this,{missingModuleFor:r});let h=new l;return typeof h.init=="function"&&h.init(this,e),h}setSortedData(){this.getSeriesOrderByLinks().forEach(function(e){e.points||e.data||!e.enabledDataSorting||e.setData(e.options.data,!1)})}getSeriesOrderByLinks(){return this.series.concat().sort(function(e,s){return e.linkedSeries.length||s.linkedSeries.length?s.linkedSeries.length-e.linkedSeries.length:0})}orderItems(e,s=0){let r=this[e],l=this.options[e]=Pn(this.options[e]).slice(),h=this.userOptions[e]=this.userOptions[e]?Pn(this.userOptions[e]).slice():[];if(this.hasRendered&&(l.splice(s),h.splice(s)),r)for(let d=s,u=r.length;d<u;++d){let f=r[d];f&&(f.index=d,f instanceof ae&&(f.name=f.getName()),f.options.isInternal||(l[d]=f.options,h[d]=f.userOptions))}}getClipBox(e,s){var v,b;let r=this.inverted,{xAxis:l,yAxis:h}=e||{},{x:d,y:u,width:f,height:m}=Ee(this.clipBox);return e&&(l&&l.len!==this.plotSizeX&&(f=l.len),h&&h.len!==this.plotSizeY&&(m=h.len),r&&!e.invertible&&([f,m]=[m,f])),s&&(d+=((v=r?h:l)==null?void 0:v.pos)??this.plotLeft,u+=((b=r?l:h)==null?void 0:b.pos)??this.plotTop),{x:d,y:u,width:f,height:m}}isInsidePlot(e,s,r={}){var T;let{inverted:l,plotBox:h,plotLeft:d,plotTop:u,scrollablePlotBox:f}=this,{scrollLeft:m=0,scrollTop:v=0}=r.visiblePlotOnly&&((T=this.scrollablePlotArea)==null?void 0:T.scrollingContainer)||{},b=r.series,k=r.visiblePlotOnly&&f||h,M=r.inverted?s:e,S=r.inverted?e:s,A={x:M,y:S,isInsidePlot:!0,options:r};if(!r.ignoreX){let P=b&&(l&&!this.polar?b.yAxis:b.xAxis)||{pos:d,len:1/0},O=r.paneCoordinates?P.pos+M:d+M;O>=Math.max(m+d,P.pos)&&O<=Math.min(m+d+k.width,P.pos+P.len)||(A.isInsidePlot=!1)}if(!r.ignoreY&&A.isInsidePlot){let P=!l&&r.axis&&!r.axis.isXAxis&&r.axis||b&&(l?b.xAxis:b.yAxis)||{pos:u,len:1/0},O=r.paneCoordinates?P.pos+S:u+S;O>=Math.max(v+u,P.pos)&&O<=Math.min(v+u+k.height,P.pos+P.len)||(A.isInsidePlot=!1)}return xt(this,"afterIsInsidePlot",A),A.isInsidePlot}redraw(e){xt(this,"beforeRedraw");let s=this.hasCartesianSeries?this.axes:this.colorAxis||[],r=this.series,l=this.pointer,h=this.legend,d=this.userOptions.legend,u=this.renderer,f=u.isHidden(),m=[],v,b,k,M=this.isDirtyBox,S=this.isDirtyLegend,A;for(u.rootFontSize=u.boxWrapper.getStyle("font-size"),this.setResponsive&&this.setResponsive(!1),ur(!!this.hasRendered&&e,this),f&&this.temporaryDisplay(),this.layOutTitles(!1),k=r.length;k--;)if(((A=r[k]).options.stacking||A.options.centerInCategory)&&(b=!0,A.isDirty)){v=!0;break}if(v)for(k=r.length;k--;)(A=r[k]).options.stacking&&(A.isDirty=!0);r.forEach(function(T){T.isDirty&&(T.options.legendType==="point"?(typeof T.updateTotals=="function"&&T.updateTotals(),S=!0):d&&(d.labelFormatter||d.labelFormat)&&(S=!0)),T.isDirtyData&&xt(T,"updatedData")}),S&&h&&h.options.enabled&&(h.render(),this.isDirtyLegend=!1),b&&this.getStacks(),s.forEach(function(T){T.updateNames(),T.setScale()}),this.getMargins(),s.forEach(function(T){T.isDirty&&(M=!0)}),s.forEach(function(T){let P=T.min+","+T.max;T.extKey!==P&&(T.extKey=P,m.push(function(){xt(T,"afterSetExtremes",ti(T.eventArgs,T.getExtremes())),delete T.eventArgs})),(M||b)&&T.redraw()}),M&&this.drawChartBox(),xt(this,"predraw"),r.forEach(function(T){(M||T.isDirty)&&T.visible&&T.redraw(),T.isDirtyData=!1}),l&&l.reset(!0),u.draw(),xt(this,"redraw"),xt(this,"render"),f&&this.temporaryDisplay(!0),m.forEach(function(T){T.call()})}get(e){let s=this.series;function r(h){return h.id===e||h.options&&h.options.id===e}let l=br(this.axes,r)||br(this.series,r);for(let h=0;!l&&h<s.length;h++)l=br(s[h].points||[],r);return l}createAxes(){let e=this.userOptions;for(let s of(xt(this,"createAxes"),["xAxis","yAxis"]))for(let r of e[s]=Pn(e[s]||{}))new zi(this,r,s);xt(this,"afterCreateAxes")}getSelectedPoints(){return this.series.reduce((e,s)=>(s.getPointsCollection().forEach(r=>{re(r.selectedStaging,r.selected)&&e.push(r)}),e),[])}getSelectedSeries(){return this.series.filter(e=>e.selected)}setTitle(e,s,r){this.applyDescription("title",e),this.applyDescription("subtitle",s),this.applyDescription("caption",void 0),this.layOutTitles(r)}applyDescription(e,s){var d;let r=this,l=this.options[e]=Ee(this.options[e],s),h=this[e];h&&s&&(this[e]=h=h.destroy()),l&&!h&&((h=this.renderer.text(l.text,0,0,l.useHTML).attr({align:l.align,class:"highcharts-"+e,zIndex:l.zIndex||4}).css({textOverflow:"ellipsis",whiteSpace:"nowrap"}).add()).update=function(u,f){r.applyDescription(e,u),r.layOutTitles(f)},this.styledMode||h.css(ti(e==="title"?{fontSize:this.options.isStock?"1em":"1.2em"}:{},l.style)),h.textPxLength=h.getBBox().width,h.css({whiteSpace:(d=l.style)==null?void 0:d.whiteSpace}),this[e]=h)}layOutTitles(e=!0){var u,f,m,v;let s=[0,0,0],{options:r,renderer:l,spacingBox:h}=this;["title","subtitle","caption"].forEach(b=>{var T;let k=this[b],M=this.options[b],S=Ee(h),A=(k==null?void 0:k.textPxLength)||0;if(k&&M){xt(this,"layOutTitle",{alignTo:S,key:b,textPxLength:A});let P=l.fontMetrics(k),O=P.b,E=P.h,z=M.verticalAlign||"top",I=z==="top",B=I&&M.minScale||1,j=b==="title"?I?-3:0:I?s[0]+2:0,F=Math.min(S.width/A,1),H=Math.max(B,F),G=Ee({y:z==="bottom"?O:j+O},{align:b==="title"?F<B?"left":"center":(T=this.title)==null?void 0:T.alignValue},M),U=(M.width||(F>B?this.chartWidth:S.width)/H)+"px";k.alignValue!==G.align&&(k.placed=!1);let q=Math.round(k.css({width:U}).getBBox(M.useHTML).height);if(G.height=q,k.align(G,!1,S).attr({align:G.align,scaleX:H,scaleY:H,"transform-origin":`${S.x+A*H*Eg(G.align)} ${E}`}),!M.floating){let Q=q*(q<1.2*E?1:H);z==="top"?s[0]=Math.ceil(s[0]+Q):z==="bottom"&&(s[2]=Math.ceil(s[2]+Q))}}},this),s[0]&&(((u=r.title)==null?void 0:u.verticalAlign)||"top")==="top"&&(s[0]+=((f=r.title)==null?void 0:f.margin)||0),s[2]&&((m=r.caption)==null?void 0:m.verticalAlign)==="bottom"&&(s[2]+=((v=r.caption)==null?void 0:v.margin)||0);let d=!this.titleOffset||this.titleOffset.join(",")!==s.join(",");this.titleOffset=s,xt(this,"afterLayOutTitles"),!this.isDirtyBox&&d&&(this.isDirtyBox=this.isDirtyLegend=d,this.hasRendered&&e&&this.isDirtyBox&&this.redraw())}getContainerBox(){let e=[].map.call(this.renderTo.children,r=>{if(r!==this.container){let l=r.style.display;return r.style.display="none",[r,l]}}),s={width:yr(this.renderTo,"width",!0)||0,height:yr(this.renderTo,"height",!0)||0};return e.filter(Boolean).forEach(([r,l])=>{r.style.display=l}),s}getChartSize(){var d;let e=this.options.chart,s=e.width,r=e.height,l=this.getContainerBox(),h=l.height<=1||!((d=this.renderTo.parentElement)!=null&&d.style.height)&&this.renderTo.style.height==="100%";this.chartWidth=Math.max(0,s||l.width||600),this.chartHeight=Math.max(0,th(r,this.chartWidth)||(h?400:l.height)),this.containerBox=l}temporaryDisplay(e){let s=this.renderTo,r;if(e)for(;s!=null&&s.style;)s.hcOrigStyle&&(ke(s,s.hcOrigStyle),delete s.hcOrigStyle),s.hcOrigDetached&&(ls.body.removeChild(s),s.hcOrigDetached=!1),s=s.parentNode;else for(;s!=null&&s.style&&(ls.body.contains(s)||s.parentNode||(s.hcOrigDetached=!0,ls.body.appendChild(s)),(yr(s,"display",!1)==="none"||s.hcOricDetached)&&(s.hcOrigStyle={display:s.style.display,height:s.style.height,overflow:s.style.overflow},r={display:"block",overflow:"hidden"},s!==this.renderTo&&(r.height=0),ke(s,r),s.offsetWidth||s.style.setProperty("display","block","important")),(s=s.parentNode)!==ls.body););}setClassName(e){this.container.className="highcharts-container "+(e||"")}getContainer(){var k,M;let e,s=this.options,r=s.chart,l="data-highcharts-chart",h=zg(),d=this.renderTo,u=Rg(Ql(d,l));ji(u)&&bi[u]&&bi[u].hasRendered&&bi[u].destroy(),Ql(d,l,this.index),d.innerHTML=Lt.emptyHTML,r.skipClone||d.offsetWidth||this.temporaryDisplay(),this.getChartSize();let f=this.chartHeight,m=this.chartWidth;ke(d,{overflow:"hidden"}),this.styledMode||(e=ti({position:"relative",overflow:"hidden",width:m+"px",height:f+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none",padding:"0px"},r.style||{}));let v=mr("div",{id:h},e,d);this.container=v,this.getChartSize(),m!==this.chartWidth&&(m=this.chartWidth,this.styledMode||ke(v,{width:re((k=r.style)==null?void 0:k.width,m+"px")})),this.containerBox=this.getContainerBox(),this._cursor=v.style.cursor;let b=r.renderer||!_g?Qi.getRendererType(r.renderer):rn;if(this.renderer=new b(v,m,f,void 0,r.forExport,(M=s.exporting)==null?void 0:M.allowHTML,this.styledMode),ur(void 0,this),this.setClassName(r.className),this.styledMode)for(let S in s.defs)this.renderer.definition(s.defs[S]);else this.renderer.setStyle(r.style);this.renderer.chartIndex=this.index,xt(this,"afterGetContainer")}getMargins(e){var h;let{spacing:s,margin:r,titleOffset:l}=this;this.resetMargins(),l[0]&&!Je(r[0])&&(this.plotTop=Math.max(this.plotTop,l[0]+s[0])),l[2]&&!Je(r[2])&&(this.marginBottom=Math.max(this.marginBottom,l[2]+s[2])),(h=this.legend)!=null&&h.display&&this.legend.adjustMargins(r,s),xt(this,"getMargins"),e||this.getAxisMargins()}getAxisMargins(){let e=this,s=e.axisOffset=[0,0,0,0],r=e.colorAxis,l=e.margin,h=d=>{d.forEach(u=>{u.visible&&u.getOffset()})};e.hasCartesianSeries?h(e.axes):r!=null&&r.length&&h(r),ql.forEach((d,u)=>{Je(l[u])||(e[d]+=s[u])}),e.setChartSize()}getOptions(){return Jl(this.userOptions,fr)}reflow(e){var h,d;let s=this,r=s.containerBox,l=s.getContainerBox();(h=s.pointer)==null||delete h.chartPosition,!((d=s.exporting)!=null&&d.isPrinting)&&!s.isResizing&&r&&l.width&&((l.width!==r.width||l.height!==r.height)&&(ot.clearTimeout(s.reflowTimeout),s.reflowTimeout=Bg(function(){s.container&&s.setSize(void 0,void 0,!1)},100*!!e)),s.containerBox=l)}setReflow(){let e=this,s=r=>{var l;(l=e.options)!=null&&l.chart.reflow&&e.hasLoaded&&e.reflow(r)};if(typeof ResizeObserver=="function")new ResizeObserver(s).observe(e.renderTo);else{let r=gr(Zl,"resize",s);gr(this,"destroy",r)}}setSize(e,s,r){let l=this,h=l.renderer;l.isResizing+=1,ur(r,l);let d=h.globalAnimation;l.oldChartHeight=l.chartHeight,l.oldChartWidth=l.chartWidth,e!==void 0&&(l.options.chart.width=e),s!==void 0&&(l.options.chart.height=s),l.getChartSize();let{chartWidth:u,chartHeight:f,scrollablePixelsX:m=0,scrollablePixelsY:v=0}=l;(l.isDirtyBox||u!==l.oldChartWidth||f!==l.oldChartHeight)&&(l.styledMode||(d?dr:ke)(l.container,{width:`${u+m}px`,height:`${f+v}px`},d),l.setChartSize(!0),h.setSize(u,f,d),l.axes.forEach(function(b){b.isDirty=!0,b.setScale()}),l.isDirtyLegend=!0,l.isDirtyBox=!0,l.layOutTitles(),l.getMargins(),l.redraw(d),l.oldChartHeight=void 0,xt(l,"resize"),setTimeout(()=>{l&&xt(l,"endResize")},Tg(d).duration)),l.isResizing-=1}setChartSize(e){let s,r,l,h,{chartHeight:d,chartWidth:u,inverted:f,spacing:m,renderer:v}=this,b=this.clipOffset,k=Math[f?"floor":"round"];this.plotLeft=s=Math.round(this.plotLeft),this.plotTop=r=Math.round(this.plotTop),this.plotWidth=l=Math.max(0,Math.round(u-s-(this.marginRight??0))),this.plotHeight=h=Math.max(0,Math.round(d-r-(this.marginBottom??0))),this.plotSizeX=f?h:l,this.plotSizeY=f?l:h,this.spacingBox=v.spacingBox={x:m[3],y:m[0],width:u-m[3]-m[1],height:d-m[0]-m[2]},this.plotBox=v.plotBox={x:s,y:r,width:l,height:h},b&&(this.clipBox={x:k(b[3]),y:k(b[0]),width:k(this.plotSizeX-b[1]-b[3]),height:k(this.plotSizeY-b[0]-b[2])}),e||(this.axes.forEach(function(M){M.setAxisSize(),M.setAxisTranslation()}),v.alignElements()),xt(this,"afterSetChartSize",{skipAxes:e})}resetMargins(){xt(this,"resetMargins");let e=this,s=e.options.chart,r=s.plotBorderWidth||0,l=Math.round(r)/2;["margin","spacing"].forEach(h=>{let d=s[h],u=Ig(d)?d:[d,d,d,d];["Top","Right","Bottom","Left"].forEach((f,m)=>{e[h][m]=s[`${h}${f}`]??u[m]})}),ql.forEach((h,d)=>{e[h]=e.margin[d]??e.spacing[d]}),e.axisOffset=[0,0,0,0],e.clipOffset=[l,l,l,l],e.plotBorderWidth=r}drawChartBox(){let e=this.options.chart,s=this.renderer,r=this.chartWidth,l=this.chartHeight,h=this.styledMode,d=this.plotBGImage,u=e.backgroundColor,f=e.plotBackgroundColor,m=e.plotBackgroundImage,v=this.plotLeft,b=this.plotTop,k=this.plotWidth,M=this.plotHeight,S=this.plotBox,A=this.clipRect,T=this.clipBox,P=this.chartBackground,O=this.plotBackground,E=this.plotBorder,z,I,B,j="animate";P||(this.chartBackground=P=s.rect().addClass("highcharts-background").add(),j="attr"),h?z=I=P.strokeWidth():(I=(z=e.borderWidth||0)+8*!!e.shadow,B={fill:u||"none"},(z||P["stroke-width"])&&(B.stroke=e.borderColor,B["stroke-width"]=z),P.attr(B).shadow(e.shadow)),P[j]({x:I/2,y:I/2,width:r-I-z%2,height:l-I-z%2,r:e.borderRadius}),j="animate",O||(j="attr",this.plotBackground=O=s.rect().addClass("highcharts-plot-background").add()),O[j](S),!h&&(O.attr({fill:f||"none"}).shadow(e.plotShadow),m&&(d?(m!==d.attr("href")&&d.attr("href",m),d.animate(S)):this.plotBGImage=s.image(m,v,b,k,M).add())),A?A.animate({width:T.width,height:T.height}):this.clipRect=s.clipRect(T),j="animate",E||(j="attr",this.plotBorder=E=s.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),h||E.attr({stroke:e.plotBorderColor,"stroke-width":e.plotBorderWidth||0,fill:"none"}),E[j](E.crisp(S,-E.strokeWidth())),this.isDirtyBox=!1,xt(this,"afterDrawChartBox")}propFromSeries(){let e,s,r,l=this,h=l.options.chart,d=l.options.series;["inverted","angular","polar"].forEach(function(u){for(s=pr[h.type],r=h[u]||s&&s.prototype[u],e=d==null?void 0:d.length;!r&&e--;)(s=pr[d[e].type])&&s.prototype[u]&&(r=!0);l[u]=r})}linkSeries(e){let s=this,r=s.series;r.forEach(function(l){l.linkedSeries.length=0}),r.forEach(function(l){let{linkedTo:h}=l.options;if(Cn(h)){let d;(d=h===":previous"?s.series[l.index-1]:s.get(h))&&d.linkedParent!==l&&(d.linkedSeries.push(l),l.linkedParent=d,d.enabledDataSorting&&l.setDataSortingOptions(),l.visible=re(l.options.visible,d.options.visible,l.visible))}}),xt(this,"afterLinkSeries",{isUpdating:e})}renderSeries(){this.series.forEach(function(e){e.translate(),e.render()})}render(){var v;let e=this.axes,s=this.colorAxis,r=this.renderer,l=this.options.chart.axisLayoutRuns||2,h=b=>{b.forEach(k=>{k.visible&&k.render()})},d=0,u=!0,f,m=0;for(let b of(this.setTitle(),xt(this,"beforeMargins"),(v=this.getStacks)==null||v.call(this),this.getMargins(!0),this.setChartSize(),e)){let{options:k}=b,{labels:M}=k;if(this.hasCartesianSeries&&b.horiz&&b.visible&&M.enabled&&b.series.length&&b.coll!=="colorAxis"&&!this.polar){d=k.tickLength,b.createGroups();let S=new Bi(b,0,"",!0),A=S.createLabel("x",M);if(S.destroy(),A&&re(M.reserveSpace,!ji(k.crossing))&&(d=A.getBBox().height+M.distance+Math.max(k.offset||0,0)),d){A==null||A.destroy();break}}}for(this.plotHeight=Math.max(this.plotHeight-d,0);(u||f||l>1)&&m<l;){let b=this.plotWidth,k=this.plotHeight;for(let M of e)m===0?M.setScale():(M.horiz&&u||!M.horiz&&f)&&M.setTickInterval(!0);m===0?this.getAxisMargins():this.getMargins(),u=b/this.plotWidth>(m?1:1.1),f=k/this.plotHeight>(m?1:1.05),m++}this.drawChartBox(),this.hasCartesianSeries?h(e):s!=null&&s.length&&h(s),this.seriesGroup||(this.seriesGroup=r.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.dataLabelsGroup||(this.dataLabelsGroup=r.g("datalabels-group").attr({zIndex:6}).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0}addCredits(e){let s=this,r=Ee(!0,this.options.credits,e);r.enabled&&!this.credits&&(this.credits=this.renderer.text(r.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){r.href&&(Zl.location.href=r.href)}).attr({align:r.position.align,zIndex:8}),s.styledMode||this.credits.css(r.style),this.credits.add().align(r.position),this.credits.update=function(l){s.credits=s.credits.destroy(),s.addCredits(l)})}destroy(){var u,f;let e,s=this,r=s.axes,l=s.series,h=s.container,d=h==null?void 0:h.parentNode;for(xt(s,"destroy"),s.renderer.forExport?Lg(bi,s):bi[s.index]=void 0,Y.chartCount--,s.renderTo.removeAttribute("data-highcharts-chart"),eh(s),e=r.length;e--;)r[e]=r[e].destroy();for((f=(u=this.scroller)==null?void 0:u.destroy)==null||f.call(u),e=l.length;e--;)l[e]=l[e].destroy();["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","rangeSelector","legend","resetZoomButton","tooltip","renderer"].forEach(m=>{var v,b;s[m]=(b=(v=s[m])==null?void 0:v.destroy)==null?void 0:b.call(v)}),h&&(h.innerHTML=Lt.emptyHTML,eh(h),d&&Og(h)),vr(s,function(m,v){delete s[v]})}firstRender(){var l;let e=this,s=e.options;e.getContainer(),e.resetMargins(),e.setChartSize(),e.propFromSeries(),e.createAxes();let r=Dg(s.series)?s.series:[];s.series=[],r.forEach(function(h){e.initSeries(h)}),e.linkSeries(),e.setSortedData(),xt(e,"beforeRender"),e.render(),(l=e.pointer)==null||l.getChartPosition(),e.renderer.imgCount||e.hasLoaded||e.onload(),e.temporaryDisplay(!0)}onload(){this.callbacks.concat([this.callback]).forEach(function(e){e&&this.index!==void 0&&e.apply(this,[this])},this),xt(this,"load"),xt(this,"render"),Je(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=!0}warnIfA11yModuleNotLoaded(){let{options:e,title:s}=this;e&&!this.accessibility&&(this.renderer.boxWrapper.attr({role:"img","aria-label":((s==null?void 0:s.element.textContent)||"").replace(/</g,"<")}),e.accessibility&&e.accessibility.enabled===!1||xr('Highcharts warning: Consider including the "accessibility.js" module to make your chart more usable for people with disabilities. Set the "accessibility.enabled" option to false to remove this warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.',!1,this))}addSeries(e,s,r){let l,h=this;return e&&(s=re(s,!0),xt(h,"addSeries",{options:e},function(){l=h.initSeries(e),h.isDirtyLegend=!0,h.linkSeries(),l.enabledDataSorting&&l.setData(e.data,!1),xt(h,"afterAddSeries",{series:l}),s&&h.redraw(r)})),l}addAxis(e,s,r,l){return this.createAxis(s?"xAxis":"yAxis",{axis:e,redraw:r,animation:l})}addColorAxis(e,s,r){return this.createAxis("colorAxis",{axis:e,redraw:s,animation:r})}createAxis(e,s){let r=new zi(this,s.axis,e);return re(s.redraw,!0)&&this.redraw(s.animation),r}showLoading(e){let s=this,r=s.options,l=r.loading,h=function(){d&&ke(d,{left:s.plotLeft+"px",top:s.plotTop+"px",width:s.plotWidth+"px",height:s.plotHeight+"px"})},d=s.loadingDiv,u=s.loadingSpan;d||(s.loadingDiv=d=mr("div",{className:"highcharts-loading highcharts-loading-hidden"},null,s.container)),u||(s.loadingSpan=u=mr("span",{className:"highcharts-loading-inner"},null,d),gr(s,"redraw",h)),d.className="highcharts-loading",Lt.setElementHTML(u,re(e,r.lang.loading,"")),!s.styledMode&&(ke(d,ti(l.style,{zIndex:10})),ke(u,l.labelStyle),s.loadingShown||(ke(d,{opacity:0,display:""}),dr(d,{opacity:l.style.opacity||.5},{duration:l.showDuration||0}))),s.loadingShown=!0,h()}hideLoading(){let e=this.options,s=this.loadingDiv;s&&(s.className="highcharts-loading highcharts-loading-hidden",this.styledMode||dr(s,{opacity:0},{duration:e.loading.hideDuration||100,complete:function(){ke(s,{display:"none"})}})),this.loadingShown=!1}update(e,s,r,l){let h,d,u,f=this,m={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},v=e.isResponsiveOptions,b=[];xt(f,"update",{options:e}),v||f.setResponsive(!1,!0),e=Jl(e,f.options),f.userOptions=Ee(f.userOptions,e);let k=e.chart;k&&(Ee(!0,f.options.chart,k),this.setZoomOptions(),"className"in k&&f.setClassName(k.className),("inverted"in k||"polar"in k||"type"in k)&&(f.propFromSeries(),h=!0),"alignTicks"in k&&(h=!0),"events"in k&&Kl(this,k),vr(k,function(A,T){f.propsRequireUpdateSeries.indexOf("chart."+T)!==-1&&(d=!0),f.propsRequireDirtyBox.indexOf(T)!==-1&&(f.isDirtyBox=!0),f.propsRequireReflow.indexOf(T)!==-1&&(f.isDirtyBox=!0,v||(u=!0))}),!f.styledMode&&k.style&&f.renderer.setStyle(f.options.chart.style||{})),!f.styledMode&&e.colors&&(this.options.colors=e.colors),vr(e,function(A,T){f[T]&&typeof f[T].update=="function"?f[T].update(A,!1):typeof f[m[T]]=="function"?f[m[T]](A):T!=="colors"&&f.collectionsWithUpdate.indexOf(T)===-1&&Ee(!0,f.options[T],e[T]),T!=="chart"&&f.propsRequireUpdateSeries.indexOf(T)!==-1&&(d=!0)}),this.collectionsWithUpdate.forEach(function(A){e[A]&&(Pn(e[A]).forEach(function(T,P){let O,E=Je(T.id);E&&(O=f.get(T.id)),!O&&f[A]&&(O=f[A][re(T.index,P)])&&(E&&Je(O.options.id)||O.options.isInternal)&&(O=void 0),O&&O.coll===A&&(O.update(T,!1),r&&(O.touched=!0)),!O&&r&&f.collectionsWithInit[A]&&(f.collectionsWithInit[A][0].apply(f,[T].concat(f.collectionsWithInit[A][1]||[]).concat([!1])).touched=!0)}),r&&f[A].forEach(function(T){T.touched||T.options.isInternal?delete T.touched:b.push(T)}))}),b.forEach(function(A){A.chart&&A.remove&&A.remove(!1)}),h&&f.axes.forEach(function(A){A.update({},!1)}),d&&f.getSeriesOrderByLinks().forEach(function(A){A.chart&&A.update({},!1)},this);let M=k==null?void 0:k.width,S=k&&(Cn(k.height)?th(k.height,M||f.chartWidth):k.height);u||ji(M)&&M!==f.chartWidth||ji(S)&&S!==f.chartHeight?f.setSize(M,S,l):re(s,!0)&&f.redraw(l),xt(f,"afterUpdate",{options:e,redraw:s,animation:l})}setSubtitle(e,s){this.applyDescription("subtitle",e),this.layOutTitles(s)}setCaption(e,s){this.applyDescription("caption",e),this.layOutTitles(s)}showResetZoom(){let e=this,s=fr.lang,r=e.zooming.resetButton,l=r.theme,h=r.relativeTo==="chart"||r.relativeTo==="spacingBox"?null:"plotBox";function d(){e.zoomOut()}xt(this,"beforeShowResetZoom",null,function(){e.resetZoomButton=e.renderer.button(s.resetZoom,null,null,d,l).attr({align:r.position.align,title:s.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(r.position,!1,h)}),xt(this,"afterShowResetZoom")}zoomOut(){xt(this,"selection",{resetSelection:!0},()=>this.transform({reset:!0,trigger:"zoom"}))}pan(e,s){let r=this,l=typeof s=="object"?s:{enabled:s,type:"x"},h=l.type,d=h&&r[{x:"xAxis",xy:"axes",y:"yAxis"}[h]].filter(f=>f.options.panningEnabled&&!f.options.isInternal),u=r.options.chart;u!=null&&u.panning&&(u.panning=l),xt(this,"pan",{originalEvent:e},()=>{r.transform({axes:d,event:e,to:{x:e.chartX-(r.mouseDownX||0),y:e.chartY-(r.mouseDownY||0)},trigger:"pan"}),ke(r.container,{cursor:"move"})})}transform(e){var S;let{axes:s=this.axes,event:r,from:l={},reset:h,selection:d,to:u={},trigger:f}=e,{inverted:m,time:v}=this;(S=this.hoverPoints)==null||S.forEach(A=>A.setState()),xt(this,"transform",e);let b=e.hasZoomed||!1,k,M;for(let A of s){let{horiz:T,len:P,minPointOffset:O=0,options:E,reversed:z}=A,I=T?"width":"height",B=T?"x":"y",j=re(u[I],A.len),F=re(l[I],A.len),H=10>Math.abs(j)?1:j/F,G=(l[B]||0)+F/2-A.pos,U=G-((u[B]??A.pos)+j/2-A.pos)/H,q=z&&!m||!z&&m?-1:1;if(!h&&(G<0||G>A.len))continue;let Q=A.chart.polar||A.isOrdinal?0:O*q||0,et=A.toValue(U,!0),tt=A.toValue(U+P/H,!0),it=et+Q,J=tt-Q,st=A.allExtremes;if(d&&d[A.coll].push({axis:A,min:Math.min(et,tt),max:Math.max(et,tt)}),it>J&&([it,J]=[J,it]),H===1&&!h&&A.coll==="yAxis"&&!st){for(let Qt of A.series){let _t=Qt.getExtremes(Qt.getProcessedData(!0).modified.getColumn("y")||[],!0);st??(st={dataMin:Number.MAX_VALUE,dataMax:-Number.MAX_VALUE}),ji(_t.dataMin)&&ji(_t.dataMax)&&(st.dataMin=Math.min(_t.dataMin,st.dataMin),st.dataMax=Math.max(_t.dataMax,st.dataMax))}A.allExtremes=st}let{dataMin:ct,dataMax:ft,min:gt,max:te}=ti(A.getExtremes(),st||{}),ut=v.parse(E.min),yt=v.parse(E.max),lt=ct??ut,at=ft??yt,Ht=J-it,vt=A.categories?0:Math.min(Ht,at-lt),At=lt-vt*(Je(ut)?0:E.minPadding),qt=at+vt*(Je(yt)?0:E.maxPadding),Ne=A.allowZoomOutside||H===1||f!=="zoom"&&H>1,pe=Math.min(ut??At,At,Ne?gt:At),ee=Math.max(yt??qt,qt,Ne?te:qt);(!A.isOrdinal||H!==1||h)&&(it<pe&&(it=pe,H>=1&&(J=it+Ht)),J>ee&&(J=ee,H>=1&&(it=J-Ht)),(h||A.series.length&&(it!==gt||J!==te)&&it>=pe&&J<=ee)&&(d?d[A.coll].push({axis:A,min:it,max:J}):(A.isPanning=f!=="zoom",A.isPanning&&(M=!0),A.setExtremes(h?void 0:it,h?void 0:J,!1,!1,{move:U,trigger:f,scale:H}),!h&&(it>pe||J<ee)&&f!=="mousewheel"&&(k=!0)),b=!0),this.hasCartesianSeries||h||f==="mousewheel"||(k=!0),r&&(this[T?"mouseDownX":"mouseDownY"]=r[T?"chartX":"chartY"]))}return b&&(d?xt(this,"selection",d,()=>{delete e.selection,e.trigger="zoom",this.transform(e)}):(!k||M||this.resetZoomButton?!k&&this.resetZoomButton&&(this.resetZoomButton=this.resetZoomButton.destroy()):this.showResetZoom(),this.redraw(f==="zoom"&&(this.options.chart.animation??this.pointCount<100)))),b}}ti(ei.prototype,{callbacks:[],collectionsWithInit:{xAxis:[ei.prototype.addAxis,[!0]],yAxis:[ei.prototype.addAxis,[!1]],series:[ei.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:["backgroundColor","borderColor","borderWidth","borderRadius","plotBackgroun
2dColor","plotBackgroundImage","plotBorderColor","plotBorderWidth","plotShadow","shadow"],propsRequireReflow:["margin","marginTop","marginRight","marginBottom","marginLeft","spacing","spacingTop","spacingRight","spacingBottom","spacingLeft"],propsRequireUpdateSeries:["chart.inverted","chart.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions","time","tooltip"]});let{stop:Fg}=Jt,{composed:Ng}=Y,{addEvent:ii,createElement:Tn,css:kr,defined:wr,erase:Wg,merge:ih,pushUnique:sh}=ot;function Hg(){let x=this.scrollablePlotArea;(this.scrollablePixelsX||this.scrollablePixelsY)&&!x&&(this.scrollablePlotArea=x=new hs(this)),x==null||x.applyFixed()}function nh(){this.chart.scrollablePlotArea&&(this.chart.scrollablePlotArea.isDirty=!0)}class hs{static compose(e,s,r){sh(Ng,this.compose)&&(ii(e,"afterInit",nh),ii(s,"afterSetChartSize",l=>this.afterSetSize(l.target,l)),ii(s,"render",Hg),ii(r,"show",nh))}static afterSetSize(e,s){let r,l,h,{minWidth:d,minHeight:u}=e.options.chart.scrollablePlotArea||{},{clipBox:f,plotBox:m,inverted:v,renderer:b}=e;if(!b.forExport)if(d?(e.scrollablePixelsX=r=Math.max(0,d-e.chartWidth),r&&(e.scrollablePlotBox=ih(e.plotBox),m.width=e.plotWidth+=r,f[v?"height":"width"]+=r,h=!0)):u&&(e.scrollablePixelsY=l=Math.max(0,u-e.chartHeight),wr(l)&&(e.scrollablePlotBox=ih(e.plotBox),m.height=e.plotHeight+=l,f[v?"width":"height"]+=l,h=!1)),wr(h)){if(!s.skipAxes)for(let k of e.axes)(k.horiz===h||e.hasParallelCoordinates&&k.coll==="yAxis")&&(k.setAxisSize(),k.setAxisTranslation())}else delete e.scrollablePlotBox}constructor(e){var M;let s,r=e.options.chart,l=Qi.getRendererType(),h=r.scrollablePlotArea||{},d=this.moveFixedElements.bind(this),u={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};e.scrollablePixelsX&&(u.overflowX="auto"),e.scrollablePixelsY&&(u.overflowY="auto"),this.chart=e;let f=this.parentDiv=Tn("div",{className:"highcharts-scrolling-parent"},{position:"relative"},e.renderTo),m=this.scrollingContainer=Tn("div",{className:"highcharts-scrolling"},u,f),v=this.innerContainer=Tn("div",{className:"highcharts-inner-container"},void 0,m),b=this.fixedDiv=Tn("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(((M=r.style)==null?void 0:M.zIndex)||0)+2,top:0},void 0,!0),k=this.fixedRenderer=new l(b,e.chartWidth,e.chartHeight,r.style);this.mask=k.path().attr({fill:r.backgroundColor||"#fff","fill-opacity":h.opacity??.85,zIndex:-1}).addClass("highcharts-scrollable-mask").add(),m.parentNode.insertBefore(b,m),kr(e.renderTo,{overflow:"visible"}),ii(e,"afterShowResetZoom",d),ii(e,"afterApplyDrilldown",d),ii(e,"afterLayOutTitles",d),ii(m,"scroll",()=>{let{pointer:S,hoverPoint:A}=e;S&&(delete S.chartPosition,A&&(s=A),S.runPointActions(void 0,s,!0))}),v.appendChild(e.container)}applyFixed(){var G;let{chart:e,fixedRenderer:s,isDirty:r,scrollingContainer:l}=this,{axisOffset:h,chartWidth:d,chartHeight:u,container:f,plotHeight:m,plotLeft:v,plotTop:b,plotWidth:k,scrollablePixelsX:M=0,scrollablePixelsY:S=0}=e,{scrollPositionX:A=0,scrollPositionY:T=0}=e.options.chart.scrollablePlotArea||{},P=d+M,O=u+S;s.setSize(d,u),(r??!0)&&(this.isDirty=!1,this.moveFixedElements()),Fg(e.container),kr(f,{width:`${P}px`,height:`${O}px`}),e.renderer.boxWrapper.attr({width:P,height:O,viewBox:[0,0,P,O].join(" ")}),(G=e.chartBackground)==null||G.attr({width:P,height:O}),kr(l,{width:`${d}px`,height:`${u}px`}),wr(r)||(l.scrollLeft=M*A,l.scrollTop=S*T);let E=b-h[0]-1,z=v-h[3]-1,I=b+m+h[2]+1,B=v+k+h[1]+1,j=v+k-M,F=b+m-S,H=[["M",0,0]];M?H=[["M",0,E],["L",v-1,E],["L",v-1,I],["L",0,I],["Z"],["M",j,E],["L",d,E],["L",d,I],["L",j,I],["Z"]]:S&&(H=[["M",z,0],["L",z,b-1],["L",B,b-1],["L",B,0],["Z"],["M",z,F],["L",z,u],["L",B,u],["L",B,F],["Z"]]),e.redrawTrigger!=="adjustHeight"&&this.mask.attr({d:H})}moveFixedElements(){let e,{container:s,inverted:r,scrollablePixelsX:l,scrollablePixelsY:h}=this.chart,d=this.fixedRenderer,u=hs.fixedSelectors;if(l&&!r?e=".highcharts-yaxis":l&&r||h&&!r?e=".highcharts-xaxis":h&&r&&(e=".highcharts-yaxis"),e&&!(this.chart.hasParallelCoordinates&&e===".highcharts-yaxis"))for(let f of[`${e}:not(.highcharts-radial-axis)`,`${e}-labels:not(.highcharts-radial-axis-labels)`])sh(u,f);else for(let f of[".highcharts-xaxis",".highcharts-yaxis"])for(let m of[`${f}:not(.highcharts-radial-axis)`,`${f}-labels:not(.highcharts-radial-axis-labels)`])Wg(u,m);for(let f of u)[].forEach.call(s.querySelectorAll(f),m=>{(m.namespaceURI===d.SVG_NS?d.box:d.box.parentNode).appendChild(m),m.style.pointerEvents="auto"})}}hs.fixedSelectors=[".highcharts-breadcrumbs-group",".highcharts-contextbutton",".highcharts-caption",".highcharts-credits",".highcharts-drillup-button",".highcharts-legend",".highcharts-legend-checkbox",".highcharts-navigator-series",".highcharts-navigator-xaxis",".highcharts-navigator-yaxis",".highcharts-navigator",".highcharts-range-selector-group",".highcharts-reset-zoom",".highcharts-scrollbar",".highcharts-subtitle",".highcharts-title"];let{format:jg}=ue,{series:Xg}=Wt,{destroyObjectProperties:Vg,fireEvent:oh,getAlignFactor:Mr,isNumber:Sr,pick:cs}=ot,rh=class{constructor(x,e,s,r,l){let h=x.chart.inverted,d=x.reversed;this.axis=x;let u=this.isNegative=!!s!=!!d;this.options=e=e||{},this.x=r,this.total=null,this.cumulative=null,this.points={},this.hasValidPoints=!1,this.stack=l,this.leftCliff=0,this.rightCliff=0,this.alignOptions={align:e.align||(h?u?"left":"right":"center"),verticalAlign:e.verticalAlign||(h?"middle":u?"bottom":"top"),y:e.y,x:e.x},this.textAlign=e.textAlign||(h?u?"right":"left":"center")}destroy(){Vg(this,this.axis)}render(x){let e=this.axis.chart,s=this.options,r=s.format,l=r?jg(r,this,e):s.formatter.call(this);if(this.label)this.label.attr({text:l,visibility:"hidden"});else{this.label=e.renderer.label(l,null,void 0,s.shape,void 0,void 0,s.useHTML,!1,"stack-labels");let h={r:s.borderRadius||0,text:l,padding:cs(s.padding,5),visibility:"hidden"};e.styledMode||(h.fill=s.backgroundColor,h.stroke=s.borderColor,h["stroke-width"]=s.borderWidth,this.label.css(s.style||{})),this.label.attr(h),this.label.added||this.label.add(x)}
vendor: 46,039 bytes, line 2
2this.label.labelrank=e.plotSizeY,oh(this,"afterRender")}setOffset(x,e,s,r,l,h){let{alignOptions:d,axis:u,label:f,options:m,textAlign:v}=this,b=u.chart,k=this.getStackBox({xOffset:x,width:e,boxBottom:s,boxTop:r,defaultX:l,xAxis:h}),{verticalAlign:M}=d;if(f&&k){let S=f.getBBox(void 0,0),A=f.padding,T=cs(m.overflow,"justify")==="justify",P;d.x=m.x||0,d.y=m.y||0;let{x:O,y:E}=this.adjustStackPosition({labelBox:S,verticalAlign:M,textAlign:v});k.x-=O,k.y-=E,f.align(d,!1,k),(P=b.isInsidePlot(f.alignAttr.x+d.x+O,f.alignAttr.y+d.y+E))||(T=!1),T&&Xg.prototype.justifyDataLabel.call(u,f,d,f.alignAttr,S,k),f.attr({x:f.alignAttr.x,y:f.alignAttr.y,rotation:m.rotation,rotationOriginX:S.width*Mr(m.textAlign||"center"),rotationOriginY:S.height/2}),cs(!T&&m.crop,!0)&&(P=Sr(f.x)&&Sr(f.y)&&b.isInsidePlot(f.x-A+(f.width||0),f.y)&&b.isInsidePlot(f.x+A,f.y)),f[P?"show":"hide"]()}oh(this,"afterSetOffset",{xOffset:x,width:e})}adjustStackPosition({labelBox:x,verticalAlign:e,textAlign:s}){return{x:x.width/2+x.width/2*(2*Mr(s)-1),y:x.height/2*2*(1-Mr(e))}}getStackBox(x){let e=this.axis,s=e.chart,{boxTop:r,defaultX:l,xOffset:h,width:d,boxBottom:u}=x,f=e.stacking.usePercentage?100:cs(r,this.total,0),m=e.toPixels(f),v=x.xAxis||s.xAxis[0],b=cs(l,v.translate(this.x))+h,k=Math.abs(m-e.toPixels(u||Sr(e.min)&&e.logarithmic&&e.logarithmic.lin2log(e.min)||0)),M=s.inverted,S=this.isNegative;return M?{x:(S?m:m-k)-s.plotLeft,y:v.height-b-d+v.top-s.plotTop,width:k,height:d}:{x:b+v.transB-s.plotLeft,y:(S?m-k:m)-s.plotTop,width:d,height:k}}},{getDeferredAnimation:Yg}=Jt,{series:{prototype:Gg}}=Wt,{addEvent:ah,correctFloat:ds,defined:lh,destroyObjectProperties:$g,fireEvent:Ug,isNumber:Cr,objectEach:yi,pick:Pr}=ot;function Kg(){let x=this.inverted;this.axes.forEach(e=>{var s;(s=e.stacking)!=null&&s.stacks&&e.hasVisibleSeries&&(e.stacking.oldStacks=e.stacking.stacks)}),this.series.forEach(e=>{var r;let s=((r=e.xAxis)==null?void 0:r.options)||{};e.options.stacking&&e.reserveSpace()&&(e.stackKey=[e.type,Pr(e.options.stack,""),x?s.top:s.left,x?s.height:s.width].join(","))})}function qg(){var e;let x=this.stacking;if(x){let s=x.stacks;yi(s,(r,l)=>{$g(r),delete s[l]}),(e=x.stackTotalGroup)==null||e.destroy()}}function Zg(){this.stacking||(this.stacking=new sm(this))}function Qg(x,e,s,r){return!lh(x)||x.x!==e||r&&x.stackKey!==r?x={x:e,index:0,key:r,stackKey:r}:x.index++,x.key=[s,e,x.index].join(","),x}function Jg(){let x,e=this,s=e.yAxis,r=e.stackKey||"",l=s.stacking.stacks,h=e.getColumn("x",!0),d=e.options.stacking,u=e[d+"Stacker"];u&&[r,"-"+r].forEach(f=>{var M;let m=h.length,v,b,k;for(;m--;)v=h[m],x=e.getStackIndicator(x,v,e.index,f),b=(M=l[f])==null?void 0:M[v],(k=b==null?void 0:b.points[x.key||""])&&u.call(e,k,b,m)})}function tm(x,e,s){let r=e.total?100/e.total:0;x[0]=ds(x[0]*r),x[1]=ds(x[1]*r),this.stackedYData[s]=x[1]}function em(x){(this.is("column")||this.is("columnrange"))&&(this.options.centerInCategory&&this.chart.series.length>1?Gg.setStackedPoints.call(this,x,"group"):x.stacking.resetStacks())}function im(x,e){var F,H;let s,r,l,h,d,u,f,m=e||this.options.stacking;if(!m||!this.reserveSpace()||({group:"xAxis"}[m]||"yAxis")!==x.coll)return;let v=this.getColumn("x",!0),b=this.getColumn(this.pointValKey||"y",!0),k=[],M=b.length,S=this.options,A=S.threshold||0,T=S.startFromThreshold?A:0,P=S.stack,O=e?`${this.type},${m}`:this.stackKey||"",E="-"+O,z=this.negStacks,I=x.stacking,B=I.stacks,j=I.oldStacks;for(I.stacksTouched+=1,f=0;f<M;f++){let G=v[f]||0,U=b[f],q=Cr(U)&&U||0;u=(s=this.getStackIndicator(s,G,this.index)).key||"",B[d=(r=z&&q<(T?0:A))?E:O]||(B[d]={}),B[d][G]||((F=j[d])!=null&&F[G]?(B[d][G]=j[d][G],B[d][G].total=null):B[d][G]=new rh(x,x.options.stackLabels,!!r,G,P)),l=B[d][G],U!==null?(l.points[u]=l.points[this.index]=[Pr(l.cumulative,T)],lh(l.cumulative)||(l.base=u),l.touched=I.stacksTouched,s.index>0&&this.singleStacks===!1&&(l.points[u][0]=l.points[this.index+","+G+",0"][0])):(delete l.points[u],delete l.points[this.index]);let Q=l.total||0;m==="percent"?(h=r?O:E,Q=z&&((H=B[h])!=null&&H[G])?(h=B[h][G]).total=Math.max(h.total||0,Q)+Math.abs(q):ds(Q+Math.abs(q))):m==="group"?Cr(U)&&Q++:Q=ds(Q+q),m==="group"?l.cumulative=(Q||1)-1:l.cumulative=ds(Pr(l.cumulative,T)+q),l.total=Q,U!==null&&(l.points[u].push(l.cumulative),k[f]=l.cumulative,l.hasValidPoints=!0)}m==="percent"&&(I.usePercentage=!0),m!=="group"&&(this.stackedYData=k),I.oldStacks={}}class sm{constructor(e){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=e}buildStacks(){let e,s,r=this.axis,l=r.series,h=r.coll==="xAxis",d=r.options.reversedStacks,u=l.length;for(this.resetStacks(),this.usePercentage=!1,s=u;s--;)e=l[d?s:u-s-1],h&&e.setGroupedPoints(r),e.setStackedPoints(r);if(!h)for(s=0;s<u;s++)l[s].modifyStacks();Ug(r,"afterBuildStacks")}cleanStacks(){this.oldStacks&&(this.stacks=this.oldStacks,yi(this.stacks,e=>{yi(e,s=>{s.cumulative=s.total})}))}resetStacks(){yi(this.stacks,e=>{yi(e,(s,r)=>{Cr(s.touched)&&s.touched<this.stacksTouched?(s.destroy(),delete e[r]):(s.total=null,s.cumulative=null)})})}renderStackTotals(){var u;let e=this.axis,s=e.chart,r=s.renderer,l=this.stacks,h=Yg(s,((u=e.options.stackLabels)==null?void 0:u.animation)||!1),d=this.stackTotalGroup=this.stackTotalGroup||r.g("stack-labels").attr({zIndex:6,opacity:0}).add();d.translate(s.plotLeft,s.plotTop),yi(l,f=>{yi(f,m=>{m.render(d)})}),d.animate({opacity:1},h)}}(N||(N={})).compose=function(x,e,s){let r=e.prototype,l=s.prototype;r.getStacks||(ah(x,"init",Zg),ah(x,"destroy",qg),r.getStacks=Kg,l.getStackIndicator=Qg,l.modifyStacks=Jg,l.percentStacker=tm,l.setGroupedPoints=em,l.setStackedPoints=im)};let nm=N,{defined:om,merge:hh,isObject:rm}=ot;class ch extends ae{drawGraph(){let e=this.options,s=(this.gappedPath||this.getGraphPath).call(this),r=this.chart.styledMode;[this,...this.zones].forEach((l,h)=>{let d,u=l.graph,f=u?"animate":"attr",m=l.dashStyle||e.dashStyle;u?(u.endX=this.preventGraphAnimation?null:s.xMap,u.animate({d:s})):s.length&&(l.graph=u=this.chart.renderer.path(s).addClass("highcharts-graph"+(h?` highcharts-zone-graph-${h-1} `:" ")+(h&&l.className||"")).attr({zIndex:1}).add(this.group)),u&&!r&&(d={stroke:!h&&e.lineColor||l.color||this.color||"#cccccc","stroke-width":e.lineWidth||0,fill:this.fillGraph&&this.color||"none"},m?d.dashstyle=m:e.linecap!=="square"&&(d["stroke-linecap"]=d["stroke-linejoin"]="round"),u[f](d).shadow(e.shadow&&hh({filterUnits:"userSpaceOnUse"},rm(e.shadow)?e.shadow:{}))),u&&(u.startX=s.xMap,u.isArea=s.isArea)})}getGraphPath(e,s,r){let l=this,h=l.options,d=[],u=[],f,m=h.step,v=(e=e||l.points).reversed;return v&&e.reverse(),(m={right:1,center:2}[m]||m&&3)&&v&&(m=4-m),(e=this.getValidPoints(e,!1,h.nullInteraction||!(h.connectNulls&&!s&&!r))).forEach(function(b,k){let M,S=b.plotX,A=b.plotY,T=e[k-1],P=b.isNull||typeof A!="number";(b.leftCliff||T!=null&&T.rightCliff)&&!r&&(f=!0),P&&!om(s)&&k>0?f=!h.connectNulls:P&&!s?f=!0:(k===0||f?M=[["M",b.plotX,b.plotY]]:l.getPointSpline?M=[l.getPointSpline(e,b,k)]:m?(M=m===1?[["L",T.plotX,A]]:m===2?[["L",(T.plotX+S)/2,T.plotY],["L",(T.plotX+S)/2,A]]:[["L",S,T.plotY]]).push(["L",S,A]):M=[["L",S,A]],u.push(b.x),m&&(u.push(b.x),m===2&&u.push(b.x)),d.push.apply(d,M),f=!1)}),d.xMap=u,l.graphPath=d,d}}ch.defaultOptions=hh(ae.defaultOptions,{legendSymbol:"lineMarker"}),Wt.registerSeriesType("line",ch);let{seriesTypes:{line:Tr}}=Wt,{extend:am,merge:lm,objectEach:hm,pick:An}=ot;class Ar extends Tr{drawGraph(){this.areaPath=[],super.drawGraph.apply(this);let{areaPath:e,options:s}=this;[this,...this.zones].forEach((r,l)=>{let h={},d=r.fillColor||s.fillColor,u=r.area,f=u?"animate":"attr";u?(u.endX=this.preventGraphAnimation?null:e.xMap,u.animate({d:e})):(h.zIndex=0,(u=r.area=this.chart.renderer.path(e).addClass("highcharts-area"+(l?` highcharts-zone-area-${l-1} `:" ")+(l&&r.className||"")).add(this.group)).isArea=!0),this.chart.styledMode||(h.fill=d||r.color||this.color,h["fill-opacity"]=d?1:s.fillOpacity??.75,u.css({pointerEvents:this.stickyTracking?"none":"auto"})),u[f](h),u.startX=e.xMap,u.shiftUnit=s.step?2:1})}getGraphPath(e){let s,r,l,h=Tr.prototype.getGraphPath,d=this.options,u=d.stacking,f=this.yAxis,m=[],v=[],b=this.index,k=f.stacking.stacks[this.stackKey],M=d.threshold,S=Math.round(f.getThreshold(d.threshold)),A=An(d.connectNulls,u==="percent"),T=function(B,j,F){let H=e[B],G=u&&k[H.x].points[b],U=H[F+"Null"]||0,q=H[F+"Cliff"]||0,Q,et,tt=!0;q||U?(Q=(U?G[0]:G[1])+q,et=G[0]+q,tt=!!U):!u&&e[j]&&e[j].isNull&&(Q=et=M),Q!==void 0&&(v.push({plotX:s,plotY:Q===null?S:f.getThreshold(Q),isNull:tt,isCliff:!0}),m.push({plotX:s,plotY:et===null?S:f.getThreshold(et),doCurve:!1}))};e=e||this.points,u&&(e=this.getStackPoints(e));for(let B=0,j=e.length;B<j;++B)u||(e[B].leftCliff=e[B].rightCliff=e[B].leftNull=e[B].rightNull=void 0),r=e[B].isNull,s=An(e[B].rectPlotX,e[B].plotX),l=u?An(e[B].yBottom,S):S,(!r||A)&&(A||T(B,B-1,"left"),r&&!u&&A||(v.push(e[B]),m.push({x:B,plotX:s,plotY:l})),A||T(B,B+1,"right"));let P=h.call(this,v,!0,!0);m.reversed=!0;let O=h.call(this,m,!0,!0),E=O[0];E&&E[0]==="M"&&(O[0]=["L",E[1],E[2]]);let z=P.concat(O);z.length&&z.push(["Z"]);let I=h.call(this,v,!1,A);return this.chart.series.length>1&&u&&v.some(B=>B.isCliff)&&(z.hasStackedCliffs=I.hasStackedCliffs=!0),z.xMap=P.xMap,this.areaPath=z,I}getStackPoints(e){let s=this,r=[],l=[],h=this.xAxis,d=this.yAxis,u=d.stacking.stacks[this.stackKey],f={},m=d.series,v=m.length,b=d.options.reversedStacks?1:-1,k=m.indexOf(s);if(e=e||this.points,this.options.stacking){for(let S=0;S<e.length;S++)e[S].leftNull=e[S].rightNull=void 0,f[e[S].x]=e[S];hm(u,function(S,A){S.total!==null&&l.push(A)}),l.sort(function(S,A){return S-A});let M=m.map(S=>S.visible);l.forEach(function(S,A){let T=0,P,O;if(f[S]&&!f[S].isNull)r.push(f[S]),[-1,1].forEach(function(E){let z=E===1?"rightNull":"leftNull",I=u[l[A+E]],B=0;if(I){let j=k;for(;j>=0&&j<v;){let F=m[j].index;!(P=I.points[F])&&(F===s.index?f[S][z]=!0:M[j]&&(O=u[S].points[F])&&(B-=O[1]-O[0])),j+=b}}f[S][E===1?"rightCliff":"leftCliff"]=B});else{let E=k;for(;E>=0&&E<v;){let z=m[E].index;if(P=u[S].points[z]){T=P[1];break}E+=b}T=An(T,0),T=d.translate(T,0,1,0,1),r.push({isNull:!0,plotX:h.translate(S,0,0,0,1),x:S,plotY:T,yBottom:T})}})}return r}}Ar.defaultOptions=lm(Tr.defaultOptions,{threshold:0,legendSymbol:"areaMarker"}),am(Ar.prototype,{singleStacks:!1}),Wt.registerSeriesType("area",Ar);let{line:dh}=Wt.seriesTypes,{merge:cm,pick:_n}=ot;class _r extends dh{getPointSpline(e,s,r){let l,h,d,u,f=s.plotX||0,m=s.plotY||0,v=e[r-1],b=e[r+1];function k(S){return S&&!S.isNull&&S.doCurve!==!1&&!s.isCliff}if(k(v)&&k(b)){let S=v.plotX||0,A=v.plotY||0,T=b.plotX||0,P=b.plotY||0,O=0;l=(1.5*f+S)/2.5,h=(1.5*m+A)/2.5,d=(1.5*f+T)/2.5,u=(1.5*m+P)/2.5,d!==l&&(O=(u-h)*(d-f)/(d-l)+m-u),h+=O,u+=O,h>A&&h>m?(h=Math.max(A,m),u=2*m-h):h<A&&h<m&&(h=Math.min(A,m),u=2*m-h),u>P&&u>m?(u=Math.max(P,m),h=2*m-u):u<P&&u<m&&(u=Math.min(P,m),h=2*m-u),s.rightContX=d,s.rightContY=u,s.controlPoints={low:[l,h],high:[d,u]}}let M=["C",_n(v.rightContX,v.plotX,0),_n(v.rightContY,v.plotY,0),_n(l,f,0),_n(h,m,0),f,m];return v.rightContX=v.rightContY=void 0,M}}_r.defaultOptions=cm(dh.defaultOptions),Wt.registerSeriesType("spline",_r);let uh=_r,{area:dm,area:{prototype:Or}}=Wt.seriesTypes,{extend:um,merge:fm}=ot;class Lr extends uh{}Lr.defaultOptions=fm(uh.defaultOptions,dm.defaultOptions),um(Lr.prototype,{getGraphPath:Or.getGraphPath,getStackPoints:Or.getStackPoints,drawGraph:Or.drawGraph}),Wt.registerSeriesType("areaspline",Lr);let{animObject:pm}=Jt,{parse:gm}=It,{noop:mm}=Y,{clamp:On,crisp:Ln,defined:fh,extend:ph,fireEvent:gh,isArray:mh,isNumber:En,merge:Er,pick:us,objectEach:xm}=ot;class Dn extends ae{animate(e){let s,r,l=this,h=this.yAxis,d=h.pos,u=h.reversed,f=l.options,{clipOffset:m,inverted:v}=this.chart,b={},k=v?"translateX":"translateY";e&&m?(b.scaleY=.001,r=On(h.toPixels(f.threshold||0),d,d+h.len),v?b.translateX=(r+=u?-Math.floor(m[0]):Math.ceil(m[2]))-h.len:b.translateY=r+=u?Math.ceil(m[0]):-Math.floor(m[2]),l.clipBox&&l.setClip(),l.group.attr(b)):(s=Number(l.group.attr(k)),l.group.animate({scaleY:1},ph(pm(l.options.animation),{step:function(M,S){l.group&&(b[k]=s+S.pos*(d-s),l.group.attr(b))}})))}init(e,s){super.init.apply(this,arguments);let r=this;(e=r.chart).hasRendered&&e.series.forEach(function(l){l.type===r.type&&(l.isDirty=!0)})}getColumnMetrics(){var A,T;let e=this,s=e.options,r=e.xAxis,l=e.yAxis,h=r.options.reversedStacks,d=r.reversed&&!h||!r.reversed&&h,u={},f,m=0;s.grouping===!1?m=1:e.chart.series.forEach(function(P){let O,E=P.yAxis,z=P.options;P.type===e.type&&P.reserveSpace()&&l.len===E.len&&l.pos===E.pos&&(z.stacking&&z.stacking!=="group"?(u[f=P.stackKey]===void 0&&(u[f]=m++),O=u[f]):z.grouping!==!1&&(O=m++),P.columnIndex=O)});let v=Math.min(Math.abs(r.transA)*(!((A=r.brokenAxis)!=null&&A.hasBreaks)&&((T=r.ordinal)==null?void 0:T.slope)||s.pointRange||r.closestPointRange||r.tickInterval||1),r.len),b=v*s.groupPadding,k=(v-2*b)/(m||1),M=Math.min(s.maxPointWidth||r.len,us(s.pointWidth,k*(1-2*s.pointPadding))),S=(e.columnIndex||0)+ +!!d;return e.columnMetrics={width:M,offset:(k-M)/2+(b+S*k-v/2)*(d?-1:1),paddedWidth:k,columnCount:m},e.columnMetrics}crispCol(e,s,r,l){let h=this.borderWidth,d=this.chart.inverted;return l=Ln(s+l,h,d)-(s=Ln(s,h,d)),this.options.crisp&&(r=Ln(e+r,h)-(e=Ln(e,h))),{x:e,y:s,width:r,height:l}}adjustForMissingColumns(e,s,r,l){var h;if(!r.isNull&&l.columnCount>1){let d=this.xAxis.series.filter(v=>v.visible).map(v=>v.index),u=0,f=0;xm((h=this.xAxis.stacking)==null?void 0:h.stacks,v=>{var S;let b=typeof r.x=="number"?(S=v[r.x.toString()])==null?void 0:S.points:void 0,k=b==null?void 0:b[this.index],M={};if(b&&mh(k)){let A=this.index,T=Object.keys(b).filter(P=>!P.match(",")&&b[P]&&b[P].length>1).map(parseFloat).filter(P=>d.indexOf(P)!==-1).filter(P=>{let O=this.chart.series[P].options,E=O.stacking&&O.stack;if(fh(E)){if(En(M[E]))return A===P&&(A=M[E]),!1;M[E]=P}return!0}).sort((P,O)=>O-P);u=T.indexOf(A),f=T.length}}),u=this.xAxis.reversed?f-1-u:u;let m=(f-1)*l.paddedWidth+s;e=(r.plotX||0)+m/2-s-u*l.paddedWidth}return e}translate(){let e=this,s=e.chart,r=e.options,l=e.dense=e.closestPointRange*e.xAxis.transA<2,h=e.borderWidth=us(r.borderWidth,+!l),d=e.xAxis,u=e.yAxis,f=r.threshold,m=us(r.minPointLength,5),v=e.getColumnMetrics(),b=v.width,k=e.pointXOffset=v.offset,M=e.dataMin,S=e.dataMax,A=e.translatedThreshold=u.getThreshold(f),T=e.barW=Math.max(b,1+2*h);r.pointPadding&&r.crisp&&(T=Math.ceil(T)),ae.prototype.translate.apply(e),e.points.forEach(function(P){let O=us(P.yBottom,A),E=999+Math.abs(O),z=P.plotX||0,I=On(P.plotY,-E,u.len+E),B,j=Math.min(I,O),F=Math.max(I,O)-j,H=b,G=z+k,U=T;m&&Math.abs(F)<m&&(F=m,B=!u.reversed&&!P.negative||u.reversed&&P.negative,En(f)&&En(S)&&P.y===f&&S<=f&&(u.min||0)<f&&(M!==S||(u.max||0)<=f)&&(B=!B,P.negative=!P.negative),j=Math.abs(j-A)>m?O-m:A-(B?m:0)),fh(P.options.pointWidth)&&(G-=Math.round(((H=U=Math.ceil(P.options.pointWidth))-b)/2)),r.centerInCategory&&(G=e.adjustForMissingColumns(G,H,P,v)),P.barX=G,P.pointWidth=H,P.tooltipPos=s.inverted?[On(u.len+u.pos-s.plotLeft-I,u.pos-s.plotLeft,u.len+u.pos-s.plotLeft),d.len+d.pos-s.plotTop-G-U/2,F]:[d.left-s.plotLeft+G+U/2,On(I+u.pos-s.plotTop,u.pos-s.plotTop,u.len+u.pos-s.plotTop),F],P.shapeType=e.pointClass.prototype.shapeType||"roundedRect",P.shapeArgs=e.crispCol(G,j,U,P.isNull?0:F)}),gh(this,"afterColumnTranslate")}drawGraph(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")}pointAttribs(e,s){let r=this.options,l=this.pointAttrToOptions||{},h=l.stroke||"borderColor",d=l["stroke-width"]||"borderWidth",u,f,m,v=e&&e.color||this.color,b=e&&e[h]||r[h]||v,k=e&&e.options.dashStyle||r.dashStyle,M=e&&e[d]||r[d]||this[d]||0,S=e!=null&&e.isNull&&r.nullInteraction?0:(e==null?void 0:e.opacity)??r.opacity??1;e&&this.zones.length&&(f=e.getZone(),v=e.options.color||f&&(f.color||e.nonZonedColor)||this.color,f&&(b=f.borderColor||b,k=f.dashStyle||k,M=f.borderWidth||M)),s&&e&&(m=(u=Er(r.states[s],e.options.states&&e.options.states[s]||{})).brightness,v=u.color||m!==void 0&&gm(v).brighten(u.brightness).get()||v,b=u[h]||b,M=u[d]||M,k=u.dashStyle||k,S=us(u.opacity,S));let A={fill:v,stroke:b,"stroke-width":M,opacity:S};return k&&(A.dashstyle=k),A}drawPoints(e=this.points){let s,r=this,l=this.chart,h=r.options,d=h.nullInteraction,u=l.renderer,f=h.animationLimit||250;e.forEach(function(m){let v=m.plotY,b=m.graphic,k=!!b,M=b&&l.pointCount<f?"animate":"attr";En(v)&&(m.y!==null||d)?(s=m.shapeArgs,b&&m.hasNewShapeType()&&(b=b.destroy()),r.enabledDataSorting&&(m.startXPos=r.xAxis.reversed?-(s&&s.width||0):r.xAxis.width),!b&&(m.graphic=b=u[m.shapeType](s).add(m.group||r.group),b&&r.enabledDataSorting&&l.hasRendered&&l.pointCount<f&&(b.attr({x:m.startXPos}),k=!0,M="animate")),b&&k&&b[M](Er(s)),l.styledMode||b[M](r.pointAttribs(m,m.selected&&"select")).shadow(m.allowShadow!==!1&&h.shadow),b&&(b.addClass(m.getClassName(),!0),b.attr({visibility:m.visible?"inherit":"hidden"}))):b&&(m.graphic=b.destroy())})}drawTracker(e=this.points){let s,r=this,l=r.chart,h=l.pointer,d=function(u){h==null||h.normalize(u);let f=h==null?void 0:h.getPointFromEvent(u);h&&f&&r.options.enableMouseTracking&&(l.isInsidePlot(u.chartX-l.plotLeft,u.chartY-l.plotTop,{visiblePlotOnly:!0})||h!=null&&h.inClass(u.target,"highcharts-data-label"))&&(h.isDirectTouch=!0,f.onMouseOver(u))};e.forEach(function(u){s=mh(u.dataLabels)?u.dataLabels:u.dataLabel?[u.dataLabel]:[],u.graphic&&(u.graphic.element.point=u),s.forEach(function(f){(f.div||f.element).point=u})}),r._hasTracking||(r.trackerGroups.forEach(function(u){r[u]&&(r[u].addClass("highcharts-tracker").on("mouseover",d).on("mouseout",function(f){h==null||h.onTrackerMouseOut(f)}).on("touchstart",d),!l.styledMode&&r.options.cursor&&r[u].css({cursor:r.options.cursor}))}),r._hasTracking=!0),gh(this,"afterDrawTracker")}remove(){let e=this,s=e.chart;s.hasRendered&&s.series.forEach(function(r){r.type===e.type&&(r.isDirty=!0)}),ae.prototype.remove.apply(e,arguments)}}Dn.defaultOptions=Er(ae.defaultOptions,{borderRadius:3,centerInCategory:!1,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"}),ph(Dn.prototype,{directTouch:!0,getSymbol:mm,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]}),Wt.registerSeriesType("column",Dn);let In=Dn,{getDeferredAnimation:bm}=Jt,{format:ym}=ue,{defined:vi,extend:xh,fireEvent:Dr,getAlignFactor:bh,isArray:si,isString:fs,merge:ps,objectEach:vm,pick:gs,pInt:km,splat:yh}=ot;(function(x){function e(){return f(this).some(v=>v==null?void 0:v.enabled)}function s(v,b,k,M,S){var G;let{chart:A,enabledDataSorting:T}=this,P=this.isCartesian&&A.inverted,O=v.plotX,E=v.plotY,z=k.rotation||0,I=vi(O)&&vi(E)&&A.isInsidePlot(O,Math.round(E),{inverted:P,paneCoordinates:!0,series:this}),B=z===0&&gs(k.overflow,T?"none":"justify")==="justify",j=this.visible&&v.visible!==!1&&vi(O)&&(v.series.forceDL||T&&!B||I||gs(k.inside,!!this.options.stacking)&&M&&A.isInsidePlot(O,P?M.x+1:M.y+M.height-1,{inverted:P,paneCoordinates:!0,series:this})),F=v.pos();if(j&&F){var H;let U=b.getBBox(),q=b.getBBox(void 0,0);if(M=xh({x:F[0],y:Math.round(F[1]),width:0,height:0},M||{}),k.alignTo==="plotEdges"&&this.isCartesian&&(M[P?"x":"y"]=0,M[P?"width":"height"]=((G=this.yAxis)==null?void 0:G.len)||0),xh(k,{width:U.width,height:U.height}),H=M,T&&this.xAxis&&!B&&this.setDataLabelStartPos(v,b,S,I,H),b.align(ps(k,{width:q.width,height:q.height}),!1,M,!1),b.alignAttr.x+=bh(k.align)*(q.width-U.width),b.alignAttr.y+=bh(k.verticalAlign)*(q.height-U.height),b[b.placed?"animate":"attr"]({"text-align":b.alignAttr["text-align"]||"center",x:b.alignAttr.x+(U.width-q.width)/2,y:b.alignAttr.y+(U.height-q.height)/2,rotationOriginX:(b.width||0)/2,rotationOriginY:(b.height||0)/2}),B&&M.height>=0)this.justifyDataLabel(b,k,b.alignAttr,U,M,S);else if(gs(k.crop,!0)){let{x:Q,y:et}=b.alignAttr;j=A.isInsidePlot(Q,et,{paneCoordinates:!0,series:this})&&A.isInsidePlot(Q+U.width-1,et+U.height-1,{paneCoordinates:!0,series:this})}k.shape&&!z&&b[S?"attr":"animate"]({anchorX:F[0],anchorY:F[1]})}S&&T&&(b.placed=!1),j||T&&!B?(b.show(),b.placed=!0):(b.hide(),b.placed=!1)}function r(){return this.plotGroup("dataLabelsGroup","data-labels",this.hasRendered?"inherit":"hidden",this.options.dataLabels.zIndex||6,this.chart.dataLabelsGroup)}function l(v){let b=this.hasRendered||0,k=this.initDataLabelsGroup().attr({opacity:+b});return!b&&k&&(this.visible&&k.show(),this.options.animation?k.animate({opacity:1},v):k.attr({opacity:1})),k}function h(v){var j;let b;v=v||this.points;let k=this,M=k.chart,S=k.options,A=M.renderer,{backgroundColor:T,plotBackgroundColor:P}=M.options.chart,O=A.getContrast(fs(P)&&P||fs(T)&&T||"#000000"),E=f(k),{animation:z,defer:I}=E[0],B=I?bm(M,z,k):{defer:0,duration:0};Dr(this,"drawDataLabels"),(j=k.hasDataLabels)!=null&&j.call(k)&&(b=this.initDataLabels(B),v.forEach(F=>{var q,Q,et;let H=F.dataLabels||[],G=F.color||k.color;yh(u(E,F.dlOptions||((q=F.options)==null?void 0:q.dataLabels))).forEach((tt,it)=>{var At;let J=tt.enabled&&(F.visible||F.dataLabelOnHidden)&&(!F.isNull||F.dataLabelOnNull)&&function(qt,Ne){let pe=Ne.filter;if(pe){let ee=pe.operator,Qt=qt[pe.property],_t=pe.value;return ee===">"&&Qt>_t||ee==="<"&&Qt<_t||ee===">="&&Qt>=_t||ee==="<="&&Qt<=_t||ee==="=="&&Qt==_t||ee==="==="&&Qt===_t||ee==="!="&&Qt!=_t||ee==="!=="&&Qt!==_t||!1}return!0}(F,tt),{backgroundColor:st,borderColor:ct,distance:ft,style:gt={}}=tt,te,ut,yt,lt={},at=H[it],Ht=!at,vt;J&&(ut=vi(te=gs(tt[F.formatPrefix+"Format"],tt.format))?ym(te,F,M):(tt[F.formatPrefix+"Formatter"]||tt.formatter).call(F,tt),yt=tt.rotation,!M.styledMode&&(gt.color=gs(tt.color,gt.color,fs(k.color)?k.color:void 0,"#000000"),gt.color==="contrast"?(st!=="none"&&(vt=st),F.contrastColor=A.getContrast(vt!=="auto"&&fs(vt)&&vt||(fs(G)?G:"")),gt.color=vt||!vi(ft)&&tt.inside||0>km(ft||0)||S.stacking?F.contrastColor:O):delete F.contrastColor,S.cursor&&(gt.cursor=S.cursor)),lt={r:tt.borderRadius||0,rotation:yt,padding:tt.padding,zIndex:1},M.styledMode||(lt.fill=st==="auto"?F.color:st,lt.stroke=ct==="auto"?F.color:ct,lt["stroke-width"]=tt.borderWidth),vm(lt,(qt,Ne)=>{qt===void 0&&delete lt[Ne]})),!at||J&&vi(ut)&&!!(at.div||(At=at.text)!=null&&At.foreignObject)==!!tt.useHTML&&(at.rotation&&tt.rotation||at.rotation===tt.rotation)||(at=void 0,Ht=!0),J&&vi(ut)&&ut!==""&&(at?lt.text=ut:(at=A.label(ut,0,0,tt.shape,void 0,void 0,tt.useHTML,void 0,"data-label")).addClass(" highcharts-data-label-color-"+F.colorIndex+" "+(tt.className||"")+(tt.useHTML?" highcharts-tracker":"")),at&&(at.options=tt,at.attr(lt),M.styledMode?gt.width&&at.css({width:gt.width,textOverflow:gt.textOverflow,whiteSpace:gt.whiteSpace}):at.css(gt).shadow(tt.shadow),Dr(at,"beforeAddingDataLabel",{labelOptions:tt,point:F}),at.added||at.add(b),k.alignDataLabel(F,at,tt,void 0,Ht),at.isActive=!0,H[it]&&H[it]!==at&&H[it].destroy(),H[it]=at))});let U=H.length;for(;U--;)(Q=H[U])!=null&&Q.isActive?H[U].isActive=!1:((et=H[U])==null||et.destroy(),H.splice(U,1));F.dataLabel=H[0],F.dataLabels=H})),Dr(this,"afterDrawDataLabels")}function d(v,b,k,M,S,A){let T=this.chart,P=b.align,O=b.verticalAlign,E=v.box?0:v.padding||0,z=T.inverted?this.yAxis:this.xAxis,I=z?z.left-T.plotLeft:0,B=T.inverted?this.xAxis:this.yAxis,j=B?B.top-T.plotTop:0,{x:F=0,y:H=0}=b,G,U;return(G=(k.x||0)+E+I)<0&&(P==="right"&&F>=0?(b.align="left",b.inside=!0):F-=G,U=!0),(G=(k.x||0)+M.width-E+I)>T.plotWidth&&(P==="left"&&F<=0?(b.align="right",b.inside=!0):F+=T.plotWidth-G,U=!0),(G=k.y+E+j)<0&&(O==="bottom"&&H>=0?(b.verticalAlign="top",b.inside=!0):H-=G,U=!0),(G=(k.y||0)+M.height-E+j)>T.plotHeight&&(O==="top"&&H<=0?(b.verticalAlign="bottom",b.inside=!0):H+=T.plotHeight-G,U=!0),U&&(b.x=F,b.y=H,v.placed=!A,v.align(b,void 0,S)),U}function u(v,b){let k=[],M;if(si(v)&&!si(b))k=v.map(function(S){return ps(S,b)});else if(si(b)&&!si(v))k=b.map(function(S){return ps(v,S)});else if(si(v)||si(b)){if(si(v)&&si(b))for(M=Math.max(v.length,b.length);M--;)k[M]=ps(v[M],b[M])}else k=ps(v,b);return k}function f(v){var k,M;let b=v.chart.options.plotOptions;return yh(u(u((k=b==null?void 0:b.series)==null?void 0:k.dataLabels,(M=b==null?void 0:b[v.type])==null?void 0:M.dataLabels),v.options.dataLabels))}function m(v,b,k,M,S){let A=this.chart,T=A.inverted,P=this.xAxis,O=P.reversed,E=((T?b.height:b.width)||0)/2,z=v.pointWidth,I=z?z/2:0;b.startXPos=T?S.x:O?-E-I:P.width-E+I,b.startYPos=T?O?this.yAxis.height-E+I:-E-I:S.y,M?b.visibility==="hidden"&&(b.show(),b.attr({opacity:0}).animate({opacity:1})):b.attr({opacity:1}).animate({opacity:0},void 0,b.hide),A.hasRendered&&(k&&b.attr({x:b.startXPos,y:b.startYPos}),b.placed=!0)}x.compose=function(v){let b=v.prototype;b.initDataLabels||(b.initDataLabels=l,b.initDataLabelsGroup=r,b.alignDataLabel=s,b.drawDataLabels=h,b.justifyDataLabel=d,b.mergeArrays=u,b.setDataLabelStartPos=m,b.hasDataLabels=e)}})(W||(W={}));let Rn=W,{composed:wm}=Y,{series:vh}=Wt,{merge:Mm,pushUnique:Sm}=ot;(function(x){function e(s,r,l,h,d){var A,T;let{chart:u,options:f}=this,m=u.inverted,v=((A=this.xAxis)==null?void 0:A.len)||u.plotSizeX||0,b=((T=this.yAxis)==null?void 0:T.len)||u.plotSizeY||0,k=s.dlBox||s.shapeArgs,M=s.below??(s.plotY||0)>(this.translatedThreshold??b),S=l.inside??!!f.stacking;if(k){if(h=Mm(k),l.overflow!=="allow"||l.crop!==!1||f.clip!==!1){h.y<0&&(h.height+=h.y,h.y=0);let P=h.y+h.height-b;P>0&&P<h.height-1&&(h.height-=P)}m&&(h={x:b-h.y-h.height,y:v-h.x-h.width,width:h.height,height:h.width}),S||(m?(h.x+=M?0:h.width,h.width=0):(h.y+=M?h.height:0,h.height=0))}l.align??(l.align=!m||S?"center":M?"right":"left"),l.verticalAlign??(l.verticalAlign=m||S?"middle":M?"top":"bottom"),vh.prototype.alignDataLabel.call(this,s,r,l,h,d),l.inside&&s.contrastColor&&r.css({color:s.contrastColor})}x.compose=function(s){Rn.compose(vh),Sm(wm,"ColumnDataLabel")&&(s.prototype.alignDataLabel=e)}})(X||(X={}));let Cm=X,{extend:Pm,merge:Tm}=ot;class Ir extends In{}Ir.defaultOptions=Tm(In.defaultOptions,{}),Pm(Ir.prototype,{inverted:!0}),Wt.registerSeriesType("bar",Ir);let{column:Am,line:kh}=Wt.seriesTypes,{addEvent:_m,extend:Om,merge:Lm}=ot;class Bn extends kh{applyJitter(){let e=this,s=this.options.jitter,r=this.points.length;s&&this.points.forEach(function(l,h){["x","y"].forEach(function(d,u){if(s[d]&&!l.isNull){let f=`plot${d.toUpperCase()}`,m=e[`${d}Axis`],v=s[d]*m.transA;if(m&&!m.logarithmic){let b=Math.max(0,(l[f]||0)-v),k=Math.min(m.len,(l[f]||0)+v);l[f]=b+(k-b)*function(M){let S=1e4*Math.sin(M);return S-Math.floor(S)}(h+u*r),d==="x"&&(l.clientX=l.plotX)}}})})}drawGraph(){this.options.lineWidth?super.drawGraph():this.graph&&(this.graph=this.graph.destroy())}}Bn.defaultOptions=Lm(kh.defaultOptions,{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">â</span> <span style="font-size: 0.8em"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}),Om(Bn.prototype,{drawTracker:Am.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"]}),_m(Bn,"afterTranslate",function(){this.applyJitter()}),Wt.registerSeriesType("scatter",Bn);let{deg2rad:wh}=Y,{fireEvent:Em,isNumber:Rr,pick:zn,relativeLength:Dm}=ot;(function(x){x.getCenter=function(){let e=this.options,s=this.chart,r=2*(e.slicedOffset||0),l=s.plotWidth-2*r,h=s.plotHeight-2*r,d=e.center,u=Math.min(l,h),f=e.thickness,m,v=e.size,b=e.innerSize||0,k,M;typeof v=="string"&&(v=parseFloat(v)),typeof b=="string"&&(b=parseFloat(b));let S=[zn(d==null?void 0:d[0],"50%"),zn(d==null?void 0:d[1],"50%"),zn(v&&v<0?void 0:e.size,"100%"),zn(b&&b<0?void 0:e.innerSize||0,"0%")];for(!s.angular||this instanceof ae||(S[3]=0),k=0;k<4;++k)M=S[k],m=k<2||k===2&&/%$/.test(M),S[k]=Dm(M,[l,h,u,S[2]][k])+(m?r:0);return S[3]>S[2]&&(S[3]=S[2]),Rr(f)&&2*f<S[2]&&f>0&&(S[3]=S[2]-2*f),Em(this,"afterGetCenter",{positions:S}),S},x.getStartAndEndRadians=function(e,s){let r=Rr(e)?e:0,l=Rr(s)&&s>r&&s-r<360?s:r+360;return{start:wh*(r+-90),end:wh*(l+-90)}}})(V||(V={}));let Mh=V,{setAnimation:Im}=Jt,{addEvent:Sh,defined:Rm,extend:Bm,isNumber:zm,pick:Fm,relativeLength:Nm}=ot;class Ch extends Ze{getConnectorPath(e){let s=e.dataLabelPosition,r=e.options||{},l=r.connectorShape,h=this.connectorShapes[l]||l;return s&&h.call(this,{...s.computed,alignment:s.alignment},s.connectorPosition,r)||[]}getTranslate(){return this.sliced&&this.slicedTranslation||{translateX:0,translateY:0}}haloPath(e){let s=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(s.x,s.y,s.r+e,s.r+e,{innerR:s.r-1,start:s.start,end:s.end,borderRadius:s.borderRadius})}constructor(e,s,r){super(e,s,r),this.half=0,this.name??(this.name=e.chart.options.lang.pieSliceName);let l=h=>{this.slice(h.type==="select")};Sh(this,"select",l),Sh(this,"unselect",l)}isValid(){return zm(this.y)&&this.y>=0}setVisible(e,s=!0){e!==this.visible&&this.update({visible:e??!this.visible},s,void 0,!1)}slice(e,s,r){let l=this.series;Im(r,l.chart),s=Fm(s,!0),this.sliced=this.options.sliced=e=Rm(e)?e:!this.sliced,l.options.data[l.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate())}}Bm(Ch.prototype,{connectorShapes:{fixedOffset:function(x,e,s){let r=e.breakAt,l=e.touchingSliceAt,h=s.softConnector?["C",x.x+(x.alignment==="left"?-5:5),x.y,2*r.x-l.x,2*r.y-l.y,r.x,r.y]:["L",r.x,r.y];return[["M",x.x,x.y],h,["L",l.x,l.y]]},straight:function(x,e){let s=e.touchingSliceAt;return[["M",x.x,x.y],["L",s.x,s.y]]},crookedLine:function(x,e,s){let{angle:r=this.angle||0,breakAt:l,touchingSliceAt:h}=e,{series:d}=this,[u,f,m]=d.center,v=m/2,{plotLeft:b,plotWidth:k}=d.chart,M=x.alignment==="left",{x:S,y:A}=x,T=l.x;if(s.crookDistance){let O=Nm(s.crookDistance,1);T=M?u+v+(k+b-u-v)*(1-O):b+(u-v)*O}else T=u+(f-A)*Math.tan(r-Math.PI/2);let P=[["M",S,A]];return(M?T<=S&&T>=l.x:T>=S&&T<=l.x)&&P.push(["L",T,A]),P.push(["L",l.x,l.y],["L",h.x,h.y]),P}}});let{getStartAndEndRadians:Wm}=Mh,{noop:Ph}=Y,{clamp:Hm,extend:jm,fireEvent:Th,merge:Br,pick:Xm}=ot;class zr extends ae{animate(e){let s=this,r=s.points,l=s.startAngleRad;e||r.forEach(function(h){let d=h.graphic,u=h.shapeArgs;d&&u&&(d.attr({r:Xm(h.startR,s.center&&s.center[3]/2),start:l,end:l}),d.animate({r:u.r,start:u.start,end:u.end},s.options.animation))})}drawEmpty(){let e,s,r=this.startAngleRad,l=this.endAngleRad,h=this.options;this.total===0&&this.center?(e=this.center[0],s=this.center[1],this.graph||(this.graph=this.chart.renderer.arc(e,s,this.center[1]/2,0,r,l).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:el.arc(e,s,this.center[2]/2,0,{start:r,end:l,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":h.borderWidth,fill:h.fillColor||"none",stroke:h.color||"#cccccc"})):this.graph&&(this.graph=this.graph.destroy())}drawPoints(){let e=this.chart.renderer;this.points.forEach(function(s){s.graphic&&s.hasNewShapeType()&&(s.graphic=s.graphic.destroy()),s.graphic||(s.graphic=e[s.shapeType](s.shapeArgs).add(s.series.group),s.delayedRendering=!0)})}generatePoints(){super.generatePoints(),this.updateTotals()}getX(e,s,r,l){let h=this.center,d=this.radii?this.radii[r.index]||0:h[2]/2,u=l.dataLabelPosition,f=(u==null?void 0:u.distance)||0,m=Math.asin(Hm((e-h[1])/(d+f),-1,1));return h[0]+Math.cos(m)*(d+f)*(s?-1:1)+(f>0?(s?-1:1)*(l.padding||0):0)}hasData(){return this.points.some(e=>e.visible)}redrawPoints(){let e,s,r,l,h=this,d=h.chart;this.drawEmpty(),h.group&&!d.styledMode&&h.group.shadow(h.options.shadow),h.points.forEach(function(u){let f={};s=u.graphic,!u.isNull&&s?(l=u.shapeArgs,e=u.getTranslate(),d.styledMode||(r=h.pointAttribs(u,u.selected&&"select")),u.delayedRendering?(s.setRadialReference(h.center).attr(l).attr(e),d.styledMode||s.attr(r).attr({"stroke-linejoin":"round"}),u.delayedRendering=!1):(s.setRadialReference(h.center),d.styledMode||Br(!0,f,r),Br(!0,f,l,e),s.animate(f)),s.attr({visibility:u.visible?"inherit":"hidden"}),s.addClass(u.getClassName(),!0)):s&&(u.graphic=s.destroy())})}sortByAngle(e,s){e.sort(function(r,l){return r.angle!==void 0&&(l.angle-r.angle)*s})}translate(e){Th(this,"translate"),this.generatePoints();let s=this.options,r=s.slicedOffset,l=Wm(s.startAngle,s.endAngle),h=this.startAngleRad=l.start,d=(this.endAngleRad=l.end)-h,u=this.points,f=s.ignoreHiddenPoint,m=u.length,v,b,k,M,S,A,T,P=0;for(e||(this.center=e=this.getCenter()),A=0;A<m;A++){T=u[A],v=h+P*d,T.isValid()&&(!f||T.visible)&&(P+=T.percentage/100),b=h+P*d;let O={x:e[0],y:e[1],r:e[2]/2,innerR:e[3]/2,start:Math.round(1e3*v)/1e3,end:Math.round(1e3*b)/1e3};T.shapeType="arc",T.shapeArgs=O,(k=(b+v)/2)>1.5*Math.PI?k-=2*Math.PI:k<-Math.PI/2&&(k+=2*Math.PI),T.slicedTranslation={translateX:Math.round(Math.cos(k)*r),translateY:Math.round(Math.sin(k)*r)},M=Math.cos(k)*e[2]/2,S=Math.sin(k)*e[2]/2,T.tooltipPos=[e[0]+.7*M,e[1]+.7*S],T.half=+(k<-Math.PI/2||k>Math.PI/2),T.angle=k}Th(this,"afterTranslate")}updateTotals(){let e=this.points,s=e.length,r=this.options.ignoreHiddenPoint,l,h,d=0;for(l=0;l<s;l++)(h=e[l]).isValid()&&(!r||h.visible)&&(d+=h.y);for(l=0,this.total=d;l<s;l++)(h=e[l]).percentage=d>0&&(h.visible||!r)?h.y/d*100:0,h.total=d}}zr.defaultOptions=Br(ae.defaultOptions,{borderRadius:3,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{connectorPadding:5,connectorShape:"crookedLine",crookDistance:void 0,distance:30,enabled:!0,formatter:function(){return this.isNull?void 0:this.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}),jm(zr.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawTracker:In.prototype.drawTracker,getCenter:Mh.getCenter,getSymbol:Ph,invertible:!1,isCartesian:!1,noSharedTooltip:!0,pointAttribs:In.prototype.pointAttribs,pointClass:Ch,requireSorting:!1,searchPoint:Ph,trackerGroups:["group","dataLabelsGroup"]}),Wt.registerSeriesType("pie",zr);let{composed:Vm,noop:Ym}=Y,{distribute:Gm}=Zs,{series:Ah}=Wt,{arrayMax:$m,clamp:_h,defined:Oh,isNumber:Um,pick:Km,pushUnique:qm,relativeLength:Lh}=ot;(function(x){let e={radialDistributionY:function(d,u){var f;return(((f=u.dataLabelPosition)==null?void 0:f.top)||0)+d.distributeBox.pos},radialDistributionX:function(d,u,f,m,v){let b=v.dataLabelPosition;return d.getX(f<((b==null?void 0:b.top)||0)+2||f>((b==null?void 0:b.bottom)||0)-2?m:f,u.half,u,v)},justify:function(d,u,f,m){var v;return m[0]+(d.half?-1:1)*(f+(((v=u.dataLabelPosition)==null?void 0:v.distance)||0))},alignToPlotEdges:function(d,u,f,m){let v=d.getBBox().width;return u?v+m:f-v-m},alignToConnectors:function(d,u,f,m){let v=0,b;return d.forEach(function(k){(b=k.dataLabel.getBBox().width)>v&&(v=b)}),u?v+m:f-v-m}};function s(d,u){let f=Math.PI/2,{start:m=0,end:v=0}=d.shapeArgs||{},b=d.angle||0;u>0&&m<f&&v>f&&b>f/2&&b<1.5*f&&(b=b<=f?Math.max(f/2,(m+f)/2):Math.min(1.5*f,(f+v)/2));let{center:k,options:M}=this,S=k[2]/2,A=Math.cos(b),T=Math.sin(b),P=k[0]+A*S,O=k[1]+T*S,E=Math.min((M.slicedOffset||0)+(M.borderWidth||0),u/5);return{natural:{x:P+A*u,y:O+T*u},computed:{},alignment:u<0?"center":d.half?"right":"left",connectorPosition:{angle:b,breakAt:{x:P+A*E,y:O+T*E},touchingSliceAt:{x:P,y:O}},distance:u}}function r(){var j;let d=this,u=d.points,f=d.chart,m=f.plotWidth,v=f.plotHeight,b=f.plotLeft,k=Math.round(f.chartWidth/3),M=d.center,S=M[2]/2,A=M[1],T=[[],[]],P=[0,0,0,0],O=d.dataLabelPositioners,E,z,I,B=0;d.visible&&((j=d.hasDataLabels)!=null&&j.call(d))&&(u.forEach(F=>{(F.dataLabels||[]).forEach(H=>{H.shortened&&(H.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),H.shortened=!1)})}),Ah.prototype.drawDataLabels.apply(d),u.forEach(F=>{(F.dataLabels||[]).forEach((H,G)=>{var et;let U=M[2]/2,q=H.options,Q=Lh((q==null?void 0:q.distance)||0,U);G===0&&T[F.half].push(F),!Oh((et=q==null?void 0:q.style)==null?void 0:et.width)&&H.getBBox().width>k&&(H.css({width:Math.round(.7*k)+"px"}),H.shortened=!0),H.dataLabelPosition=this.getDataLabelPosition(F,Q),B=Math.max(B,Q)})}),T.forEach((F,H)=>{let G=F.length,U=[],q,Q,et=0,tt;G&&(d.sortByAngle(F,H-.5),B>0&&(q=Math.max(0,A-S-B),Q=Math.min(A+S+B,f.plotHeight),F.forEach(it=>{(it.dataLabels||[]).forEach(J=>{var ct;let st=J.dataLabelPosition;st&&st.distance>0&&(st.top=Math.max(0,A-S-st.distance),st.bottom=Math.min(A+S+st.distance,f.plotHeight),et=J.getBBox().height||21,J.lineHeight=f.renderer.fontMetrics(J.text||J).h+2*J.padding,it.distributeBox={target:(((ct=J.dataLabelPosition)==null?void 0:ct.natural.y)||0)-st.top+J.lineHeight/2,size:et,rank:it.y},U.push(it.distributeBox))})}),Gm(U,tt=Q+et-q,tt/5)),F.forEach(it=>{(it.dataLabels||[]).forEach(J=>{let st=J.options||{},ct=it.distributeBox,ft=J.dataLabelPosition,gt=(ft==null?void 0:ft.natural.y)||0,te=st.connectorPadding||0,ut=J.lineHeight||21,yt=(ut-J.getBBox().height)/2,lt=0,at=gt,Ht="inherit";if(ft){if(U&&Oh(ct)&&ft.distance>0&&(ct.pos===void 0?Ht="hidden":(I=ct.size,at=O.radialDistributionY(it,J))),st.justify)lt=O.justify(it,J,S,M);else switch(st.alignTo){case"connectors":lt=O.alignToConnectors(F,H,m,b);break;case"plotEdges":lt=O.alignToPlotEdges(J,H,m,b);break;default:lt=O.radialDistributionX(d,it,at-yt,gt,J)}if(ft.attribs={visibility:Ht,align:ft.alignment},ft.posAttribs={x:lt+(st.x||0)+({left:te,right:-te}[ft.alignment]||0),y:at+(st.y||0)-ut/2},ft.computed.x=lt,ft.computed.y=at-yt,Km(st.crop,!0)){let vt;lt-(z=J.getBBox().width)<te&&H===1?(vt=Math.round(z-lt+te),P[3]=Math.max(vt,P[3])):lt+z>m-te&&H===0&&(vt=Math.round(lt+z-m+te),P[1]=Math.max(vt,P[1])),at-I/2<0?P[0]=Math.max(Math.round(-at+I/2),P[0]):at+I/2>v&&(P[2]=Math.max(Math.round(at+I/2-v),P[2])),ft.sideOverflow=vt}}})}))}),($m(P)===0||this.verifyDataLabelOverflow(P))&&(this.placeDataLabels(),this.points.forEach(F=>{(F.dataLabels||[]).forEach(H=>{var Q;let{connectorColor:G,connectorWidth:U=1}=H.options||{},q=H.dataLabelPosition;if(Um(U)){let et;E=H.connector,q&&q.distance>0?(et=!E,E||(H.connector=E=f.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+F.colorIndex+(F.className?" "+F.className:"")).add(d.dataLabelsGroup)),f.styledMode||E.attr({"stroke-width":U,stroke:G||F.color||"#666666"}),E[et?"attr":"animate"]({d:F.getConnectorPath(H)}),E.attr({visibility:(Q=q.attribs)==null?void 0:Q.visibility})):E&&(H.connector=E.destroy())}})})))}function l(){this.points.forEach(d=>{(d.dataLabels||[]).forEach(u=>{var m,v;let f=u.dataLabelPosition;f?(f.sideOverflow&&(u.css({width:Math.max(u.getBBox().width-f.sideOverflow,0)+"px",textOverflow:((v=(m=u.options)==null?void 0:m.style)==null?void 0:v.textOverflow)||"ellipsis"}),u.shortened=!0),u.attr(f.attribs),u[u.moved?"animate":"attr"](f.posAttribs),u.moved=!0):u&&u.attr({y:-9999})}),delete d.distributeBox},this)}function h(d){let u=this.center,f=this.options,m=f.center,v=f.minSize||80,b=v,k=f.size!==null;return!k&&(m[0]!==null?b=Math.max(u[2]-Math.max(d[1],d[3]),v):(b=Math.max(u[2]-d[1]-d[3],v),u[0]+=(d[3]-d[1])/2),m[1]!==null?b=_h(b,v,u[2]-Math.max(d[0],d[2])):(b=_h(b,v,u[2]-d[0]-d[2]),u[1]+=(d[0]-d[2])/2),b<u[2]?(u[2]=b,u[3]=Math.min(f.thickness?Math.max(0,b-2*f.thickness):Math.max(0,Lh(f.innerSize||0,b)),b),this.translate(u),this.drawDataLabels&&this.drawDataLabels()):k=!0),k}x.compose=function(d){if(Rn.compose(Ah),qm(Vm,"PieDataLabel")){let u=d.prototype;u.dataLabelPositioners=e,u.alignDataLabel=Ym,u.drawDataLabels=r,u.getDataLabelPosition=s,u.placeDataLabels=l,u.verifyDataLabelOverflow=h}}})(K||(K={}));let Zm=K;(function(x){x.getCenterOfPoints=function(e){let s=e.reduce((r,l)=>(r.x+=l.x,r.y+=l.y,r),{x:0,y:0});return{x:s.x/e.length,y:s.y/e.length}},x.getDistanceBetweenPoints=function(e,s){return Math.sqrt(Math.pow(s.x-e.x,2)+Math.pow(s.y-e.y,2))},x.getAngleBetweenPoints=function(e,s){return Math.atan2(s.x-e.x,s.y-e.y)},x.pointInPolygon=function({x:e,y:s},r){let l=r.length,h,d,u=!1;for(h=0,d=l-1;h<l;d=h++){let[f,m]=r[h],[v,b]=r[d];m>s!=b>s&&e<(v-f)*(s-m)/(b-m)+f&&(u=!u)}return u}})($||($={}));let{pointInPolygon:Qm}=$,{addEvent:Jm,getAlignFactor:tx,fireEvent:Eh,objectEach:Dh,pick:ex}=ot;function ix(x){let e=x.length,s=(v,b)=>!(b.x>=v.x+v.width||b.x+b.width<=v.x||b.y>=v.y+v.height||b.y+b.height<=v.y),r=(v,b)=>{for(let k of v)if(Qm({x:k[0],y:k[1]},b))return!0;return!1},l,h,d,u,f,m=!1;for(let v=0;v<e;v++)(l=x[v])&&(l.oldOpacity=l.opacity,l.newOpacity=1,l.absoluteBox=function(b){var k,M;if(b&&(!b.alignAttr||b.placed)){let S=b.box?0:b.padding||0,A=b.alignAttr||{x:b.attr("x"),y:b.attr("y")},{height:T,polygon:P,width:O}=b.getBBox(),E=tx(b.alignValue)*O;return b.width=O,b.height=T,{x:A.x+(((k=b.parentGroup)==null?void 0:k.translateX)||0)+S-E,y:A.y+(((M=b.parentGroup)==null?void 0:M.translateY)||0)+S,width:O-2*S,height:T-2*S,polygon:P}}}(l));x.sort((v,b)=>(b.labelrank||0)-(v.labelrank||0));for(let v=0;v<e;++v){u=(h=x[v])&&h.absoluteBox;let b=u==null?void 0:u.polygon;for(let k=v+1;k<e;++k){f=(d=x[k])&&d.absoluteBox;let M=!1;if(u&&f&&h!==d&&h.newOpacity!==0&&d.newOpacity!==0&&h.visibility!=="hidden"&&d.visibility!=="hidden"){let S=f.polygon;if(b&&S&&b!==S?r(b,S)&&(M=!0):s(u,f)&&(M=!0),M){let A=h.labelrank<d.labelrank?h:d,T=A.text;A.newOpacity=0,T!=null&&T.element.querySelector("textPath")&&T.hide()}}}}for(let v of x)Ih(v,this)&&(m=!0);m&&Eh(this,"afterHideAllOverlappingLabels")}function Ih(x,e){let s,r=!1;return x&&(s=x.newOpacity,x.oldOpacity!==s&&(x.hasClass("highcharts-data-label")?(x[s?"removeClass":"addClass"]("highcharts-data-label-hidden"),r=!0,x[x.isOld?"animate":"attr"]({opacity:s},void 0,function(){e.styledMode||x.css({pointerEvents:s?"auto":"none"})}),Eh(e,"afterHideOverlappingLabel")):x.attr({opacity:s})),x.isOld=!0),r}function sx(){var s;let x=this,e=[];for(let r of x.labelCollectors||[])e=e.concat(r());for(let r of x.yAxis||[])r.stacking&&r.options.stackLabels&&!r.options.stackLabels.allowOverlap&&Dh(r.stacking.stacks,l=>{Dh(l,h=>{h.label&&e.push(h.label)})});for(let r of x.series||[])if(r.visible&&((s=r.hasDataLabels)!=null&&s.call(r))){let l=h=>{for(let d of h)d.visible&&(d.dataLabels||[]).forEach(u=>{var m;let f=u.options||{};u.labelrank=ex(f.labelrank,d.labelrank,(m=d.shapeArgs)==null?void 0:m.height),f.allowOverlap??Number(f.distance)>0?(u.oldOpacity=u.opacity,u.newOpacity=1,Ih(u,x)):e.push(u)})};l(r.nodes||[]),l(r.points)}this.hideOverlappingLabels(e)}let Rh={compose:function(x){let e=x.prototype;e.hideOverlappingLabels||(e.hideOverlappingLabels=ix,Jm(x,"render",sx))}},{defaultOptions:nx}=de,{noop:Bh}=Y,{addEvent:zh,extend:ox,isObject:Fh,merge:rx,relativeLength:Fr}=ot,ax={radius:0,scope:"stack",where:void 0},Nh=Bh,Wh=Bh;function lx(x,e,s,r,l={}){let h=Nh(x,e,s,r,l),{brStart:d=!0,brEnd:u=!0,innerR:f=0,r:m=s,start:v=0,end:b=0}=l;if(l.open||!l.borderRadius)return h;let k=b-v,M=Math.sin(k/2),S=Math.max(Math.min(Fr(l.borderRadius||0,m-f),(m-f)/2,m*M/(1+M)),0),A=Math.min(S,k/Math.PI*2*f),T=h.length-1;for(;T--;)(d||T!==0&&T!==3)&&(u||T!==1&&T!==2)&&function(P,O,E){let z,I,B,j=P[O],F=P[O+1];if(F[0]==="Z"&&(F=P[0]),(j[0]==="M"||j[0]==="L")&&F[0]==="A"?(z=j,I=F,B=!0):j[0]==="A"&&(F[0]==="M"||F[0]==="L")&&(z=F,I=j),z&&I&&I.params){let H=I[1],G=I[5],U=I.params,{start:q,end:Q,cx:et,cy:tt}=U,it=G?H-E:H+E,J=it?Math.asin(E/it):0,st=G?J:-J,ct=Math.cos(J)*it;B?(U.start=q+st,z[1]=et+ct*Math.cos(q),z[2]=tt+ct*Math.sin(q),P.splice(O+1,0,["A",E,E,0,0,1,et+H*Math.cos(U.start),tt+H*Math.sin(U.start)])):(U.end=Q-st,I[6]=et+H*Math.cos(U.end),I[7]=tt+H*Math.sin(U.end),P.splice(O+1,0,["A",E,E,0,0,1,et+ct*Math.cos(Q),tt+ct*Math.sin(Q)])),I[4]=Math.abs(U.end-U.start)<Math.PI?0:1}}(h,T,T>1?A:S);return h}function hx(){var x,e;if(this.options.borderRadius&&!(this.chart.is3d&&this.chart.is3d())){let{options:s,yAxis:r}=this,l=s.stacking==="percent",h=(e=(x=nx.plotOptions)==null?void 0:x[this.type])==null?void 0:e.borderRadius,d=Nr(s.borderRadius,Fh(h)?h:{}),u=r.options.reversed;for(let f of this.points){let{shapeArgs:m}=f;if(f.shapeType==="roundedRect"&&m){let{width:v=0,height:b=0,y:k=0}=m,M=k,S=b;if(d.scope==="stack"&&f.stackTotal){let O=r.translate(l?100:f.stackTotal,!1,!0,!1,!0),E=r.translate(s.threshold||0,!1,!0,!1,!0),z=this.crispCol(0,Math.min(O,E),0,Math.abs(O-E));M=z.y,S=z.height}let A=(f.negative?-1:1)*(u?-1:1)==-1,T=d.where;!T&&this.is("waterfall")&&Math.abs((f.yBottom||0)-(this.translatedThreshold||0))>this.borderWidth&&(T="all"),T||(T="end");let P=Math.min(Fr(d.radius,v),v/2,T==="all"?b/2:1/0)||0;T==="end"&&(A&&(M-=P),S+=P),ox(m,{brBoxHeight:S,brBoxY:M,r:P})}}}}function Nr(x,e){return Fh(x)||(x={radius:x||0}),rx(ax,e,x)}function cx(){let x=Nr(this.options.borderRadius);for(let e of this.points){let s=e.shapeArgs;s&&(s.borderRadius=Fr(x.radius,(s.r||0)-(s.innerR||0)))}}function dx(x,e,s,r,l={}){let h=Wh(x,e,s,r,l),{r:d=0,brBoxHeight:u=r,brBoxY:f=e}=l,m=e-f,v=f+u-(e+r),b=m-d>-.1?0:d,k=v-d>-.1?0:d,M=Math.max(b&&m,0),S=Math.max(k&&v,0),A=[x+b,e],T=[x+s-b,e],P=[x+s,e+b],O=[x+s,e+r-k],E=[x+s-k,e+r],z=[x+k,e+r],I=[x,e+r-k],B=[x,e+b],j=(F,H)=>Math.sqrt(Math.pow(F,2)-Math.pow(H,2));if(M){let F=j(b,b-M);A[0]-=F,T[0]+=F,P[1]=B[1]=e+b-M}if(r<b-M){let F=j(b,b-M-r);P[0]=O[0]=x+s-b+F,E[0]=Math.min(P[0],E[0]),z[0]=Math.max(O[0],z[0]),I[0]=B[0]=x+b-F,P[1]=B[1]=e+r}if(S){let F=j(k,k-S);E[0]+=F,z[0]-=F,O[1]=I[1]=e+r-k+S}if(r<k-S){let F=j(k,k-S-r);P[0]=O[0]=x+s-k+F,T[0]=Math.min(P[0],T[0]),A[0]=Math.max(O[0],A[0]),I[0]=B[0]=x+k-F,O[1]=I[1]=e}return h.length=0,h.push(["M",...A],["L",...T],["A",b,b,0,0,1,...P],["L",...O],["A",k,k,0,0,1,...E],["L",...z],["A",k,k,0,0,1,...I],["L",...B],["A",b,b,0,0,1,...A],["Z"]),h}let{diffObjects:ux,extend:fx,find:px,merge:gx,pick:Fn,uniqueKey:mx}=ot;(function(x){function e(r,l){let h=r.condition;(h.callback||function(){return this.chartWidth<=Fn(h.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=Fn(h.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=Fn(h.minWidth,0)&&this.chartHeight>=Fn(h.minHeight,0)}).call(this)&&l.push(r._id)}function s(r,l){let h=this.options.responsive,d=this.currentResponsive,u=[],f;
2!l&&h&&h.rules&&h.rules.forEach(b=>{b._id===void 0&&(b._id=mx()),this.matchResponsiveRule(b,u)},this);let m=gx(...u.map(b=>px((h==null?void 0:h.rules)||[],k=>k._id===b)).map(b=>b==null?void 0:b.chartOptions));m.isResponsiveOptions=!0,u=u.toString()||void 0;let v=d==null?void 0:d.ruleIds;u!==v&&(d&&(this.currentResponsive=void 0,this.updatingResponsive=!0,this.update(d.undoOptions,r,!0),this.updatingResponsive=!1),u?((f=ux(m,this.options,!0,this.collectionsWithUpdate)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:u,mergedOptions:m,undoOptions:f},this.updatingResponsive||this.update(m,r,!0)):this.currentResponsive=void 0)}x.compose=function(r){let l=r.prototype;return l.matchResponsiveRule||fx(l,{matchResponsiveRule:e,setResponsive:s}),r}})(Z||(Z={}));let xx=Z;Y.AST=Lt,Y.Axis=zi,Y.Chart=ei,Y.Color=It,Y.DataLabel=Rn,Y.DataTableCore=kn,Y.Fx=oe,Y.HTMLElement=Ri,Y.Legend=Ul,Y.LegendSymbol=Il,Y.OverlappingDataLabels=Y.OverlappingDataLabels||Rh,Y.PlotLineOrBand=mn,Y.Point=Ze,Y.Pointer=Ll,Y.RendererRegistry=Qi,Y.Series=ae,Y.SeriesRegistry=Wt,Y.StackItem=rh,Y.SVGElement=Ae,Y.SVGRenderer=rn,Y.Templating=ue,Y.Tick=Bi,Y.Time=To,Y.Tooltip=Pl,Y.animate=Jt.animate,Y.animObject=Jt.animObject,Y.chart=ei.chart,Y.color=It.parse,Y.dateFormat=ue.dateFormat,Y.defaultOptions=de.defaultOptions,Y.distribute=Zs.distribute,Y.format=ue.format,Y.getDeferredAnimation=Jt.getDeferredAnimation,Y.getOptions=de.getOptions,Y.numberFormat=ue.numberFormat,Y.seriesType=Wt.seriesType,Y.setAnimation=Jt.setAnimation,Y.setOptions=de.setOptions,Y.stop=Jt.stop,Y.time=de.defaultTime,Y.timers=oe.timers,{compose:function(x,e,s){let r=x.types.pie;if(!e.symbolCustomAttribs.includes("borderRadius")){let l=s.prototype.symbols;zh(x,"afterColumnTranslate",hx,{order:9}),zh(r,"afterTranslate",cx),e.symbolCustomAttribs.push("borderRadius","brBoxHeight","brBoxY","brEnd","brStart"),Nh=l.arc,Wh=l.roundedRect,l.arc=lx,l.roundedRect=dx}},optionsToObject:Nr}.compose(Y.Series,Y.SVGElement,Y.SVGRenderer),Cm.compose(Y.Series.types.column),Rn.compose(Y.Series),op.compose(Y.Axis),Ri.compose(Y.SVGRenderer),Ul.compose(Y.Chart),lp.compose(Y.Axis),Rh.compose(Y.Chart),Zm.compose(Y.Series.types.pie),mn.compose(Y.Chart,Y.Axis),Ll.compose(Y.Chart),xx.compose(Y.Chart),hs.compose(Y.Axis,Y.Chart,Y.Series),nm.compose(Y.Axis,Y.Chart,Y.Series),Pl.compose(Y.Pointer),ot.extend(Y,ot);let bx=Y;return mt.default})())})(nd);var yx=nd.exports;const Vv=id(yx);var od={exports:{}};(function(n,t){(function(i,o){n.exports=o(Me)})(typeof self<"u"?self:ed,function(i){return function(o){function a(p){if(c[p])return c[p].exports;var g=c[p]={i:p,l:!1,exports:{}};return o[p].call(g.exports,g,g.exports,a),g.l=!0,g.exports}var c={};return a.m=o,a.c=c,a.d=function(p,g,y){a.o(p,g)||Object.defineProperty(p,g,{configurable:!1,enumerable:!0,get:y})},a.n=function(p){var g=p&&p.__esModule?function(){return p.default}:function(){return p};return a.d(g,"a",g),g},a.o=function(p,g){return Object.prototype.hasOwnProperty.call(p,g)},a.p="",a(a.s=0)}([function(o,a,c){function p(){return p=Object.assign?Object.assign.bind():function(V){for(var K=1;K<arguments.length;K++){var $=arguments[K];for(var Z in $)Object.prototype.hasOwnProperty.call($,Z)&&(V[Z]=$[Z])}return V},p.apply(this,arguments)}function g(V){return _(V)||C(V)||w(V)||y()}function y(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(V,K){if(V){if(typeof V=="string")return L(V,K);var $=Object.prototype.toString.call(V).slice(8,-1);return $==="Object"&&V.constructor&&($=V.constructor.name),$==="Map"||$==="Set"?Array.from(V):$==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($)?L(V,K):void 0}}function C(V){if(typeof Symbol<"u"&&V[Symbol.iterator]!=null||V["@@iterator"]!=null)return Array.from(V)}function _(V){if(Array.isArray(V))return L(V)}function L(V,K){(K==null||K>V.length)&&(K=V.length);for(var $=0,Z=new Array(K);$<K;$++)Z[$]=V[$];return Z}function D(V){"@babel/helpers - typeof";return(D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K})(V)}Object.defineProperty(a,"__esModule",{value:!0}),c.d(a,"HighchartsReact",function(){return X});var R=c(1),N=c.n(R),W=typeof window<"u"?R.useLayoutEffect:R.useEffect,X=Object(R.memo)(Object(R.forwardRef)(function(V,K){var $=Object(R.useRef)(),Z=Object(R.useRef)(),nt=Object(R.useRef)(V.constructorType),mt=Object(R.useRef)(V.highcharts
3);return W(function(){function Y(){var pt=V.highcharts||(typeof window>"u"?"undefined":D(window))==="object"&&window.Highcharts,kt=V.constructorType||"chart";pt?pt[kt]?V.options?Z.current=pt[kt]($.current,V.options,V.callback):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(Z.current){if(V.allowChartUpdate!==!1)if(V.constructorType!==nt.current||V.highcharts!==mt.current)nt.current=V.constructorType,mt.current=V.highcharts,Y();else if(!V.immutable&&Z.current){var St;(St=Z.current).update.apply(St,[V.options].concat(g(V.updateArgs||[!0,!0])))}else Y()}else Y()},[V.options,V.allowChartUpdate,V.updateArgs,V.containerProps,V.highcharts,V.constructorType]),W(function(){return function(){Z.current&&(Z.current.destroy(),Z.current=null)}},[]),Object(R.useImperativeHandle)(K,function(){return{get chart(){return Z.current},container:$}},[]),N.a.createElement("div",p({},V.containerProps,{ref:$}))}));a.default=X},function(o,a){o.exports=i}])})})(od);var vx=od.exports;const Yv=id(vx);/*! 4 * Chart.js v3.0.0 5 * https://www.chartjs.org 6 * (c) 2021 Chart.js Contributors 7 * Released under the MIT License 8 */const rd=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function ad(n,t,i){const o=i||(p=>Array.prototype.slice.call(p));let a=!1,c=[];return function(...p){c=o(p),a||(a=!0,rd.call(window,()=>{a=!1,n.apply(t,c)}))}}function kx(n,t){let i;return function(){return t?(clearTimeout(i),i=setTimeout(n,t)):n(),t}}const aa=n=>n==="start"?"left":n==="end"?"right":"center",se=(n,t,i)=>n==="start"?t:n==="end"?i:(t+i)/2,wx=(n,t,i)=>n==="right"?i:n==="center"?(t+i)/2:t;function We(){}const Mx=function(){let n=0;return function(){return n++}}();function Mt(n){return n===null||typeof n>"u"}function Ft(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.substr(0,7)==="[object"&&t.substr(-6)==="Array]"}function Tt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Xt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function me(n,t){return Xt(n)?n:t}function wt(n,t){return typeof n>"u"?t:n}const Sx=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/t,qr=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function Et(n,t,i){if(n&&typeof n.call=="function")return n.apply(i,t)}function Pt(n,t,i,o){let a,c,p;if(Ft(n))for(c=n.length,a=0;a<c;a++)t.call(i,n[a],a);else if(Tt(n))for(p=Object.keys(n),c=p.length,a=0;a<c;a++)t.call(i,n[p[a]],p[a])}function Zn(n,t){let i,o,a,c;if(!n||!t||n.length!==t.length)return!1;for(i=0,o=n.length;i<o;++i)if(a=n[i],c=t[i],a.datasetIndex!==c.datasetIndex||a.index!==c.index)return!1;return!0}function Qn(n){if(Ft(n))return n.map(Qn);if(Tt(n)){const t=Object.create(null),i=Object.keys(n),o=i.length;let a=0;for(;a<o;++a)t[i[a]]=Qn(n[i[a]]);return t}return n}function ld(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function Cx(n,t,i,o){if(!ld(n))return;const a=t[n],c=i[n];Tt(a)&&Tt(c)?Ds(a,c,o):t[n]=Qn(c)}function Ds(n,t,i){const o=Ft(t)?t:[t],a=o.length;if(!Tt(n))return n;i=i||{};const c=i.merger||Cx;for(let p=0;p<a;++p){if(t=o[p],!Tt(t))continue;const g=Object.keys(t);for(let y=0,w=g.length;y<w;++y)c(g[y],n,t,i)}return n}function As(n,t){return Ds(n,t,{merger:Px})}function Px(n,t,i){if(!ld(n))return;const o=t[n],a=i[n];Tt(o)&&Tt(a)?As(o,a):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=Qn(a))}const Tx="",Ax=".";function Xh(n,t){const i=n.indexOf(Ax,t);return i===-1?n.length:i}function ai(n,t){if(t===Tx)return n;let i=0,o=Xh(t,i);for(;n&&o>i;)n=n[t.substr(i,o-i)],i=o+1,o=Xh(t,i);return n}function la(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Ie=n=>typeof n<"u",Vi=n=>typeof n=="function",Gt=Math.PI,Ot=2*Gt,_x=Ot+Gt,Jn=Number.POSITIVE_INFINITY,Ox=Gt/180,ie=Gt/2,bs=Gt/4,Vh=Gt*2/3,xe=Math.log10,li=Math.sign;function Yh(n){const t=Math.pow(10,Math.floor(xe(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function Lx(n){const t=[],i=Math.sqrt(n);let o;for(o=1;o<i;o++)n%o===0&&(t.push(o),t.push(n/o));
vendor: 5,994 bytes, lines 8-13
8return i===(i|0)&&t.push(i),t.sort((a,c)=>a-c).pop(),t}function Yi(n){return!isNaN(parseFloat(n))&&isFinite(n)}function hd(n,t,i){return Math.abs(n-t)<i}function Wr(n,t){const i=Math.round(n);return i-t<=n&&i+t>=n}function cd(n,t,i){let o,a,c;for(o=0,a=n.length;o<a;o++)c=n[o][i],isNaN(c)||(t.min=Math.min(t.min,c),t.max=Math.max(t.max,c))}function Xe(n){return n*(Gt/180)}function Zr(n){return n*(180/Gt)}function Ex(n){if(!Xt(n))return;let t=1,i=0;for(;Math.round(n*t)/t!==n;)t*=10,i++;return i}function Dx(n,t){const i=t.x-n.x,o=t.y-n.y,a=Math.sqrt(i*i+o*o);let c=Math.atan2(o,i);return c<-.5*Gt&&(c+=Ot),{angle:c,distance:a}}function Qr(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Ix(n,t){return(n-t+_x)%Ot-Gt}function Se(n){return(n%Ot+Ot)%Ot}function to(n,t,i){const o=Se(n),a=Se(t),c=Se(i),p=Se(a-o),g=Se(c-o),y=Se(o-a),w=Se(o-c);return o===a||o===c||p>g&&y<w}function Ye(n,t,i){return Math.max(t,Math.min(i,n))}function Rx(n){return Ye(n,-32768,32767)}const Nn=n=>n===0||n===1,Gh=(n,t,i)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*Ot/i)),$h=(n,t,i)=>Math.pow(2,-10*n)*Math.sin((n-t)*Ot/i)+1,_s={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*ie)+1,easeOutSine:n=>Math.sin(n*ie),easeInOutSine:n=>-.5*(Math.cos(Gt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Nn(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Nn(n)?n:Gh(n,.075,.3),easeOutElastic:n=>Nn(n)?n:$h(n,.075,.3),easeInOutElastic(n){return Nn(n)?n:n<.5?.5*Gh(n*2,.1125,.45):.5+.5*$h(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-_s.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?_s.easeInBounce(n*2)*.5:_s.easeOutBounce(n*2-1)*.5+.5};/*! 9 * @kurkle/color v0.1.9 10 * https://github.com/kurkle/color#readme 11 * (c) 2020 Jukka Kurkela 12 * Released under the MIT License 13 */const ge={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},Jr="0123456789ABCDEF",Bx=n=>Jr[n&15],zx=n=>Jr[(n&240)>>4]+Jr[n&15],Wn=n=>(n&240)>>4===(n&15);function Fx(n){return Wn(n.r)&&Wn(n.g)&&Wn(n.b)&&Wn(n.a)}function Nx(n){var t=n.length,i;return n[0]==="#"&&(t===4||t===5?i={r:255&ge[n[1]]*17,g:255&ge[n[2]]*17,b:255&ge[n[3]]*17,a:t===5?ge[n[4]]*17:255}:(t===7||t===9)&&(i={r:ge[n[1]]<<4|ge[n[2]],g:ge[n[3]]<<4|ge[n[4]],b:ge[n[5]]<<4|ge[n[6]],a:t===9?ge[n[7]]<<4|ge[n[8]]:255})),i}function Wx(n){var t=Fx(n)?Bx:zx;return n&&"#"+t(n.r)+t(n.g)+t(n.b)+(n.a<255?t(n.a):"")}function zs(n){return n+.5|0}const lo=(n,t,i)=>Math.max(Math.min(n,i),t);function Ms(n){return lo(zs(n*2.55),0,255)}function Is(n){return lo(zs(n*255),0,255)}function ha(n){return lo(zs(n/2.55)/100,0,1)}function Uh(n){return lo(zs(n*100),0,100)}const Hx=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function jx(n){const t=Hx.exec(n);let i=255,o,a,c;if(t){if(t[7]!==o){const p=+t[7];i=255&(t[8]?Ms(p):p*255)}return o=+t[1],a=+t[3],c=+t[5],o=255&(t[2]?Ms(o):o),a=255&(t[4]?Ms(a):a),c=255&(t[6]?Ms(c):c),{r:o,g:a,b:c,a:i}}}function Xx(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${ha(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const Vx=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function dd(n,t,i){const o=t*Math.min(i,1-i),a=(c,p=(c+n/30)%12)=>i-o*Math.max(Math.min(p-3,9-p,1),-1);return[a(0),a(8),a(4)]}function Yx(n,t,i){const o=(a,c=(a+n/60)%6)=>i-i*t*Math.max(Math.min(c,4-c,1),0);return[o(5),o(3),o(1)]}function Gx(n,t,i){const o=dd(n,1,.5);let a;for(t+i>1&&(a=1/(t+i),t*=a,i*=a),a=0;a<3;a++)o[a]*=1-t-i,o[a]+=t;return o}function ca(n){const i=n.r/255,o=n.g/255,a=n.b/255,c=Math.max(i,o,a),p=Math.min(i,o,a),g=(c+p)/2;let y,w,C;return c!==p&&(C=c-p,w=g>.5?C/(2-c-p):C/(c+p),y=c===i?(o-a)/C+(o<a?6:0):c===o?(a-i)/C+2:(i-o)/C+4,y=y*60+.5),[y|0,w||0,g]}function da(n,t,i,o){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,i,o)).map(Is)}function ua(n,t,i){return da(dd,n,t,i)}function $x(n,t,i){return da(Gx,n,t,i)}function Ux(n,t,i){return da(Yx,n,t,i)}function ud(n){return(n%360+360)%360}function Kx(n){const t=Vx.exec(n);let i=255,o;if(!t)return;t[5]!==o&&(i=t[6]?Ms(+t[5]):Is(+t[5]));const a=ud(+t[2]),c=+t[3]/100,p=+t[4]/100;return t[1]==="hwb"?o=$x(a,c,p):t[1]==="hsv"?o=Ux(a,c,p):o=ua(a,c,p),{r:o[0],g:o[1],b:o[2],a:i}}function qx(n,t){var i=ca(n);i[0]=ud(i[0]+t),i=ua(i),n.r=i[0],n.g=i[1],n.b=i[2]}function Zx(n){if(!n)return;const t=ca(n),i=t[0],o=Uh(t[1]),a=Uh(t[2]);return n.a<255?`hsla(${i}, ${o}%, ${a}%, ${ha(n.a)})`:`hsl(${i}, ${o}%, ${a}%)`}const Kh={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"},qh={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",K
vendor: 4,968 bytes, line 13
13ocTate:"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 Qx(){const n={},t=Object.keys(qh),i=Object.keys(Kh);let o,a,c,p,g;for(o=0;o<t.length;o++){for(p=g=t[o],a=0;a<i.length;a++)c=i[a],g=g.replace(c,Kh[c]);c=parseInt(qh[p],16),n[g]=[c>>16&255,c>>8&255,c&255]}return n}let Hn;function Jx(n){Hn||(Hn=Qx(),Hn.transparent=[0,0,0,0]);const t=Hn[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}function jn(n,t,i){if(n){let o=ca(n);o[t]=Math.max(0,Math.min(o[t]+o[t]*i,t===0?360:1)),o=ua(o),n.r=o[0],n.g=o[1],n.b=o[2]}}function fd(n,t){return n&&Object.assign(t||{},n)}function Zh(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=Is(n[3]))):(t=fd(n,{r:0,g:0,b:0,a:1}),t.a=Is(t.a)),t}function tb(n){return n.charAt(0)==="r"?jx(n):Kx(n)}class eo{constructor(t){if(t instanceof eo)return t;const i=typeof t;let o;i==="object"?o=Zh(t):i==="string"&&(o=Nx(t)||Jx(t)||tb(t)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var t=fd(this._rgb);return t&&(t.a=ha(t.a)),t}set rgb(t){this._rgb=Zh(t)}rgbString(){return this._valid?Xx(this._rgb):this._rgb}hexString(){return this._valid?Wx(this._rgb):this._rgb}hslString(){return this._valid?Zx(this._rgb):this._rgb}mix(t,i){const o=this;if(t){const a=o.rgb,c=t.rgb;let p;const g=i===p?.5:i,y=2*g-1,w=a.a-c.a,C=((y*w===-1?y:(y+w)/(1+y*w))+1)/2;p=1-C,a.r=255&C*a.r+p*c.r+.5,a.g=255&C*a.g+p*c.g+.5,a.b=255&C*a.b+p*c.b+.5,a.a=g*a.a+(1-g)*c.a,o.rgb=a}return o}clone(){return new eo(this.rgb)}alpha(t){return this._rgb.a=Is(t),this}clearer(t){const i=this._rgb;return i.a*=1-t,this}greyscale(){const t=this._rgb,i=zs(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=i,this}opaquer(t){const i=this._rgb;return i.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return jn(this._rgb,2,t),this}darken(t){return jn(this._rgb,2,-t),this}saturate(t){return jn(this._rgb,1,t),this}desaturate(t){return jn(this._rgb,1,-t),this}rotate(t){return qx(this._rgb,t),this}}function pd(n){return new eo(n)}const gd=n=>n instanceof CanvasGradient||n instanceof CanvasPattern;function Qh(n){return gd(n)?n:pd(n)}function Hr(n){return gd(n)?n:pd(n).saturate(.5).darken(.1).hexString()}const Pi=Object.create(null),ta=Object.create(null);function Os(n,t){if(!t)return n;const i=t.split(".");for(let o=0,a=i.length;o<a;++o){const c=i[o];n=n[c]||(n[c]=Object.create(null))}return n}function jr(n,t,i){return typeof t=="string"?Ds(Os(n,t),i):Ds(Os(n,""),t)}class eb{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.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={}
vendor: 14,838 bytes, line 13
13,this.hoverBackgroundColor=(i,o)=>Hr(o.backgroundColor),this.hoverBorderColor=(i,o)=>Hr(o.borderColor),this.hoverColor=(i,o)=>Hr(o.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,i){return jr(this,t,i)}get(t){return Os(this,t)}describe(t,i){return jr(ta,t,i)}override(t,i){return jr(Pi,t,i)}route(t,i,o,a){const c=Os(this,t),p=Os(this,o),g="_"+i;Object.defineProperties(c,{[g]:{value:c[i],writable:!0},[i]:{enumerable:!0,get(){const y=this[g],w=p[a];return Tt(y)?Object.assign({},w,y):wt(y,w)},set(y){this[g]=y}}})}}var bt=new eb({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ib(n){return!n||Mt(n.size)||Mt(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function io(n,t,i,o,a){let c=t[a];return c||(c=t[a]=n.measureText(a).width,i.push(a)),c>o&&(o=c),o}function sb(n,t,i,o){o=o||{};let a=o.data=o.data||{},c=o.garbageCollect=o.garbageCollect||[];o.font!==t&&(a=o.data={},c=o.garbageCollect=[],o.font=t),n.save(),n.font=t;let p=0;const g=i.length;let y,w,C,_,L;for(y=0;y<g;y++)if(_=i[y],_!=null&&Ft(_)!==!0)p=io(n,a,c,p,_);else if(Ft(_))for(w=0,C=_.length;w<C;w++)L=_[w],L!=null&&!Ft(L)&&(p=io(n,a,c,p,L));n.restore();const D=c.length/2;if(D>i.length){for(y=0;y<D;y++)delete a[c[y]];c.splice(0,D)}return p}function wi(n,t,i){const o=n.currentDevicePixelRatio,a=i!==0?Math.max(i/2,.5):0;return Math.round((t-a)*o)/o+a}function Jh(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function so(n,t,i,o){let a,c,p,g,y;const w=t.pointStyle,C=t.rotation,_=t.radius;let L=(C||0)*Ox;if(w&&typeof w=="object"&&(a=w.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){n.save(),n.translate(i,o),n.rotate(L),n.drawImage(w,-w.width/2,-w.height/2,w.width,w.height),n.restore();return}if(!(isNaN(_)||_<=0)){switch(n.beginPath(),w){default:n.arc(i,o,_,0,Ot),n.closePath();break;case"triangle":n.moveTo(i+Math.sin(L)*_,o-Math.cos(L)*_),L+=Vh,n.lineTo(i+Math.sin(L)*_,o-Math.cos(L)*_),L+=Vh,n.lineTo(i+Math.sin(L)*_,o-Math.cos(L)*_),n.closePath();break;case"rectRounded":y=_*.516,g=_-y,c=Math.cos(L+bs)*g,p=Math.sin(L+bs)*g,n.arc(i-c,o-p,y,L-Gt,L-ie),n.arc(i+p,o-c,y,L-ie,L),n.arc(i+c,o+p,y,L,L+ie),n.arc(i-p,o+c,y,L+ie,L+Gt),n.closePath();break;case"rect":if(!C){g=Math.SQRT1_2*_,n.rect(i-g,o-g,2*g,2*g);break}L+=bs;case"rectRot":c=Math.cos(L)*_,p=Math.sin(L)*_,n.moveTo(i-c,o-p),n.lineTo(i+p,o-c),n.lineTo(i+c,o+p),n.lineTo(i-p,o+c),n.closePath();break;case"crossRot":L+=bs;case"cross":c=Math.cos(L)*_,p=Math.sin(L)*_,n.moveTo(i-c,o-p),n.lineTo(i+c,o+p),n.moveTo(i+p,o-c),n.lineTo(i-p,o+c);break;case"star":c=Math.cos(L)*_,p=Math.sin(L)*_,n.moveTo(i-c,o-p),n.lineTo(i+c,o+p),n.moveTo(i+p,o-c),n.lineTo(i-p,o+c),L+=bs,c=Math.cos(L)*_,p=Math.sin(L)*_,n.moveTo(i-c,o-p),n.lineTo(i+c,o+p),n.moveTo(i+p,o-c),n.lineTo(i-p,o+c);break;case"line":c=Math.cos(L)*_,p=Math.sin(L)*_,n.moveTo(i-c,o-p),n.lineTo(i+c,o+p);break;case"dash":n.moveTo(i,o),n.lineTo(i+Math.cos(L)*_,o+Math.sin(L)*_);break}n.fill(),t.borderWidth>0&&n.stroke()}}function Rs(n,t,i){return i=i||.5,n&&n.x>t.left-i&&n.x<t.right+i&&n.y>t.top-i&&n.y<t.bottom+i}function Fs(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function Ns(n){n.restore()}function nb(n,t,i,o,a){if(!t)return n.lineTo(i.x,i.y);if(a==="middle"){const c=(t.x+i.x)/2;n.lineTo(c,t.y),n.lineTo(c,i.y)}else a==="after"!=!!o?n.lineTo(t.x,i.y):n.lineTo(i.x,t.y);n.lineTo(i.x,i.y)}function ob(n,t,i,o){if(!t)return n.lineTo(i.x,i.y);n.bezierCurveTo(o?t.cp1x:t.cp2x,o?t.cp1y:t.cp2y,o?i.cp2x:i.cp1x,o?i.cp2y:i.cp1y,i.x,i.y)}function Ti(n,t,i,o,a,c={}){const p=Ft(t)?t:[t],g=c.strokeWidth>0&&c.strokeColor!=="";let y,w;for(n.save(),c.translation&&n.translate(c.translation[0],c.translation[1]),Mt(c.rotation)||n.rotate(c.rotation),n.font=a.string,c.color&&(n.fillStyle=c.color),c.textAlign&&(n.textAlign=c.textAlign),c.textBaseline&&(n.textBaseline=c.textBaseline),y=0;y<p.length;++y){if(w=p[y],g&&(c.strokeColor&&(n.strokeStyle=c.strokeColor),Mt(c.strokeWidth)||(n.lineWidth=c.strokeWidth),n.strokeText(w,i,o,c.maxWidth)),n.fillText(w,i,o,c.maxWidth),c.strikethrough||c.underline){const C=n.measureText(w),_=i-C.actualBoundingBoxLeft,L=i+C.actualBoundingBoxRight,D=o-C.actualBoundingBoxAscent,R=o+C.actualBoundingBoxDescent,N=c.strikethrough?(D+R)/2:R;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=c.decorationWidth||2,n.moveTo(_,N),n.lineTo(L,N),n.stroke()}o+=a.lineHeight}n.restore()}const rb=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);function ab(n,t){const i=(""+n).match(rb);if(!i||i[1]==="normal")return t*1.2;switch(n=+i[2],i[3]){case"px":return n;case"%":n/=100;break}return t*n}const lb=n=>+n||0;function md(n,t){const i={},o=Tt(t),a=o?Object.keys(t):t,c=Tt(n)?o?p=>wt(n[p],n[t[p]]):p=>n[p]:()=>n;for(const p of a)i[p]=lb(c(p));return i}function xd(n){return md(n,{top:"y",right:"x",bottom:"y",left:"x"})}function hb(n){return md(n,["topLeft","topRight","bottomLeft","bottomRight"])}function he(n){const t=xd(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Zt(n,t){n=n||{},t=t||bt.font;let i=wt(n.size,t.size);typeof i=="string"&&(i=parseInt(i,10));const o={family:wt(n.family,t.family),lineHeight:ab(wt(n.lineHeight,t.lineHeight),i),size:i,style:wt(n.style,t.style),weight:wt(n.weight,t.weight),string:""};return o.string=ib(o),o}function Ss(n,t,i,o){let a,c,p;for(a=0,c=n.length;a<c;++a)if(p=n[a],p!==void 0&&p!==void 0)return p}function cb(n,t){const{min:i,max:o}=n;return{min:i-Math.abs(qr(t,i)),max:o+qr(t,o)}}function ho(n,t,i){i=i||(p=>n[p]<t);let o=n.length-1,a=0,c;for(;o-a>1;)c=a+o>>1,i(c)?a=c:o=c;return{lo:a,hi:o}}const Cs=(n,t,i)=>ho(n,i,o=>n[o][t]<i),db=(n,t,i)=>ho(n,i,o=>n[o][t]>=i);function ub(n,t,i){let o=0,a=n.length;for(;o<a&&n[o]<t;)o++;for(;a>o&&n[a-1]>i;)a--;return o>0||a<n.length?n.slice(o,a):n}const bd=["push","pop","shift","splice","unshift"];function fb(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),bd.forEach(i=>{const o="_onData"+la(i),a=n[i];Object.defineProperty(n,i,{configurable:!0,enumerable:!1,value(...c){const p=a.apply(this,c);return n._chartjs.listeners.forEach(g=>{typeof g[o]=="function"&&g[o](...c)}),p}})})}function tc(n,t){const i=n._chartjs;if(!i)return;const o=i.listeners,a=o.indexOf(t);a!==-1&&o.splice(a,1),!(o.length>0)&&(bd.forEach(c=>{delete n[c]}),delete n._chartjs)}function yd(n){const t=new Set;let i,o;for(i=0,o=n.length;i<o;++i)t.add(n[i]);if(t.size===o)return n;const a=[];return t.forEach(c=>{a.push(c)}),a}function fa(n,t=[""],i=n,o){Ie(o)||(o=Sd("_fallback",n));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:i,_fallback:o,override:c=>fa([c,...n],t,i,o)};return new Proxy(a,{deleteProperty(c,p){return delete c[p],delete c._keys,delete n[0][p],!0},get(c,p){return wd(c,p,()=>vb(p,t,n,c))},getOwnPropertyDescriptor(c,p){return Reflect.getOwnPropertyDescriptor(c._scopes[0],p)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(c,p){return ic(c).includes(p)},ownKeys(c){return ic(c)},set(c,p,g){return n[0][p]=g,delete c[p],delete c._keys,!0}})}function Gi(n,t,i,o){const a={_cacheable:!1,_proxy:n,_context:t,_subProxy:i,_stack:new Set,_descriptors:vd(n,o),setContext:c=>Gi(n,c,i,o),override:c=>Gi(n.override(c),t,i,o)};return new Proxy(a,{deleteProperty(c,p){return delete c[p],delete n[p],!0},get(c,p,g){return wd(c,p,()=>gb(c,p,g))},getOwnPropertyDescriptor(c,p){return c._descriptors.allKeys?Reflect.has(n,p)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,p)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(c,p){return Reflect.has(n,p)},ownKeys(){return Reflect.ownKeys(n)},set(c,p,g){return n[p]=g,delete c[p],!0}})}function vd(n,t={scriptable:!0,indexable:!0}){const{_scriptable:i=t.scriptable,_indexable:o=t.indexable,_allKeys:a=t.allKeys}=n;return{allKeys:a,scriptable:i,indexable:o,isScriptable:Vi(i)?i:()=>i,isIndexable:Vi(o)?o:()=>o}}const pb=(n,t)=>n?n+la(t):t,kd=(n,t)=>Tt(t)&&n!=="adapters";function wd(n,t,i){let o=n[t];return Ie(o)||(o=i(),Ie(o)&&(n[t]=o)),o}function gb(n,t,i){const{_proxy:o,_context:a,_subProxy:c,_descriptors:p}=n;let g=o[t];return Vi(g)&&p.isScriptable(t)&&(g=mb(t,g,n,i)),Ft(g)&&g.length&&(g=xb(t,g,n,p.isIndexable)),kd(t,g)&&(g=Gi(g,a,c&&c[t],p)),g}function mb(n,t,i,o){const{_proxy:a,_context:c,_subProxy:p,_stack:g}=i;if(g.has(n))throw new Error("Recursion detected: "+[...g].join("->")+"->"+n);return g.add(n),t=t(c,p||o),g.delete(n),Tt(t)&&(t=pa(a._scopes,a,n,t)),t}function xb(n,t,i,o){const{_proxy:a,_context:c,_subProxy:p,_descriptors:g}=i;if(Ie(c.index)&&o(n))t=t[c.index%t.length];else if(Tt(t[0])){const y=t,w=a._scopes.filter(C=>C!==y);t=[];for(const C of y){const _=pa(w,a,n,C);t.push(Gi(_,c,p&&p[n],g))}}return t}function Md(n,t,i){return Vi(n)?n(t,i):n}const bb=(n,t)=>n===!0?t:typeof n=="string"?ai(t,n):void 0;function yb(n,t,i,o){for(const a of t){const c=bb(i,a);if(c){n.add(c);const p=Md(c._fallback,i,c);if(Ie(p)&&p!==i&&p!==o)return p}else if(c===!1&&Ie(o)&&i!==o)return null}return!1}function pa(n,t,i,o){const a=t._rootScopes,c=Md(t._fallback,i,o),p=[...n,...a],g=new Set;i in n[0]||g.add(n[0][i]={}),g.add(o);let y=ec(g,p,i,c||i);return y===null||Ie(c)&&c!==i&&(y=ec(g,p,c,y),y===null)?!1:fa([...g],[""],a,c)}function ec(n,t,i,o){for(;i;)i=yb(n,t,i,o);return i}function vb(n,t,i,o){let a;for(const c of t)if(a=Sd(pb(c,n),i),Ie(a))return kd(n,a)?pa(i,o,n,a):a}function Sd(n,t){for(const i of t){if(!i)continue;const o=i[n];if(Ie(o))return o}}function ic(n){let t=n._keys;return t||(t=n._keys=kb(n._scopes)),t}function kb(n){const t=new Set;for(const i of n)for(const o of Object.keys(i).filter(a=>!a.startsWith("_")))t.add(o);return[...t]}const wb=Number.EPSILON||1e-14,$i=(n,t)=>t<n.length&&!n[t].skip&&n[t];function Mb(n,t,i,o){const a=n.skip?t:n,c=t,p=i.skip?t:i,g=Qr(c,a),y=Qr(p,c);let w=g/(g+y),C=y/(g+y);w=isNaN(w)?0:w,C=isNaN(C)?0:C;const _=o*w,L=o*C;return{previous:{x:c.x-_*(p.x-a.x),y:c.y-_*(p.y-a.y)},next:{x:c.x+L*(p.x-a.x),y:c.y+L*(p.y-a.y)}}}function Sb(n,t,i){const o=n.length;let a,c,p,g,y,w=$i(n,0);for(let C=0;C<o-1;++C)if(y=w,w=$i(n,C+1),!(!y||!w)){if(hd(t[C],0,wb)){i[C]=i[C+1]=0;continue}a=i[C]/t[C],c=i[C+1]/t[C],g=Math.pow(a,2)+Math.pow(c,2),!(g<=9)&&(p=3/Math.sqrt(g),i[C]=a*p*t[C],i[C+1]=c*p*t[C])}}function Cb(n,t){const i=n.length;let o,a,c,p=$i(n,0);for(let g=0;g<i;++g){if(a=c,c=p,p=$i(n,g+1),!c)continue;const{x:y,y:w}=c;a&&(o=(y-a.x)/3,c.cp1x=y-o,c.cp1y=w-o*t[g]),p&&(o=(p.x-y)/3,c.cp2x=y+o,c.cp2y=w+o*t[g])}}function Pb(n){const t=n.length,i=Array(t).fill(0),o=Array(t);let a,c,p,g=$i(n,0);for(a=0;a<t;++a)if(c=p,p=g,g=$i(n,a+1),!!p){if(g){const y=g.x-p.x;i[a]=y!==0?(g.y-p.y)/y:0}o[a]=c?g?li(i[a-1])!==li(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}Sb(n,i,o),Cb(n,o)}function Xn(n,t,i){return Math.max(Math.min(n,i),t)}function Tb(n,t){let i,o,a,c,p,g=Rs(n[0],t);for(i=0,o=n.length;i<o;++i)p=c,c=g,g=i<o-1&&Rs(n[i+1],t),c&&(a=n[i],p&&(a.cp1x=Xn(a.cp1x,t.left,t.right),a.cp1y=Xn(a.cp1y,t.top,t.bottom)),g&&(a.cp2x=Xn(a.cp2x,t.left,t.right),a.cp2y=Xn(a.cp2y,t.top,t.bottom)))}function Ab(n,t,i,o){let a,c,p,g;if(t.spanGaps&&(n=n.filter(y=>!y.skip)),t.cubicInterpolationMode==="monotone")Pb(n);else{let y=o?n[n.length-1]:n[0];for(a=0,c=n.length;a<c;++a)p=n[a],g=Mb(y,p,n[Math.min(a+1,c-(o?0:1))%c],t.tension),p.cp1x=g.previous.x,p.cp1y=g.previous.y,p.cp2x=g.next.x,p.cp2y=g.next.y,y=p}t.capBezierPoints&&Tb(n,i)}function Ai(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function no(n,t,i){let o;return typeof n=="string"?(o=parseInt(n,10),n.indexOf("%")!==-1&&(o=o/100*t.parentNode[i])):o=n,o}const co=n=>window.getComputedStyle(n,null);function _b(n,t){return co(n).getPropertyValue(t)}const Ob=["top","right","bottom","left"];function Ci(n,t,i){const o={};i=i?"-"+i:"";for(let a=0;a<4;a++){const c=Ob[a];o[c]=parseFloat(n[t+"-"+c+i])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const Lb=(n,t,i)=>(n>0||t>0)&&(!i||!i.shadowRoot);function Eb(n,t){const i=n.native||n,o=i.touches,a=o&&o.length?o[0]:i,{offsetX:c,offsetY:p}=a;let g=!1,y,w;if(Lb(c,p,i.target))y=c,w=p;else{const C=t.getBoundingClientRect();y=a.clientX-C.left,w=a.clientY-C.top,g=!0}return{x:y,y:w,box:g}}function Cd(n,t){const{canvas:i,currentDevicePixelRatio:o}=t,a=co(i),c=a.boxSizing==="border-box",p=Ci(a,"padding"),g=Ci(a,"border","width"),{x:y,y:w,box:C}=Eb(n,i),_=p.left+(C&&g.left),L=p.top+(C&&g.top);let{width:D,height:R}=t;return c&&(D-=p.width+g.width,R-=p.height+g.height),{x:Math.round((y-_)/D*i.width/o),y:Math.round((w-L)/R*i.height/o)}}function Db(n,t,i){let o,a;if(t===void 0||i===void 0){const c=Ai(n);if(!c)t=n.clientWidth,i=n.clientHeight;else{const p=c.getBoundingClientRect(),g=co(c),y=Ci(g,"border","width"),w=Ci(g,"padding");t=p.width-w.width-y.width,i=p.height-w.height-y.height,o=no(g.maxWidth,c,"clientWidth"),a=no(g.maxHeight,c,"clientHeight")}}return{width:t,height:i,maxWidth:o||Jn,maxHeight:a||Jn}}const Xr=n=>Math.round(n*10)/10;function Ib(n,t,i,o){const a=co(n),c=Ci(a,"margin"),p=no(a.maxWidth,n,"clientWidth")||Jn,g=no(a.maxHeight,n,"clientHeight")||Jn,y=Db(n,t,i);let{width:w,height:C}=y;if(a.boxSizing==="content-box"){const _=Ci(a,"border","width"),L=Ci(a,"padding");w-=L.width+_.width,C-=L.height+_.height}return w=Math.max(0,w-c.width),C=Math.max(0,o?Math.floor(w/o):C-c.height),w=Xr(Math.min(w,p,y.maxWidth)),C=Xr(Math.min(C,g,y.maxHeight)),w&&!C&&(C=Xr(w/2)),{width:w,height:C}}function sc(n,t,i){const o=n.currentDevicePixelRatio=t||1,{canvas:a,width:c,height:p}=n;a.height=p*o,a.width=c*o,n.ctx.setTransform(o,0,0,o,0,0),a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=p+"px",a.style.width=c+"px")}const Rb=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return n}();function nc(n,t){const i=_b(n,t),o=i&&i.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Si(n,t,i,o){return{x:n.x+i*(t.x-n.x),y:n.y+i*(t.y-n.y)}}function Bb(n,t,i,o){return{x:n.x+i*(t.x-n.x),y:o==="middle"?i<.5?n.y:t.y:o==="after"?i<1?n.y:t.y:i>0?t.y:n.y}}function zb(n,t,i,o){const a={x:n.cp2x,y:n.cp2y},c={x:t.cp1x,y:t.cp1y},p=Si(n,a,i),g=Si(a,c,i),y=Si(c,t,i),w=Si(p,g,i),C=Si(g,y,i);return Si(w,C,i)}const oc=new Map;function Fb(n,t){t=t||{};const i=n+JSON.stringify(t);let o=oc.get(i);return o||(o=new Intl.NumberFormat(n,t),oc.set(i,o)),o}function uo(n,t,i){return Fb(t,i).format(n)}const Nb=function(n,t){return{x(i){return n+n+t-i}
vendor: 6,436 bytes, lines 13-18
13,setWidth(i){t=i},textAlign(i){return i==="center"?i:i==="right"?"left":"right"},xPlus(i,o){return i-o},leftForLtr(i,o){return i-o}}},Wb=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function Ls(n,t,i){return n?Nb(t,i):Wb()}function Pd(n,t){let i,o;(t==="ltr"||t==="rtl")&&(i=n.canvas.style,o=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",t,"important"),n.prevTextDirection=o)}function Td(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Ad(n){return n==="angle"?{between:to,compare:Ix,normalize:Se}:{between:(t,i,o)=>t>=i&&t<=o,compare:(t,i)=>t-i,normalize:t=>t}}function rc(n,t,i,o){return{start:n%o,end:t%o,loop:i&&(t-n+1)%o===0}}function Hb(n,t,i){const{property:o,start:a,end:c}=i,{between:p,normalize:g}=Ad(o),y=t.length;let{start:w,end:C,loop:_}=n,L,D;if(_){for(w+=y,C+=y,L=0,D=y;L<D&&p(g(t[w%y][o]),a,c);++L)w--,C--;w%=y,C%=y}return C<w&&(C+=y),{start:w,end:C,loop:_}}function _d(n,t,i){if(!i)return[n];const{property:o,start:a,end:c}=i,p=t.length,{compare:g,between:y,normalize:w}=Ad(o),{start:C,end:_,loop:L}=Hb(n,t,i),D=[];let R=!1,N=null,W,X,V;const K=()=>y(a,V,W)&&g(a,V)!==0,$=()=>g(c,W)===0||y(c,V,W),Z=()=>R||K(),nt=()=>!R||$();for(let mt=C,Y=C;mt<=_;++mt)X=t[mt%p],!X.skip&&(W=w(X[o]),R=y(W,a,c),N===null&&Z()&&(N=g(W,a)===0?mt:Y),N!==null&&nt()&&(D.push(rc(N,mt,L,p)),N=null),Y=mt,V=W);return N!==null&&D.push(rc(N,_,L,p)),D}function Od(n,t){const i=[],o=n.segments;for(let a=0;a<o.length;a++){const c=_d(o[a],n.points,t);c.length&&i.push(...c)}return i}function jb(n,t,i,o){let a=0,c=t-1;if(i&&!o)for(;a<t&&!n[a].skip;)a++;for(;a<t&&n[a].skip;)a++;for(a%=t,i&&(c+=a);c>a&&n[c%t].skip;)c--;return c%=t,{start:a,end:c}}function Xb(n,t,i,o){const a=n.length,c=[];let p=t,g=n[t],y;for(y=t+1;y<=i;++y){const w=n[y%a];w.skip||w.stop?g.skip||(o=!1,c.push({start:t%a,end:(y-1)%a,loop:o}),t=p=w.stop?y:null):(p=y,g.skip&&(t=y)),g=w}return p!==null&&c.push({start:t%a,end:p%a,loop:o}),c}function Vb(n){const t=n.points,i=n.options.spanGaps,o=t.length;if(!o)return[];const a=!!n._loop,{start:c,end:p}=jb(t,o,a,i);if(i===!0)return[{start:c,end:p,loop:a}];const g=p<c?p+o:p,y=!!n._fullLoop&&c===0&&p===o-1;return Xb(t,c,g,y)}/*! 14 * Chart.js v3.0.0 15 * https://www.chartjs.org 16 * (c) 2021 Chart.js Contributors 17 * Released under the MIT License 18 */class Yb{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,i,o,a){const c=i.listeners[a],p=i.duration;c.forEach(g=>g({chart:t,numSteps:p,currentStep:Math.min(o-i.start,p)}))}_refresh(){const t=this;t._request||(t._running=!0,t._request=rd.call(window,()=>{t._update(),t._request=null,t._running&&t._refresh()}))}_update(t=Date.now()){const i=this;let o=0;i._charts.forEach((a,c)=>{if(!a.running||!a.items.length)return;const p=a.items;let g=p.length-1,y=!1,w;for(;g>=0;--g)w=p[g],w._active?(w._total>a.duration&&(a.duration=w._total),w.tick(t),y=!0):(p[g]=p[p.length-1],p.pop());y&&(c.draw(),i._notify(c,a,t,"progress")),p.length||(a.running=!1,i._notify(c,a,t,"complete")),o+=p.length}),i._lastDate=t,o===0&&(i._running=!1)}_getAnims(t){const i=this._charts;let o=i.get(t);return o||(o={running:!1,items:[],listeners:{complete:[],progress:[]}},i.set(t,o)),o}listen(t,i,o){this._getAnims(t).listeners[i].push(o)}add(t,i){!i||!i.length||this._getAnims(t).items.push(...i)}has(t){return this._getAnims(t).items.length>0}start(t){const i=this._charts.get(t);i&&(i.running=!0,i.start=Date.now(),i.duration=i.items.reduce((o,a)=>Math.max(o,a._duration),0),this._refresh())}running(t){if(!this._running)return!1;const i=this._charts.get(t);return!(!i||!i.running||!i.items.length)}stop(t){const i=this._charts.get(t);if(!i||!i.items.length)return;const o=i.items;let a=o.length-1;for(;a>=0;--a)o[a].cancel();i.items=[],this._notify(t,i,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var He=new Yb;const ac="transparent",Gb={boolean(n,t,i){return i>.5?t:n},color(n,t,i){const o=Qh(n||ac),a=o.valid&&Qh(t||ac);return a&&a.valid?a.mix(o,i).hexString():t},number(n,t,i){return n+(t-n)*i}};class $b{constructor(t,i,o,a){const c=i[o];a=Ss([t.to,a,c,t.from]);const p=Ss([t.from,c,a]);this._active=!0,this._fn=t.fn||Gb[t.type||typeof p],this._easing=_s[t.easing]||_s.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=i,this._prop=o,this._from=p,this._to=a,this._promises=void 0}active(){return this._active}update(t,i,o){const a=this;if(a._active){a._notify(!1);const c=a._target[a._prop],p=o-a._start,g=a._duration-p;a._start=o,a._duration=Math.floor(Math.max(g,t.duration)),a._total+=p,a._loop=!!t.loop,a._to=Ss([t.to,i,c,t.from]),a._from=Ss([t.from,c,i])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const i=this,o=t-i._start,a=i._duration,c=i._prop,p=i._from,g=i._loop,y=i._to;let w;if(i._active=p!==y&&(g||o<a),!i._active){i._target[c]=y,i._notify(!0);return}if(o<0){i._target[c]=p;return}w=o/a%2,w=g&&w>1?2-w:w,w=i._easing(Math.min(1,Math.max(0,w))),i._target[c]=i._fn(p,y,w)}wait(){const t=this._promises||(this._promises=[]);return new Promise((i,o)=>{t.push({res:i,rej:o})})}_notify(t){const i=t?"res":"rej",o=this._promises||[];for(let a=0;a<o.length;a++)o[a][i]()}}const Ub=["x","y","borderWidth","radius","tension"],Kb=["color","borderColor","backgroundColor"];bt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const qb=Object.keys(bt.animation);bt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});bt.set("animations",{colors:{type:"color",properties:Kb},numbers:{type:"number",properties:Ub}});bt.describe("animations",{_fallback:"animation"});bt.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:n=>n|0}}}});class Ld{constructor(t,i){this._chart=t,this._properties=new Map,this.configure(i)}configure(t){if(!Tt(t))return;const i=this._properties;Object.getOwnPropertyNames(t).forEach(o=>{const a=t[o];if(!Tt(a))return;const c={};for(const p of qb)c[p]=a[p];
vendor: 5,926 bytes, line 18
18(Ft(a.properties)&&a.properties||[o]).forEach(p=>{(p===o||!i.has(p))&&i.set(p,c)})})}_animateOptions(t,i){const o=i.options,a=Qb(t,o);if(!a)return[];const c=this._createAnimations(a,o);return o.$shared&&Zb(t.options.$animations,o).then(()=>{t.options=o},()=>{}),c}_createAnimations(t,i){const o=this._properties,a=[],c=t.$animations||(t.$animations={}),p=Object.keys(i),g=Date.now();let y;for(y=p.length-1;y>=0;--y){const w=p[y];if(w.charAt(0)==="$")continue;if(w==="options"){a.push(...this._animateOptions(t,i));continue}const C=i[w];let _=c[w];const L=o.get(w);if(_)if(L&&_.active()){_.update(L,C,g);continue}else _.cancel();if(!L||!L.duration){t[w]=C;continue}c[w]=_=new $b(L,t,w,C),a.push(_)}return a}update(t,i){if(this._properties.size===0){Object.assign(t,i);return}const o=this._createAnimations(t,i);if(o.length)return He.add(this._chart,o),!0}}function Zb(n,t){const i=[],o=Object.keys(t);for(let a=0;a<o.length;a++){const c=n[o[a]];c&&c.active()&&i.push(c.wait())}return Promise.all(i)}function Qb(n,t){if(!t)return;let i=n.options;if(!i){n.options=t;return}return i.$shared&&(n.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}function lc(n,t){const i=n&&n.options||{},o=i.reverse,a=i.min===void 0?t:0,c=i.max===void 0?t:0;return{start:o?c:a,end:o?a:c}}function Jb(n,t,i){if(i===!1)return!1;const o=lc(n,i),a=lc(t,i);return{top:a.end,right:o.end,bottom:a.start,left:o.start}}function ty(n){let t,i,o,a;return Tt(n)?(t=n.top,i=n.right,o=n.bottom,a=n.left):t=i=o=a=n,{top:t,right:i,bottom:o,left:a}}function hc(n,t){const i=[],o=n._getSortedDatasetMetas(t);let a,c;for(a=0,c=o.length;a<c;++a)i.push(o[a].index);return i}function cc(n,t,i,o){const a=n.keys,c=o.mode==="single";let p,g,y,w;if(t!==null){for(p=0,g=a.length;p<g;++p){if(y=+a[p],y===i){if(o.all)continue;break}w=n.values[y],Xt(w)&&(c||t===0||li(t)===li(w))&&(t+=w)}return t}}function ey(n){const t=Object.keys(n),i=new Array(t.length);let o,a,c;for(o=0,a=t.length;o<a;++o)c=t[o],i[o]={x:c,y:n[c]};return i}function dc(n,t){const i=n&&n.options.stacked;return i||i===void 0&&t.stack!==void 0}function iy(n,t,i){return n.id+"."+t.id+"."+i.stack+"."+i.type}function sy(n){const{min:t,max:i,minDefined:o,maxDefined:a}=n.getUserBounds();return{min:o?t:Number.NEGATIVE_INFINITY,max:a?i:Number.POSITIVE_INFINITY}}function ny(n,t,i){const o=n[t]||(n[t]={});return o[i]||(o[i]={})}function uc(n,t){const{chart:i,_cachedMeta:o}=n,a=i._stacks||(i._stacks={}),{iScale:c,vScale:p,index:g}=o,y=c.axis,w=p.axis,C=iy(c,p,o),_=t.length;let L;for(let D=0;D<_;++D){const R=t[D],{[y]:N,[w]:W}=R,X=R._stacks||(R._stacks={});L=X[w]=ny(a,C,N),L[g]=W}}function Vr(n,t){const i=n.scales;return Object.keys(i).filter(o=>i[o].axis===t).shift()}function oy(n,t){return Object.assign(Object.create(n),{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function ry(n,t,i){return Object.assign(Object.create(n),{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:i,index:t,mode:"default",type:"data"})}function Vn(n,t){t=t||n._parsed;for(const i of t){const o=i._stacks;if(!o||o[n.vScale.id]===void 0||o[n.vScale.id][n.index]===void 0)return;delete o[n.vScale.id][n.index]}}const Yr=n=>n==="reset"||n==="none",fc=(n,t)=>t?n:Object.assign({},n);class Re{constructor(t,i){this.chart=t,this._ctx=t.ctx,this.index=i,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this.initialize()}initialize(){const t=this,i=t._cachedMeta;t.configure(),t.linkScales(),i._stacked=dc(i.vScale,i),t.addElements()}updateIndex(t){this.index=t}linkScales(){const t=this,i=t.chart,o=t._cachedMeta,a=t.getDataset(),c=(L,D,R,N)=>L==="x"?D:L==="r"?N:R,p=o.xAxisID=wt(a.xAxisID,Vr(i,"x")),g=o.yAxisID=wt(a.yAxisID,Vr(i,"y")),y=o.rAxisID=wt(a.rAxisID,Vr(i,"r")),w=o.indexAxis,C=o.iAxisID=c(w,p,g,y),_=o.vAxisID=c(w,g,p,y);o.xScale=t.getScaleForId(p),o.yScale=t.getScaleForId(g),o.rScale=t.getScaleForId(y),o.iScale=t.getScaleForId(C),o.vScale=t.getScaleForId(_)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const i=this._cachedMeta;return t===i.iScale?i.vScale:i.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&tc(this._data,this),t._stacked&&Vn(t)}_dataCheck(){const t=this,i=t.getDataset(),o=i.data||(i.data=[]);Tt(o)?t._data=ey(o):t._data!==o&&(t._data&&(tc(t._data,t),Vn(t._cachedMeta)),o&&Object.isExtensible(o)&&fb(o,t),t._data=o)}addElements(){const t=this,i=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(i.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const i=this,o=i._cachedMeta,a=i.getDataset();let c=!1;i._dataCheck(),o._stacked=dc(o.vScale,o),o.stack!==a.stack&&(c=!0,Vn(o),o.stack=a.stack),i._resyncElements(t),c&&uc(i,o._parsed)}configure(){const t=this,i=t.chart.config,o=i.datasetScopeKeys(t._type),a=i.getOptionScopes(t.getDataset(),o,!0);t.options=i.createResolver(a,t.getContext()),t._parsing=t.options.parsing}parse(t,i){const o=this,{_cachedMeta:a,_data:c}=o,{iScale:p,_stacked:g}=a,y=p.axis;let w=t===0&&i===c.length?!0:a._sorted,C=t>0&&a._parsed[t-1],_,L,D;if(o._parsing===!1)a._parsed=c,a._sorted=!0;else{Ft(c[t])?D=o.parseArrayData(a,c,t,i):Tt(c[t])?D=o.parseObjectData(a,c,t,i):D=o.parsePrimitiveData(a,c,t,i);const R=()=>L[y]===null||C&&L[y]<C[y];for(_=0;_<i;++_)a._parsed[_+t]=L=D[_],w&&(R()&&(w=!1),C=L);a._sorted=w}g&&uc(o,D)}parsePrimitiveData(t,i,o,a){const{iScale:c,vScale:p}=t,g=c.axis,y=p.axis,w=c.getLabels(),C=c===p,_=new Array(a);let L,D,R;for(L=0,D=a;L<D;++L)R=L+o,_[L]={[g]:C||c.parse(w[R],R),[y]:p.parse(i[R],R)};return _}parseArrayData(t,i,o,a){const{xScale:c,yScale:p}=t,g=new Array(a);let y,w,C,_;
18for(y=0,w=a;y<w;++y)C=y+o,_=i[C],g[y]={x:c.parse(_[0],C),y:p.parse(_[1],C)};return g}parseObjectData(t,i,o,a){const{xScale:c,yScale:p}=t,{xAxisKey:g="x",yAxisKey:y="y"}=this._parsing,w=new Array(a);let C,_,L,D;for(C=0,_=a;C<_;++C)L=C+o,D=i[L],w[C]={x:c.parse(ai(D,g),L),y:p.parse(ai(D,y),L)};return w}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,i,o){const a=this.chart,c=this._cachedMeta,p=i[t.axis],g={keys:hc(a,!0),values:i._stacks[t.axis]};return cc(g,p,c.index,{mode:o})}updateRangeFromParsed(t,i,o,a){const c=o[i.axis];let p=c===null?NaN:c;const g=a&&o._stacks[i.axis];a&&g&&(a.values=g,t.min=Math.min(t.min,p),t.max=Math.max(t.max,p),p=cc(a,c,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,p),t.max=Math.max(t.max,p)}getMinMax(t,i){const o=this,a=o._cachedMeta,c=a._parsed,p=a._sorted&&t===a.iScale,g=c.length,y=o._getOtherScale(t),w=i&&a._stacked&&{keys:hc(o.chart,!0),values:null},C={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:_,max:L}=sy(y);let D,R,N,W;function X(){return N=c[D],R=N[t.axis],W=N[y.axis],!Xt(R)||_>W||L<W}for(D=0;D<g&&!(!X()&&(o.updateRangeFromParsed(C,t,N,w),p));++D);if(p){for(D=g-1;D>=0;--D)if(!X()){o.updateRangeFromParsed(C,t,N,w);break}}return C}getAllParsedValues(t){const i=this._cachedMeta._parsed,o=[];let a,c,p;for(a=0,c=i.length;a<c;++a)p=i[a][t.axis],Xt(p)&&o.push(p);return o}getMaxOverflow(){return!1}getLabelAndValue(t){const i=this,o=i._cachedMeta,a=o.iScale,c=o.vScale,p=i.getParsed(t);return{label:a?""+a.getLabelForValue(p[a.axis]):"",value:c?""+c.getLabelForValue(p[c.axis]):""}}_update(t){const i=this,o=i._cachedMeta;i.configure(),i._cachedDataOpts={},i.update(t||"default"),o._clip=ty(wt(i.options.clip,Jb(o.xScale,o.yScale,i.getMaxOverflow())))}update(t){}draw(){const t=this,i=t._ctx,o=t.chart,a=t._cachedMeta,c=a.data||[],p=o.chartArea,g=[],y=t._drawStart||0,w=t._drawCount||c.length-y;let C;for(a.dataset&&a.dataset.draw(i,p,y,w),C=y;C<y+w;++C){const _=c[C];_.active?g.push(_):_.draw(i,p)}for(C=0;C<g.length;++C)g[C].draw(i,p)}getStyle(t,i){const o=i?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(t||0,o)}getContext(t,i,o){const a=this,c=a.getDataset();let p;if(t>=0&&t<a._cachedMeta.data.length){const g=a._cachedMeta.data[t];p=g.$context||(g.$context=ry(a.getContext(),t,g)),p.parsed=a.getParsed(t),p.raw=c.data[t]}else p=a.$context||(a.$context=oy(a.chart.getContext(),a.index)),p.dataset=c;return p.active=!!i,p.mode=o,p}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,i){return this._resolveElementOptions(this.dataElementType.id,i,t)}_resolveElementOptions(t,i="default",o){const a=this,c=i==="active",p=a._cachedDataOpts,g=t+"-"+i,y=p[g],w=a.enableOptionSharing&&Ie(o);if(y)return fc(y,w);const C=a.chart.config,_=C.datasetElementScopeKeys(a._type,t),L=c?[`${t}Hover`,"hover",t,""]:[t,""],D=C.getOptionScopes(a.getDataset(),_),R=Object.keys(bt.elements[t]),N=()=>a.getContext(o,c),W=C.resolveNamedOptions(D,R,N,L);return W.$shared&&(W.$shared=w,p[g]=Object.freeze(fc(W,w))),W}_resolveAnimations(t,i,o){const a=this,c=a.chart,p=a._cachedDataOpts,g=`animation-${i}`,y=p[g];if(y)return y;let w;if(c.options.animation!==!1){const _=a.chart.config,L=_.datasetAnimationScopeKeys(a._type,i),D=_.getOptionScopes(a.getDataset(),L);w=_.createResolver(D,a.getContext(t,o,i))}const C=new Ld(c,w&&w.animations);return w&&w._cacheable&&(p[g]=Object.freeze(C)),C}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,i){return!i||Yr(t)||this.chart._animationsDisabled}updateElement(t,i,o,a){Yr(a)?Object.assign(t,o):this._resolveAnimations(i,a).update(t,o)}updateSharedOptions(t,i,o){t&&!Yr(i)&&this._resolveAnimations(void 0,i).update(t,o)}_setStyle(t,i,o,a){t.active=a;const c=this.getStyle(i,a);this._resolveAnimations(i,o,a).update(t,{options:!a&&this.getSharedOptions(c)||c})}removeHoverStyle(t,i,o){this._setStyle(t,o,"active",!1)}setHoverStyle(t,i,o){this._setStyle(t,o,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const i=this,o=i._cachedMeta.data.length,a=i._data.length;a>o?i._insertElements(o,a-o,t):a<o&&i._removeElements(a,o-a);const c=Math.min(a,o);c&&i.parse(0,c)}_insertElements(t,i,o=!0){const a=this,c=a._cachedMeta,p=c.data,g=t+i;let y;const w=C=>{for(C.length+=i,y=C.length-1;y>=g;y--)C[y]=C[y-i]};for(w(p),y=t;y<g;++y)p[y]=new a.dataElementType;a._parsing&&w(c._parsed),a.parse(t,i),o&&a.updateElements(p,t,i,"reset")}updateElements(t,i,o,a){}_removeElements(t,i){const o=this,a=o._cachedMeta;if(o._parsing){const c=a._parsed.splice(t,i);a._stacked&&Vn(a,c)}a.data.splice(t,i)}_onDataPush(){const t=arguments.length;this._insertElements(this.getDataset().data.length-t,t)}_onDataPop(){this._removeElements(this._cachedMeta.data.length-1,1)}_onDataShift(){this._removeElements(0,1)}_onDataSplice(t,i){this._removeElements(t,i),this._insertElements(t,arguments.length-2)}_onDataUnshift(){this._insertElements(0,arguments.length)}}Re.defaults={};Re.prototype.datasetElementType=null;Re.prototype.dataElementType=null;function ay(n){if(!n._cache.$bar){const t=n.getMatchingVisibleMetas("bar");let i=[];for(let o=0,a=t.length;o<a;o++)i=i.concat(t[o].controller.getAllParsedValues(n));n._cache.$bar=yd(i.sort((o,a)=>o-a))}return n._cache.$bar}function ly(n){const t=ay(n);let i=n._length,o,a,c,p;const g=()=>{i=Math.min(i,o&&Math.abs(c-p)||i),p=c};for(o=0,a=t.length;o<a;++o)c=n.getPixelForValue(t[o]),g();for(o=0,a=n.ticks.length;o<a;++o)c=n.getPixelForTick(o),g();return i}function hy(n,t,i,o){const a=i.barThickness;let c,p;return Mt(a)?(c=t.min*i.categoryPercentage,p=i.barPercentage):(c=a*o,p=1),{chunk:c/o,ratio:p,start:t.pixels[n]-c/2}}function cy(n,t,i,o){const a=t.pixels,c=a[n];let p=n>0?a[n-1]:null,g=n<a.length-1?a[n+1]:null;const y=i.categoryPercentage;p===null&&(p=c-(g===null?t.end-t.start:g-c)),g===null&&(g=c+c-p);const w=c-(c-Math.min(p,g))/2*y;return{chunk:Math.abs(g-p)/2*y/o,ratio:i.barPercentage,start:w}}function dy(n,t,i,o){const a=i.parse(n[0],o),c=i.parse(n[1],o),p=Math.min(a,c
18),g=Math.max(a,c);let y=p,w=g;Math.abs(p)>Math.abs(g)&&(y=g,w=p),t[i.axis]=w,t._custom={barStart:y,barEnd:w,start:a,end:c,min:p,max:g}}function Ed(n,t,i,o){return Ft(n)?dy(n,t,i,o):t[i.axis]=i.parse(n,o),t}function pc(n,t,i,o){const a=n.iScale,c=n.vScale,p=a.getLabels(),g=a===c,y=[];let w,C,_,L;for(w=i,C=i+o;w<C;++w)L=t[w],_={},_[a.axis]=g||a.parse(p[w],w),y.push(Ed(L,_,c,w));return y}function gc(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}class Ws extends Re{parsePrimitiveData(t,i,o,a){return pc(t,i,o,a)}parseArrayData(t,i,o,a){return pc(t,i,o,a)}parseObjectData(t,i,o,a){const{iScale:c,vScale:p}=t,{xAxisKey:g="x",yAxisKey:y="y"}=this._parsing,w=c.axis==="x"?g:y,C=p.axis==="x"?g:y,_=[];let L,D,R,N;for(L=o,D=o+a;L<D;++L)N=i[L],R={},R[c.axis]=c.parse(ai(N,w),L),_.push(Ed(ai(N,C),R,p,L));return _}updateRangeFromParsed(t,i,o,a){super.updateRangeFromParsed(t,i,o,a);const c=o._custom;c&&i===this._cachedMeta.vScale&&(t.min=Math.min(t.min,c.min),t.max=Math.max(t.max,c.max))}getLabelAndValue(t){const i=this,o=i._cachedMeta,{iScale:a,vScale:c}=o,p=i.getParsed(t),g=p._custom,y=gc(g)?"["+g.start+", "+g.end+"]":""+c.getLabelForValue(p[c.axis]);return{label:""+a.getLabelForValue(p[a.axis]),value:y}}initialize(){const t=this;t.enableOptionSharing=!0,super.initialize();const i=t._cachedMeta;i.stack=t.getDataset().stack}update(t){const i=this,o=i._cachedMeta;i.updateElements(o.data,0,o.data.length,t)}updateElements(t,i,o,a){const c=this,p=a==="reset",g=c._cachedMeta.vScale,y=g.getBasePixel(),w=g.isHorizontal(),C=c._getRuler(),_=c.resolveDataElementOptions(i,a),L=c.getSharedOptions(_),D=c.includeOptions(a,L);c.updateSharedOptions(L,a,_);for(let R=i;R<i+o;R++){const N=p?{base:y,head:y}:c._calculateBarValuePixels(R),W=c._calculateBarIndexPixels(R,C),X={horizontal:w,base:N.base,x:w?N.head:W.center,y:w?W.center:N.head,height:w?W.size:void 0,width:w?void 0:W.size};D&&(X.options=L||c.resolveDataElementOptions(R,a)),c.updateElement(t[R],R,X,a)}}_getStacks(t,i){const o=this,c=o._cachedMeta.iScale,p=c.getMatchingVisibleMetas(o._type),g=c.options.stacked,y=p.length,w=[];let C,_;for(C=0;C<y;++C){if(_=p[C],typeof i<"u"){const L=_.controller.getParsed(i)[_.controller._cachedMeta.vScale.axis];if(Mt(L)||isNaN(L))continue}if((g===!1||w.indexOf(_.stack)===-1||g===void 0&&_.stack===void 0)&&w.push(_.stack),_.index===t)break}return w.length||w.push(void 0),w}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,i){const o=this._getStacks(t),a=i!==void 0?o.indexOf(i):-1;return a===-1?o.length-1:a}_getRuler(){const t=this,i=t.options,o=t._cachedMeta,a=o.iScale,c=[];let p,g;for(p=0,g=o.data.length;p<g;++p)c.push(a.getPixelForValue(t.getParsed(p)[a.axis],p));const y=i.barThickness;return{min:y||ly(a),pixels:c,start:a._startPixel,end:a._endPixel,stackCount:t._getStackCount(),scale:a,grouped:i.grouped,ratio:y?1:i.categoryPercentage*i.barPercentage}}_calculateBarValuePixels(t){const i=this,{vScale:o,_stacked:a}=i._cachedMeta,{base:c,minBarLength:p}=i.options,g=i.getParsed(t),y=g._custom,w=gc(y);let C=g[o.axis],_=0,L=a?i.applyStack(o,g,a):C,D,R;L!==C&&(_=L-C,L=C),w&&(C=y.barStart,L=y.barEnd-y.barStart,C!==0&&li(C)!==li(y.barEnd)&&(_=0),_+=C);const N=!Mt(c)&&!w?c:_;let W=o.getPixelForValue(N);this.chart.getDataVisibility(t)?D=o.getPixelForValue(_+L):D=W,R=D-W,p!==void 0&&Math.abs(R)<p&&(R=R<0?-p:p,C===0&&(W-=R/2),D=W+R);const X=c||0;if(W===o.getPixelForValue(X)){const V=o.getLineWidthForValue(X)/2;R>0?(W+=V,R-=V):R<0&&(W-=V,R+=V)}return{size:R,base:W,head:D,center:D+R/2}}_calculateBarIndexPixels(t,i){const o=this,a=i.scale,c=o.options,p=wt(c.maxBarThickness,1/0);let g,y;if(i.grouped){const w=c.skipNull?o._getStackCount(t):i.stackCount,C=c.barThickness==="flex"?cy(t,i,c,w):hy(t,i,c,w),_=o._getStackIndex(o.index,o._cachedMeta.stack);g=C.start+C.chunk*_+C.chunk/2,y=Math.min(p,C.chunk*C.ratio)}else g=a.getPixelForValue(o.getParsed(t)[a.axis],t),y=Math.min(p,i.min*i.ratio);return{base:g-y/2,head:g+y/2,center:g,size:y}}draw(){const t=this,i=t.chart,o=t._cachedMeta,a=o.vScale,c=o.data,p=c.length;let g=0;for(Fs(i.ctx,i.chartArea);g<p;++g)t.getParsed(g)[a.axis]!==null&&c[g].draw(t._ctx);Ns(i.ctx)}}Ws.id="bar";Ws.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};Ws.overrides={interaction:{mode:"index"},scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class fo extends Re{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,i,o,a){const{xScale:c,yScale:p}=t,{xAxisKey:g="x",yAxisKey:y="y"}=this._parsing,w=[];let C,_,L;for(C=o,_=o+a;C<_;++C)L=i[C],w.push({x:c.parse(ai(L,g),C),y:p.parse(ai(L,y),C),_custom:L&&L.r&&+L.r});return w}getMaxOverflow(){const{data:t,_parsed:i}=this._cachedMeta;let o=0;for(let a=t.length-1;a>=0;--a)o=Math.max(o,t[a].size()/2,i[a]._custom);return o>0&&o}getLabelAndValue(t){const i=this,o=i._cachedMeta,{xScale:a,yScale:c}=o,p=i.getParsed(t),g=a.getLabelForValue(p.x),y=c.getLabelForValue(p.y),w=p._custom;return{label:o.label,value:"("+g+", "+y+(w?", "+w:"")+")"}}update(t){const i=this,o=i._cachedMeta.data;i.updateElements(o,0,o.length,t)}updateElements(t,i,o,a){const c=this,p=a==="reset",{xScale:g,yScale:y}=c._cachedMeta,w=c.resolveDataElementOptions(i,a),C=c.getSharedOptions(w),_=c.includeOptions(a,C);for(let L=i;L<i+o;L++){const D=t[L],R=!p&&c.getParsed(L),N=p?g.getPixelForDecimal(.5):g.getPixelForValue(R.x),W=p?y.getBasePixel():y.getPixelForValue(R.y),X={x:N,y:W,skip:isNaN(N)||isNaN(W)};_&&(X.options=c.resolveDataElementOptions(L,a),p&&(X.options.radius=0)),c.updateElement(D,L,X,a)}c.updateSharedOptions(C,a,w)}resolveDataElementOptions(t,i){const o=this.getParsed(t);let a=super.resolveDataElementOptions(t,i);a.$shared&&(a=Object.assign({},a,{$shared:!1}));const c=a.radius;return i!=="active"&&(a.radius=0),a.radius+=wt(o&&o._custom,c),a}}fo.id="bubble";fo.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};fo.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function uy(n,t,i){let o=1,a=1,c=0,p=0;if(t<Ot){const g=n,y=g+t,w=Math.cos(g),C=Math.sin(g),_=Math.cos(y),L=Math.sin(y),D=(K,$,Z)=>to(K,g,y)?1:Math.max($,$*i,Z,Z*i),R=(K,$,Z)=>to(K,g,y)?-1:Math.min($,$*i,Z,Z*i),N=D(0,w,_),W=D(ie,C,L),X=R(Gt,w,_),V=R(Gt+ie,C,L);o=(N-X)/2,a=(W-V)/2,c=-(N+X)/2,p=-(W+V)/2}return{ratioX:o,ratioY:a,offsetX:c,offsetY:p}}class Hs extends Re{constructor(t,i){super(t,i),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,i){const o=this.getDataset().data,a=this._cachedMeta;let c,p;for(c=t,p=t+i;c<p;++c)a._parsed[c]=+o[c]}_getRotation(){return Xe(this.options.rotation-90)}_getCircumference(){return Xe(this.options.circumference)}_getRotationExtents(){let t=Ot,i=-Ot;const o=this;for(let a=0;a<o.chart.data.datasets.length;++a)if(o.chart.isDatasetVisible(a)){const c=o.chart.getDatasetMeta(a).controller,p=c._getRotation(),g=c._getCircumference();t=Math.min(t,p),i=Math.max(i,p+g)}return{rotation:t,circumference:i-t}}update(t){const i=this,o=i.chart,{chartArea:a}=o,c=i._cachedMeta,p=c.data,g=i.getMaxBorderWidth()+i.getMaxOffset(p),y=Math.max((Math.min(a.width,a.height)-g)/2,0),w=Math.min(Sx(i.options.cutout,y),1),C=i._getRingWeight(i.index),{circumference:_,rotation:L}=i._getRotationExtents(),{ratioX:D,ratioY:R,offsetX:N,offsetY:W}=uy(L,_,w),X=(a.width-g)/D,V=(a.height-g)/R,K=Math.max(Math.min(X,V)/2,0),$=qr(i.options.radius,K),Z=Math.max($*w,0),nt=($-Z)/i._getVisibleDatasetWeightTotal();i.offsetX=N*$,i.offsetY=W*$,c.total=i.calculateTotal(),i.outerRadius=$-nt*i._getRingWeightOffset(i.index),i.innerRadius=Math.max(i.outerRadius-nt*C,0),i.updateElements(p,0,p.length,t)}_circumference(t,i){const o=this,a=o.options,c=o._cachedMeta,p=o._getCircumference();return i&&a.animation.animateRotate||!this.chart.getDataVisibility(t)||c._parsed[t]===null?0:o.calculateCircumference(c._parsed[t]*p/Ot)}updateElements(t,i,o,a){const c=this,p=a==="reset",g=c.chart,y=g.chartArea,C=g.options.animation,_=(y.left+y.right)/2,L=(y.top+y.bottom)/2,D=p&&C.animateScale,R=D?0:c.innerRadius,N=D?0:c.outerRadius,W=c.resolveDataElementOptions(i,a),X=c.getSharedOptions(W),V=c.includeOptions(a,X);let K=c._getRotation(),$;for($=0;$<i;++$)K+=c._circumference($,p);for($=i;$<i+o;++$){const Z=c._circumference($,p),nt=t[$],mt={x:_+c.offsetX,y:L+c.offsetY,startAngle:K,endAngle:K+Z,circumference:Z,outerRadius:N,innerRadius:R};V&&(mt.options=X||c.resolveDataElementOptions($,a)),K+=Z,c.updateElement(nt,$,mt,a)}c.updateSharedOptions(X,a,W)}calculateTotal(){const t=this._cachedMeta,i=t.data;let o=0,a;for(a=0;a<i.length;a++){const c=t._parsed[a];c!==null&&!isNaN(c)&&this.chart.getDataVisibility(a)&&(o+=Math.abs(c))}return o}calculateCircumference(t){const i=this._cachedMeta.total;return i>0&&!isNaN(t)?Ot*(Math.abs(t)/i):0}getLabelAndValue(t){const i=this,o=i._cachedMeta,a=i.chart,c=a.data.labels||[],p=uo(o._parsed[t],a.options.locale);return{label:c[t]||"",value:p}}getMaxBorderWidth(t){const i=this;let o=0;const a=i.chart;let c,p,g,y,w;if(!t){for(c=0,p=a.data.datasets.length;c<p;++c)if(a.isDatasetVisible(c)){g=a.getDatasetMeta(c),t=g.data,y=g.controller,y!==i&&y.configure();break}}if(!t)return 0;for(c=0,p=t.length;c<p;++c)w=y.resolveDataElementOptions(c),w.borderAlign!=="inner"&&(o=Math.max(o,w.borderWidth||0,w.hoverBorderWidth||0));return o}getMaxOffset(t){let i=0;for(let o=0,a=t.length;o<a;++o){const c=this.resolveDataElementOptions(o);i=Math.max(i,c.offset||0,c.hoverOffset||0)}return i}_getRingWeightOffset(t){let i=0;for(let o=0;o<t;
18++o)this.chart.isDatasetVisible(o)&&(i+=this._getRingWeight(o));return i}_getRingWeight(t){return Math.max(wt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Hs.id="doughnut";Hs.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",indexAxis:"r"};Hs.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const t=n.data;return t.labels.length&&t.datasets.length?t.labels.map((i,o)=>{const c=n.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,lineWidth:c.borderWidth,hidden:!n.getDataVisibility(o),index:o}}):[]}},onClick(n,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let t=n.label;const i=": "+n.formattedValue;return Ft(t)?(t=t.slice(),t[0]+=i):t+=i,t}}}}};class js extends Re{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const i=this,o=i._cachedMeta,{dataset:a,data:c=[],_dataset:p}=o,g=i.chart._animationsDisabled;let{start:y,count:w}=fy(o,c,g);if(i._drawStart=y,i._drawCount=w,py(o)&&(y=0,w=c.length),a._decimated=!!p._decimated,a.points=c,t!=="resize"){const C=i.resolveDatasetElementOptions(t);i.options.showLine||(C.borderWidth=0),i.updateElement(a,void 0,{animated:!g,options:C},t)}i.updateElements(c,y,w,t)}updateElements(t,i,o,a){const c=this,p=a==="reset",{xScale:g,yScale:y,_stacked:w}=c._cachedMeta,C=c.resolveDataElementOptions(i,a),_=c.getSharedOptions(C),L=c.includeOptions(a,_),D=c.options.spanGaps,R=Yi(D)?D:Number.POSITIVE_INFINITY,N=c.chart._animationsDisabled||p||a==="none";let W=i>0&&c.getParsed(i-1);for(let X=i;X<i+o;++X){const V=t[X],K=c.getParsed(X),$=N?V:{},Z=$.x=g.getPixelForValue(K.x,X),nt=$.y=p?y.getBasePixel():y.getPixelForValue(w?c.applyStack(y,K,w):K.y,X);$.skip=isNaN(Z)||isNaN(nt),$.stop=X>0&&K.x-W.x>R,L&&($.options=_||c.resolveDataElementOptions(X,a)),N||c.updateElement(V,X,$,a),W=K}c.updateSharedOptions(_,a,C)}getMaxOverflow(){const t=this,i=t._cachedMeta,o=i.dataset,a=o.options&&o.options.borderWidth||0,c=i.data||[];if(!c.length)return a;const p=c[0].size(t.resolveDataElementOptions(0)),g=c[c.length-1].size(t.resolveDataElementOptions(c.length-1));return Math.max(a,p,g)/2}draw(){this._cachedMeta.dataset.updateControlPoints(this.chart.chartArea),super.draw()}}js.id="line";js.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};js.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};function fy(n,t,i){const o=t.length;let a=0,c=o;if(n._sorted){const{iScale:p,_parsed:g}=n,y=p.axis,{min:w,max:C,minDefined:_,maxDefined:L}=p.getUserBounds();_&&(a=Ye(Math.min(Cs(g,p.axis,w).lo,i?o:Cs(t,y,p.getPixelForValue(w)).lo),0,o-1)),L?c=Ye(Math.max(Cs(g,p.axis,C).hi+1,i?0:Cs(t,y,p.getPixelForValue(C)).hi+1),a,o)-a:c=o-a}return{start:a,count:c}}function py(n){const{xScale:t,yScale:i,_scaleRanges:o}=n,a={xmin:t.min,xmax:t.max,ymin:i.min,ymax:i.max};if(!o)return n._scaleRanges=a,!0;const c=o.xmin!==t.min||o.xmax!==t.max||o.ymin!==i.min||o.ymax!==i.max;return Object.assign(o,a),c}class po extends Re{constructor(t,i){super(t,i),this.innerRadius=void 0,this.outerRadius=void 0}update(t){const i=this._cachedMeta.data;this._updateRadius(),this.updateElements(i,0,i.length,t)}_updateRadius(){const t=this,i=t.chart,o=i.chartArea,a=i.options,c=Math.min(o.right-o.left,o.bottom-o.top),p=Math.max(c/2,0),g=Math.max(a.cutoutPercentage?p/100*a.cutoutPercentage:1,0),y=(p-g)/i.getVisibleDatasetCount();t.outerRadius=p-y*t.index,t.innerRadius=t.outerRadius-y}updateElements(t,i,o,a){const c=this,p=a==="reset",g=c.chart,y=c.getDataset(),C=g.options.animation,_=c._cachedMeta.rScale,L=_.xCenter,D=_.yCenter,R=_.getIndexAngle(0)-.5*Gt;let N=R,W;const X=360/c.countVisibleElements();for(W=0;W<i;++W)N+=c._computeAngle(W,a,X);for(W=i;W<i+o;W++){const V=t[W];let K=N,$=N+c._computeAngle(W,a,X),Z=g.getDataVisibility(W)?_.getDistanceFromCenterForValue(y.data[W]):0;N=$,p&&(C.animateScale&&(Z=0),C.animateRotate&&(K=$=R));const nt={x:L,y:D,innerRadius:0,outerRadius:Z,startAngle:K,endAngle:$,options:c.resolveDataElementOptions(W,a)};c.updateElement(V,W,nt,a)}}countVisibleElements(){const t=this.getDataset(),i=this._cachedMeta;let o=0;return i.data.forEach((a,c)=>{!isNaN(t.data[c])&&this.chart.getDataVisibility(c)&&o++}),o}_computeAngle(t,i,o){return this.chart.getDataVisibility(t)?Xe(this.resolveDataElementOptions(t,i).angle||o):0}}po.id="polarArea";po.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};po.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const t=n.data;return t.labels.length&&t.datasets.length?t.labels.map((i,o)=>{const c=n.getDatasetMeta(0).controller.getStyle(o);return{text:i,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,lineWidth:c.borderWidth,hidden:!n.getDataVisibility(o),index:o}}):[]}},onClick(n,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update(
18)}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class ga extends Hs{}ga.id="pie";ga.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class go extends Re{getLabelAndValue(t){const i=this,o=i._cachedMeta.vScale,a=i.getParsed(t);return{label:o.getLabels()[t],value:""+o.getLabelForValue(a[o.axis])}}update(t){const i=this,o=i._cachedMeta,a=o.dataset,c=o.data||[],p=o.iScale.getLabels();if(a.points=c,t!=="resize"){const g=i.resolveDatasetElementOptions(t);i.options.showLine||(g.borderWidth=0);const y={_loop:!0,_fullLoop:p.length===c.length,options:g};i.updateElement(a,void 0,y,t)}i.updateElements(c,0,c.length,t)}updateElements(t,i,o,a){const c=this,p=c.getDataset(),g=c._cachedMeta.rScale,y=a==="reset";for(let w=i;w<i+o;w++){const C=t[w],_=c.resolveDataElementOptions(w,a),L=g.getPointPositionForValue(w,p.data[w]),D=y?g.xCenter:L.x,R=y?g.yCenter:L.y,N={x:D,y:R,angle:L.angle,skip:isNaN(D)||isNaN(R),options:_};c.updateElement(C,w,N,a)}}}go.id="radar";go.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};go.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class mo extends js{}mo.id="scatter";mo.defaults={showLine:!1,fill:!1};mo.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var gy=Object.freeze({__proto__:null,BarController:Ws,BubbleController:fo,DoughnutController:Hs,LineController:js,PolarAreaController:po,PieController:ga,RadarController:go,ScatterController:mo});function Mi(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}class ea{constructor(t){this.options=t||{}}formats(){return Mi()}parse(t,i){return Mi()}format(t,i){return Mi()}add(t,i,o){return Mi()}diff(t,i,o){return Mi()}startOf(t,i,o){return Mi()}endOf(t,i){return Mi()}}ea.override=function(n){Object.assign(ea.prototype,n)};var my={_date:ea};function Ps(n,t){return"native"in n?{x:n.x,y:n.y}:Cd(n,t)}function xy(n,t){const i=n.getSortedVisibleDatasetMetas();let o,a,c;for(let p=0,g=i.length;p<g;++p){({index:o,data:a}=i[p]);for(let y=0,w=a.length;y<w;++y)c=a[y],c.skip||t(c,o,y)}}function by(n,t,i,o){const{controller:a,data:c,_sorted:p}=n,g=a._cachedMeta.iScale;if(g&&t===g.axis&&p&&c.length){const y=g._reversePixels?db:Cs;if(o){if(a._sharedOptions){const w=c[0],C=typeof w.getRange=="function"&&w.getRange(t);if(C){const _=y(c,t,i-C),L=y(c,t,i+C);return{lo:_.lo,hi:L.hi}}}}else return y(c,t,i)}return{lo:0,hi:c.length-1}}function Dd(n,t,i,o,a){const c=n.getSortedVisibleDatasetMetas(),p=i[t];for(let g=0,y=c.length;g<y;++g){const{index:w,data:C}=c[g],{lo:_,hi:L}=by(c[g],t,p,a);for(let D=_;D<=L;++D){const R=C[D];R.skip||o(R,w,D)}}}function yy(n){const t=n.indexOf("x")!==-1,i=n.indexOf("y")!==-1;return function(o,a){const c=t?Math.abs(o.x-a.x):0,p=i?Math.abs(o.y-a.y):0;return Math.sqrt(Math.pow(c,2)+Math.pow(p,2))}}function Gr(n,t,i,o){const a=[];return Rs(t,n.chartArea,n._minPadding)&&Dd(n,i,t,function(p,g,y){p.inRange(t.x,t.y,o)&&a.push({element:p,datasetIndex:g,index:y})},!0),a}function $r(n,t,i,o,a){const c=yy(i);let p=Number.POSITIVE_INFINITY,g=[];return Rs(t,n.chartArea,n._minPadding)&&Dd(n,i,t,function(w,C,_){if(o&&!w.inRange(t.x,t.y,a))return;const L=w.getCenterPoint(a),D=c(t,L);D<p?(g=[{element:w,datasetIndex:C,index:_}],p=D):D===p&&g.push({element:w,datasetIndex:C,index:_})}),g}function mc(n,t,i,o){const a=Ps(t,n),c=[],p=i.axis,g=p==="x"?"inXRange":"inYRange";let y=!1;return xy(n,(w,C,_)=>{w[g](a[p],o)&&c.push({element:w,datasetIndex:C,index:_}),w.inRange(a.x,a.y,o)&&(y=!0)}),i.intersect&&!y?[]:c}var vy={modes:{index(n,t,i,o){const a=Ps(t,n),c=i.axis||"x",p=i.intersect?Gr(n,a,c,o):$r(n,a,c,!1,o),g=[];return p.length?(n.getSortedVisibleDatasetMetas().forEach(y=>{const w=p[0].index,C=y.data[w];C&&!C.skip&&g.push({element:C,datasetIndex:y.index,index:w})}),g):[]},dataset(n,t,i,o){const a=Ps(t,n),c=i.axis||"xy";let p=i.intersect?Gr(n,a,c,o):$r(n,a,c,!1,o);if(p.length>0){const g=p[0].datasetIndex,y=n.getDatasetMeta(g).data;p=[];for(let w=0;w<y.length;++w)p.push({element:y[w],datasetIndex:g,index:w})}return p},point(n,t,i,o){const a=Ps(t,n),c=i.axis||"xy";return Gr(n,a,c,o)},nearest(n,t,i,o){const a=Ps(t,n),c=i.axis||"xy";return $r(n,a,c,i.intersect,o)},x(n,t,i,o){return i.axis="x",mc(n,t,i,o)},y(n,t,i,o){return i.axis="y",mc(n,t,i,o)}}};const ky=["left","top","right","bottom"];function ys(n,t){return n.filter(i=>i.pos===t)}function xc(n,t){return n.filter(i=>ky.indexOf(i.pos)===-1&&i.box.axis===t)}function vs(n,t){return n.sort((i,o)=>{const a=t?o:i,c=t?i:o;return a.weight===c.weight?a.index-c.index:a.weight-c.weight})}function wy(n){const t=[];let i,o,a;for(i=0,o=(n||[]).length;i<o;++i)a=n[i],t.push({index:i,box:a,pos:a.position,horizontal:a.isHorizontal(),weight:a.weight});return t}function My(n,t){let i,o,a;for(i=0,o=n.length;i<o;++i)a=n[i],a.horizontal?(a.width=a.box.fullSize&&t.availableWidth,a.height=t.hBoxMaxHeight):(a.width=t.vBoxMaxWidth,a.height=a.box.fullSize&&t.availableHeight)}function Sy(n){const t=wy(n),i=vs(t.filter(w=>w.box.fullSize),!0),o=vs(ys(t,"left"),!0),a=vs(ys(t,"right")),c=vs(ys(t,"top"),!0),p=vs(ys(t,"bottom")),g=xc(t,"x"),y=xc(t,"y");
vendor: 3,961 bytes, line 18
18return{fullSize:i,leftAndTop:o.concat(c),rightAndBottom:a.concat(y).concat(p).concat(g),chartArea:ys(t,"chartArea"),vertical:o.concat(a).concat(y),horizontal:c.concat(p).concat(g)}}function bc(n,t,i,o){return Math.max(n[i],t[i])+Math.max(n[o],t[o])}function Id(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function Cy(n,t,i){const o=i.box,a=n.maxPadding;if(Tt(i.pos))return{same:!1,other:!1};i.size&&(n[i.pos]-=i.size),i.size=i.horizontal?o.height:o.width,n[i.pos]+=i.size,o.getPadding&&Id(a,o.getPadding());const c=Math.max(0,t.outerWidth-bc(a,n,"left","right")),p=Math.max(0,t.outerHeight-bc(a,n,"top","bottom")),g=c!==n.w,y=p!==n.h;return n.w=c,n.h=p,i.horizontal?{same:g,other:y}:{same:y,other:g}}function Py(n){const t=n.maxPadding;function i(o){const a=Math.max(t[o]-n[o],0);return n[o]+=a,a}n.y+=i("top"),n.x+=i("left"),i("right"),i("bottom")}function Ty(n,t){const i=t.maxPadding;function o(a){const c={left:0,top:0,right:0,bottom:0};return a.forEach(p=>{c[p]=Math.max(t[p],i[p])}),c}return o(n?["left","right"]:["top","bottom"])}function Ts(n,t,i){const o=[];let a,c,p,g,y,w;for(a=0,c=n.length,y=0;a<c;++a){p=n[a],g=p.box,g.update(p.width||t.w,p.height||t.h,Ty(p.horizontal,t));const{same:C,other:_}=Cy(t,i,p);y|=C&&o.length,w=w||_,g.fullSize||o.push(p)}return y&&Ts(o,t,i)||w}function yc(n,t,i){const o=i.padding;let a=t.x,c=t.y,p,g,y,w;for(p=0,g=n.length;p<g;++p)y=n[p],w=y.box,y.horizontal?(w.left=w.fullSize?o.left:t.left,w.right=w.fullSize?i.outerWidth-o.right:t.left+t.w,w.top=c,w.bottom=c+w.height,w.width=w.right-w.left,c=w.bottom):(w.left=a,w.right=a+w.width,w.top=w.fullSize?o.top:t.top,w.bottom=w.fullSize?i.outerHeight-o.right:t.top+t.h,w.height=w.bottom-w.top,a=w.right);t.x=a,t.y=c}bt.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var be={addBox(n,t){n.boxes||(n.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(i){t.draw(i)}}]},n.boxes.push(t)},removeBox(n,t){const i=n.boxes?n.boxes.indexOf(t):-1;i!==-1&&n.boxes.splice(i,1)},configure(n,t,i){t.fullSize=i.fullSize,t.position=i.position,t.weight=i.weight},update(n,t,i,o){if(!n)return;const a=he(n.options.layout.padding),c=t-a.width,p=i-a.height,g=Sy(n.boxes),y=g.vertical,w=g.horizontal;Pt(n.boxes,R=>{typeof R.beforeLayout=="function"&&R.beforeLayout()});const C=y.reduce((R,N)=>N.box.options&&N.box.options.display===!1?R:R+1,0)||1,_=Object.freeze({outerWidth:t,outerHeight:i,padding:a,availableWidth:c,availableHeight:p,vBoxMaxWidth:c/2/C,hBoxMaxHeight:p/2}),L=Object.assign({},a);Id(L,he(o));const D=Object.assign({maxPadding:L,w:c,h:p,x:a.left,y:a.top},a);My(y.concat(w),_),Ts(g.fullSize,D,_),Ts(y,D,_),Ts(w,D,_)&&Ts(y,D,_),Py(D),yc(g.leftAndTop,D,_),D.x+=D.w,D.y+=D.h,yc(g.rightAndBottom,D,_),n.chartArea={left:D.left,top:D.top,right:D.left+D.w,bottom:D.top+D.h,height:D.h,width:D.w},Pt(g.chartArea,R=>{const N=R.box;Object.assign(N,n.chartArea),N.update(D.w,D.h)})}};class Rd{acquireContext(t,i){}releaseContext(t){return!1}addEventListener(t,i,o){}removeEventListener(t,i,o){}getDevicePixelRatio(){return 1}getMaximumSize(t,i,o,a){return i=Math.max(0,i||t.width),o=o||t.height,{width:i,height:Math.max(0,a?Math.floor(i/a):o)}}isAttached(t){return!0}}class Ay extends Rd{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const qn="$chartjs",_y={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},vc=n=>n===null||n==="";function Oy(n,t){const i=n.style,o=n.getAttribute("height"),a=n.getAttribute("width");if(n[qn]={initial:{height:o,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",vc(a)){const c=nc(n,"width");c!==void 0&&(n.width=c)}
vendor: 5,813 bytes, line 18
18if(vc(o))if(n.style.height==="")n.height=n.width/(t||2);else{const c=nc(n,"height");c!==void 0&&(n.height=c)}return n}const Bd=Rb?{passive:!0}:!1;function Ly(n,t,i){n.addEventListener(t,i,Bd)}function Ey(n,t,i){n.canvas.removeEventListener(t,i,Bd)}function Dy(n,t){const i=_y[n.type]||n.type,{x:o,y:a}=Cd(n,t);return{type:i,chart:t,native:n,x:o!==void 0?o:null,y:a!==void 0?a:null}}function Iy(n,t,i){const o=n.canvas,c=o&&Ai(o)||o,p=new MutationObserver(g=>{const y=Ai(c);g.forEach(w=>{for(let C=0;C<w.addedNodes.length;C++){const _=w.addedNodes[C];(_===c||_===y)&&i(w.target)}})});return p.observe(document,{childList:!0,subtree:!0}),p}function Ry(n,t,i){const o=n.canvas,a=o&&Ai(o);if(!a)return;const c=new MutationObserver(p=>{p.forEach(g=>{for(let y=0;y<g.removedNodes.length;y++)if(g.removedNodes[y]===o){i();break}})});return c.observe(a,{childList:!0}),c}const Bs=new Map;let kc=0;function zd(){const n=window.devicePixelRatio;n!==kc&&(kc=n,Bs.forEach((t,i)=>{i.currentDevicePixelRatio!==n&&t()}))}function By(n,t){Bs.size||window.addEventListener("resize",zd),Bs.set(n,t)}function zy(n){Bs.delete(n),Bs.size||window.removeEventListener("resize",zd)}function Fy(n,t,i){const o=n.canvas,a=o&&Ai(o);if(!a)return;const c=ad((g,y)=>{const w=a.clientWidth;i(g,y),w<a.clientWidth&&i()},window),p=new ResizeObserver(g=>{const y=g[0],w=y.contentRect.width,C=y.contentRect.height;w===0&&C===0||c(w,C)});return p.observe(a),By(n,c),p}function Ur(n,t,i){i&&i.disconnect(),t==="resize"&&zy(n)}function Ny(n,t,i){const o=n.canvas,a=ad(c=>{n.ctx!==null&&i(Dy(c,n))},n,c=>{const p=c[0];return[p,p.offsetX,p.offsetY]});return Ly(o,t,a),a}class Wy extends Rd{acquireContext(t,i){const o=t&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(Oy(t,i),o):null}releaseContext(t){const i=t.canvas;if(!i[qn])return!1;const o=i[qn].initial;["height","width"].forEach(c=>{const p=o[c];Mt(p)?i.removeAttribute(c):i.setAttribute(c,p)});const a=o.style||{};return Object.keys(a).forEach(c=>{i.style[c]=a[c]}),i.width=i.width,delete i[qn],!0}addEventListener(t,i,o){this.removeEventListener(t,i);const a=t.$proxies||(t.$proxies={}),p={attach:Iy,detach:Ry,resize:Fy}[i]||Ny;a[i]=p(t,i,o)}removeEventListener(t,i){const o=t.$proxies||(t.$proxies={}),a=o[i];if(!a)return;({attach:Ur,detach:Ur,resize:Ur}[i]||Ey)(t,i,a),o[i]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,i,o,a){return Ib(t,i,o,a)}isAttached(t){const i=Ai(t);return!!(i&&Ai(i))}}class Ce{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:i,y:o}=this.getProps(["x","y"],t);return{x:i,y:o}}hasValue(){return Yi(this.x)&&Yi(this.y)}getProps(t,i){const o=this,a=this.$animations;if(!i||!a)return o;const c={};return t.forEach(p=>{c[p]=a[p]&&a[p].active()?a[p]._to:o[p]}),c}}Ce.defaults={};Ce.defaultRoutes=void 0;const Fd={values(n){return Ft(n)?n:""+n},numeric(n,t,i){if(n===0)return"0";const o=this.chart.options.locale;let a,c=n;if(i.length>1){const w=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(w<1e-4||w>1e15)&&(a="scientific"),c=Hy(n,i)}const p=xe(Math.abs(c)),g=Math.max(Math.min(-1*Math.floor(p),20),0),y={notation:a,minimumFractionDigits:g,maximumFractionDigits:g};return Object.assign(y,this.options.ticks.format),uo(n,o,y)},logarithmic(n,t,i){if(n===0)return"0";const o=n/Math.pow(10,Math.floor(xe(n)));return o===1||o===2||o===5?Fd.numeric.call(this,n,t,i):""}};function Hy(n,t){let i=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(i)>1&&n!==Math.floor(n)&&(i=n-Math.floor(n)),i}var xo={formatters:Fd};bt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,t)=>t.lineWidth,tickColor:(n,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderColor:(n,t)=>t.color,borderWidth:(n,t)=>t.lineWidth},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:xo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near"}});bt.route("scale.ticks","color","","color");bt.route("scale.grid","color","","borderColor");bt.route("scale.title","color","","color");bt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});bt.describe("scales",{_fallback:"scale"});function jy(n,t){const i=n.options.ticks,o=i.maxTicksLimit||Xy(n),a=i.major.enabled?Yy(t):[],c=a.length,p=a[0],g=a[c-1],y=[];if(c>o)return Gy(t,y,a,c/o),y;const w=Vy(a,t,o);if(c>0){let C,_;const L=c>1?Math.round((g-p)/(c-1)):null;for(Yn(t,y,w,Mt(L)?0:p-L,p),C=0,_=c-1;C<_;C++)Yn(t,y,w,a[C],a[C+1]);return Yn(t,y,w,g,Mt(L)?t.length:g+L),y}return Yn(t,y,w),y}function Xy(n){const t=n.options.offset,i=n._tickSize(),o=n._length/i+(t?0:1),a=n._maxLength/i;return Math.floor(Math.min(o,a))}function Vy(n,t,i){const o=$y(n),a=t.length/i;if(!o)return Math.max(a,1);const c=Lx(o);for(let p=0,g=c.length-1;p<g;p++){const y=c[p];if(y>a)return y}return Math.max(a,1)}function Yy(n){const t=[];let i,o;for(i=0,o=n.length;i<o;i++)n[i].major&&t.push(i);return t}function Gy(n,t,i,o){let a=0,c=i[0],p;for(o=Math.ceil(o),p=0;p<n.length;p++)p===c&&(t.push(n[p]),a++,c=i[a*o])}function Yn(n,t,i,o,a){const c=wt(o,0),p=Math.min(wt(a,n.length),n.length);let g=0,y,w,C;for(i=Math.ceil(i),a&&(y=a-o,i=y/Math.floor(y/i)),C=c;C<0;)g++,C=Math.round(c+g*i);for(w=Math.max(c,0);w<p;w++)w===C&&(t.push(n[w]),g++,C=Math.round(c+g*i))}function $y(n){const t=n.length;let i,o;if(t<2)return!1;for(o=n[0],i=1;i<t;++i)if(n[i]-n[i-1]!==o)return!1;return o}const Uy=n=>
18n==="left"?"right":n==="right"?"left":n,wc=(n,t,i)=>t==="top"||t==="left"?n[t]+i:n[t]-i;function Mc(n,t){const i=[],o=n.length/t,a=n.length;let c=0;for(;c<a;c+=o)i.push(n[Math.floor(c)]);return i}function Ky(n,t,i){const o=n.ticks.length,a=Math.min(t,o-1),c=n._startPixel,p=n._endPixel,g=1e-6;let y=n.getPixelForTick(a),w;if(!(i&&(o===1?w=Math.max(y-c,p-y):t===0?w=(n.getPixelForTick(1)-y)/2:w=(y-n.getPixelForTick(a-1))/2,y+=a<t?w:-w,y<c-g||y>p+g)))return y}function qy(n,t){Pt(n,i=>{const o=i.gc,a=o.length/2;let c;if(a>t){for(c=0;c<a;++c)delete i.data[o[c]];o.splice(0,a)}})}function ks(n){return n.drawTicks?n.tickLength:0}function Sc(n,t){if(!n.display)return 0;const i=Zt(n.font,t),o=he(n.padding);return(Ft(n.text)?n.text.length:1)*i.lineHeight+o.height}function Zy(n,t){return Object.assign(Object.create(n),{scale:t,type:"scale"})}function Qy(n,t,i){return Object.assign(Object.create(n),{tick:i,index:t,type:"tick"})}function Jy(n,t,i){let o=aa(n);return(i&&t!=="right"||!i&&t==="right")&&(o=Uy(o)),o}function t0(n,t,i,o){const{top:a,left:c,bottom:p,right:g}=n;let y=0,w,C,_;return n.isHorizontal()?(C=se(o,c,g),_=wc(n,i,t),w=g-c):(C=wc(n,i,t),_=se(o,p,a),y=i==="left"?-ie:ie),{titleX:C,titleY:_,maxWidth:w,rotation:y}}class _i extends Ce{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){const i=this;i.options=t,i.axis=t.axis,i._userMin=i.parse(t.min),i._userMax=i.parse(t.max),i._suggestedMin=i.parse(t.suggestedMin),i._suggestedMax=i.parse(t.suggestedMax)}parse(t,i){return t}getUserBounds(){let{_userMin:t,_userMax:i,_suggestedMin:o,_suggestedMax:a}=this;return t=me(t,Number.POSITIVE_INFINITY),i=me(i,Number.NEGATIVE_INFINITY),o=me(o,Number.POSITIVE_INFINITY),a=me(a,Number.NEGATIVE_INFINITY),{min:me(t,o),max:me(i,a),minDefined:Xt(t),maxDefined:Xt(i)}}getMinMax(t){const i=this;let{min:o,max:a,minDefined:c,maxDefined:p}=i.getUserBounds(),g;if(c&&p)return{min:o,max:a};const y=i.getMatchingVisibleMetas();for(let w=0,C=y.length;w<C;++w)g=y[w].controller.getMinMax(i,t),c||(o=Math.min(o,g.min)),p||(a=Math.max(a,g.max));return{min:me(o,me(a,o)),max:me(a,me(o,a))}}getPadding(){const t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Et(this.options.beforeUpdate,[this])}update(t,i,o){const a=this,c=a.options.ticks,p=c.sampleSize;a.beforeUpdate(),a.maxWidth=t,a.maxHeight=i,a._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),a.ticks=null,a._labelSizes=null,a._gridLineItems=null,a._labelItems=null,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a._maxLength=a.isHorizontal()?a.width+o.left+o.right:a.height+o.top+o.bottom,a._dataLimitsCached||(a.beforeDataLimits(),a.determineDataLimits(),a.afterDataLimits(),a._dataLimitsCached=!0),a.beforeBuildTicks(),a.ticks=a.buildTicks()||[],a.afterBuildTicks();const g=p<a.ticks.length;a._convertTicksToLabels(g?Mc(a.ticks,p):a.ticks),a.configure(),a.beforeCalculateLabelRotation(),a.calculateLabelRotation(),a.afterCalculateLabelRotation(),c.display&&(c.autoSkip||c.source==="auto")&&(a.ticks=jy(a,a.ticks),a._labelSizes=null),g&&a._convertTicksToLabels(a.ticks),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate()}configure(){const t=this;let i=t.options.reverse,o,a;t.isHorizontal()?(o=t.left,a=t.right):(o=t.top,a=t.bottom,i=!i),t._startPixel=o,t._endPixel=a,t._reversePixels=i,t._length=a-o,t._alignToPixels=t.options.alignToPixels}afterUpdate(){Et(this.options.afterUpdate,[this])}beforeSetDimensions(){Et(this.options.beforeSetDimensions,[this])}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}afterSetDimensions(){Et(this.options.afterSetDimensions,[this])}_callHooks(t){const i=this;
18i.chart.notifyPlugins(t,i.getContext()),Et(i.options[t],[i])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Et(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const i=this,o=i.options.ticks;let a,c,p;for(a=0,c=t.length;a<c;a++)p=t[a],p.label=Et(o.callback,[p.value,a,t],i)}afterTickToLabelConversion(){Et(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Et(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this,i=t.options,o=i.ticks,a=t.ticks.length,c=o.minRotation||0,p=o.maxRotation;let g=c,y,w,C;if(!t._isVisible()||!o.display||c>=p||a<=1||!t.isHorizontal()){t.labelRotation=c;return}const _=t._getLabelSizes(),L=_.widest.width,D=_.highest.height,R=Ye(t.chart.width-L,0,t.maxWidth);y=i.offset?t.maxWidth/a:R/(a-1),L+6>y&&(y=R/(a-(i.offset?.5:1)),w=t.maxHeight-ks(i.grid)-o.padding-Sc(i.title,t.chart.options.font),C=Math.sqrt(L*L+D*D),g=Zr(Math.min(Math.asin(Math.min((_.highest.height+6)/y,1)),Math.asin(Math.min(w/C,1))-Math.asin(D/C))),g=Math.max(c,Math.min(p,g))),t.labelRotation=g}afterCalculateLabelRotation(){Et(this.options.afterCalculateLabelRotation,[this])}beforeFit(){Et(this.options.beforeFit,[this])}fit(){const t=this,i={width:0,height:0},{chart:o,options:{ticks:a,title:c,grid:p}}=t,g=t._isVisible(),y=t.isHorizontal();if(g){const w=Sc(c,o.options.font);if(y?(i.width=t.maxWidth,i.height=ks(p)+w):(i.height=t.maxHeight,i.width=ks(p)+w),a.display&&t.ticks.length){const{first:C,last:_,widest:L,highest:D}=t._getLabelSizes(),R=a.padding*2,N=Xe(t.labelRotation),W=Math.cos(N),X=Math.sin(N);if(y){const V=X*L.width+W*D.height;i.height=Math.min(t.maxHeight,i.height+V+R)}else{const V=a.mirror?0:W*L.width+X*D.height;i.width=Math.min(t.maxWidth,i.width+V+R)}t._calculatePadding(C,_,X,W)}}t._handleMargins(),y?(t.width=t._length=o.width-t._margins.left-t._margins.right,t.height=i.height):(t.width=i.width,t.height=t._length=o.height-t._margins.top-t._margins.bottom)}_calculatePadding(t,i,o,a){const c=this,{ticks:{align:p,padding:g},position:y}=c.options,w=c.labelRotation!==0,C=y!=="top"&&c.axis==="x";if(c.isHorizontal()){const _=c.getPixelForTick(0)-c.left,L=c.right-c.getPixelForTick(c.ticks.length-1);let D=0,R=0;w?C?(D=a*t.width,R=o*i.height):(D=o*t.height,R=a*i.width):p==="start"?R=i.width:p==="end"?D=t.width:(D=t.width/2,R=i.width/2),c.paddingLeft=Math.max((D-_+g)*c.width/(c.width-_),0),c.paddingRight=Math.max((R-L+g)*c.width/(c.width-L),0)}else{let _=i.height/2,L=t.height/2;p==="start"?(_=0,L=t.height):p==="end"&&(_=i.height,L=0),c.paddingTop=_+g,c.paddingBottom=L+g}}_handleMargins(){const t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){Et(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:i}=this.options;return i==="top"||i==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){const i=this;i.beforeTickToLabelConversion(),i.generateTickLabels(t),i.afterTickToLabelConversion()}_getLabelSizes(){const t=this;let i=t._labelSizes;if(!i){const o=t.options.ticks.sampleSize;let a=t.ticks;o<a.length&&(a=Mc(a,o)),t._labelSizes=i=t._computeLabelSizes(a,a.length)}return i}_computeLabelSizes(t,i){const{ctx:o,_longestTextCache:a}=this,c=[],p=[];let g=0,y=0,w,C,_,L,D,R,N,W,X,V,K;for(w=0;w<i;++w){if(L=t[w].label,D=this._resolveTickFontOptions(w),o.font=R=D.string,N=a[R]=a[R]||{data:{},gc:[]},W=D.lineHeight,X=V=0,!Mt(L)&&!Ft(L))X=io(o,N.data,N.gc,X,L),V=W;else if(Ft(L))for(C=0,_=L.length;C<_;++C)K=L[C],!Mt(K)&&!Ft(K)&&(X=io(o,N.data,N.gc,X,K),V+=W);c.push(X),p.push(V),g=Math.max(X,g),y=Math.max(V,y)}qy(a,i);const $=c.indexOf(g),Z=p.indexOf(y),nt=mt=>({width:c[mt]||0,height:p[mt]||0});return{first:nt(0),last:nt(i-1),widest:nt($),highest:nt(Z)}}getLabelForValue(t){return t}getPixelForValue(t,i){return NaN}getValueForPixel(t){}getPixelForTick(t){const i=this.ticks;return t<0||t>i.length-1?null:this.getPixelForValue(i[t].value)}getPixelForDecimal(t){const i=this;i._reversePixels&&(t=1-t);const o=i._startPixel+t*i._length;return Rx(i._alignToPixels?wi(i.chart,o,0):o)}getDecimalForPixel(t){const i=(t-this._startPixel)/this._length;return this._reversePixels?1-i:i}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:i}=this;
18return t<0&&i<0?i:t>0&&i>0?t:0}getContext(t){const i=this,o=i.ticks||[];if(t>=0&&t<o.length){const a=o[t];return a.$context||(a.$context=Qy(i.getContext(),t,a))}return i.$context||(i.$context=Zy(i.chart.getContext(),i))}_tickSize(){const t=this,i=t.options.ticks,o=Xe(t.labelRotation),a=Math.abs(Math.cos(o)),c=Math.abs(Math.sin(o)),p=t._getLabelSizes(),g=i.autoSkipPadding||0,y=p?p.widest.width+g:0,w=p?p.highest.height+g:0;return t.isHorizontal()?w*a>y*c?y/a:w/c:w*c<y*a?w/a:y/c}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const i=this,o=i.axis,a=i.chart,c=i.options,{grid:p,position:g}=c,y=p.offset,w=i.isHorizontal(),_=i.ticks.length+(y?1:0),L=ks(p),D=[],R=p.setContext(i.getContext(0)),N=R.drawBorder?R.borderWidth:0,W=N/2,X=function(ht){return wi(a,ht,N)};let V,K,$,Z,nt,mt,Y,St,pt,kt,Nt,Dt;if(g==="top")V=X(i.bottom),mt=i.bottom-L,St=V-W,kt=X(t.top)+W,Dt=t.bottom;else if(g==="bottom")V=X(i.top),kt=t.top,Dt=X(t.bottom)-W,mt=V+W,St=i.top+L;else if(g==="left")V=X(i.right),nt=i.right-L,Y=V-W,pt=X(t.left)+W,Nt=t.right;else if(g==="right")V=X(i.left),pt=t.left,Nt=X(t.right)-W,nt=V+W,Y=i.left+L;else if(o==="x"){if(g==="center")V=X((t.top+t.bottom)/2+.5);else if(Tt(g)){const ht=Object.keys(g)[0],Vt=g[ht];V=X(i.chart.scales[ht].getPixelForValue(Vt))}kt=t.top,Dt=t.bottom,mt=V+W,St=mt+L}else if(o==="y"){if(g==="center")V=X((t.left+t.right)/2);else if(Tt(g)){const ht=Object.keys(g)[0],Vt=g[ht];V=X(i.chart.scales[ht].getPixelForValue(Vt))}nt=V-W,Y=nt-L,pt=t.left,Nt=t.right}for(K=0;K<_;++K){const ht=p.setContext(i.getContext(K)),Vt=ht.lineWidth,Pe=ht.color,ci=p.borderDash||[],Oi=ht.borderDashOffset,Ui=ht.tickWidth,Ge=ht.tickColor,Ys=ht.tickBorderDash||[],Gs=ht.tickBorderDashOffset;$=Ky(i,K,y),$!==void 0&&(Z=wi(a,$,Vt),w?nt=Y=pt=Nt=Z:mt=St=kt=Dt=Z,D.push({tx1:nt,ty1:mt,tx2:Y,ty2:St,x1:pt,y1:kt,x2:Nt,y2:Dt,width:Vt,color:Pe,borderDash:ci,borderDashOffset:Oi,tickWidth:Ui,tickColor:Ge,tickBorderDash:Ys,tickBorderDashOffset:Gs}))}return i._ticksLength=_,i._borderValue=V,D}_computeLabelItems(t){const i=this,o=i.axis,a=i.options,{position:c,ticks:p}=a,g=i.isHorizontal(),y=i.ticks,{align:w,crossAlign:C,padding:_}=p,L=ks(a.grid),D=L+_,R=-Xe(i.labelRotation),N=[];let W,X,V,K,$,Z,nt,mt,Y,St,pt,kt,Nt="middle";if(c==="top")Z=i.bottom-D,nt=i._getXAxisLabelAlignment();else if(c==="bottom")Z=i.top+D,nt=i._getXAxisLabelAlignment();else if(c==="left"){const ht=this._getYAxisLabelAlignment(L);nt=ht.textAlign,$=ht.x}else if(c==="right"){const ht=this._getYAxisLabelAlignment(L);nt=ht.textAlign,$=ht.x}else if(o==="x"){if(c==="center")Z=(t.top+t.bottom)/2+D;else if(Tt(c)){const ht=Object.keys(c)[0],Vt=c[ht];Z=i.chart.scales[ht].getPixelForValue(Vt)+D}nt=i._getXAxisLabelAlignment()}else if(o==="y"){if(c==="center")$=(t.left+t.right)/2-D;else if(Tt(c)){const ht=Object.keys(c)[0],Vt=c[ht];$=i.chart.scales[ht].getPixelForValue(Vt)}nt=this._getYAxisLabelAlignment(L).textAlign}o==="y"&&(w==="start"?Nt="top":w==="end"&&(Nt="bottom"));const Dt=i._getLabelSizes();for(W=0,X=y.length;W<X;++W){V=y[W],K=V.label;const ht=p.setContext(i.getContext(W));mt=i.getPixelForTick(W)+p.labelOffset,Y=i._resolveTickFontOptions(W),St=Y.lineHeight,pt=Ft(K)?K.length:1;const Vt=pt/2,Pe=ht.color,ci=ht.textStrokeColor,Oi=ht.textStrokeWidth;g?($=mt,c==="top"?C==="near"||R!==0?kt=-pt*St+St/2:C==="center"?kt=-Dt.highest.height/2-Vt*St+St:kt=-Dt.highest.height+St/2:C==="near"||R!==0?kt=St/2:C==="center"?kt=Dt.highest.height/2-Vt*St:kt=Dt.highest.height-pt*St):(Z=mt,kt=(1-pt)*St/2),N.push({rotation:R,label:K,font:Y,color:Pe,strokeColor:ci,strokeWidth:Oi,textOffset:kt,textAlign:nt,textBaseline:Nt,translation:[$,Z]})}return N}_getXAxisLabelAlignment(){const t=this,{position:i,ticks:o}=t.options;if(-Xe(t.labelRotation))return i==="top"?"left":"right";let c="center";return o.align==="start"?c="left":o.align==="end"&&(c="right"),c}_getYAxisLabelAlignment(t){const i=this,{position:o,ticks:{crossAlign:a,mirror:c,padding:p}}=i.options,g=i._getLabelSizes(),y=t+p,w=g.widest.width;let C,_;return o==="left"?c?(C="left",_=i.right-p):(_=i.right-y,a==="near"?C="right":a==="center"?(C="center",_-=w/2):(C="left",_=i.left)):o==="right"?c?(C="right",_=i.left+p):(_=i.left+y,a==="near"?C="left":a==="center"?(C="center",_+=w/2):(C="right",_=i.right)):C="right",{textAlign:C,x:_}}_computeLabelArea(){const t=this;if(t.options.ticks.mirror)return;const i=t.chart,o=t.options.position;if(o==="left"||o==="right")return{top:0,left:t.left,bottom:i.height,right:t.right};
18if(o==="top"||o==="bottom")return{top:t.top,left:0,bottom:t.bottom,right:i.width}}drawBackground(){const{ctx:t,options:{backgroundColor:i},left:o,top:a,width:c,height:p}=this;i&&(t.save(),t.fillStyle=i,t.fillRect(o,a,c,p),t.restore())}getLineWidthForValue(t){const i=this,o=i.options.grid;if(!i._isVisible()||!o.display)return 0;const c=i.ticks.findIndex(p=>p.value===t);return c>=0?o.setContext(i.getContext(c)).lineWidth:0}drawGrid(t){const i=this,o=i.options.grid,a=i.ctx,c=i.chart,p=o.setContext(i.getContext(0)),g=o.drawBorder?p.borderWidth:0,y=i._gridLineItems||(i._gridLineItems=i._computeGridLineItems(t));let w,C;const _=(L,D,R)=>{!R.width||!R.color||(a.save(),a.lineWidth=R.width,a.strokeStyle=R.color,a.setLineDash(R.borderDash||[]),a.lineDashOffset=R.borderDashOffset,a.beginPath(),a.moveTo(L.x,L.y),a.lineTo(D.x,D.y),a.stroke(),a.restore())};if(o.display)for(w=0,C=y.length;w<C;++w){const L=y[w];o.drawOnChartArea&&_({x:L.x1,y:L.y1},{x:L.x2,y:L.y2},L),o.drawTicks&&_({x:L.tx1,y:L.ty1},{x:L.tx2,y:L.ty2},{color:L.tickColor,width:L.tickWidth,borderDash:L.tickBorderDash,borderDashOffset:L.tickBorderDashOffset})}if(g){const L=o.setContext(i.getContext(i._ticksLength-1)),D=L.lineWidth,R=i._borderValue;let N,W,X,V;i.isHorizontal()?(N=wi(c,i.left,g)-g/2,W=wi(c,i.right,D)+D/2,X=V=R):(X=wi(c,i.top,g)-g/2,V=wi(c,i.bottom,D)+D/2,N=W=R),_({x:N,y:X},{x:W,y:V},{width:g,color:L.borderColor})}}drawLabels(t){const i=this;if(!i.options.ticks.display)return;const a=i.ctx,c=i._computeLabelArea();c&&Fs(a,c);const p=i._labelItems||(i._labelItems=i._computeLabelItems(t));let g,y;for(g=0,y=p.length;g<y;++g){const w=p[g],C=w.font,_=w.label;let L=w.textOffset;Ti(a,_,0,L,C,w)}c&&Ns(a)}drawTitle(){const{ctx:t,options:{position:i,title:o,reverse:a}}=this;if(!o.display)return;const c=Zt(o.font),p=he(o.padding),g=o.align;let y=c.lineHeight/2;i==="bottom"?(y+=p.bottom,Ft(o.text)&&(y+=c.lineHeight*(o.text.length-1))):y+=p.top;const{titleX:w,titleY:C,maxWidth:_,rotation:L}=t0(this,y,i,g);Ti(t,o.text,0,0,c,{color:o.color,maxWidth:_,rotation:L,textAlign:Jy(g,i,a),textBaseline:"middle",translation:[w,C]})}draw(t){const i=this;i._isVisible()&&(i.drawBackground(),i.drawGrid(t),i.drawTitle(),i.drawLabels(t))}_layers(){const t=this,i=t.options,o=i.ticks&&i.ticks.z||0,a=i.grid&&i.grid.z||0;return!t._isVisible()||o===a||t.draw!==_i.prototype.draw?[{z:o,draw(c){t.draw(c)}}]:[{z:a,draw(c){t.drawBackground(),t.drawGrid(c),t.drawTitle()}},{z:o,draw(c){t.drawLabels(c)}}]}getMatchingVisibleMetas(t){const i=this,o=i.chart.getSortedVisibleDatasetMetas(),a=i.axis+"AxisID",c=[];let p,g;for(p=0,g=o.length;p<g;++p){const y=o[p];y[a]===i.id&&(!t||y.type===t)&&c.push(y)}return c}_resolveTickFontOptions(t){const i=this.options.ticks.setContext(this.getContext(t));return Zt(i.font)}}class Gn{constructor(t,i,o){this.type=t,this.scope=i,this.override=o,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const i=this,o=Object.getPrototypeOf(t);let a;s0(o)&&(a=i.register(o));const c=i.items,p=t.id,g=i.scope+"."+p;if(!p)throw new Error("class does not have id: "+t);return p in c||(c[p]=t,e0(t,g,a),i.override&&bt.override(t.id,t.overrides)),g}get(t){return this.items[t]}unregister(t){const i=this.items,o=t.id,a=this.scope;o in i&&delete i[o],a&&o in bt[a]&&(delete bt[a][o],this.override&&delete Pi[o])}}function e0(n,t,i){const o=Ds(Object.create(null),[i?bt.get(i):{},bt.get(t),n.defaults]);bt.set(t,o),n.defaultRoutes&&i0(t,n.defaultRoutes),n.descriptors&&bt.describe(t,n.descriptors)}function i0(n,t){Object.keys(t).forEach(i=>{const o=i.split("."),a=o.pop(),c=[n].concat(o).join("."),p=t[i].split("."),g=p.pop(),y=p.join(".");bt.route(c,a,y,g)})}function s0(n){return"id"in n&&"defaults"in n}class n0{constructor(){this.controllers=new Gn(Re,"datasets",!0),this.elements=new Gn(Ce,"elements"),this.plugins=new Gn(Object,"plugins"),this.scales=new Gn(_i,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}
vendor: 4,878 bytes, line 18
18removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,i,o){const a=this;[...i].forEach(c=>{const p=o||a._getRegistryForType(c);o||p.isForType(c)||p===a.plugins&&c.id?a._exec(t,p,c):Pt(c,g=>{const y=o||a._getRegistryForType(g);a._exec(t,y,g)})})}_exec(t,i,o){const a=la(t);Et(o["before"+a],[],o),i[t](o),Et(o["after"+a],[],o)}_getRegistryForType(t){for(let i=0;i<this._typedRegistries.length;i++){const o=this._typedRegistries[i];if(o.isForType(t))return o}return this.plugins}_get(t,i,o){const a=i.get(t);if(a===void 0)throw new Error('"'+t+'" is not a registered '+o+".");return a}}var Ve=new n0;class o0{constructor(){this._init=[]}notify(t,i,o){const a=this;i==="beforeInit"&&(a._init=a._createDescriptors(t,!0),a._notify(a._init,t,"install"));const c=a._descriptors(t),p=a._notify(c,t,i,o);return i==="destroy"&&(a._notify(c,t,"stop"),a._notify(a._init,t,"uninstall")),p}_notify(t,i,o,a){a=a||{};for(const c of t){const p=c.plugin,g=p[o],y=[i,a,c.options];if(Et(g,y,p)===!1&&a.cancelable)return!1}return!0}invalidate(){Mt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const i=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),i}_createDescriptors(t,i){const o=t&&t.config,a=wt(o.options&&o.options.plugins,{}),c=r0(o);return a===!1&&!i?[]:l0(t,c,a,i)}_notifyStateChanges(t){const i=this._oldCache||[],o=this._cache,a=(c,p)=>c.filter(g=>!p.some(y=>g.plugin.id===y.plugin.id));this._notify(a(i,o),t,"stop"),this._notify(a(o,i),t,"start")}}function r0(n){const t=[],i=Object.keys(Ve.plugins.items);for(let a=0;a<i.length;a++)t.push(Ve.getPlugin(i[a]));const o=n.plugins||[];for(let a=0;a<o.length;a++){const c=o[a];t.indexOf(c)===-1&&t.push(c)}return t}function a0(n,t){return!t&&n===!1?null:n===!0?{}:n}function l0(n,t,i,o){const a=[],c=n.getContext();for(let p=0;p<t.length;p++){const g=t[p],y=g.id,w=a0(i[y],o);w!==null&&a.push({plugin:g,options:h0(n.config,g,w,c)})}return a}function h0(n,t,i,o){const a=n.pluginScopeKeys(t),c=n.getOptionScopes(i,a);return n.createResolver(c,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ia(n,t){const i=bt.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||i.indexAxis||"x"}function c0(n,t){let i=n;return n==="_index_"?i=t:n==="_value_"&&(i=t==="x"?"y":"x"),i}function d0(n,t){return n===t?"_index_":"_value_"}function u0(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function sa(n,t){return n==="x"||n==="y"?n:t.axis||u0(t.position)||n.charAt(0).toLowerCase()}function f0(n,t){const i=Pi[n.type]||{scales:{}},o=t.scales||{},a=ia(n.type,t),c=Object.create(null),p=Object.create(null);return Object.keys(o).forEach(g=>{const y=o[g],w=sa(g,y),C=d0(w,a),_=i.scales||{};c[w]=c[w]||g,p[g]=As(Object.create(null),[{axis:w},y,_[w],_[C]])}),n.data.datasets.forEach(g=>{const y=g.type||n.type,w=g.indexAxis||ia(y,t),_=(Pi[y]||{}).scales||{};Object.keys(_).forEach(L=>{const D=c0(L,w),R=g[D+"AxisID"]||c[D]||D;p[R]=p[R]||Object.create(null),As(p[R],[{axis:D},o[R],_[L]])})}),Object.keys(p).forEach(g=>{const y=p[g];As(y,[bt.scales[y.type],bt.scale])}),p}function Nd(n){const t=n.options||(n.options={});t.plugins=wt(t.plugins,{}),t.scales=f0(n,t)}function p0(n){n=n||{};const t=n.data=n.data||{datasets:[],labels:[]};return t.datasets=t.datasets||[],t.labels=t.labels||[],Nd(n),n}const Cc=new Map,Wd=new Set;function $n(n,t){let i=Cc.get(n);return i||(i=t(),Cc.set(n,i),Wd.add(i)),i}const ws=(n,t,i)=>{const o=ai(t,i);o!==void 0&&n.add(o)};class g0{constructor(t){this._config=p0(t),this._scopeCache=new Map,this._resolverCache=new Map}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=t}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Nd(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return $n(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,i){return $n(`${t}.transition.${i}`,()=>[[`datasets.${t}.transitions.${i}`,`transitions.${i}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,i){return $n(`${t}-${i}`,()=>[[`datasets.${t}.elements.${i}`,`datasets.${t}`,`elements.${i}`,""]])}pluginScopeKeys(t){const i=t.id,o=this.type;return $n(`${o}-plugin-${i}`,()=>[[`plugins.${i}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,i){const o=this._scopeCache;let a=o.get(t);return(!a||i)&&(a=new Map,o.set(t,a)),a}getOptionScopes(t,i,o){const{options:a,type:c}=this,p=this._cachedScopes(t,o),g=p.get(i);if(g)return g;const y=new Set;
18i.forEach(C=>{t&&(y.add(t),C.forEach(_=>ws(y,t,_))),C.forEach(_=>ws(y,a,_)),C.forEach(_=>ws(y,Pi[c]||{},_)),C.forEach(_=>ws(y,bt,_)),C.forEach(_=>ws(y,ta,_))});const w=[...y];return Wd.has(i)&&p.set(i,w),w}chartOptionScopes(){const{options:t,type:i}=this;return[t,Pi[i]||{},bt.datasets[i]||{},{type:i},bt,ta]}resolveNamedOptions(t,i,o,a=[""]){const c={$shared:!0},{resolver:p,subPrefixes:g}=Pc(this._resolverCache,t,a);let y=p;if(m0(p,i)){c.$shared=!1,o=Vi(o)?o():o;const w=this.createResolver(t,o,g);y=Gi(p,o,w)}for(const w of i)c[w]=y[w];return c}createResolver(t,i,o=[""],a){const{resolver:c}=Pc(this._resolverCache,t,o);return Tt(i)?Gi(c,i,void 0,a):c}}function Pc(n,t,i){let o=n.get(t);o||(o=new Map,n.set(t,o));const a=i.join();let c=o.get(a);return c||(c={resolver:fa(t,i),subPrefixes:i.filter(g=>!g.toLowerCase().includes("hover"))},o.set(a,c)),c}function m0(n,t){const{isScriptable:i,isIndexable:o}=vd(n);for(const a of t)if(i(a)&&Vi(n[a])||o(a)&&Ft(n[a]))return!0;return!1}var x0="3.0.0";const b0=["top","bottom","left","right","chartArea"];function Tc(n,t){return n==="top"||n==="bottom"||b0.indexOf(n)===-1&&t==="x"}function Ac(n,t){return function(i,o){return i[n]===o[n]?i[t]-o[t]:i[n]-o[n]}}function _c(n){const t=n.chart,i=t.options.animation;t.notifyPlugins("afterRender"),Et(i&&i.onComplete,[n],t)}function y0(n){const t=n.chart,i=t.options.animation;Et(i&&i.onProgress,[n],t)}function Hd(){return typeof window<"u"&&typeof document<"u"}function jd(n){return Hd()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const oo={},Xd=n=>{const t=jd(n);return Object.values(oo).filter(i=>i.canvas===t).pop()};let bo=class{constructor(t,i){const o=this;this.config=i=new g0(i);const a=jd(t),c=Xd(a);if(c)throw new Error("Canvas is already in use. Chart with ID '"+c.id+"' must be destroyed before the canvas can be reused.");const p=i.createResolver(i.chartOptionScopes(),o.getContext());this.platform=o._initializePlatform(a,i);const g=o.platform.acquireContext(a,p.aspectRatio),y=g&&g.canvas,w=y&&y.height,C=y&&y.width;if(this.id=Mx(),this.ctx=g,this.canvas=y,this.width=C,this.height=w,this._options=p,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._sortedMetasets=[],this.scales={},this.scale=void 0,this._plugins=new o0,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=kx(()=>this.update("resize"),p.resizeDelay||0),oo[o.id]=o,!g||!y){console.error("Failed to create chart: can't acquire context from the given item");return}He.listen(o,"complete",_c),He.listen(o,"progress",y0),o._initialize(),o.attached&&o.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:i},width:o,height:a,_aspectRatio:c}=this;return Mt(t)?i&&c?c:a?o/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){const t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():sc(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}_initializePlatform(t,i){return i.platform?new i.platform:!Hd()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?new Ay:new Wy}clear(){return Jh(this.canvas,this.ctx),this}stop(){return He.stop(this),this}resize(t,i){He.running(this)?this._resizeBeforeDraw={width:t,height:i}:this._resize(t,i)}_resize(t,i){const o=this,a=o.options,c=o.canvas,p=a.maintainAspectRatio&&o.aspectRatio,g=o.platform.getMaximumSize(c,t,i,p),y=o.currentDevicePixelRatio,w=a.devicePixelRatio||o.platform.getDevicePixelRatio();o.width===g.width&&o.height===g.height&&y===w||(o.width=g.width,o.height=g.height,o._aspectRatio=o.aspectRatio,sc(o,w,!0),o.notifyPlugins("resize",{size:g}),Et(a.onResize,[o,g],o),o.attached&&o._doResize()&&o.render())}ensureScalesHaveIDs(){const i=this.options.scales||{};Pt(i,(o,a)=>{o.id=a})}buildOrUpdateScales(){const t=this,i=t.options,o=i.scales,a=t.scales,c=Object.keys(a).reduce((g,y)=>(g[y]=!1,g),{});let p=[];o&&(p=p.concat(Object.keys(o).map(g=>{const y=o[g],w=sa(g,y),C=w==="r",_=w==="x";return{options:y,dposition:C?"chartArea":_?"bottom":"left",dtype:C?"radialLinear":_?"category":"linear"}}))),Pt(p,g=>{const y=g.options,w=y.id,C=sa(w,y),_=wt(y.type,g.dtype);(y.position===void 0||Tc(y.position,C)!==Tc(g.dposition))&&(y.position=g.dposition),c[w]=!0;let L=null;if(w in a&&a[w].type===_)L=a[w];else{const D=Ve.getScale(_);L=new D({id:w,type:_,ctx:t.ctx,chart:t}),a[L.id]=L}L.init(y,i)}
18),Pt(c,(g,y)=>{g||delete a[y]}),Pt(a,g=>{be.configure(t,g,g.options),be.addBox(t,g)})}_updateMetasetIndex(t,i){const o=this._metasets,a=t.index;a!==i&&(o[a]=o[i],o[i]=t,t.index=i)}_updateMetasets(){const t=this,i=t._metasets,o=t.data.datasets.length,a=i.length;if(a>o){for(let c=o;c<a;++c)t._destroyDatasetMeta(c);i.splice(o,a-o)}t._sortedMetasets=i.slice(0).sort(Ac("order","index"))}_removeUnreferencedMetasets(){const t=this,{_metasets:i,data:{datasets:o}}=t;i.length>o.length&&delete t._stacks,i.forEach((a,c)=>{o.filter(p=>p===a._dataset).length===0&&t._destroyDatasetMeta(c)})}buildOrUpdateControllers(){const t=this,i=[],o=t.data.datasets;let a,c;for(t._removeUnreferencedMetasets(),a=0,c=o.length;a<c;a++){const p=o[a];let g=t.getDatasetMeta(a);const y=p.type||t.config.type;if(g.type&&g.type!==y&&(t._destroyDatasetMeta(a),g=t.getDatasetMeta(a)),g.type=y,g.indexAxis=p.indexAxis||ia(y,t.options),g.order=p.order||0,t._updateMetasetIndex(g,a),g.label=""+p.label,g.visible=t.isDatasetVisible(a),g.controller)g.controller.updateIndex(a),g.controller.linkScales();else{const w=Ve.getController(y),{datasetElementType:C,dataElementType:_}=bt.datasets[y];Object.assign(w.prototype,{dataElementType:Ve.getElement(_),datasetElementType:C&&Ve.getElement(C)}),g.controller=new w(t,a),i.push(g.controller)}}return t._updateMetasets(),i}_resetElements(){const t=this;Pt(t.data.datasets,(i,o)=>{t.getDatasetMeta(o).controller.reset()},t)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const i=this,o=i.config;o.update(),i._options=o.createResolver(o.chartOptionScopes(),i.getContext()),Pt(i.scales,g=>{be.removeBox(i,g)});const a=i._animationsDisabled=!i.options.animation;if(i.ensureScalesHaveIDs(),i.buildOrUpdateScales(),i._plugins.invalidate(),i.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const c=i.buildOrUpdateControllers();i.notifyPlugins("beforeElementsUpdate");let p=0;for(let g=0,y=i.data.datasets.length;g<y;g++){const{controller:w}=i.getDatasetMeta(g),C=!a&&c.indexOf(w)===-1;w.buildOrUpdateElements(C),p=Math.max(+w.getMaxOverflow(),p)}i._minPadding=p,i._updateLayout(p),a||Pt(c,g=>{g.reset()}),i._updateDatasets(t),i.notifyPlugins("afterUpdate",{mode:t}),i._layers.sort(Ac("z","_idx")),i._lastEvent&&i._eventHandler(i._lastEvent,!0),i.render()}_updateLayout(t){const i=this;if(i.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;be.update(i,i.width,i.height,t);const o=i.chartArea,a=o.width<=0||o.height<=0;i._layers=[],Pt(i.boxes,c=>{a&&c.position==="chartArea"||(c.configure&&c.configure(),i._layers.push(...c._layers()))},i),i._layers.forEach((c,p)=>{c._idx=p}),i.notifyPlugins("afterLayout")}_updateDatasets(t){const i=this,o=typeof t=="function";if(i.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let a=0,c=i.data.datasets.length;a<c;++a)i._updateDataset(a,o?t({datasetIndex:a}):t);i.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,i){const o=this,a=o.getDatasetMeta(t),c={meta:a,index:t,mode:i,cancelable:!0};o.notifyPlugins("beforeDatasetUpdate",c)!==!1&&(a.controller._update(i),c.cancelable=!1,o.notifyPlugins("afterDatasetUpdate",c))}render(){const t=this;t.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(He.has(t)?t.attached&&!He.running(t)&&He.start(t):(t.draw(),_c({chart:t})))}draw(){const t=this;let i;if(t._resizeBeforeDraw){const{width:a,height:c}=t._resizeBeforeDraw;t._resize(a,c),t._resizeBeforeDraw=null}if(t.clear(),t.width<=0||t.height<=0||t.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const o=t._layers;for(i=0;i<o.length&&o[i].z<=0;++i)o[i].draw(t.chartArea);for(t._drawDatasets();i<o.length;++i)o[i].draw(t.chartArea);t.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const o=this._sortedMetasets,a=[];let c,p;for(c=0,p=o.length;c<p;++c){const g=o[c];(!t||g.visible)&&a.push(g)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){const t=this;if(t.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const i=t.getSortedVisibleDatasetMetas();for(let o=i.length-1;o>=0;
18--o)t._drawDataset(i[o]);t.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const i=this,o=i.ctx,a=t._clip,c=i.chartArea,p={meta:t,index:t.index,cancelable:!0};i.notifyPlugins("beforeDatasetDraw",p)!==!1&&(Fs(o,{left:a.left===!1?0:c.left-a.left,right:a.right===!1?i.width:c.right+a.right,top:a.top===!1?0:c.top-a.top,bottom:a.bottom===!1?i.height:c.bottom+a.bottom}),t.controller.draw(),Ns(o),p.cancelable=!1,i.notifyPlugins("afterDatasetDraw",p))}getElementsAtEventForMode(t,i,o,a){const c=vy.modes[i];return typeof c=="function"?c(this,t,o,a):[]}getDatasetMeta(t){const i=this,o=i.data.datasets[t],a=i._metasets;let c=a.filter(p=>p&&p._dataset===o).pop();return c||(c=a[t]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:o&&o.order||0,index:t,_dataset:o,_parsed:[],_sorted:!1}),c}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const i=this.data.datasets[t];if(!i)return!1;const o=this.getDatasetMeta(t);return typeof o.hidden=="boolean"?!o.hidden:!i.hidden}setDatasetVisibility(t,i){const o=this.getDatasetMeta(t);o.hidden=!i}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateDatasetVisibility(t,i){const o=this,a=i?"show":"hide",c=o.getDatasetMeta(t),p=c.controller._resolveAnimations(void 0,a);o.setDatasetVisibility(t,i),p.update(c,{visible:i}),o.update(g=>g.datasetIndex===t?a:void 0)}hide(t){this._updateDatasetVisibility(t,!1)}show(t){this._updateDatasetVisibility(t,!0)}_destroyDatasetMeta(t){const i=this,o=i._metasets&&i._metasets[t];o&&o.controller&&(o.controller._destroy(),delete i._metasets[t])}destroy(){const t=this,{canvas:i,ctx:o}=t;let a,c;for(t.stop(),He.remove(t),a=0,c=t.data.datasets.length;a<c;++a)t._destroyDatasetMeta(a);t.config.clearCache(),i&&(t.unbindEvents(),Jh(i,o),t.platform.releaseContext(o),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete oo[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){const t=this,i=t._listeners,o=t.platform,a=(g,y)=>{o.addEventListener(t,g,y),i[g]=y},c=(g,y)=>{i[g]&&(o.removeEventListener(t,g,y),delete i[g])};let p=function(g,y,w){g.offsetX=y,g.offsetY=w,t._eventHandler(g)};if(Pt(t.options.events,g=>a(g,p)),t.options.responsive){p=(w,C)=>{t.canvas&&t.resize(w,C)};let g;const y=()=>{c("attach",y),t.attached=!0,t.resize(),a("resize",p),a("detach",g)};g=()=>{t.attached=!1,c("resize",p),a("attach",y)},o.isAttached(t.canvas)?y():g()}else t.attached=!0}unbindEvents(){const t=this,i=t._listeners;i&&(delete t._listeners,Pt(i,(o,a)=>{t.platform.removeEventListener(t,a,o)}))}updateHoverStyle(t,i,o){const a=o?"set":"remove";let c,p,g,y;for(i==="dataset"&&(c=this.getDatasetMeta(t[0].datasetIndex),c.controller["_"+a+"DatasetHoverStyle"]()),g=0,y=t.length;g<y;++g){p=t[g];const w=p&&this.getDatasetMeta(p.datasetIndex).controller;w&&w[a+"HoverStyle"](p.element,p.datasetIndex,p.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const i=this,o=i._active||[],a=t.map(({datasetIndex:p,index:g})=>{const y=i.getDatasetMeta(p);if(!y)throw new Error("No dataset found at index "+p);return{datasetIndex:p,element:y.data[g],index:g}});!Zn(a,o)&&(i._active=a,i._updateHoverStyles(a,o))}notifyPlugins(t,i){return this._plugins.notify(this,t,i)}_updateHoverStyles(t,i,o){const a=this,c=a.options.hover,p=(w,C)=>w.filter(_=>!C.some(L=>_.datasetIndex===L.datasetIndex&&_.index===L.index)),g=p(i,t),y=o?t:p(t,i);g.length&&a.updateHoverStyle(g,c.mode,!1),y.length&&c.mode&&a.updateHoverStyle(y,c.mode,!0)}_eventHandler(t,i){const o=this,a={event:t,replay:i,cancelable:!0};if(o.notifyPlugins("beforeEvent",a)===!1)return;const c=o._handleEvent(t,i);return a.cancelable=!1,o.notifyPlugins("afterEvent",a),(c||a.changed)&&o.render(),o}_handleEvent(t,i){const o=this,{_active:a=[],options:c}=o,p=c.hover,g=i;let y=[],w=!1,C=null;return t.type!=="mouseout"&&(y=o.getElementsAtEventForMode(t,p.mode,p,g),C=t.type==="click"?o._lastEvent:t),o._lastEvent=null,Et(c.onHover,[t,y,o],o),(t.type==="mouseup"||t.type==="click"||t.type==="contextmenu")&&Rs(t,o.chartArea,o._minPadding)&&Et(c.onClick,[t,y,o],o),w=!Zn(y,a),(w||i)&&(o._active=y,o._updateHoverStyles(y,a,i)),o._lastEvent=C,w}};const Oc=()=>Pt(bo.instances,n=>n._plugins.invalidate()),oi=!0;Object.defineProperties(bo,{defaults:{enumerable:oi,value:bt},instances:{enumerable:oi,value:oo},overrides:{enumerable:oi,value:Pi},registry:{enumerable:oi,value:Ve},version:{enumerable:oi,value:x0},getChart:{enumerable:oi,value:Xd},register:{enumerable:oi,value:(...n)=>{Ve.add(...n),Oc()}},unregister:{enumerable:oi,value:(...n)=>{Ve.remove(...n),Oc()}}});function Vd(n,t){const{startAngle:i,endAngle:o,pixelMargin:a,x:c,y:p,outerRadius:g,innerRadius:y}=t;let w=a/g;n.beginPath(),n.arc(c,p,g,i-w,o+w),y>a?(w=a/y,n.arc(c,p,y,o+w,i-w,!0)):n.arc(c,p,a,o+ie,i-ie),n.closePath(),n.clip()}function Lc(n,t){const{x:i,y:o,startAngle:a,endAngle:c,pixelMargin:p}=t,g=Math.max(t.outerRadius-p,0),y=t.innerRadius+p;n.beginPath(),n.arc(i,o,g,a,c),n.arc(i,o,y,c,a,!0),n.closePath()}function v0(n,t){if(t.fullCircles){t.endAngle=t.startAngle+Ot,Lc(n,t);for(let i=0;i<t.fullCircles;++i)n.fill()}isNaN(t.circumference)||(t.endAngle=t.startAngle+t.circumference%Ot),Lc(n,t),n.fill()}function k0(n,t,i){const{x:o,y:a,startAngle:c,endAngle:p,pixelMargin:g}=t,y=Math.max(t.outerRadius-g,0),w=t.innerRadius+g;let C;for(i&&(t.endAngle=t.startAngle+Ot,Vd(n,t),t.endAngle=p,t.endAngle===t.startAngle&&(t.endAngle+=Ot,t.fullCircles--)),n.beginPath(),n.arc(o,a,w,c+Ot,c,!0),C=0;C<t.fullCircles;++C)n.stroke();for(n.beginPath(),n.arc(o,a,y,c,c+Ot),C=0;C<t.fullCircles;++C)n.stroke()}function w0(n,t){const{x:i,y:o,startAngle:a,endAngle:c,pixelMargin:p,options:g}=t,y=t.outerRadius,w=t.innerRadius+p,C=g.borderAlign==="inner";g.borderWidth&&(C?(n.lineWidth=g.borderWidth*2,n.lineJoin="round"):(n.lineWidth=g.borderWidth,n.lineJoin="bevel"),t.fullCircles&&k0(n,t,C),C&&Vd(n,t),n.beginPath(),n.arc(i,o,y,a,c),n.arc(i,o,w,c,a,!0),n.closePath(),n.stroke())}class yo extends Ce{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,i,o){const a=this.getProps(["x","y"],o),{angle:c,distance:p}=Dx(a,{x:t,y:i}),{startAngle:g,endAngle:y,innerRadius:w,outerRadius:C,circumference:_}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],o),L=_>=Ot||to(c,g,y),D=p>=w&&p<=C;return L&&D}getCenterPoint(t){const{x:i,y:o,startAngle:a,endAngle:c,innerRadius:p,outerRadius:g}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),y=(a+c)/2,w=(p+g)/2;return{x:i+Math.cos(y)*w,y:o+Math.sin(y)*w}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const i=this,o=i.options,a=o.offset||0;if(i.pixelMargin=o.borderAlign==="inner"?.33:0,i.fullCircles=Math.floor(i.circumference/Ot),!(i.circumference===0||i.innerRadius<0||i.outerRadius<0)){if(t.save(),a&&i.circumference<Ot){const c=(i.startAngle+i.endAngle)/2;t.translate(Math.cos(c)*a,Math.sin(c)*a)}t.fillStyle=o.backgroundColor,t.strokeStyle=o.borderColor,v0(t,i),w0(t,i),t.restore(
18)}}}yo.id="arc";yo.defaults={borderAlign:"center",borderColor:"#fff",borderWidth:2,offset:0,angle:void 0};yo.defaultRoutes={backgroundColor:"backgroundColor"};function M0(n,t){n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor}function S0(n,t,i){n.lineTo(i.x,i.y)}function C0(n){return n.stepped?nb:n.tension?ob:S0}function Yd(n,t,i){i=i||{};const o=n.length,a=Math.max(i.start||0,t.start),c=Math.min(i.end||o-1,t.end);return{count:o,start:a,loop:t.loop,ilen:c<a?o+c-a:c-a}}function P0(n,t,i,o){const{points:a,options:c}=t,{count:p,start:g,loop:y,ilen:w}=Yd(a,i,o),C=C0(c);let{move:_=!0,reverse:L}=o||{},D,R,N;for(D=0;D<=w;++D)R=a[(g+(L?w-D:D))%p],!R.skip&&(_?(n.moveTo(R.x,R.y),_=!1):C(n,N,R,L,c.stepped),N=R);return y&&(R=a[(g+(L?w:0))%p],C(n,N,R,L,c.stepped)),!!y}function T0(n,t,i,o){const a=t.points,{count:c,start:p,ilen:g}=Yd(a,i,o),{move:y=!0,reverse:w}=o||{};let C=0,_=0,L,D,R,N,W,X;const V=$=>(p+(w?g-$:$))%c,K=()=>{N!==W&&(n.lineTo(C,W),n.lineTo(C,N),n.lineTo(C,X))};for(y&&(D=a[V(0)],n.moveTo(D.x,D.y)),L=0;L<=g;++L){if(D=a[V(L)],D.skip)continue;const $=D.x,Z=D.y,nt=$|0;nt===R?(Z<N?N=Z:Z>W&&(W=Z),C=(_*C+$)/++_):(K(),n.lineTo($,Z),R=nt,_=0,N=W=Z),X=Z}K()}function Ec(n){const t=n.options,i=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&!t.stepped&&!i?T0:P0}function A0(n){return n.stepped?Bb:n.tension?zb:Si}function _0(n,t,i,o){let a=t._path;a||(a=t._path=new Path2D,t.path(a,i,o)&&a.closePath()),n.stroke(a)}function O0(n,t,i,o){n.beginPath(),t.path(n,i,o)&&n.closePath(),n.stroke()}const L0=typeof Path2D=="function",E0=L0?_0:O0;class hi extends Ce{constructor(t){super(),this.animated=!0,this.options=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,t&&Object.assign(this,t)}updateControlPoints(t){const i=this,o=i.options;if(o.tension&&!o.stepped&&!i._pointsUpdated){const a=o.spanGaps?i._loop:i._fullLoop;Ab(i._points,o,t,a),i._pointsUpdated=!0}}set points(t){const i=this;i._points=t,delete i._segments,delete i._path,i._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Vb(this))}first(){const t=this.segments,i=this.points;return t.length&&i[t[0].start]}last(){const t=this.segments,i=this.points,o=t.length;return o&&i[t[o-1].end]}interpolate(t,i){const o=this,a=o.options,c=t[i],p=o.points,g=Od(o,{property:i,start:c,end:c});if(!g.length)return;const y=[],w=A0(a);let C,_;for(C=0,_=g.length;C<_;++C){const{start:L,end:D}=g[C],R=p[L],N=p[D];if(R===N){y.push(R);continue}const W=Math.abs((c-R[i])/(N[i]-R[i])),X=w(R,N,W,a.stepped);X[i]=t[i],y.push(X)}return y.length===1?y[0]:y}pathSegment(t,i,o){return Ec(this)(t,this,i,o)}path(t,i,o){const a=this,c=a.segments,p=c.length,g=Ec(a);let y=a._loop;i=i||0,o=o||a.points.length-i;for(let w=0;w<p;++w)y&=g(t,a,c[w],{start:i,end:i+o-1});return!!y}draw(t,i,o,a){const c=this,p=c.options||{};!(c.points||[]).length||!p.borderWidth||(t.save(),M0(t,p),E0(t,c,o,a),t.restore(),c.animated&&(c._pointsUpdated=!1,c._path=void 0))}}hi.id="line";hi.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};hi.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};hi.descriptors={_scriptable:!0,_indexable:n=>n!=="borderDash"&&n!=="fill"};function Dc(n,t,i,o){const a=n.options,{[i]:c}=n.getProps([i],o);return Math.abs(t-c)<a.radius+a.hitRadius}class vo extends Ce{constructor(t){super(),this.options=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,i,o){const a=this.options,{x:c,y:p}=this.getProps(["x","y"],o);return Math.pow(t-c,2)+Math.pow(i-p,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(t,i){return Dc(this,t,"x",i)}inYRange(t,i){return Dc(this,t,"y",i)}getCenterPoint(t){const{x:i,y:o}=this.getProps(["x","y"],t);return{x:i,y:o}}size(t){t=t||this.options||{};let i=t.radius||0;i=Math.max(i,i&&t.hoverRadius||0);const o=i&&t.borderWidth||0;return(i+o)*2}draw(t){const i=this,o=i.options;i.skip||o.radius<.1||(t.strokeStyle=o.borderColor,t.lineWidth=o.borderWidth,t.fillStyle=o.backgroundColor,so(t,o,i.x,i.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}vo.id="point";vo.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};vo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Gd(n,t){const{x:i,y:o,base:a,width:c,height:p}=n.getProps(["x","y","base","width","height"],t);let g,y,w,C,_;return n.horizontal?(_=p/2,g=Math.min(i,a),y=Math.max(i,a),w=o-_,C=o+_):(_=c/2,g=i-_,y=i+_,w=Math.min(o,a),C=Math.max(o,a)),{left:g,top:w,right:y,bottom:C}}function $d(n){let t=n.options.borderSkipped;const i={};return t&&(t=n.horizontal?Ic(t,"left","right",n.base>n.x):Ic(t,"bottom","top",n.base<n.y),i[t]=!0),i}function Ic(n,t,i,o){return o?(n=D0(n,t,i),n=Rc(n,i,t)):n=Rc(n,t,i),n}function D0(n,t,i){return n===t?i:n===i?t:n}function Rc(n,t,i){return n==="start"?t:n==="end"?i:n}function ri(n,t,i,o){return n?0:Math.max(Math.min(t,o),i)}function I0(n,t,i){const o=n.options.borderWidth,a=$d(n),c=xd(o);return{t:ri(a.top,c.top,0,i),r:ri(a.right,c.right,0,t),b:ri(a.bottom,c.bottom,0,i),l:ri(a.left,c.left,0,t)}}function R0(n,t,i){const o=n.options.borderRadius,a=hb(o),c=Math.min(t,i),p=$d(n);return{topLeft:ri(p.top||p.left,a.topLeft,0,c),topRight:ri(p.top||p.right,a.topRight,0,c),bottomLeft:ri(p.bottom||p.left,a.bottomLeft,0,c
18),bottomRight:ri(p.bottom||p.right,a.bottomRight,0,c)}}function B0(n){const t=Gd(n),i=t.right-t.left,o=t.bottom-t.top,a=I0(n,i/2,o/2),c=R0(n,i/2,o/2);return{outer:{x:t.left,y:t.top,w:i,h:o,radius:c},inner:{x:t.left+a.l,y:t.top+a.t,w:i-a.l-a.r,h:o-a.t-a.b,radius:{topLeft:Math.max(0,c.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,c.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,c.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,c.bottomRight-Math.max(a.b,a.r))}}}}function Kr(n,t,i,o){const a=t===null,c=i===null,g=n&&!(a&&c)&&Gd(n,o);return g&&(a||t>=g.left&&t<=g.right)&&(c||i>=g.top&&i<=g.bottom)}function z0(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function F0(n,t){const{x:i,y:o,w:a,h:c,radius:p}=t;n.arc(i+p.topLeft,o+p.topLeft,p.topLeft,-ie,Gt,!0),n.lineTo(i,o+c-p.bottomLeft),n.arc(i+p.bottomLeft,o+c-p.bottomLeft,p.bottomLeft,Gt,ie,!0),n.lineTo(i+a-p.bottomRight,o+c),n.arc(i+a-p.bottomRight,o+c-p.bottomRight,p.bottomRight,ie,0,!0),n.lineTo(i+a,o+p.topRight),n.arc(i+a-p.topRight,o+p.topRight,p.topRight,0,-ie,!0),n.lineTo(i+p.topLeft,o)}function N0(n,t){n.rect(t.x,t.y,t.w,t.h)}class ko extends Ce{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const i=this.options,{inner:o,outer:a}=B0(this),c=z0(a.radius)?F0:N0;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),c(t,a),t.clip(),c(t,o),t.fillStyle=i.borderColor,t.fill("evenodd")),t.beginPath(),c(t,o),t.fillStyle=i.backgroundColor,t.fill(),t.restore()}inRange(t,i,o){return Kr(this,t,i,o)}inXRange(t,i){return Kr(this,t,null,i)}inYRange(t,i){return Kr(this,null,t,i)}getCenterPoint(t){const{x:i,y:o,base:a,horizontal:c}=this.getProps(["x","y","base","horizontal"],t);return{x:c?(i+a)/2:i,y:c?o:(o+a)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}ko.id="bar";ko.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,pointStyle:void 0};ko.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var W0=Object.freeze({__proto__:null,ArcElement:yo,LineElement:hi,PointElement:vo,BarElement:ko});function H0(n,t,i){const o=i.samples||t,a=[],c=(n.length-2)/(o-2);let p=0,g=0,y,w,C,_,L;for(a[p++]=n[g],y=0;y<o-2;y++){let D=0,R=0,N;const W=Math.floor((y+1)*c)+1,X=Math.min(Math.floor((y+2)*c)+1,n.length),V=X-W;for(N=W;N<X;N++)D=n[N].x,R=n[N].y;D/=V,R/=V;const K=Math.floor(y*c)+1,$=Math.floor((y+1)*c)+1,{x:Z,y:nt}=n[g];for(C=_=-1,N=K;N<$;N++)_=.5*Math.abs((Z-D)*(n[N].y-nt)-(Z-n[N].x)*(R-nt)),_>C&&(C=_,w=n[N],L=N);a[p++]=w,g=L}return a[p++]=n[n.length-1],a}function j0(n,t){let i=0,o=0,a,c,p,g,y,w,C,_,L,D;
18const R=[],N=n[0].x,X=n[n.length-1].x-N;for(a=0;a<n.length;++a){c=n[a],p=(c.x-N)/X*t,g=c.y;const V=p|0;if(V===y)g<L?(L=g,w=a):g>D&&(D=g,C=a),i=(o*i+c.x)/++o;else{const K=a-1;if(!Mt(w)&&!Mt(C)){const $=Math.min(w,C),Z=Math.max(w,C);$!==_&&$!==K&&R.push({...n[$],x:i}),Z!==_&&Z!==K&&R.push({...n[Z],x:i})}a>0&&K!==_&&R.push(n[K]),R.push(c),y=V,o=0,L=D=g,w=C=_=a}}return R}var X0={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,i)=>{if(!i.enabled)return;const o=n.width;n.data.datasets.forEach((a,c)=>{const{_data:p,indexAxis:g}=a,y=n.getDatasetMeta(c),w=p||a.data;if(Ss([g,n.options.indexAxis])==="y"||y.type!=="line")return;const C=n.scales[y.xAxisID];if(C.type!=="linear"&&C.type!=="time"||n.options.parsing||w.length<=4*o)return;Mt(p)&&(a._data=w,delete a.data,Object.defineProperty(a,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(L){this._data=L}}));let _;switch(i.algorithm){case"lttb":_=H0(w,o,i);break;case"min-max":_=j0(w,o);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}a._decimated=_})},destroy(n){n.data.datasets.forEach(t=>{if(t._decimated){const i=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:i})}})}};function V0(n,t){const i=n.getDatasetMeta(t);return i&&n.isDatasetVisible(t)?i.dataset:null}function Y0(n){const t=n.options,i=t.fill;let o=wt(i&&i.target,i);return o===void 0&&(o=!!t.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function G0(n,t,i){const o=Y0(n);if(Tt(o))return isNaN(o.value)?!1:o;let a=parseFloat(o);return Xt(a)&&Math.floor(a)===a?((o[0]==="-"||o[0]==="+")&&(a=t+a),a===t||a<0||a>=i?!1:a):["origin","start","end","stack"].indexOf(o)>=0&&o}function $0(n){const{scale:t={},fill:i}=n;let o=null,a;return i==="start"?o=t.bottom:i==="end"?o=t.top:Tt(i)?o=t.getPixelForValue(i.value):t.getBasePixel&&(o=t.getBasePixel()),Xt(o)?(a=t.isHorizontal(),{x:a?o:null,y:a?null:o}):null}class Ud{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,i,o){const{x:a,y:c,radius:p}=this;return i=i||{start:0,end:Ot},t.arc(a,c,p,i.end,i.start,!0),!o.bounds}interpolate(t){const{x:i,y:o,radius:a}=this,c=t.angle;return{x:i+Math.cos(c)*a,y:o+Math.sin(c)*a,angle:c}}}function U0(n){const{scale:t,fill:i}=n,o=t.options,a=t.getLabels().length,c=[],p=o.reverse?t.max:t.min,g=o.reverse?t.min:t.max;let y,w,C;if(i==="start"?C=p:i==="end"?C=g:Tt(i)?C=i.value:C=t.getBaseValue(),o.grid.circular)return w=t.getPointPositionForValue(0,p),new Ud({x:w.x,y:w.y,radius:t.getDistanceFromCenterForValue(C)});for(y=0;y<a;++y)c.push(t.getPointPositionForValue(y,C));return c}function K0(n){return(n.scale||{}).getPointPositionForValue?U0(n):$0(n)}function q0(n,t){const{x:i=null,y:o=null}=n||{},a=t.points,c=[];return t.segments.forEach(p=>{const g=a[p.start],y=a[p.end];o!==null?(c.push({x:g.x,y:o}),c.push({x:y.x,y:o})):i!==null&&(c.push({x:i,y:g.y}),c.push({x:i,y:y.y}))}),c}function Z0(n){const{chart:t,scale:i,index:o,line:a}=n,c=[],p=a.segments,g=a.points,y=J0(t,o);y.push(Kd({x:null,y:i.bottom},a));for(let w=0;w<p.length;w++){const C=p[w];for(let _=C.start;_<=C.end;_++)tv(c,g[_],y)}return new hi({points:c,options:{}})}const Q0=n=>n.type==="line"&&!n.hidden;function J0(n,t){const i=[],o=n.getSortedVisibleDatasetMetas();for(let a=0;a<o.length;a++){const c=o[a];if(c.index===t)break;Q0(c)&&i.unshift(c.dataset)}return i}function tv(n,t,i){const o=[];for(let a=0;a<i.length;a++){const c=i[a],{first:p,last:g,point:y}=ev(c,t,"x");if(!(!y||p&&g)){if(p)o.unshift(y);else if(n.push(y),!g)break}}n.push(...o)}function ev(n,t,i){const o=n.interpolate(t,i);if(!o)return{};const a=o[i],c=n.segments,p=n.points;let g=!1,y=!1;for(let w=0;w<c.length;w++){const C=c[w],_=p[C.start][i],L=p[C.end][i];if(a>=_&&a<=L){g=a===_,y=a===L;break}}return{first:g,last:y,point:o}}function iv(n){const{chart:t,fill:i,line:o}=n;
18if(Xt(i))return V0(t,i);if(i==="stack")return Z0(n);const a=K0(n);return a instanceof Ud?a:Kd(a,o)}function Kd(n,t){let i=[],o=!1;return Ft(n)?(o=!0,i=n):i=q0(n,t),i.length?new hi({points:i,options:{tension:0},_loop:o,_fullLoop:o}):null}function sv(n,t,i){let a=n[t].fill;const c=[t];let p;if(!i)return a;for(;a!==!1&&c.indexOf(a)===-1;){if(!Xt(a))return a;if(p=n[a],!p)return!1;if(p.visible)return a;c.push(a),a=p.fill}return!1}function Bc(n,t,i){n.beginPath(),t.path(n),n.lineTo(t.last().x,i),n.lineTo(t.first().x,i),n.closePath(),n.clip()}function na(n,t,i,o){if(o)return;let a=t[n],c=i[n];return n==="angle"&&(a=Se(a),c=Se(c)),{property:n,start:a,end:c}}function zc(n,t,i,o){return n&&t?o(n[i],t[i]):n?n[i]:t?t[i]:0}function nv(n,t,i){const o=n.segments,a=n.points,c=t.points,p=[];for(let g=0;g<o.length;g++){const y=o[g],w=na(i,a[y.start],a[y.end],y.loop);if(!t.segments){p.push({source:y,target:w,start:a[y.start],end:a[y.end]});continue}const C=Od(t,w);for(let _=0;_<C.length;++_){const L=C[_],D=na(i,c[L.start],c[L.end],L.loop),R=_d(y,a,D);for(let N=0;N<R.length;N++)p.push({source:R[N],target:L,start:{[i]:zc(w,D,"start",Math.max)},end:{[i]:zc(w,D,"end",Math.min)}})}}return p}function ov(n,t,i){const{top:o,bottom:a}=t.chart.chartArea,{property:c,start:p,end:g}=i||{};c==="x"&&(n.beginPath(),n.rect(p,o,g-p,a-o),n.clip())}function Fc(n,t,i,o){const a=t.interpolate(i,o);a&&n.lineTo(a.x,a.y)}function Nc(n,t){const{line:i,target:o,property:a,color:c,scale:p}=t,g=nv(i,o,a);n.fillStyle=c;for(let y=0,w=g.length;y<w;++y){const{source:C,target:_,start:L,end:D}=g[y];n.save(),ov(n,p,na(a,L,D)),n.beginPath();const R=!!i.pathSegment(n,C);R?n.closePath():Fc(n,o,D,a);const N=!!o.pathSegment(n,_,{move:R,reverse:!0}),W=R&&N;W||Fc(n,o,L,a),n.closePath(),n.fill(W?"evenodd":"nonzero"),n.restore()}}function rv(n,t){const{line:i,target:o,above:a,below:c,area:p,scale:g}=t,y=i._loop?"angle":"x";n.save(),y==="x"&&c!==a&&(Bc(n,o,p.top),Nc(n,{line:i,target:o,color:a,scale:g,property:y}),n.restore(),n.save(),Bc(n,o,p.bottom)),Nc(n,{line:i,target:o,color:c,scale:g,property:y}),n.restore()}var av={id:"filler",afterDatasetsUpdate(n,t,i){const o=(n.data.datasets||[]).length,a=i.propagate,c=[];let p,g,y,w;for(g=0;g<o;++g)p=n.getDatasetMeta(g),y=p.dataset,w=null,y&&y.options&&y instanceof hi&&(w={visible:n.isDatasetVisible(g),index:g,fill:G0(y,g,o),chart:n,scale:p.vScale,line:y}),p.$filler=w,c.push(w);for(g=0;g<o;++g)w=c[g],!(!w||w.fill===!1)&&(w.fill=sv(c,g,a))},beforeDatasetsDraw(n){const t=n.getSortedVisibleDatasetMetas(),i=n.chartArea;let o,a;for(o=t.length-1;o>=0;--o)a=t[o].$filler,a&&a.line.updateControlPoints(i)},beforeDatasetDraw(n,t){const i=n.chartArea,o=n.ctx,a=t.meta.$filler;if(!a||a.fill===!1)return;const c=iv(a),{line:p,scale:g}=a,y=p.options,w=y.fill,C=y.backgroundColor,{above:_=C,below:L=C}=w||{};c&&p.points.length&&(Fs(o,i),rv(o,{line:p,target:c,above:_,below:L,area:i,scale:g}),Ns(o))},defaults:{propagate:!0}};const Wc=(n,t)=>{let{boxHeight:i=t,boxWidth:o=t}=n;return n.usePointStyle&&(i=Math.min(i,t),o=Math.min(o,t)),{boxWidth:o,boxHeight:i,itemHeight:Math.max(t,i)}},lv=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class Hc extends Ce{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,i,o){const a=this;a.maxWidth=t,a.maxHeight=i,a._margins=o,a.setDimensions(),a.buildLabels(),a.fit()}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height)}buildLabels(){const t=this,i=t.options.labels||{};let o=Et(i.generateLabels,[t.chart],t)||[];i.filter&&(o=o.filter(a=>i.filter(a,t.chart.data))),i.sort&&(o=o.sort((a,c)=>i.sort(a,c,t.chart.data))),t.options.reverse&&o.reverse(),t.legendItems=o}fit(){const t=this,{options:i,ctx:o}=t;if(!i.display){t.width=t.height=0;return}const a=i.labels,c=Zt(a.font),p=c.size,g=t._computeTitleHeight(),{boxWidth:y,itemHeight:w}=Wc(a,p);let C,_;o.font=c.string,t.isHorizontal()?(C=t.maxWidth,_=t._fitRows(g,p,y,w)+10):(_=t.maxHeight,C=t._fitCols(g,p,y,w)+10),t.width=Math.min(C,i.maxWidth||t.maxWidth),t.height=Math.min(_,i.maxHeight||t.maxHeight)}_fitRows(t,i,o,a){const c=this,{ctx:p,maxWidth:g,options:{labels:{padding:y}}}=c,w=c.legendHitBoxes=[],C=c.lineWidths=[0],_=a+y;let L=t;p.textAlign="left",p.textBaseline="middle";let D=-1,R=-_;
18return c.legendItems.forEach((N,W)=>{const X=o+i/2+p.measureText(N.text).width;(W===0||C[C.length-1]+X+2*y>g)&&(L+=_,C[C.length-(W>0?0:1)]=0,R+=_,D++),w[W]={left:0,top:R,row:D,width:X,height:a},C[C.length-1]+=X+y}),L}_fitCols(t,i,o,a){const c=this,{ctx:p,maxHeight:g,options:{labels:{padding:y}}}=c,w=c.legendHitBoxes=[],C=c.columnSizes=[],_=g-t;let L=y,D=0,R=0,N=0,W=0,X=0;return c.legendItems.forEach((V,K)=>{const $=o+i/2+p.measureText(V.text).width;K>0&&R+i+2*y>_&&(L+=D+y,C.push({width:D,height:R}),N+=D+y,X++,W=0,D=R=0),D=Math.max(D,$),R+=i+y,w[K]={left:N,top:W,col:X,width:$,height:a},W+=a+y}),L+=D,C.push({width:D,height:R}),L}adjustHitBoxes(){const t=this;if(!t.options.display)return;const i=t._computeTitleHeight(),{legendHitBoxes:o,options:{align:a,labels:{padding:c}}}=t;if(this.isHorizontal()){let p=0,g=se(a,t.left+c,t.right-t.lineWidths[p]);for(const y of o)p!==y.row&&(p=y.row,g=se(a,t.left+c,t.right-t.lineWidths[p])),y.top+=t.top+i+c,y.left=g,g+=y.width+c}else{let p=0,g=se(a,t.top+i+c,t.bottom-t.columnSizes[p].height);for(const y of o)y.col!==p&&(p=y.col,g=se(a,t.top+i+c,t.bottom-t.columnSizes[p].height)),y.top=g,y.left+=t.left+c,g+=y.height+c}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){const t=this;if(t.options.display){const i=t.ctx;Fs(i,t),t._draw(),Ns(i)}}_draw(){const t=this,{options:i,columnSizes:o,lineWidths:a,ctx:c}=t,{align:p,labels:g}=i,y=bt.color,w=Ls(i.rtl,t.left,t.width),C=Zt(g.font),{color:_,padding:L}=g,D=C.size,R=D/2;let N;t.drawTitle(),c.textAlign=w.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=_,c.fillStyle=_,c.font=C.string;const{boxWidth:W,boxHeight:X,itemHeight:V}=Wc(g,D),K=function(Y,St,pt){if(isNaN(W)||W<=0||isNaN(X)||X<0)return;c.save();const kt=wt(pt.lineWidth,1);if(c.fillStyle=wt(pt.fillStyle,y),c.lineCap=wt(pt.lineCap,"butt"),c.lineDashOffset=wt(pt.lineDashOffset,0),c.lineJoin=wt(pt.lineJoin,"miter"),c.lineWidth=kt,c.strokeStyle=wt(pt.strokeStyle,y),c.setLineDash(wt(pt.lineDash,[])),g.usePointStyle){const Nt={radius:W*Math.SQRT2/2,pointStyle:pt.pointStyle,rotation:pt.rotation,borderWidth:kt},Dt=w.xPlus(Y,W/2),ht=St+R;so(c,Nt,Dt,ht)}else{const Nt=St+Math.max((D-X)/2,0);c.fillRect(w.leftForLtr(Y,W),Nt,W,X),kt!==0&&c.strokeRect(w.leftForLtr(Y,W),Nt,W,X)}
18c.restore()},$=function(Y,St,pt){Ti(c,pt.text,Y,St+V/2,C,{strikethrough:pt.hidden,textAlign:pt.textAlign})},Z=t.isHorizontal(),nt=this._computeTitleHeight();Z?N={x:se(p,t.left+L,t.right-a[0]),y:t.top+L+nt,line:0}:N={x:t.left+L,y:se(p,t.top+nt+L,t.bottom-o[0].height),line:0},Pd(t.ctx,i.textDirection);const mt=V+L;t.legendItems.forEach((Y,St)=>{const pt=c.measureText(Y.text).width,kt=w.textAlign(Y.textAlign||(Y.textAlign=g.textAlign)),Nt=W+D/2+pt;let Dt=N.x,ht=N.y;w.setWidth(t.width),Z?St>0&&Dt+Nt+L>t.right&&(ht=N.y+=mt,N.line++,Dt=N.x=se(p,t.left+L,t.right-a[N.line])):St>0&&ht+mt>t.bottom&&(Dt=N.x=Dt+o[N.line].width+L,N.line++,ht=N.y=se(p,t.top+nt+L,t.bottom-o[N.line].height));const Vt=w.x(Dt);K(Vt,ht,Y),Dt=wx(kt,Dt+W+R,t.right),$(w.x(Dt),ht,Y),Z?N.x+=Nt+L:N.y+=mt}),Td(t.ctx,i.textDirection)}drawTitle(){const t=this,i=t.options,o=i.title,a=Zt(o.font),c=he(o.padding);if(!o.display)return;const p=Ls(i.rtl,t.left,t.width),g=t.ctx,y=o.position,w=a.size/2,C=c.top+w;let _,L=t.left,D=t.width;if(this.isHorizontal())D=Math.max(...t.lineWidths),_=t.top+C,L=se(i.align,L,t.right-D);else{const N=t.columnSizes.reduce((W,X)=>Math.max(W,X.height),0);_=C+se(i.align,t.top,t.bottom-N-i.labels.padding-t._computeTitleHeight())}const R=se(y,L,L+D);g.textAlign=p.textAlign(aa(y)),g.textBaseline="middle",g.strokeStyle=o.color,g.fillStyle=o.color,g.font=a.string,Ti(g,o.text,R,_,a)}_computeTitleHeight(){const t=this.options.title,i=Zt(t.font),o=he(t.padding);return t.display?i.lineHeight+o.height:0}_getLegendItemAt(t,i){const o=this;let a,c,p;if(t>=o.left&&t<=o.right&&i>=o.top&&i<=o.bottom){for(p=o.legendHitBoxes,a=0;a<p.length;++a)if(c=p[a],t>=c.left&&t<=c.left+c.width&&i>=c.top&&i<=c.top+c.height)return o.legendItems[a]}return null}handleEvent(t){const i=this,o=i.options;if(!hv(t.type,o))return;const a=i._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"){const c=i._hoveredItem,p=lv(c,a);c&&!p&&Et(o.onLeave,[t,c,i],i),i._hoveredItem=a,a&&!p&&Et(o.onHover,[t,a,i],i)}else a&&Et(o.onClick,[t,a,i],i)}}function hv(n,t){return!!(n==="mousemove"&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var cv={id:"legend",_element:Hc,start(n,t,i){const o=n.legend=new Hc({ctx:n.ctx,options:i,chart:n});be.configure(n,o,i),be.addBox(n,o)},stop(n){be.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,i){const o=n.legend;be.configure(n,o,i),o.options=i},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,i){const o=t.datasetIndex,a=i.chart;a.isDatasetVisible(o)?(a.hide(o),t.hidden=!0):(a.show(o),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:i,pointStyle:o,textAlign:a}}=n.legend.options;return n._getSortedDatasetMetas().map(c=>{const p=c.controller.getStyle(i?0:void 0),g=he(p.borderWidth);return{text:t[c.index].label,fillStyle:p.backgroundColor,hidden:!c.visible,lineCap:p.borderCapStyle,lineDash:p.borderDash,lineDashOffset:p.borderDashOffset,lineJoin:p.borderJoinStyle,lineWidth:(g.width+g.height)/4,strokeStyle:p.borderColor,pointStyle:o||p.pointStyle,rotation:p.rotation,textAlign:a||p.textAlign,datasetIndex:c.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class qd extends Ce{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,i){const o=this,a=o.options;if(o.left=0,o.top=0,!a.display){o.width=o.height=o.right=o.bottom=0;return}o.width=o.right=t,o.height=o.bottom=i;const c=Ft(a.text)?a.text.length:1;o._padding=he(a.padding);const p=c*Zt(a.font).lineHeight+o._padding.height;o.isHorizontal()?o.height=p:o.width=p}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:i,left:o,bottom:a,right:c,options:p}=this,g=p.align;let y=0,w,C,_;return this.isHorizontal()?(C=se(g,o,c),_=i+t,w=c-o):(p.position==="left"?
vendor: 6,410 bytes, lines 18-20
18(C=o+t,_=se(g,a,i),y=Gt*-.5):(C=c-t,_=se(g,i,a),y=Gt*.5),w=a-i),{titleX:C,titleY:_,maxWidth:w,rotation:y}}draw(){const t=this,i=t.ctx,o=t.options;if(!o.display)return;const a=Zt(o.font),p=a.lineHeight/2+t._padding.top,{titleX:g,titleY:y,maxWidth:w,rotation:C}=t._drawArgs(p);Ti(i,o.text,0,0,a,{color:o.color,maxWidth:w,rotation:C,textAlign:aa(o.align),textBaseline:"middle",translation:[g,y]})}}function dv(n,t){const i=new qd({ctx:n.ctx,options:t,chart:n});be.configure(n,i,t),be.addBox(n,i),n.titleBlock=i}var uv={id:"title",_element:qd,start(n,t,i){dv(n,i)},stop(n){const t=n.titleBlock;be.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,i){const o=n.titleBlock;be.configure(n,o,i),o.options=i},defaults:{align:"center",display:!1,font:{style:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Es={average(n){if(!n.length)return!1;let t,i,o=0,a=0,c=0;for(t=0,i=n.length;t<i;++t){const p=n[t].element;if(p&&p.hasValue()){const g=p.tooltipPosition();o+=g.x,a+=g.y,++c}}return{x:o/c,y:a/c}},nearest(n,t){let i=t.x,o=t.y,a=Number.POSITIVE_INFINITY,c,p,g;for(c=0,p=n.length;c<p;++c){const y=n[c].element;if(y&&y.hasValue()){const w=y.getCenterPoint(),C=Qr(t,w);C<a&&(a=C,g=y)}}if(g){const y=g.tooltipPosition();i=y.x,o=y.y}return{x:i,y:o}}};function De(n,t){return t&&(Ft(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function je(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(` 19`)>-1?n.split(` 20`):n}function fv(n,t){const{element:i,datasetIndex:o,index:a}=t,c=n.getDatasetMeta(o).controller,{label:p,value:g}=c.getLabelAndValue(a);return{chart:n,label:p,parsed:c.getParsed(a),raw:n.data.datasets[o].data[a],formattedValue:g,dataset:c.getDataset(),dataIndex:a,datasetIndex:o,element:i}}function jc(n,t){const i=n._chart.ctx,{body:o,footer:a,title:c}=n,{boxWidth:p,boxHeight:g}=t,y=Zt(t.bodyFont),w=Zt(t.titleFont),C=Zt(t.footerFont),_=c.length,L=a.length,D=o.length,R=he(t.padding);let N=R.height,W=0,X=o.reduce(($,Z)=>$+Z.before.length+Z.lines.length+Z.after.length,0);if(X+=n.beforeBody.length+n.afterBody.length,_&&(N+=_*w.lineHeight+(_-1)*t.titleSpacing+t.titleMarginBottom),X){const $=t.displayColors?Math.max(g,y.lineHeight):y.lineHeight;N+=D*$+(X-D)*y.lineHeight+(X-1)*t.bodySpacing}L&&(N+=t.footerMarginTop+L*C.lineHeight+(L-1)*t.footerSpacing);let V=0;const K=function($){W=Math.max(W,i.measureText($).width+V)};return i.save(),i.font=w.string,Pt(n.title,K),i.font=y.string,Pt(n.beforeBody.concat(n.afterBody),K),V=t.displayColors?p+2:0,Pt(o,$=>{Pt($.before,K),Pt($.lines,K),Pt($.after,K)}),V=0,i.font=C.string,Pt(n.footer,K),i.restore(),W+=R.width,{width:W,height:N}}function pv(n,t){const{y:i,height:o}=t;return i<o/2?"top":i>n.height-o/2?"bottom":"center"}function gv(n,t,i,o){const{x:a,width:c}=o,p=i.caretSize+i.caretPadding;if(n==="left"&&a+c+p>t.width||n==="right"&&a-c-p<0)return!0}function mv(n,t,i,o){const{x:a,width:c}=i,{width:p,chartArea:{left:g,right:y}}=n;let w="center";return o==="center"?w=a<=(g+y)/2?"left":"right":a<=c/2?w="left":a>=p-c/2&&(w="right"),gv(w,n,t,i)&&(w="center"),w}function Xc(n,t,i){const o=t.yAlign||pv(n,i);return{xAlign:t.xAlign||mv(n,t,i,o),yAlign:o}}function xv(n,t){let{x:i,width:o}=n;return t==="right"?i-=o:t==="center"&&(i-=o/2),i}function bv(n,t,i){let{y:o,height:a}=n;return t==="top"?o+=i:t==="bottom"?o-=a+i:o-=a/2,o}function Vc(n,t,i,o){const{caretSize:a,caretPadding:c,cornerRadius:p}=n,{xAlign:g,yAlign:y}=i,w=a+c,C=p+c;let _=xv(t,g);const L=bv(t,y,w);return y==="center"?g==="left"?_+=w:g==="right"&&(_-=w):g==="left"?_-=C:g==="right"&&(_+=C),{x:Ye(_,0,o.width-t.width),y:Ye(L,0,o.height-t.height)}}function Un(n,t,i){const o=he(i.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-o.right:n.x+o.left}function Yc(n){return De([],je(n))}function yv(n,t,i){return Object.assign(Object.create(n),{tooltip:t,tooltipItems:i,type:"tooltip"})}function Gc(n,t){const i=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return i?n.override(i):n}class oa extends Ce{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this,i=t._cachedAnimations;if(i)return i;const o=t._chart,a=t.options.setContext(t.getContext()),c=a.enabled&&o.options.animation&&a.animations,p=new Ld(t._chart,c);return c._cacheable&&(t._cachedAnimations=Object.freeze(p)),p}getContext(){const t=this;return t.$context||(t.$context=yv(t._chart.getContext(),t,t._tooltipItems))}getTitle(t,i){const o=this,{callbacks:a}=i,c=a.beforeTitle.apply(o,[t]),p=a.title.apply(o,[t]),g=a.afterTitle.apply(o,[t]);let y=[];return y=De(y,je(c)),y=De(y,je(p)),y=De(y,je(g)),y}getBeforeBody(t,i){return Yc(i.callbacks.beforeBody.apply(this,[t]))}getBody(t,i){const o=this,{callbacks:a}=i,c=[];return Pt(t,p=>{const g={before:[],lines:[],after:[]},y=Gc(a,p);De(g.before,je(y.beforeLabel.call(o,p))),De(g.lines,y.label.call(o,p)),De(g.after,je(y.afterLabel.call(o,p))),c.push(g)}),c}getAfterBody(t,i){return Yc(i.callbacks.afterBody.apply(this,[t]))}getFooter(t,i){const o=this,{callbacks:a}=i,c=a.beforeFooter.apply(o,[t]),p=a.footer.apply(o,[t]),g=a.afterFooter.apply(o,[t]);let y=[];return y=De(y,je(c)),y=De(y,je(p)),y=De(y,je(g)),y}_createItems(t){const i=this,o=i._active,a=i._chart.data,c=[],p=[],g=[];let y=[],w,C;for(w=0,C=o.length;w<C;++w)y.push(fv(i._chart,o[w]));return t.filter&&(y=y.filter((_,L,D)=>t.filter(_,L,D,a))),t.itemSort&&(y=y.sort((_,L)=>t.itemSort(_,L,a))),Pt(y,_=>{const L=Gc(t.callbacks,_);c.push(L.labelColor.call(i,_)),p.push(L.labelPointStyle.call(i,_)),g.push(L.labelTextColor.call(i,_))}),i.labelColors=c,i.labelPointStyles=p,i.labelTextColors=g,i.dataPoints=y,y}update(t,i){const o=this,a=o.options.setContext(o.getContext()),c=o._active;let p,g=[];if(!c.length)o.opacity!==0&&(p={opacity:0}
20);else{const y=Es[a.position].call(o,c,o._eventPosition);g=o._createItems(a),o.title=o.getTitle(g,a),o.beforeBody=o.getBeforeBody(g,a),o.body=o.getBody(g,a),o.afterBody=o.getAfterBody(g,a),o.footer=o.getFooter(g,a);const w=o._size=jc(o,a),C=Object.assign({},y,w),_=Xc(o._chart,a,C),L=Vc(a,C,_,o._chart);o.xAlign=_.xAlign,o.yAlign=_.yAlign,p={opacity:1,x:L.x,y:L.y,width:w.width,height:w.height,caretX:y.x,caretY:y.y}}o._tooltipItems=g,o.$context=void 0,p&&o._resolveAnimations().update(o,p),t&&a.external&&a.external.call(o,{chart:o._chart,tooltip:o,replay:i})}drawCaret(t,i,o,a){const c=this.getCaretPosition(t,o,a);i.lineTo(c.x1,c.y1),i.lineTo(c.x2,c.y2),i.lineTo(c.x3,c.y3)}getCaretPosition(t,i,o){const{xAlign:a,yAlign:c}=this,{cornerRadius:p,caretSize:g}=o,{x:y,y:w}=t,{width:C,height:_}=i;let L,D,R,N,W,X;return c==="center"?(W=w+_/2,a==="left"?(L=y,D=L-g,N=W+g,X=W-g):(L=y+C,D=L+g,N=W-g,X=W+g),R=L):(a==="left"?D=y+p+g:a==="right"?D=y+C-p-g:D=this.caretX,c==="top"?(N=w,W=N-g,L=D-g,R=D+g):(N=w+_,W=N+g,L=D+g,R=D-g),X=N),{x1:L,x2:D,x3:R,y1:N,y2:W,y3:X}}drawTitle(t,i,o){const a=this,c=a.title,p=c.length;let g,y,w;if(p){const C=Ls(o.rtl,a.x,a.width);for(t.x=Un(a,o.titleAlign,o),i.textAlign=C.textAlign(o.titleAlign),i.textBaseline="middle",g=Zt(o.titleFont),y=o.titleSpacing,i.fillStyle=o.titleColor,i.font=g.string,w=0;w<p;++w)i.fillText(c[w],C.x(t.x),t.y+g.lineHeight/2),t.y+=g.lineHeight+y,w+1===p&&(t.y+=o.titleMarginBottom-y)}}_drawColorBox(t,i,o,a,c){const p=this,g=p.labelColors[o],y=p.labelPointStyles[o],{boxHeight:w,boxWidth:C}=c,_=Zt(c.bodyFont),L=Un(p,"left",c),D=a.x(L),R=w<_.lineHeight?(_.lineHeight-w)/2:0,N=i.y+R;if(c.usePointStyle){const W={radius:Math.min(C,w)/2,pointStyle:y.pointStyle,rotation:y.rotation,borderWidth:1},X=a.leftForLtr(D,C)+C/2,V=N+w/2;t.strokeStyle=c.multiKeyBackground,t.fillStyle=c.multiKeyBackground,so(t,W,X,V),t.strokeStyle=g.borderColor,t.fillStyle=g.backgroundColor,so(t,W,X,V)}else t.fillStyle=c.multiKeyBackground,t.fillRect(a.leftForLtr(D,C),N,C,w),t.lineWidth=1,t.strokeStyle=g.borderColor,t.strokeRect(a.leftForLtr(D,C),N,C,w),t.fillStyle=g.backgroundColor,t.fillRect(a.leftForLtr(a.xPlus(D,1
20),C-2),N+1,C-2,w-2);t.fillStyle=p.labelTextColors[o]}drawBody(t,i,o){const a=this,{body:c}=a,{bodySpacing:p,bodyAlign:g,displayColors:y,boxHeight:w,boxWidth:C}=o,_=Zt(o.bodyFont);let L=_.lineHeight,D=0;const R=Ls(o.rtl,a.x,a.width),N=function(Y){i.fillText(Y,R.x(t.x+D),t.y+L/2),t.y+=L+p},W=R.textAlign(g);let X,V,K,$,Z,nt,mt;for(i.textAlign=g,i.textBaseline="middle",i.font=_.string,t.x=Un(a,W,o),i.fillStyle=o.bodyColor,Pt(a.beforeBody,N),D=y&&W!=="right"?g==="center"?C/2+1:C+2:0,$=0,nt=c.length;$<nt;++$){for(X=c[$],V=a.labelTextColors[$],i.fillStyle=V,Pt(X.before,N),K=X.lines,y&&K.length&&(a._drawColorBox(i,t,$,R,o),L=Math.max(_.lineHeight,w)),Z=0,mt=K.length;Z<mt;++Z)N(K[Z]),L=_.lineHeight;Pt(X.after,N)}D=0,L=_.lineHeight,Pt(a.afterBody,N),t.y-=p}drawFooter(t,i,o){const a=this,c=a.footer,p=c.length;let g,y;if(p){const w=Ls(o.rtl,a.x,a.width);for(t.x=Un(a,o.footerAlign,o),t.y+=o.footerMarginTop,i.textAlign=w.textAlign(o.footerAlign),i.textBaseline="middle",g=Zt(o.footerFont),i.fillStyle=o.footerColor,i.font=g.string,y=0;y<p;++y)i.fillText(c[y],w.x(t.x),t.y+g.lineHeight/2),t.y+=g.lineHeight+o.footerSpacing}}drawBackground(t,i,o,a){const{xAlign:c,yAlign:p}=this,{x:g,y}=t,{width:w,height:C}=o,_=a.cornerRadius;i.fillStyle=a.backgroundColor,i.strokeStyle=a.borderColor,i.lineWidth=a.borderWidth,i.beginPath(),i.moveTo(g+_,
20y),p==="top"&&this.drawCaret(t,i,o,a),i.lineTo(g+w-_,y),i.quadraticCurveTo(g+w,y,g+w,y+_),p==="center"&&c==="right"&&this.drawCaret(t,i,o,a),i.lineTo(g+w,y+C-_),i.quadraticCurveTo(g+w,y+C,g+w-_,y+C),p==="bottom"&&this.drawCaret(t,i,o,a),i.lineTo(g+_,y+C),i.quadraticCurveTo(g,y+C,g,y+C-_),p==="center"&&c==="left"&&this.drawCaret(t,i,o,a),i.lineTo(g,y+_),i.quadraticCurveTo(g,y,g+_,y),i.closePath(),i.fill(),a.borderWidth>0&&i.stroke()}_updateAnimationTarget(t){const i=this,o=i._chart,a=i.$animations,c=a&&a.x,p=a&&a.y;if(c||p){const g=Es[t.position].call(i,i._active,i._eventPosition);if(!g)return;const y=i._size=jc(i,t),w=Object.assign({},g,i._size),C=Xc(o,t,w),_=Vc(t,w,C,o);(c._to!==_.x||p._to!==_.y)&&(i.xAlign=C.xAlign,i.yAlign=C.yAlign,i.width=y.width,i.height=y.height,i.caretX=g.x,i.caretY=g.y,i._resolveAnimations().update(i,_))}}draw(t){const i=this,o=i.options.setContext(i.getContext());let a=i.opacity;if(!a)return;i._updateAnimationTarget(o);const c={width:i.width,height:i.height},p={x:i.x,y:i.y};a=Math.abs(a)<.001?0:a;const g=he(o.padding),y=i.title.length||i.beforeBody.length||i.body.length||i.afterBody.length||i.footer.length;o.enabled&&y&&(t.save(),t.globalAlpha=a,i.drawBackground(p,t,c,o),Pd(t,o.textDirection),p.y+=g.top,i.drawTitle(p,t,o),i.drawBody(p,t,o),i.drawFooter(p,t,o),Td(t,o.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,i){const o=this,a=o._active,c=t.map(({datasetIndex:y,index:w})=>{const C=o._chart.getDatasetMeta(y);if(!C)throw new Error("Cannot find a dataset at index "+y);return{datasetIndex:y,element:C.data[w],index:w}}),p=!Zn(a,c),g=o._positionChanged(c,i);(p||g)&&(o._active=c,o._eventPosition=i,o.update(!0))}handleEvent(t,i){const o=this,a=o.options,c=o._active||[];let p=!1,g=[];t.type!=="mouseout"&&(g=o._chart.getElementsAtEventForMode(t,a.mode,a,i),a.reverse&&g.reverse());const y=o._positionChanged(g,t);return p=i||!Zn(g,c)||y,p&&(o._active=g,(a.enabled||a.external)&&(o._eventPosition={x:t.x,y:t.y},o.update(!0,i))),p}_positionChanged(t,i){const o=this,a=Es[o.options.position].call(o,t,i);return o.caretX!==a.x||o.caretY!==a.y}}oa.positioners=Es;var vv={id:"tooltip",_element:oa,positioners:Es,afterInit(n,t,i){i&&(n.tooltip=new oa({_chart:n,options:i}))},beforeUpdate(n,t,i){n.tooltip&&n.tooltip.initialize(i)},reset(n,t,i){n.tooltip&&n.tooltip.initialize(i)},afterDraw(n){const t=n.tooltip,i={tooltip:t};n.notifyPlugins("beforeTooltipDraw",i)!==!1&&(t&&t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",i))},afterEvent(n,t){if(n.tooltip){const i=t.replay;n.tooltip.handleEvent(t.event,i)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{style:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{style:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,t)=>t.bodyFont.size,boxWidth:(n,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:We,title(n){if(n.length>0){const t=n[0],i=t.chart.data.labels,o=i?i.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(o>0&&t.dataIndex<o)return i[t.dataIndex]}return""},afterTitle:We,beforeBody:We,beforeLabel:We,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const i=n.formattedValue;return Mt(i)||(t+=i),t},labelColor(n){const i=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const i=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}}
20,afterLabel:We,afterBody:We,beforeFooter:We,footer:We,afterFooter:We}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},kv=Object.freeze({__proto__:null,Decimation:X0,Filler:av,Legend:cv,Title:uv,Tooltip:vv});const wv=(n,t,i)=>typeof t=="string"?n.push(t)-1:isNaN(t)?null:i;function Mv(n,t,i){const o=n.indexOf(t);if(o===-1)return wv(n,t,i);const a=n.lastIndexOf(t);return o!==a?i:o}const Sv=(n,t)=>n===null?null:Ye(Math.round(n),0,t);class ro extends _i{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,i){if(Mt(t))return null;const o=this.getLabels();return i=isFinite(i)&&o[i]===t?i:Mv(o,t,wt(i,t)),Sv(i,o.length-1)}determineDataLimits(){const t=this,{minDefined:i,maxDefined:o}=t.getUserBounds();let{min:a,max:c}=t.getMinMax(!0);t.options.bounds==="ticks"&&(i||(a=0),o||(c=t.getLabels().length-1)),t.min=a,t.max=c}buildTicks(){const t=this,i=t.min,o=t.max,a=t.options.offset,c=[];let p=t.getLabels();p=i===0&&o===p.length-1?p:p.slice(i,o+1),t._valueRange=Math.max(p.length-(a?0:1),1),t._startValue=t.min-(a?.5:0);for(let g=i;g<=o;g++)c.push({value:g});return c}getLabelForValue(t){const o=this.getLabels();return t>=0&&t<o.length?o[t]:t}configure(){const t=this;super.configure(),t.isHorizontal()||(t._reversePixels=!t._reversePixels)}getPixelForValue(t){const i=this;return typeof t!="number"&&(t=i.parse(t)),t===null?NaN:i.getPixelForDecimal((t-i._startValue)/i._valueRange)}getPixelForTick(t){const i=this,o=i.ticks;return t<0||t>o.length-1?null:i.getPixelForValue(o[t].value)}getValueForPixel(t){const i=this;return Math.round(i._startValue+i.getDecimalForPixel(t)*i._valueRange)}getBasePixel(){return this.bottom}}ro.id="category";ro.defaults={ticks:{callback:ro.prototype.getLabelForValue}};function Cv(n,t){const i=[],{step:a,min:c,max:p,precision:g,count:y,maxTicks:w}=n,C=a||1,_=w-1,{min:L,max:D}=t,R=!Mt(c),N=!Mt(p),W=!Mt(y);let X=Yh((D-L)/_/C)*C,V,K,$,Z;if(X<1e-14&&!R&&!N)return[{value:L},{value:D}];Z=Math.ceil(D/X)-Math.floor(L/X),Z>_&&(X=Yh(Z*X/_/C)*C),Mt(g)||(V=Math.pow(10,g),X=Math.ceil(X*V)/V),K=Math.floor(L/X)*X,$=Math.ceil(D/X)*X,R&&N&&a&&Wr((p-c)/a,X/1e3)?(Z=Math.min((p-c)/X,w),X=(p-c)/Z,K=c,$=p):W?(K=R?c:K,$=N?p:$,Z=y-1,X=($-K)/Z):(Z=($-K)/X,hd(Z,Math.round(Z),X/1e3)?Z=Math.round(Z):Z=Math.ceil(Z)),V=Math.pow(10,Mt(g)?Ex(X):g),K=Math.round(K*V)/V,$=Math.round($*V)/V;let nt=0;for(R&&(i.push({value:c}),K<c&&nt++,Wr(Math.round((K+nt*X)*V)/V/c,X/1e3)&&nt++);nt<Z;++nt)i.push({value:Math.round((K+nt*X)*V)/V});return N?Wr(i[i.length-1].value/p,X/1e3)?i[i.length-1].value=p:i.push({value:p}):i.push({value:$}),i}class ao extends _i{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,i){return Mt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:i,stacked:o}=t.options,{minDefined:a,maxDefined:c}=t.getUserBounds();let{min:p,max:g}=t;const y=C=>p=a?p:C,w=C=>g=c?g:C;if(i||o){const C=li(p),_=li(g);C<0&&_<0?w(0):C>0&&_>0&&y(0)}p===g&&(w(g+1),i||y(p-1)),t.min=p,t.max=g}getTickLimit(){const t=this,i=t.options.ticks;let{maxTicksLimit:o,stepSize:a}=i,c;return a?c=Math.ceil(t.max/a)-Math.floor(t.min/a)+1:(c=t.computeTickLimit(),o=o||11),o&&(c=Math.min(o,c)),c}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this,i=t.options,o=i.ticks;let a=t.getTickLimit();a=Math.max(2,a);const c={maxTicks:a,min:i.min,max:i.max,precision:o.precision,step:o.stepSize,count:o.count},p=Cv(c,cb(t,i.grace));return i.bounds==="ticks"&&cd(p,t,"value"),i.reverse?(p.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),p}configure(){const t=this,i=t.ticks;let o=t.min,a=t.max;if(super.configure(),t.options.offset&&i.length){const c=(a-o)/Math.max(i.length-1,1)/2;o-=c,a+=c}t._startValue=o,t._endValue=a,t._valueRange=a-o}getLabelForValue(t){return uo(t,this.chart.options.locale)}}class ma extends ao{determineDataLimits(){const t=this,{min:i,max:o}=t.getMinMax(!0);t.min=Xt(i)?i:0,t.max=Xt(o)?o:1,t.handleTickRangeOptions()}computeTickLimit(){const t=this;if(t.isHorizontal())return Math.ceil(t.width/40);const i=t._resolveTickFontOptions(0);return Math.ceil(t.height/i.lineHeight)}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}ma.id="linear";ma.defaults={ticks:{callback:xo.formatters.numeric}};function $c(n){return n/Math.pow(10,Math.floor(xe(n)))===1}function Pv(n,t){const i=Math.floor(xe(t.max)),o=Math.ceil(t.max/Math.pow(10,i)),a=[];
20let c=me(n.min,Math.pow(10,Math.floor(xe(t.min)))),p=Math.floor(xe(c)),g=Math.floor(c/Math.pow(10,p)),y=p<0?Math.pow(10,Math.abs(p)):1;do a.push({value:c,major:$c(c)}),++g,g===10&&(g=1,++p,y=p>=0?1:y),c=Math.round(g*Math.pow(10,p)*y)/y;while(p<i||p===i&&g<o);const w=me(n.max,c);return a.push({value:w,major:$c(c)}),a}class xa extends _i{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,i){const o=ao.prototype.parse.apply(this,[t,i]);if(o===0){this._zero=!0;return}return Xt(o)&&o>0?o:null}determineDataLimits(){const t=this,{min:i,max:o}=t.getMinMax(!0);t.min=Xt(i)?Math.max(0,i):null,t.max=Xt(o)?Math.max(0,o):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}handleTickRangeOptions(){const t=this,{minDefined:i,maxDefined:o}=t.getUserBounds();let a=t.min,c=t.max;const p=w=>a=i?a:w,g=w=>c=o?c:w,y=(w,C)=>Math.pow(10,Math.floor(xe(w))+C);a===c&&(a<=0?(p(1),g(10)):(p(y(a,-1)),g(y(c,1)))),a<=0&&p(y(c,-1)),c<=0&&g(y(a,1)),t._zero&&t.min!==t._suggestedMin&&a===y(t.min,0)&&p(y(a,-1)),t.min=a,t.max=c}buildTicks(){const t=this,i=t.options,o={min:t._userMin,max:t._userMax},a=Pv(o,t);return i.bounds==="ticks"&&cd(a,t,"value"),i.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),a}getLabelForValue(t){return t===void 0?"0":uo(t,this.chart.options.locale)}configure(){const t=this,i=t.min;super.configure(),t._startValue=xe(i),t._valueRange=xe(t.max)-xe(i)}getPixelForValue(t){const i=this;return(t===void 0||t===0)&&(t=i.min),i.getPixelForDecimal(t===i.min?0:(xe(t)-i._startValue)/i._valueRange)}getValueForPixel(t){const i=this,o=i.getDecimalForPixel(t);return Math.pow(10,i._startValue+o*i._valueRange)}}xa.id="logarithmic";xa.defaults={ticks:{callback:xo.formatters.logarithmic,major:{enabled:!0}}};function ra(n){const t=n.ticks;if(t.display&&n.display){const i=he(t.backdropPadding);return wt(t.font&&t.font.size,bt.font.size)+i.height}return 0}function Tv(n,t,i){return Ft(i)?{w:sb(n,n.font,i),h:i.length*t}:{w:n.measureText(i).width,h:t}}function Uc(n,t,i,o,a){return n===o||n===a?{start:t-i/2,end:t+i/2}:n<o||n>a?{start:t-i,end:t}:{start:t,end:t+i}}function Av(n){const t={l:0,r:n.width,t:0,b:n.height-n.paddingTop},i={};let o,a,c;const p=[],g=[],y=n.getLabels().length;for(o=0;o<y;o++){const L=n.options.pointLabels.setContext(n.getContext(o));g[o]=L.padding,c=n.getPointPosition(o,n.drawingArea+g[o]);const D=Zt(L.font);n.ctx.font=D.string,a=Tv(n.ctx,D.lineHeight,n._pointLabels[o]),p[o]=a;const R=n.getIndexAngle(o),N=Zr(R),W=Uc(N,c.x,a.w,0,180),X=Uc(N,c.y,a.h,90,270);W.start<t.l&&(t.l=W.start,i.l=R),W.end>t.r&&(t.r=W.end,i.r=R),X.start<t.t&&(t.t=X.start,i.t=R),X.end>t.b&&(t.b=X.end,i.b=R)}n._setReductions(n.drawingArea,t,i),n._pointLabelItems=[];const w=n.options,C=ra(w),_=n.getDistanceFromCenterForValue(w.ticks.reverse?n.min:n.max);for(o=0;o<y;o++){const L=o===0?C/2:0,D=n.getPointPosition(o,_+L+g[o]),R=Zr(n.getIndexAngle(o)),N=p[o];Ov(R,N,D);const W=_v(R);let X;W==="left"?X=D.x:W==="center"?X=D.x-N.w/2:X=D.x-N.w;const V=X+N.w;n._pointLabelItems[o]={x:D.x,y:D.y,textAlign:W,left:X,top:D.y,right:V,bottom:D.y+N.h}}}function _v(n){return n===0||n===180?"center":n<180?"left":"right"}function Ov(n,t,i){n===90||n===270?i.y-=t.h/2:(n>270||n<90)&&(i.y-=t.h)}function Lv(n,t){const{ctx:i,options:{pointLabels:o}}=n;for(let a=t-1;a>=0;a--){const c=o.setContext(n.getContext(a)),p=Zt(c.font),{x:g,y,textAlign:w,left:C,top:_,right:L,bottom:D}=n._pointLabelItems[a],{backdropColor:R}=c;if(!Mt(R)){const N=he(c.backdropPadding);i.fillStyle=R,i.fillRect(C-N.left,_-N.top,L-C+N.width,D-_+N.height)}Ti(i,n._pointLabels[a],g,y+p.lineHeight/2,p,{color:c.color,textAlign:w,textBaseline:"middle"})}}function Zd(n,t,i,o){const{ctx:a}=n;if(i)a.arc(n.xCenter,n.yCenter,t,0,Ot);else{let c=n.getPointPosition(0,t);a.moveTo(c.x,c.y);for(let p=1;p<o;p++)c=n.getPointPosition(p,t),a.lineTo(c.x,c.y)}}function Ev(n,t,i,o){const a=n.ctx,c=t.circular,{color:p,lineWidth:g}=t;!c&&!o||!p||!g||i<0||(a.save(),a.strokeStyle=p,a.lineWidth=g,a.setLineDash(t.borderDash),a.lineDashOffset=t.borderDashOffset,a.beginPath(),Zd(n,i,c,o),a.closePath(),a.stroke(),a.restore(
20))}function Kn(n){return Yi(n)?n:0}class Xs extends ao{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=ra(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){const t=this,{min:i,max:o}=t.getMinMax(!1);t.min=Xt(i)&&!isNaN(i)?i:0,t.max=Xt(o)&&!isNaN(o)?o:0,t.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ra(this.options))}generateTickLabels(t){const i=this;ao.prototype.generateTickLabels.call(i,t),i._pointLabels=i.getLabels().map((o,a)=>{const c=Et(i.options.pointLabels.callback,[o,a],i);return c||c===0?c:""})}fit(){const t=this,i=t.options;i.display&&i.pointLabels.display?Av(t):t.setCenterPoint(0,0,0,0)}_setReductions(t,i,o){const a=this;let c=i.l/Math.sin(o.l),p=Math.max(i.r-a.width,0)/Math.sin(o.r),g=-i.t/Math.cos(o.t),y=-Math.max(i.b-(a.height-a.paddingTop),0)/Math.cos(o.b);c=Kn(c),p=Kn(p),g=Kn(g),y=Kn(y),a.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(c+p)/2),Math.floor(t-(g+y)/2))),a.setCenterPoint(c,p,g,y)}setCenterPoint(t,i,o,a){const c=this,p=c.width-i-c.drawingArea,g=t+c.drawingArea,y=o+c.drawingArea,w=c.height-c.paddingTop-a-c.drawingArea;c.xCenter=Math.floor((g+p)/2+c.left),c.yCenter=Math.floor((y+w)/2+c.top+c.paddingTop)}getIndexAngle(t){const i=Ot/this.getLabels().length,o=this.options.startAngle||0;return Se(t*i+Xe(o))}getDistanceFromCenterForValue(t){const i=this;if(Mt(t))return NaN;const o=i.drawingArea/(i.max-i.min);return i.options.reverse?(i.max-t)*o:(t-i.min)*o}getValueForDistanceFromCenter(t){if(Mt(t))return NaN;const i=this,o=t/(i.drawingArea/(i.max-i.min));return i.options.reverse?i.max-o:i.min+o}getPointPosition(t,i){const o=this,a=o.getIndexAngle(t)-ie;return{x:Math.cos(a)*i+o.xCenter,y:Math.sin(a)*i+o.yCenter,angle:a}}getPointPositionForValue(t,i){return this.getPointPosition(t,this.getDistanceFromCenterForValue(i))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:i,top:o,right:a,bottom:c}=this._pointLabelItems[t];return{left:i,top:o,right:a,bottom:c}}drawBackground(){const t=this,{backgroundColor:i,grid:{circular:o}}=t.options;if(i){const a=t.ctx;a.save(),a.beginPath(),Zd(t,t.getDistanceFromCenterForValue(t._endValue),o,t.getLabels().length),a.closePath(),a.fillStyle=i,a.fill(),a.restore()}}drawGrid(){const t=this,i=t.ctx,o=t.options,{angleLines:a,grid:c}=o,p=t.getLabels().length;let g,y,w;if(o.pointLabels.display&&Lv(t,p),c.display&&t.ticks.forEach((C,_)=>{if(_!==0){y=t.getDistanceFromCenterForValue(C.value);const L=c.setContext(t.getContext(_-1));Ev(t,L,y,p)}}),a.display){for(i.save(),g=t.getLabels().length-1;g>=0;g--){const C=a.setContext(t.getContext(g)),{color:_,lineWidth:L}=C;!L||!_||(i.lineWidth=L,i.strokeStyle=_,i.setLineDash(C.borderDash),i.lineDashOffset=C.borderDashOffset,y=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max),w=t.getPointPosition(g,y),i.beginPath(),i.moveTo(t.xCenter,t.yCenter),i.lineTo(w.x,w.y),i.stroke())}i.restore()}}drawLabels(){const t=this,i=t.ctx,o=t.options,a=o.ticks;if(!a.display)return;const c=t.getIndexAngle(0);let p,g;i.save(),i.translate(t.xCenter,t.yCenter),i.rotate(c),i.textAlign="center",i.textBaseline="middle",t.ticks.forEach((y,w)=>{if(w===0&&!o.reverse)return;const C=a.setContext(t.getContext(w)),_=Zt(C.font);if(p=t.getDistanceFromCenterForValue(t.ticks[w].value),C.showLabelBackdrop){g=i.measureText(y.label).width,i.fillStyle=C.backdropColor;const L=he(C.backdropPadding);i.fillRect(-g/2-L.left,-p-_.size/2-L.top,g+L.width,_.size+L.height)}Ti(i,y.label,0,-p,_,{color:C.color})}),i.restore()}drawTitle(){}}Xs.id="radialLinear";Xs.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPadding:2,callback:xo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5}};Xs.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Xs.descriptors={angleLines:{_fallback:"grid"}};const wo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},le=Object.keys(wo);function Dv(n,t){return n-t}function Kc(n,t){if(Mt(t))return null;const i=n._adapter,o=n.options.time,{parser:a,round:c,isoWeekday:p}=o;let g=t;
20return typeof a=="function"&&(g=a(g)),Xt(g)||(g=typeof a=="string"?i.parse(g,a):i.parse(g)),g===null?null:(c&&(g=c==="week"&&(Yi(p)||p===!0)?i.startOf(g,"isoWeek",p):i.startOf(g,c)),+g)}function qc(n,t,i,o){const a=le.length;for(let c=le.indexOf(n);c<a-1;++c){const p=wo[le[c]],g=p.steps?p.steps:Number.MAX_SAFE_INTEGER;if(p.common&&Math.ceil((i-t)/(g*p.size))<=o)return le[c]}return le[a-1]}function Iv(n,t,i,o,a){for(let c=le.length-1;c>=le.indexOf(i);c--){const p=le[c];if(wo[p].common&&n._adapter.diff(a,o,p)>=t-1)return p}return le[i?le.indexOf(i):0]}function Rv(n){for(let t=le.indexOf(n)+1,i=le.length;t<i;++t)if(wo[le[t]].common)return le[t]}function Zc(n,t,i){if(!i)n[t]=!0;else if(i.length){const{lo:o,hi:a}=ho(i,t),c=i[o]>=t?i[o]:i[a];n[c]=!0}}function Bv(n,t,i,o){const a=n._adapter,c=+a.startOf(t[0].value,o),p=t[t.length-1].value;let g,y;for(g=c;g<=p;g=+a.add(g,1,o))y=i[g],y>=0&&(t[y].major=!0);return t}function Qc(n,t,i){const o=[],a={},c=t.length;let p,g;for(p=0;p<c;++p)g=t[p],a[g]=p,o.push({value:g,major:!1});return c===0||!i?o:Bv(n,o,a,i)}class Vs extends _i{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1}init(t,i){const o=t.time||(t.time={}),a=this._adapter=new my._date(t.adapters.date);As(o.displayFormats,a.formats()),super.init(t),this._normalized=i.normalized}parse(t,i){return t===void 0?null:Kc(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this,i=t.options,o=t._adapter,a=i.time.unit||"day";let{min:c,max:p,minDefined:g,maxDefined:y}=t.getUserBounds();function w(C){!g&&!isNaN(C.min)&&(c=Math.min(c,C.min)),!y&&!isNaN(C.max)&&(p=Math.max(p,C.max))}(!g||!y)&&(w(t._getLabelBounds()),(i.bounds!=="ticks"||i.ticks.source!=="labels")&&w(t.getMinMax(!1))),c=Xt(c)&&!isNaN(c)?c:+o.startOf(Date.now(),a),p=Xt(p)&&!isNaN(p)?p:+o.endOf(Date.now(),a)+1,t.min=Math.min(c,p-1),t.max=Math.max(c+1,p)}_getLabelBounds(){const t=this.getLabelTimestamps();let i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return t.length&&(i=t[0],o=t[t.length-1]),{min:i,max:o}}buildTicks(){const t=this,i=t.options,o=i.time,a=i.ticks,c=a.source==="labels"?t.getLabelTimestamps():t._generate();i.bounds==="ticks"&&c.length&&(t.min=t._userMin||c[0],t.max=t._userMax||c[c.length-1]);const p=t.min,g=t.max,y=ub(c,p,g);return t._unit=o.unit||(a.autoSkip?qc(o.minUnit,t.min,t.max,t._getLabelCapacity(p)):Iv(t,y.length,o.minUnit,t.min,t.max)),t._majorUnit=!a.major.enabled||t._unit==="year"?void 0:Rv(t._unit),t.initOffsets(c),i.reverse&&y.reverse(),Qc(t,y,t._majorUnit)}initOffsets(t){const i=this;let o=0,a=0,c,p;i.options.offset&&t.length&&(c=i.getDecimalForValue(t[0]),t.length===1?o=1-c:o=(i.getDecimalForValue(t[1])-c)/2,p=i.getDecimalForValue(t[t.length-1]),t.length===1?a=p:a=(p-i.getDecimalForValue(t[t.length-2]))/2);const g=t.length<3?.5:.25;o=Ye(o,0,g),a=Ye(a,0,g),i._offsets={start:o,end:a,factor:1/(o+1+a)}}_generate(){const t=this,i=t._adapter,o=t.min,a=t.max,c=t.options,p=c.time,g=p.unit||qc(p.minUnit,o,a,t._getLabelCapacity(o)),y=wt(p.stepSize,1),w=g==="week"?p.isoWeekday:!1,C=Yi(w)||w===!0,_={};let L=o,D,R;if(C&&(L=+i.startOf(L,"isoWeek",w)),L=+i.startOf(L,C?"day":g),i.diff(a,o,g)>1e5*y)throw new Error(o+" and "+a+" are too far apart with stepSize of "+y+" "+g);const N=c.ticks.source==="data"&&t.getDataTimestamps();for(D=L,R=0;D<a;D=+i.add(D,y,g),R++)Zc(_,D,N);return(D===a||c.bounds==="ticks"||R===1)&&Zc(_,D,N),Object.keys(_).sort((W,X)=>W-X).map(W=>+W)}getLabelForValue(t){const i=this,o=i._adapter,a=i.options.time;return a.tooltipFormat?o.format(t,a.tooltipFormat):o.format(t,a.displayFormats.datetime)}_tickFormatFunction(t,i,o,a){const c=this,p=c.options,g=p.time.displayFormats,y=c._unit,w=c._majorUnit,C=y&&g[y],_=w&&g[w],L=o[i],D=w&&_&&L&&L.major,R=c._adapter.format(t,a||(D?_:C)),N=p.ticks.callback;return N?N(R,i,o):R}generateTickLabels(t){let i,o,a;for(i=0,o=t.length;i<o;++i)a=t[i],a.label=this._tickFormatFunction(a.value,i,t)}getDecimalForValue(t){const i=this;return t===null?NaN:(t-i.min)/(i.max-i.min)}getPixelForValue(t){const i=this,o=i._offsets,a=i.getDecimalForValue(t);return i.getPixelForDecimal((o.start+a)*o.factor)}getValueForPixel(t){const i=this,o=i._offsets,a=i.getDecimalForPixel(t)/o.factor-o.end;return i.min+a*(i.max-i.min)}_getLabelSize(t){const i=this,o=i.options.ticks,a=i.ctx.measureText(t).width,c=Xe(i.isHorizontal()?o.maxRotation:o.minRotation),p=Math.cos(c),g=Math.sin(c),y=i._resolveTickFontOptions(0).size;
20return{w:a*p+y*g,h:a*g+y*p}}_getLabelCapacity(t){const i=this,o=i.options.time,a=o.displayFormats,c=a[o.unit]||a.millisecond,p=i._tickFormatFunction(t,0,Qc(i,[t],i._majorUnit),c),g=i._getLabelSize(p),y=Math.floor(i.isHorizontal()?i.width/g.w:i.height/g.h)-1;return y>0?y:1}getDataTimestamps(){const t=this;let i=t._cache.data||[],o,a;if(i.length)return i;const c=t.getMatchingVisibleMetas();if(t._normalized&&c.length)return t._cache.data=c[0].controller.getAllParsedValues(t);for(o=0,a=c.length;o<a;++o)i=i.concat(c[o].controller.getAllParsedValues(t));return t._cache.data=t.normalize(i)}getLabelTimestamps(){const t=this,i=t._cache.labels||[];let o,a;if(i.length)return i;const c=t.getLabels();for(o=0,a=c.length;o<a;++o)i.push(Kc(t,c[o]));return t._cache.labels=t._normalized?i:t.normalize(i)}normalize(t){return yd(t.sort(Dv))}}Vs.id="time";Vs.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function Jc(n,t,i){let o,a,c,p;if(i)o=Math.floor(t),a=Math.ceil(t),c=n[o],p=n[a];else{const y=ho(n,t);c=y.lo,p=y.hi,o=n[c],a=n[p]}const g=a-o;return g?c+(p-c)*(t-o)/g:c}class ba extends Vs{constructor(t){super(t),this._table=[],this._maxIndex=void 0}initOffsets(){const t=this,i=t._getTimestampsForTable();t._table=t.buildLookupTable(i),t._maxIndex=t._table.length-1,super.initOffsets(i)}buildLookupTable(t){const i=this,{min:o,max:a}=i;if(!t.length)return[{time:o,pos:0},{time:a,pos:1}];const c=[o];let p,g,y;for(p=0,g=t.length;p<g;++p)y=t[p],y>o&&y<a&&c.push(y);return c.push(a),c}_getTimestampsForTable(){const t=this;let i=t._cache.all||[];if(i.length)return i;const o=t.getDataTimestamps(),a=t.getLabelTimestamps();return o.length&&a.length?i=t.normalize(o.concat(a)):i=o.length?o:a,i=t._cache.all=i,i}getPixelForValue(t,i){const o=this,a=o._offsets,c=o._normalized&&o._maxIndex>0&&!Mt(i)?i/o._maxIndex:o.getDecimalForValue(t);return o.getPixelForDecimal((a.start+c)*a.factor)}getDecimalForValue(t){return Jc(this._table,t)/this._maxIndex}getValueForPixel(t){const i=this,o=i._offsets,a=i.getDecimalForPixel(t)/o.factor-o.end;return Jc(i._table,a*this._maxIndex,!0)}}ba.id="timeseries";ba.defaults=Vs.defaults;var zv=Object.freeze({__proto__:null,CategoryScale:ro,LinearScale:ma,LogarithmicScale:xa,RadialLinearScale:Xs,TimeScale:Vs,TimeSeriesScale:ba});const $v=[gy,W0,kv,zv],Qd="label";function td(n,t){typeof n=="function"?n(t):n&&(n.current=t)}function Fv(n,t){const i=n.options;i&&t&&Object.assign(i,t)}function Jd(n,t){n.labels=t}function tu(n,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qd;const o=[];n.datasets=t.map(a=>{const c=n.datasets.find(p=>p[i]===a[i]);return!c||!a.data||o.includes(c)?{...a}:(o.push(c),Object.assign(c,a),c)})}function Nv(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qd;const i={labels:[],datasets:[]};return Jd(i,n.labels),tu(i,n.datasets,t),i}function Wv(n,t){const{height:i=150,width:o=300,redraw:a=!1,datasetIdKey:c,type:p,data:g,options:y,plugins:w=[],fallbackContent:C,updateMode:_,...L}=n,D=Me.useRef(null),R=Me.useRef(null),N=()=>{D.current&&(R.current=new bo(D.current,{type:p,data:Nv(g,c),options:y&&{...y},plugins:w}),td(t,R.current))},W=()=>{td(t,null),R.current&&(R.current.destroy(),R.current=null)};return Me.useEffect(()=>{!a&&R.current&&y&&Fv(R.current,y)},[a,y]),Me.useEffect(()=>{!a&&R.current&&Jd(R.current.config.data,g.labels)},[a,g.labels]),Me.useEffect(()=>{!a&&R.current&&g.datasets&&tu(R.current.config.data,g.datasets,c)},[a,g.datasets]),Me.useEffect(()=>{R.current&&(a?(W(),setTimeout(N)):R.current.update(_))},[a,y,g.labels,g.datasets,_]),Me.useEffect(()=>{R.current&&(W(),setTimeout(N))},[p]),Me.useEffect(()=>(N(),()=>W()),[]),sd.createElement("canvas",{ref:D,role:"img",height:i,width:o,...L},C)}const Hv=Me.forwardRef(Wv);function jv(n,t){return bo.register(t),Me.forwardRef((i,o)=>sd.createElement(Hv,{...i,ref:o,type:n}))}const Uv=jv("bar",Ws);export{Uv as B,bo as C,Vv as H,Yv as a,$v as r};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.