@kong-ui-public/analytics-chart 4.0.2 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vitals-chart.es.js +3 -3
- package/dist/vitals-chart.umd.js +12 -12
- package/package.json +4 -4
package/dist/vitals-chart.umd.js
CHANGED
|
@@ -8,37 +8,37 @@
|
|
|
8
8
|
* https://www.chartjs.org
|
|
9
9
|
* (c) 2024 Chart.js Contributors
|
|
10
10
|
* Released under the MIT License
|
|
11
|
-
*/function $e(){}const jp=(()=>{let n=0;return()=>n++})();function st(n){return n===null||typeof n>"u"}function mt(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function lt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function It(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function ve(n,t){return It(n)?n:t}function rt(n,t){return typeof n>"u"?t:n}const Vp=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,dc=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function Tt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function St(n,t,e,r){let i,a,s;if(mt(n))if(a=n.length,r)for(i=a-1;i>=0;i--)t.call(e,n[i],i);else for(i=0;i<a;i++)t.call(e,n[i],i);else if(lt(n))for(s=Object.keys(n),a=s.length,i=0;i<a;i++)t.call(e,n[s[i]],s[i])}function mi(n,t){let e,r,i,a;if(!n||!t||n.length!==t.length)return!1;for(e=0,r=n.length;e<r;++e)if(i=n[e],a=t[e],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function yi(n){if(mt(n))return n.map(yi);if(lt(n)){const t=Object.create(null),e=Object.keys(n),r=e.length;let i=0;for(;i<r;++i)t[e[i]]=yi(n[e[i]]);return t}return n}function fc(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function qp(n,t,e,r){if(!fc(n))return;const i=t[n],a=e[n];lt(i)&<(a)?Tr(i,a,r):t[n]=yi(a)}function Tr(n,t,e){const r=mt(t)?t:[t],i=r.length;if(!lt(n))return n;e=e||{};const a=e.merger||qp;let s;for(let o=0;o<i;++o){if(s=r[o],!lt(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)a(l[c],n,s,e)}return n}function Sr(n,t){return Tr(n,t,{merger:Xp})}function Xp(n,t,e){if(!fc(n))return;const r=t[n],i=e[n];lt(r)&<(i)?Sr(r,i):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=yi(i))}const hc={"":n=>n,x:n=>n.x,y:n=>n.y};function Gp(n){const t=n.split("."),e=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(e.push(r),r="");return e}function Kp(n){const t=Gp(n);return e=>{for(const r of t){if(r==="")break;e=e&&e[r]}return e}}function cn(n,t){return(hc[t]||(hc[t]=Kp(t)))(n)}function Ua(n){return n.charAt(0).toUpperCase()+n.slice(1)}const de=n=>typeof n<"u",fe=n=>typeof n=="function",pc=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Qp(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const dt=Math.PI,kt=2*dt,Zp=kt+dt,bi=Number.POSITIVE_INFINITY,Ba=dt/180,Et=dt/2,Te=dt/4,vi=dt*2/3,un=Math.log10,Le=Math.sign;function Mr(n,t,e){return Math.abs(n-t)<e}function gc(n){const t=Math.round(n);n=Mr(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(un(n))),r=n/e;return(r<=1?1:r<=2?2:r<=5?5:10)*e}function Jp(n){const t=[],e=Math.sqrt(n);let r;for(r=1;r<e;r++)n%r===0&&(t.push(r),t.push(n/r));return e===(e|0)&&t.push(e),t.sort((i,a)=>i-a).pop(),t}function dn(n){return!isNaN(parseFloat(n))&&isFinite(n)}function tg(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function mc(n,t,e){let r,i,a;for(r=0,i=n.length;r<i;r++)a=n[r][e],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Xt(n){return n*(dt/180)}function xi(n){return n*(180/dt)}function yc(n){if(!It(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function bc(n,t){const e=t.x-n.x,r=t.y-n.y,i=Math.sqrt(e*e+r*r);let a=Math.atan2(r,e);return a<-.5*dt&&(a+=kt),{angle:a,distance:i}}function Jn(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function eg(n,t){return(n-t+Zp)%kt-dt}function xe(n){return(n%kt+kt)%kt}function Cr(n,t,e,r){const i=xe(n),a=xe(t),s=xe(e),o=xe(a-i),l=xe(s-i),c=xe(i-a),u=xe(i-s);return i===a||i===s||r&&a===s||o>l&&c<u}function Qt(n,t,e){return Math.max(t,Math.min(e,n))}function ng(n){return Qt(n,-32768,32767)}function je(n,t,e,r=1e-6){return n>=Math.min(t,e)-r&&n<=Math.max(t,e)+r}function Wa(n,t,e){e=e||(s=>n[s]<t);let r=n.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,e(a)?i=a:r=a;return{lo:i,hi:r}}const Ve=(n,t,e,r)=>Wa(n,e,r?i=>{const a=n[i][t];return a<e||a===e&&n[i+1][t]===e}:i=>n[i][t]<e),rg=(n,t,e)=>Wa(n,e,r=>n[r][t]>=e);function ig(n,t,e){let r=0,i=n.length;for(;r<i&&n[r]<t;)r++;for(;i>r&&n[i-1]>e;)i--;return r>0||i<n.length?n.slice(r,i):n}const vc=["push","pop","shift","splice","unshift"];function ag(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),vc.forEach(e=>{const r="_onData"+Ua(e),i=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...a){const s=i.apply(this,a);return n._chartjs.listeners.forEach(o=>{typeof o[r]=="function"&&o[r](...a)}),s}})})}function xc(n,t){const e=n._chartjs;if(!e)return;const r=e.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(vc.forEach(a=>{delete n[a]}),delete n._chartjs)}function _c(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const wc=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Tc(n,t){let e=[],r=!1;return function(...i){e=i,r||(r=!0,wc.call(window,()=>{r=!1,n.apply(t,e)}))}}function sg(n,t){let e;return function(...r){return t?(clearTimeout(e),e=setTimeout(n,t,r)):n.apply(this,r),t}}const za=n=>n==="start"?"left":n==="end"?"right":"center",re=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,og=(n,t,e,r)=>n===(r?"left":"right")?e:n==="center"?(t+e)/2:t;function Sc(n,t,e){const r=t.length;let i=0,a=r;if(n._sorted){const{iScale:s,_parsed:o}=n,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:f}=s.getUserBounds();d&&(i=Qt(Math.min(Ve(o,l,c).lo,e?r:Ve(t,l,s.getPixelForValue(c)).lo),0,r-1)),f?a=Qt(Math.max(Ve(o,s.axis,u,!0).hi+1,e?0:Ve(t,l,s.getPixelForValue(u),!0).hi+1),i,r)-i:a=r-i}return{start:i,count:a}}function Mc(n){const{xScale:t,yScale:e,_scaleRanges:r}=n,i={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!r)return n._scaleRanges=i,!0;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==e.min||r.ymax!==e.max;return Object.assign(r,i),a}const _i=n=>n===0||n===1,Cc=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*kt/e)),Dc=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*kt/e)+1,Dr={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*Et)+1,easeOutSine:n=>Math.sin(n*Et),easeInOutSine:n=>-.5*(Math.cos(dt*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=>_i(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=>_i(n)?n:Cc(n,.075,.3),easeOutElastic:n=>_i(n)?n:Dc(n,.075,.3),easeInOutElastic(n){return _i(n)?n:n<.5?.5*Cc(n*2,.1125,.45):.5+.5*Dc(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-Dr.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?Dr.easeInBounce(n*2)*.5:Dr.easeOutBounce(n*2-1)*.5+.5};function Ya(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function kc(n){return Ya(n)?n:new wr(n)}function Ha(n){return Ya(n)?n:new wr(n).saturate(.5).darken(.1).hexString()}const lg=["x","y","borderWidth","radius","tension"],cg=["color","borderColor","backgroundColor"];function ug(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:cg},numbers:{type:"number",properties:lg}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function dg(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Oc=new Map;function fg(n,t){t=t||{};const e=n+JSON.stringify(t);let r=Oc.get(e);return r||(r=new Intl.NumberFormat(n,t),Oc.set(e,r)),r}function kr(n,t,e){return fg(t,e).format(n)}const Pc={values(n){return mt(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const r=this.chart.options.locale;let i,a=n;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),a=hg(n,e)}const s=un(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),kr(n,r,l)},logarithmic(n,t,e){if(n===0)return"0";const r=e[t].significand||n/Math.pow(10,Math.floor(un(n)));return[1,2,3,5,10,15].includes(r)||t>.8*e.length?Pc.numeric.call(this,n,t,e):""}};function hg(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var wi={formatters:Pc};function pg(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:wi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const On=Object.create(null),$a=Object.create(null);function Or(n,t){if(!t)return n;const e=t.split(".");for(let r=0,i=e.length;r<i;++r){const a=e[r];n=n[a]||(n[a]=Object.create(null))}return n}function ja(n,t,e){return typeof t=="string"?Tr(Or(n,t),e):Tr(Or(n,""),t)}class gg{constructor(t,e){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=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>Ha(i.backgroundColor),this.hoverBorderColor=(r,i)=>Ha(i.borderColor),this.hoverColor=(r,i)=>Ha(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ja(this,t,e)}get(t){return Or(this,t)}describe(t,e){return ja($a,t,e)}override(t,e){return ja(On,t,e)}route(t,e,r,i){const a=Or(this,t),s=Or(this,r),o="_"+e;Object.defineProperties(a,{[o]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[o],c=s[i];return lt(l)?Object.assign({},c,l):rt(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(e=>e(this))}}var Ut=new gg({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ug,dg,pg]);function mg(n){return!n||st(n.size)||st(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Ti(n,t,e,r,i){let a=t[i];return a||(a=t[i]=n.measureText(i).width,e.push(i)),a>r&&(r=a),r}function yg(n,t,e,r){r=r||{};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),n.save(),n.font=t;let s=0;const o=e.length;let l,c,u,d,f;for(l=0;l<o;l++)if(d=e[l],d!=null&&!mt(d))s=Ti(n,i,a,s,d);else if(mt(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!mt(f)&&(s=Ti(n,i,a,s,f));n.restore();const p=a.length/2;if(p>e.length){for(l=0;l<p;l++)delete i[a[l]];a.splice(0,p)}return s}function Pn(n,t,e){const r=n.currentDevicePixelRatio,i=e!==0?Math.max(e/2,.5):0;return Math.round((t-i)*r)/r+i}function Ec(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function Va(n,t,e,r){Rc(n,t,e,r,null)}function Rc(n,t,e,r,i){let a,s,o,l,c,u,d,f;const p=t.pointStyle,b=t.rotation,x=t.radius;let g=(b||0)*Ba;if(p&&typeof p=="object"&&(a=p.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){n.save(),n.translate(e,r),n.rotate(g),n.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),n.restore();return}if(!(isNaN(x)||x<=0)){switch(n.beginPath(),p){default:i?n.ellipse(e,r,i/2,x,0,0,kt):n.arc(e,r,x,0,kt),n.closePath();break;case"triangle":u=i?i/2:x,n.moveTo(e+Math.sin(g)*u,r-Math.cos(g)*x),g+=vi,n.lineTo(e+Math.sin(g)*u,r-Math.cos(g)*x),g+=vi,n.lineTo(e+Math.sin(g)*u,r-Math.cos(g)*x),n.closePath();break;case"rectRounded":c=x*.516,l=x-c,s=Math.cos(g+Te)*l,d=Math.cos(g+Te)*(i?i/2-c:l),o=Math.sin(g+Te)*l,f=Math.sin(g+Te)*(i?i/2-c:l),n.arc(e-d,r-o,c,g-dt,g-Et),n.arc(e+f,r-s,c,g-Et,g),n.arc(e+d,r+o,c,g,g+Et),n.arc(e-f,r+s,c,g+Et,g+dt),n.closePath();break;case"rect":if(!b){l=Math.SQRT1_2*x,u=i?i/2:l,n.rect(e-u,r-l,2*u,2*l);break}g+=Te;case"rectRot":d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+f,r-s),n.lineTo(e+d,r+o),n.lineTo(e-f,r+s),n.closePath();break;case"crossRot":g+=Te;case"cross":d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+d,r+o),n.moveTo(e+f,r-s),n.lineTo(e-f,r+s);break;case"star":d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+d,r+o),n.moveTo(e+f,r-s),n.lineTo(e-f,r+s),g+=Te,d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+d,r+o),n.moveTo(e+f,r-s),n.lineTo(e-f,r+s);break;case"line":s=i?i/2:Math.cos(g)*x,o=Math.sin(g)*x,n.moveTo(e-s,r-o),n.lineTo(e+s,r+o);break;case"dash":n.moveTo(e,r),n.lineTo(e+Math.cos(g)*(i?i/2:x),r+Math.sin(g)*x);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function qe(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Pr(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function Er(n){n.restore()}function bg(n,t,e,r,i){if(!t)return n.lineTo(e.x,e.y);if(i==="middle"){const a=(t.x+e.x)/2;n.lineTo(a,t.y),n.lineTo(a,e.y)}else i==="after"!=!!r?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function vg(n,t,e,r){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?e.cp2x:e.cp1x,r?e.cp2y:e.cp1y,e.x,e.y)}function xg(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),st(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function _g(n,t,e,r,i){if(i.strikethrough||i.underline){const a=n.measureText(r),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,l=e-a.actualBoundingBoxAscent,c=e+a.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=i.decorationWidth||2,n.moveTo(s,u),n.lineTo(o,u),n.stroke()}}function wg(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function En(n,t,e,r,i,a={}){const s=mt(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(n.save(),n.font=i.string,xg(n,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&wg(n,a.backdrop),o&&(a.strokeColor&&(n.strokeStyle=a.strokeColor),st(a.strokeWidth)||(n.lineWidth=a.strokeWidth),n.strokeText(c,e,r,a.maxWidth)),n.fillText(c,e,r,a.maxWidth),_g(n,e,r,c,a),r+=Number(i.lineHeight);n.restore()}function tr(n,t){const{x:e,y:r,w:i,h:a,radius:s}=t;n.arc(e+s.topLeft,r+s.topLeft,s.topLeft,1.5*dt,dt,!0),n.lineTo(e,r+a-s.bottomLeft),n.arc(e+s.bottomLeft,r+a-s.bottomLeft,s.bottomLeft,dt,Et,!0),n.lineTo(e+i-s.bottomRight,r+a),n.arc(e+i-s.bottomRight,r+a-s.bottomRight,s.bottomRight,Et,0,!0),n.lineTo(e+i,r+s.topRight),n.arc(e+i-s.topRight,r+s.topRight,s.topRight,0,-Et,!0),n.lineTo(e+s.topLeft,r)}const Tg=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Sg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Mg(n,t){const e=(""+n).match(Tg);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const Cg=n=>+n||0;function qa(n,t){const e={},r=lt(t),i=r?Object.keys(t):t,a=lt(n)?r?s=>rt(n[s],n[t[s]]):s=>n[s]:()=>n;for(const s of i)e[s]=Cg(a(s));return e}function Ac(n){return qa(n,{top:"y",right:"x",bottom:"y",left:"x"})}function fn(n){return qa(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Gt(n){const t=Ac(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Rt(n,t){n=n||{},t=t||Ut.font;let e=rt(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let r=rt(n.style,t.style);r&&!(""+r).match(Sg)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:rt(n.family,t.family),lineHeight:Mg(rt(n.lineHeight,t.lineHeight),e),size:e,style:r,weight:rt(n.weight,t.weight),string:""};return i.string=mg(i),i}function Rr(n,t,e,r){let i=!0,a,s,o;for(a=0,s=n.length;a<s;++a)if(o=n[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),i=!1),e!==void 0&&mt(o)&&(o=o[e%o.length],i=!1),o!==void 0))return r&&!i&&(r.cacheable=!1),o}function Dg(n,t,e){const{min:r,max:i}=n,a=dc(t,(i-r)/2),s=(o,l)=>e&&o===0?0:o+l;return{min:s(r,-Math.abs(a)),max:s(i,a)}}function hn(n,t){return Object.assign(Object.create(n),t)}function Xa(n,t=[""],e,r,i=()=>n[0]){const a=e||n;typeof r>"u"&&(r=Uc("_fallback",n));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:a,_fallback:r,_getTarget:i,override:o=>Xa([o,...n],t,a,r)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete n[0][l],!0},get(o,l){return Ic(o,l,()=>Ig(l,t,n,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,l){return Bc(o).includes(l)},ownKeys(o){return Bc(o)},set(o,l,c){const u=o._storage||(o._storage=i());return o[l]=u[l]=c,delete o._keys,!0}})}function er(n,t,e,r){const i={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Lc(n,r),setContext:a=>er(n,a,e,r),override:a=>er(n.override(a),t,e,r)};return new Proxy(i,{deleteProperty(a,s){return delete a[s],delete n[s],!0},get(a,s,o){return Ic(a,s,()=>Og(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(n,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,s)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(a,s){return Reflect.has(n,s)},ownKeys(){return Reflect.ownKeys(n)},set(a,s,o){return n[s]=o,delete a[s],!0}})}function Lc(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=n;return{allKeys:i,scriptable:e,indexable:r,isScriptable:fe(e)?e:()=>e,isIndexable:fe(r)?r:()=>r}}const kg=(n,t)=>n?n+Ua(t):t,Ga=(n,t)=>lt(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ic(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const r=e();return n[t]=r,r}function Og(n,t,e){const{_proxy:r,_context:i,_subProxy:a,_descriptors:s}=n;let o=r[t];return fe(o)&&s.isScriptable(t)&&(o=Pg(t,o,n,e)),mt(o)&&o.length&&(o=Eg(t,o,n,s.isIndexable)),Ga(t,o)&&(o=er(o,i,a&&a[t],s)),o}function Pg(n,t,e,r){const{_proxy:i,_context:a,_subProxy:s,_stack:o}=e;if(o.has(n))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+n);o.add(n);let l=t(a,s||r);return o.delete(n),Ga(n,l)&&(l=Ka(i._scopes,i,n,l)),l}function Eg(n,t,e,r){const{_proxy:i,_context:a,_subProxy:s,_descriptors:o}=e;if(typeof a.index<"u"&&r(n))return t[a.index%t.length];if(lt(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Ka(c,i,n,u);t.push(er(d,a,s&&s[n],o))}}return t}function Nc(n,t,e){return fe(n)?n(t,e):n}const Rg=(n,t)=>n===!0?t:typeof n=="string"?cn(t,n):void 0;function Ag(n,t,e,r,i){for(const a of t){const s=Rg(e,a);if(s){n.add(s);const o=Nc(s._fallback,e,i);if(typeof o<"u"&&o!==e&&o!==r)return o}else if(s===!1&&typeof r<"u"&&e!==r)return null}return!1}function Ka(n,t,e,r){const i=t._rootScopes,a=Nc(t._fallback,e,r),s=[...n,...i],o=new Set;o.add(r);let l=Fc(o,s,e,a||e,r);return l===null||typeof a<"u"&&a!==e&&(l=Fc(o,s,a,l,r),l===null)?!1:Xa(Array.from(o),[""],i,a,()=>Lg(t,e,r))}function Fc(n,t,e,r,i){for(;e;)e=Ag(n,t,e,r,i);return e}function Lg(n,t,e){const r=n._getTarget();t in r||(r[t]={});const i=r[t];return mt(i)&<(e)?e:i||{}}function Ig(n,t,e,r){let i;for(const a of t)if(i=Uc(kg(a,n),e),typeof i<"u")return Ga(n,i)?Ka(e,r,n,i):i}function Uc(n,t){for(const e of t){if(!e)continue;const r=e[n];if(typeof r<"u")return r}}function Bc(n){let t=n._keys;return t||(t=n._keys=Ng(n._scopes)),t}function Ng(n){const t=new Set;for(const e of n)for(const r of Object.keys(e).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function Wc(n,t,e,r){const{iScale:i}=n,{key:a="r"}=this._parsing,s=new Array(r);let o,l,c,u;for(o=0,l=r;o<l;++o)c=o+e,u=t[c],s[o]={r:i.parse(cn(u,a),c)};return s}const Fg=Number.EPSILON||1e-14,nr=(n,t)=>t<n.length&&!n[t].skip&&n[t],zc=n=>n==="x"?"y":"x";function Ug(n,t,e,r){const i=n.skip?t:n,a=t,s=e.skip?t:e,o=Jn(a,i),l=Jn(s,a);let c=o/(o+l),u=l/(o+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:a.x-d*(s.x-i.x),y:a.y-d*(s.y-i.y)},next:{x:a.x+f*(s.x-i.x),y:a.y+f*(s.y-i.y)}}}function Bg(n,t,e){const r=n.length;let i,a,s,o,l,c=nr(n,0);for(let u=0;u<r-1;++u)if(l=c,c=nr(n,u+1),!(!l||!c)){if(Mr(t[u],0,Fg)){e[u]=e[u+1]=0;continue}i=e[u]/t[u],a=e[u+1]/t[u],o=Math.pow(i,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),e[u]=i*s*t[u],e[u+1]=a*s*t[u])}}function Wg(n,t,e="x"){const r=zc(e),i=n.length;let a,s,o,l=nr(n,0);for(let c=0;c<i;++c){if(s=o,o=l,l=nr(n,c+1),!o)continue;const u=o[e],d=o[r];s&&(a=(u-s[e])/3,o[`cp1${e}`]=u-a,o[`cp1${r}`]=d-a*t[c]),l&&(a=(l[e]-u)/3,o[`cp2${e}`]=u+a,o[`cp2${r}`]=d+a*t[c])}}function zg(n,t="x"){const e=zc(t),r=n.length,i=Array(r).fill(0),a=Array(r);let s,o,l,c=nr(n,0);for(s=0;s<r;++s)if(o=l,l=c,c=nr(n,s+1),!!l){if(c){const u=c[t]-l[t];i[s]=u!==0?(c[e]-l[e])/u:0}a[s]=o?c?Le(i[s-1])!==Le(i[s])?0:(i[s-1]+i[s])/2:i[s-1]:i[s]}Bg(n,i,a),Wg(n,a,t)}function Si(n,t,e){return Math.max(Math.min(n,e),t)}function Yg(n,t){let e,r,i,a,s,o=qe(n[0],t);for(e=0,r=n.length;e<r;++e)s=a,a=o,o=e<r-1&&qe(n[e+1],t),a&&(i=n[e],s&&(i.cp1x=Si(i.cp1x,t.left,t.right),i.cp1y=Si(i.cp1y,t.top,t.bottom)),o&&(i.cp2x=Si(i.cp2x,t.left,t.right),i.cp2y=Si(i.cp2y,t.top,t.bottom)))}function Hg(n,t,e,r,i){let a,s,o,l;if(t.spanGaps&&(n=n.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")zg(n,i);else{let c=r?n[n.length-1]:n[0];for(a=0,s=n.length;a<s;++a)o=n[a],l=Ug(c,o,n[Math.min(a+1,s-(r?0:1))%s],t.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,c=o}t.capBezierPoints&&Yg(n,e)}function Qa(){return typeof window<"u"&&typeof document<"u"}function Za(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Mi(n,t,e){let r;return typeof n=="string"?(r=parseInt(n,10),n.indexOf("%")!==-1&&(r=r/100*t.parentNode[e])):r=n,r}const Ci=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function $g(n,t){return Ci(n).getPropertyValue(t)}const jg=["top","right","bottom","left"];function Rn(n,t,e){const r={};e=e?"-"+e:"";for(let i=0;i<4;i++){const a=jg[i];r[a]=parseFloat(n[t+"-"+a+e])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Vg=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function qg(n,t){const e=n.touches,r=e&&e.length?e[0]:n,{offsetX:i,offsetY:a}=r;let s=!1,o,l;if(Vg(i,a,n.target))o=i,l=a;else{const c=t.getBoundingClientRect();o=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:o,y:l,box:s}}function pn(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:r}=t,i=Ci(e),a=i.boxSizing==="border-box",s=Rn(i,"padding"),o=Rn(i,"border","width"),{x:l,y:c,box:u}=qg(n,e),d=s.left+(u&&o.left),f=s.top+(u&&o.top);let{width:p,height:b}=t;return a&&(p-=s.width+o.width,b-=s.height+o.height),{x:Math.round((l-d)/p*e.width/r),y:Math.round((c-f)/b*e.height/r)}}function Xg(n,t,e){let r,i;if(t===void 0||e===void 0){const a=Za(n);if(!a)t=n.clientWidth,e=n.clientHeight;else{const s=a.getBoundingClientRect(),o=Ci(a),l=Rn(o,"border","width"),c=Rn(o,"padding");t=s.width-c.width-l.width,e=s.height-c.height-l.height,r=Mi(o.maxWidth,a,"clientWidth"),i=Mi(o.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:r||bi,maxHeight:i||bi}}const Di=n=>Math.round(n*10)/10;function Gg(n,t,e,r){const i=Ci(n),a=Rn(i,"margin"),s=Mi(i.maxWidth,n,"clientWidth")||bi,o=Mi(i.maxHeight,n,"clientHeight")||bi,l=Xg(n,t,e);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=Rn(i,"border","width"),p=Rn(i,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-a.width),u=Math.max(0,r?c/r:u-a.height),c=Di(Math.min(c,s,l.maxWidth)),u=Di(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Di(c/2)),(t!==void 0||e!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Di(Math.floor(u*r))),{width:c,height:u}}function Yc(n,t,e){const r=t||1,i=Math.floor(n.height*r),a=Math.floor(n.width*r);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const s=n.canvas;return s.style&&(e||!s.style.height&&!s.style.width)&&(s.style.height=`${n.height}px`,s.style.width=`${n.width}px`),n.currentDevicePixelRatio!==r||s.height!==i||s.width!==a?(n.currentDevicePixelRatio=r,s.height=i,s.width=a,n.ctx.setTransform(r,0,0,r,0,0),!0):!1}const Kg=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};Qa()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n}();function Hc(n,t){const e=$g(n,t),r=e&&e.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function An(n,t,e,r){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Qg(n,t,e,r){return{x:n.x+e*(t.x-n.x),y:r==="middle"?e<.5?n.y:t.y:r==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Zg(n,t,e,r){const i={x:n.cp2x,y:n.cp2y},a={x:t.cp1x,y:t.cp1y},s=An(n,i,e),o=An(i,a,e),l=An(a,t,e),c=An(s,o,e),u=An(o,l,e);return An(c,u,e)}const Jg=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,r){return e-r},leftForLtr(e,r){return e-r}}},tm=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function rr(n,t,e){return n?Jg(t,e):tm()}function $c(n,t){let e,r;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,r=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=r)}function jc(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Vc(n){return n==="angle"?{between:Cr,compare:eg,normalize:xe}:{between:je,compare:(t,e)=>t-e,normalize:t=>t}}function qc({start:n,end:t,count:e,loop:r,style:i}){return{start:n%e,end:t%e,loop:r&&(t-n+1)%e===0,style:i}}function em(n,t,e){const{property:r,start:i,end:a}=e,{between:s,normalize:o}=Vc(r),l=t.length;let{start:c,end:u,loop:d}=n,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&s(o(t[c%l][r]),i,a);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:n.style}}function Xc(n,t,e){if(!e)return[n];const{property:r,start:i,end:a}=e,s=t.length,{compare:o,between:l,normalize:c}=Vc(r),{start:u,end:d,loop:f,style:p}=em(n,t,e),b=[];let x=!1,g=null,m,v,y;const _=()=>l(i,y,m)&&o(i,y)!==0,T=()=>o(a,m)===0||l(a,y,m),D=()=>x||_(),O=()=>!x||T();for(let S=u,M=u;S<=d;++S)v=t[S%s],!v.skip&&(m=c(v[r]),m!==y&&(x=l(m,i,a),g===null&&D()&&(g=o(m,i)===0?S:M),g!==null&&O()&&(b.push(qc({start:g,end:S,loop:f,count:s,style:p})),g=null),M=S,y=m));return g!==null&&b.push(qc({start:g,end:d,loop:f,count:s,style:p})),b}function Gc(n,t){const e=[],r=n.segments;for(let i=0;i<r.length;i++){const a=Xc(r[i],n.points,t);a.length&&e.push(...a)}return e}function nm(n,t,e,r){let i=0,a=t-1;if(e&&!r)for(;i<t&&!n[i].skip;)i++;for(;i<t&&n[i].skip;)i++;for(i%=t,e&&(a+=i);a>i&&n[a%t].skip;)a--;return a%=t,{start:i,end:a}}function rm(n,t,e,r){const i=n.length,a=[];let s=t,o=n[t],l;for(l=t+1;l<=e;++l){const c=n[l%i];c.skip||c.stop?o.skip||(r=!1,a.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,o.skip&&(t=l)),o=c}return s!==null&&a.push({start:t%i,end:s%i,loop:r}),a}function im(n,t){const e=n.points,r=n.options.spanGaps,i=e.length;if(!i)return[];const a=!!n._loop,{start:s,end:o}=nm(e,i,a,r);if(r===!0)return Kc(n,[{start:s,end:o,loop:a}],e,t);const l=o<s?o+i:o,c=!!n._fullLoop&&s===0&&o===i-1;return Kc(n,rm(e,s,l,c),e,t)}function Kc(n,t,e,r){return!r||!r.setContext||!e?t:am(n,t,e,r)}function am(n,t,e,r){const i=n._chart.getContext(),a=Qc(n.options),{_datasetIndex:s,options:{spanGaps:o}}=n,l=e.length,c=[];let u=a,d=t[0].start,f=d;function p(b,x,g,m){const v=o?-1:1;if(b!==x){for(b+=l;e[b%l].skip;)b-=v;for(;e[x%l].skip;)x+=v;b%l!==x%l&&(c.push({start:b%l,end:x%l,loop:g,style:m}),u=m,d=x%l)}}for(const b of t){d=o?d:b.start;let x=e[d%l],g;for(f=d+1;f<=b.end;f++){const m=e[f%l];g=Qc(r.setContext(hn(i,{type:"segment",p0:x,p1:m,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:s}))),sm(g,u)&&p(d,f-1,b.loop,u),x=m,u=g}d<f-1&&p(d,f-1,b.loop,u)}return c}function Qc(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function sm(n,t){if(!t)return!1;const e=[],r=function(i,a){return Ya(a)?(e.includes(a)||e.push(a),e.indexOf(a)):a};return JSON.stringify(n,r)!==JSON.stringify(t,r)}/*!
|
|
11
|
+
*/function $e(){}const jp=(()=>{let n=0;return()=>n++})();function st(n){return n===null||typeof n>"u"}function mt(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function lt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function It(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function be(n,t){return It(n)?n:t}function rt(n,t){return typeof n>"u"?t:n}const Vp=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,dc=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function Tt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function St(n,t,e,r){let i,a,s;if(mt(n))if(a=n.length,r)for(i=a-1;i>=0;i--)t.call(e,n[i],i);else for(i=0;i<a;i++)t.call(e,n[i],i);else if(lt(n))for(s=Object.keys(n),a=s.length,i=0;i<a;i++)t.call(e,n[s[i]],s[i])}function mi(n,t){let e,r,i,a;if(!n||!t||n.length!==t.length)return!1;for(e=0,r=n.length;e<r;++e)if(i=n[e],a=t[e],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function yi(n){if(mt(n))return n.map(yi);if(lt(n)){const t=Object.create(null),e=Object.keys(n),r=e.length;let i=0;for(;i<r;++i)t[e[i]]=yi(n[e[i]]);return t}return n}function fc(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function qp(n,t,e,r){if(!fc(n))return;const i=t[n],a=e[n];lt(i)&<(a)?Tr(i,a,r):t[n]=yi(a)}function Tr(n,t,e){const r=mt(t)?t:[t],i=r.length;if(!lt(n))return n;e=e||{};const a=e.merger||qp;let s;for(let o=0;o<i;++o){if(s=r[o],!lt(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)a(l[c],n,s,e)}return n}function Sr(n,t){return Tr(n,t,{merger:Xp})}function Xp(n,t,e){if(!fc(n))return;const r=t[n],i=e[n];lt(r)&<(i)?Sr(r,i):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=yi(i))}const hc={"":n=>n,x:n=>n.x,y:n=>n.y};function Gp(n){const t=n.split("."),e=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(e.push(r),r="");return e}function Kp(n){const t=Gp(n);return e=>{for(const r of t){if(r==="")break;e=e&&e[r]}return e}}function cn(n,t){return(hc[t]||(hc[t]=Kp(t)))(n)}function Ua(n){return n.charAt(0).toUpperCase()+n.slice(1)}const de=n=>typeof n<"u",fe=n=>typeof n=="function",pc=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Qp(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const dt=Math.PI,kt=2*dt,Zp=kt+dt,vi=Number.POSITIVE_INFINITY,Ba=dt/180,Et=dt/2,Te=dt/4,bi=dt*2/3,un=Math.log10,Le=Math.sign;function Mr(n,t,e){return Math.abs(n-t)<e}function gc(n){const t=Math.round(n);n=Mr(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(un(n))),r=n/e;return(r<=1?1:r<=2?2:r<=5?5:10)*e}function Jp(n){const t=[],e=Math.sqrt(n);let r;for(r=1;r<e;r++)n%r===0&&(t.push(r),t.push(n/r));return e===(e|0)&&t.push(e),t.sort((i,a)=>i-a).pop(),t}function dn(n){return!isNaN(parseFloat(n))&&isFinite(n)}function tg(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function mc(n,t,e){let r,i,a;for(r=0,i=n.length;r<i;r++)a=n[r][e],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Xt(n){return n*(dt/180)}function xi(n){return n*(180/dt)}function yc(n){if(!It(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function vc(n,t){const e=t.x-n.x,r=t.y-n.y,i=Math.sqrt(e*e+r*r);let a=Math.atan2(r,e);return a<-.5*dt&&(a+=kt),{angle:a,distance:i}}function Jn(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function eg(n,t){return(n-t+Zp)%kt-dt}function xe(n){return(n%kt+kt)%kt}function Cr(n,t,e,r){const i=xe(n),a=xe(t),s=xe(e),o=xe(a-i),l=xe(s-i),c=xe(i-a),u=xe(i-s);return i===a||i===s||r&&a===s||o>l&&c<u}function Qt(n,t,e){return Math.max(t,Math.min(e,n))}function ng(n){return Qt(n,-32768,32767)}function je(n,t,e,r=1e-6){return n>=Math.min(t,e)-r&&n<=Math.max(t,e)+r}function Wa(n,t,e){e=e||(s=>n[s]<t);let r=n.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,e(a)?i=a:r=a;return{lo:i,hi:r}}const Ve=(n,t,e,r)=>Wa(n,e,r?i=>{const a=n[i][t];return a<e||a===e&&n[i+1][t]===e}:i=>n[i][t]<e),rg=(n,t,e)=>Wa(n,e,r=>n[r][t]>=e);function ig(n,t,e){let r=0,i=n.length;for(;r<i&&n[r]<t;)r++;for(;i>r&&n[i-1]>e;)i--;return r>0||i<n.length?n.slice(r,i):n}const bc=["push","pop","shift","splice","unshift"];function ag(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),bc.forEach(e=>{const r="_onData"+Ua(e),i=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...a){const s=i.apply(this,a);return n._chartjs.listeners.forEach(o=>{typeof o[r]=="function"&&o[r](...a)}),s}})})}function xc(n,t){const e=n._chartjs;if(!e)return;const r=e.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(bc.forEach(a=>{delete n[a]}),delete n._chartjs)}function _c(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const wc=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Tc(n,t){let e=[],r=!1;return function(...i){e=i,r||(r=!0,wc.call(window,()=>{r=!1,n.apply(t,e)}))}}function sg(n,t){let e;return function(...r){return t?(clearTimeout(e),e=setTimeout(n,t,r)):n.apply(this,r),t}}const za=n=>n==="start"?"left":n==="end"?"right":"center",re=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,og=(n,t,e,r)=>n===(r?"left":"right")?e:n==="center"?(t+e)/2:t;function Sc(n,t,e){const r=t.length;let i=0,a=r;if(n._sorted){const{iScale:s,_parsed:o}=n,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:f}=s.getUserBounds();d&&(i=Qt(Math.min(Ve(o,l,c).lo,e?r:Ve(t,l,s.getPixelForValue(c)).lo),0,r-1)),f?a=Qt(Math.max(Ve(o,s.axis,u,!0).hi+1,e?0:Ve(t,l,s.getPixelForValue(u),!0).hi+1),i,r)-i:a=r-i}return{start:i,count:a}}function Mc(n){const{xScale:t,yScale:e,_scaleRanges:r}=n,i={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!r)return n._scaleRanges=i,!0;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==e.min||r.ymax!==e.max;return Object.assign(r,i),a}const _i=n=>n===0||n===1,Cc=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*kt/e)),Dc=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*kt/e)+1,Dr={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*Et)+1,easeOutSine:n=>Math.sin(n*Et),easeInOutSine:n=>-.5*(Math.cos(dt*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=>_i(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=>_i(n)?n:Cc(n,.075,.3),easeOutElastic:n=>_i(n)?n:Dc(n,.075,.3),easeInOutElastic(n){return _i(n)?n:n<.5?.5*Cc(n*2,.1125,.45):.5+.5*Dc(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-Dr.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?Dr.easeInBounce(n*2)*.5:Dr.easeOutBounce(n*2-1)*.5+.5};function Ya(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function kc(n){return Ya(n)?n:new wr(n)}function Ha(n){return Ya(n)?n:new wr(n).saturate(.5).darken(.1).hexString()}const lg=["x","y","borderWidth","radius","tension"],cg=["color","borderColor","backgroundColor"];function ug(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:cg},numbers:{type:"number",properties:lg}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function dg(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Oc=new Map;function fg(n,t){t=t||{};const e=n+JSON.stringify(t);let r=Oc.get(e);return r||(r=new Intl.NumberFormat(n,t),Oc.set(e,r)),r}function kr(n,t,e){return fg(t,e).format(n)}const Pc={values(n){return mt(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const r=this.chart.options.locale;let i,a=n;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),a=hg(n,e)}const s=un(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),kr(n,r,l)},logarithmic(n,t,e){if(n===0)return"0";const r=e[t].significand||n/Math.pow(10,Math.floor(un(n)));return[1,2,3,5,10,15].includes(r)||t>.8*e.length?Pc.numeric.call(this,n,t,e):""}};function hg(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var wi={formatters:Pc};function pg(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:wi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const On=Object.create(null),$a=Object.create(null);function Or(n,t){if(!t)return n;const e=t.split(".");for(let r=0,i=e.length;r<i;++r){const a=e[r];n=n[a]||(n[a]=Object.create(null))}return n}function ja(n,t,e){return typeof t=="string"?Tr(Or(n,t),e):Tr(Or(n,""),t)}class gg{constructor(t,e){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=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>Ha(i.backgroundColor),this.hoverBorderColor=(r,i)=>Ha(i.borderColor),this.hoverColor=(r,i)=>Ha(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ja(this,t,e)}get(t){return Or(this,t)}describe(t,e){return ja($a,t,e)}override(t,e){return ja(On,t,e)}route(t,e,r,i){const a=Or(this,t),s=Or(this,r),o="_"+e;Object.defineProperties(a,{[o]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[o],c=s[i];return lt(l)?Object.assign({},c,l):rt(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(e=>e(this))}}var Ut=new gg({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ug,dg,pg]);function mg(n){return!n||st(n.size)||st(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Ti(n,t,e,r,i){let a=t[i];return a||(a=t[i]=n.measureText(i).width,e.push(i)),a>r&&(r=a),r}function yg(n,t,e,r){r=r||{};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),n.save(),n.font=t;let s=0;const o=e.length;let l,c,u,d,f;for(l=0;l<o;l++)if(d=e[l],d!=null&&!mt(d))s=Ti(n,i,a,s,d);else if(mt(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!mt(f)&&(s=Ti(n,i,a,s,f));n.restore();const p=a.length/2;if(p>e.length){for(l=0;l<p;l++)delete i[a[l]];a.splice(0,p)}return s}function Pn(n,t,e){const r=n.currentDevicePixelRatio,i=e!==0?Math.max(e/2,.5):0;return Math.round((t-i)*r)/r+i}function Ec(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function Va(n,t,e,r){Rc(n,t,e,r,null)}function Rc(n,t,e,r,i){let a,s,o,l,c,u,d,f;const p=t.pointStyle,v=t.rotation,x=t.radius;let g=(v||0)*Ba;if(p&&typeof p=="object"&&(a=p.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){n.save(),n.translate(e,r),n.rotate(g),n.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),n.restore();return}if(!(isNaN(x)||x<=0)){switch(n.beginPath(),p){default:i?n.ellipse(e,r,i/2,x,0,0,kt):n.arc(e,r,x,0,kt),n.closePath();break;case"triangle":u=i?i/2:x,n.moveTo(e+Math.sin(g)*u,r-Math.cos(g)*x),g+=bi,n.lineTo(e+Math.sin(g)*u,r-Math.cos(g)*x),g+=bi,n.lineTo(e+Math.sin(g)*u,r-Math.cos(g)*x),n.closePath();break;case"rectRounded":c=x*.516,l=x-c,s=Math.cos(g+Te)*l,d=Math.cos(g+Te)*(i?i/2-c:l),o=Math.sin(g+Te)*l,f=Math.sin(g+Te)*(i?i/2-c:l),n.arc(e-d,r-o,c,g-dt,g-Et),n.arc(e+f,r-s,c,g-Et,g),n.arc(e+d,r+o,c,g,g+Et),n.arc(e-f,r+s,c,g+Et,g+dt),n.closePath();break;case"rect":if(!v){l=Math.SQRT1_2*x,u=i?i/2:l,n.rect(e-u,r-l,2*u,2*l);break}g+=Te;case"rectRot":d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+f,r-s),n.lineTo(e+d,r+o),n.lineTo(e-f,r+s),n.closePath();break;case"crossRot":g+=Te;case"cross":d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+d,r+o),n.moveTo(e+f,r-s),n.lineTo(e-f,r+s);break;case"star":d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+d,r+o),n.moveTo(e+f,r-s),n.lineTo(e-f,r+s),g+=Te,d=Math.cos(g)*(i?i/2:x),s=Math.cos(g)*x,o=Math.sin(g)*x,f=Math.sin(g)*(i?i/2:x),n.moveTo(e-d,r-o),n.lineTo(e+d,r+o),n.moveTo(e+f,r-s),n.lineTo(e-f,r+s);break;case"line":s=i?i/2:Math.cos(g)*x,o=Math.sin(g)*x,n.moveTo(e-s,r-o),n.lineTo(e+s,r+o);break;case"dash":n.moveTo(e,r),n.lineTo(e+Math.cos(g)*(i?i/2:x),r+Math.sin(g)*x);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function qe(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Pr(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function Er(n){n.restore()}function vg(n,t,e,r,i){if(!t)return n.lineTo(e.x,e.y);if(i==="middle"){const a=(t.x+e.x)/2;n.lineTo(a,t.y),n.lineTo(a,e.y)}else i==="after"!=!!r?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function bg(n,t,e,r){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?e.cp2x:e.cp1x,r?e.cp2y:e.cp1y,e.x,e.y)}function xg(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),st(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function _g(n,t,e,r,i){if(i.strikethrough||i.underline){const a=n.measureText(r),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,l=e-a.actualBoundingBoxAscent,c=e+a.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=i.decorationWidth||2,n.moveTo(s,u),n.lineTo(o,u),n.stroke()}}function wg(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function En(n,t,e,r,i,a={}){const s=mt(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(n.save(),n.font=i.string,xg(n,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&wg(n,a.backdrop),o&&(a.strokeColor&&(n.strokeStyle=a.strokeColor),st(a.strokeWidth)||(n.lineWidth=a.strokeWidth),n.strokeText(c,e,r,a.maxWidth)),n.fillText(c,e,r,a.maxWidth),_g(n,e,r,c,a),r+=Number(i.lineHeight);n.restore()}function tr(n,t){const{x:e,y:r,w:i,h:a,radius:s}=t;n.arc(e+s.topLeft,r+s.topLeft,s.topLeft,1.5*dt,dt,!0),n.lineTo(e,r+a-s.bottomLeft),n.arc(e+s.bottomLeft,r+a-s.bottomLeft,s.bottomLeft,dt,Et,!0),n.lineTo(e+i-s.bottomRight,r+a),n.arc(e+i-s.bottomRight,r+a-s.bottomRight,s.bottomRight,Et,0,!0),n.lineTo(e+i,r+s.topRight),n.arc(e+i-s.topRight,r+s.topRight,s.topRight,0,-Et,!0),n.lineTo(e+s.topLeft,r)}const Tg=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Sg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Mg(n,t){const e=(""+n).match(Tg);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const Cg=n=>+n||0;function qa(n,t){const e={},r=lt(t),i=r?Object.keys(t):t,a=lt(n)?r?s=>rt(n[s],n[t[s]]):s=>n[s]:()=>n;for(const s of i)e[s]=Cg(a(s));return e}function Ac(n){return qa(n,{top:"y",right:"x",bottom:"y",left:"x"})}function fn(n){return qa(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Gt(n){const t=Ac(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Rt(n,t){n=n||{},t=t||Ut.font;let e=rt(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let r=rt(n.style,t.style);r&&!(""+r).match(Sg)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:rt(n.family,t.family),lineHeight:Mg(rt(n.lineHeight,t.lineHeight),e),size:e,style:r,weight:rt(n.weight,t.weight),string:""};return i.string=mg(i),i}function Rr(n,t,e,r){let i=!0,a,s,o;for(a=0,s=n.length;a<s;++a)if(o=n[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),i=!1),e!==void 0&&mt(o)&&(o=o[e%o.length],i=!1),o!==void 0))return r&&!i&&(r.cacheable=!1),o}function Dg(n,t,e){const{min:r,max:i}=n,a=dc(t,(i-r)/2),s=(o,l)=>e&&o===0?0:o+l;return{min:s(r,-Math.abs(a)),max:s(i,a)}}function hn(n,t){return Object.assign(Object.create(n),t)}function Xa(n,t=[""],e,r,i=()=>n[0]){const a=e||n;typeof r>"u"&&(r=Uc("_fallback",n));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:a,_fallback:r,_getTarget:i,override:o=>Xa([o,...n],t,a,r)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete n[0][l],!0},get(o,l){return Ic(o,l,()=>Ig(l,t,n,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,l){return Bc(o).includes(l)},ownKeys(o){return Bc(o)},set(o,l,c){const u=o._storage||(o._storage=i());return o[l]=u[l]=c,delete o._keys,!0}})}function er(n,t,e,r){const i={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Lc(n,r),setContext:a=>er(n,a,e,r),override:a=>er(n.override(a),t,e,r)};return new Proxy(i,{deleteProperty(a,s){return delete a[s],delete n[s],!0},get(a,s,o){return Ic(a,s,()=>Og(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(n,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,s)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(a,s){return Reflect.has(n,s)},ownKeys(){return Reflect.ownKeys(n)},set(a,s,o){return n[s]=o,delete a[s],!0}})}function Lc(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=n;return{allKeys:i,scriptable:e,indexable:r,isScriptable:fe(e)?e:()=>e,isIndexable:fe(r)?r:()=>r}}const kg=(n,t)=>n?n+Ua(t):t,Ga=(n,t)=>lt(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ic(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const r=e();return n[t]=r,r}function Og(n,t,e){const{_proxy:r,_context:i,_subProxy:a,_descriptors:s}=n;let o=r[t];return fe(o)&&s.isScriptable(t)&&(o=Pg(t,o,n,e)),mt(o)&&o.length&&(o=Eg(t,o,n,s.isIndexable)),Ga(t,o)&&(o=er(o,i,a&&a[t],s)),o}function Pg(n,t,e,r){const{_proxy:i,_context:a,_subProxy:s,_stack:o}=e;if(o.has(n))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+n);o.add(n);let l=t(a,s||r);return o.delete(n),Ga(n,l)&&(l=Ka(i._scopes,i,n,l)),l}function Eg(n,t,e,r){const{_proxy:i,_context:a,_subProxy:s,_descriptors:o}=e;if(typeof a.index<"u"&&r(n))return t[a.index%t.length];if(lt(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Ka(c,i,n,u);t.push(er(d,a,s&&s[n],o))}}return t}function Nc(n,t,e){return fe(n)?n(t,e):n}const Rg=(n,t)=>n===!0?t:typeof n=="string"?cn(t,n):void 0;function Ag(n,t,e,r,i){for(const a of t){const s=Rg(e,a);if(s){n.add(s);const o=Nc(s._fallback,e,i);if(typeof o<"u"&&o!==e&&o!==r)return o}else if(s===!1&&typeof r<"u"&&e!==r)return null}return!1}function Ka(n,t,e,r){const i=t._rootScopes,a=Nc(t._fallback,e,r),s=[...n,...i],o=new Set;o.add(r);let l=Fc(o,s,e,a||e,r);return l===null||typeof a<"u"&&a!==e&&(l=Fc(o,s,a,l,r),l===null)?!1:Xa(Array.from(o),[""],i,a,()=>Lg(t,e,r))}function Fc(n,t,e,r,i){for(;e;)e=Ag(n,t,e,r,i);return e}function Lg(n,t,e){const r=n._getTarget();t in r||(r[t]={});const i=r[t];return mt(i)&<(e)?e:i||{}}function Ig(n,t,e,r){let i;for(const a of t)if(i=Uc(kg(a,n),e),typeof i<"u")return Ga(n,i)?Ka(e,r,n,i):i}function Uc(n,t){for(const e of t){if(!e)continue;const r=e[n];if(typeof r<"u")return r}}function Bc(n){let t=n._keys;return t||(t=n._keys=Ng(n._scopes)),t}function Ng(n){const t=new Set;for(const e of n)for(const r of Object.keys(e).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function Wc(n,t,e,r){const{iScale:i}=n,{key:a="r"}=this._parsing,s=new Array(r);let o,l,c,u;for(o=0,l=r;o<l;++o)c=o+e,u=t[c],s[o]={r:i.parse(cn(u,a),c)};return s}const Fg=Number.EPSILON||1e-14,nr=(n,t)=>t<n.length&&!n[t].skip&&n[t],zc=n=>n==="x"?"y":"x";function Ug(n,t,e,r){const i=n.skip?t:n,a=t,s=e.skip?t:e,o=Jn(a,i),l=Jn(s,a);let c=o/(o+l),u=l/(o+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:a.x-d*(s.x-i.x),y:a.y-d*(s.y-i.y)},next:{x:a.x+f*(s.x-i.x),y:a.y+f*(s.y-i.y)}}}function Bg(n,t,e){const r=n.length;let i,a,s,o,l,c=nr(n,0);for(let u=0;u<r-1;++u)if(l=c,c=nr(n,u+1),!(!l||!c)){if(Mr(t[u],0,Fg)){e[u]=e[u+1]=0;continue}i=e[u]/t[u],a=e[u+1]/t[u],o=Math.pow(i,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),e[u]=i*s*t[u],e[u+1]=a*s*t[u])}}function Wg(n,t,e="x"){const r=zc(e),i=n.length;let a,s,o,l=nr(n,0);for(let c=0;c<i;++c){if(s=o,o=l,l=nr(n,c+1),!o)continue;const u=o[e],d=o[r];s&&(a=(u-s[e])/3,o[`cp1${e}`]=u-a,o[`cp1${r}`]=d-a*t[c]),l&&(a=(l[e]-u)/3,o[`cp2${e}`]=u+a,o[`cp2${r}`]=d+a*t[c])}}function zg(n,t="x"){const e=zc(t),r=n.length,i=Array(r).fill(0),a=Array(r);let s,o,l,c=nr(n,0);for(s=0;s<r;++s)if(o=l,l=c,c=nr(n,s+1),!!l){if(c){const u=c[t]-l[t];i[s]=u!==0?(c[e]-l[e])/u:0}a[s]=o?c?Le(i[s-1])!==Le(i[s])?0:(i[s-1]+i[s])/2:i[s-1]:i[s]}Bg(n,i,a),Wg(n,a,t)}function Si(n,t,e){return Math.max(Math.min(n,e),t)}function Yg(n,t){let e,r,i,a,s,o=qe(n[0],t);for(e=0,r=n.length;e<r;++e)s=a,a=o,o=e<r-1&&qe(n[e+1],t),a&&(i=n[e],s&&(i.cp1x=Si(i.cp1x,t.left,t.right),i.cp1y=Si(i.cp1y,t.top,t.bottom)),o&&(i.cp2x=Si(i.cp2x,t.left,t.right),i.cp2y=Si(i.cp2y,t.top,t.bottom)))}function Hg(n,t,e,r,i){let a,s,o,l;if(t.spanGaps&&(n=n.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")zg(n,i);else{let c=r?n[n.length-1]:n[0];for(a=0,s=n.length;a<s;++a)o=n[a],l=Ug(c,o,n[Math.min(a+1,s-(r?0:1))%s],t.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,c=o}t.capBezierPoints&&Yg(n,e)}function Qa(){return typeof window<"u"&&typeof document<"u"}function Za(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Mi(n,t,e){let r;return typeof n=="string"?(r=parseInt(n,10),n.indexOf("%")!==-1&&(r=r/100*t.parentNode[e])):r=n,r}const Ci=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function $g(n,t){return Ci(n).getPropertyValue(t)}const jg=["top","right","bottom","left"];function Rn(n,t,e){const r={};e=e?"-"+e:"";for(let i=0;i<4;i++){const a=jg[i];r[a]=parseFloat(n[t+"-"+a+e])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Vg=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function qg(n,t){const e=n.touches,r=e&&e.length?e[0]:n,{offsetX:i,offsetY:a}=r;let s=!1,o,l;if(Vg(i,a,n.target))o=i,l=a;else{const c=t.getBoundingClientRect();o=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:o,y:l,box:s}}function pn(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:r}=t,i=Ci(e),a=i.boxSizing==="border-box",s=Rn(i,"padding"),o=Rn(i,"border","width"),{x:l,y:c,box:u}=qg(n,e),d=s.left+(u&&o.left),f=s.top+(u&&o.top);let{width:p,height:v}=t;return a&&(p-=s.width+o.width,v-=s.height+o.height),{x:Math.round((l-d)/p*e.width/r),y:Math.round((c-f)/v*e.height/r)}}function Xg(n,t,e){let r,i;if(t===void 0||e===void 0){const a=Za(n);if(!a)t=n.clientWidth,e=n.clientHeight;else{const s=a.getBoundingClientRect(),o=Ci(a),l=Rn(o,"border","width"),c=Rn(o,"padding");t=s.width-c.width-l.width,e=s.height-c.height-l.height,r=Mi(o.maxWidth,a,"clientWidth"),i=Mi(o.maxHeight,a,"clientHeight")}}return{width:t,height:e,maxWidth:r||vi,maxHeight:i||vi}}const Di=n=>Math.round(n*10)/10;function Gg(n,t,e,r){const i=Ci(n),a=Rn(i,"margin"),s=Mi(i.maxWidth,n,"clientWidth")||vi,o=Mi(i.maxHeight,n,"clientHeight")||vi,l=Xg(n,t,e);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=Rn(i,"border","width"),p=Rn(i,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-a.width),u=Math.max(0,r?c/r:u-a.height),c=Di(Math.min(c,s,l.maxWidth)),u=Di(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Di(c/2)),(t!==void 0||e!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Di(Math.floor(u*r))),{width:c,height:u}}function Yc(n,t,e){const r=t||1,i=Math.floor(n.height*r),a=Math.floor(n.width*r);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const s=n.canvas;return s.style&&(e||!s.style.height&&!s.style.width)&&(s.style.height=`${n.height}px`,s.style.width=`${n.width}px`),n.currentDevicePixelRatio!==r||s.height!==i||s.width!==a?(n.currentDevicePixelRatio=r,s.height=i,s.width=a,n.ctx.setTransform(r,0,0,r,0,0),!0):!1}const Kg=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};Qa()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n}();function Hc(n,t){const e=$g(n,t),r=e&&e.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function An(n,t,e,r){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Qg(n,t,e,r){return{x:n.x+e*(t.x-n.x),y:r==="middle"?e<.5?n.y:t.y:r==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Zg(n,t,e,r){const i={x:n.cp2x,y:n.cp2y},a={x:t.cp1x,y:t.cp1y},s=An(n,i,e),o=An(i,a,e),l=An(a,t,e),c=An(s,o,e),u=An(o,l,e);return An(c,u,e)}const Jg=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,r){return e-r},leftForLtr(e,r){return e-r}}},tm=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function rr(n,t,e){return n?Jg(t,e):tm()}function $c(n,t){let e,r;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,r=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=r)}function jc(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Vc(n){return n==="angle"?{between:Cr,compare:eg,normalize:xe}:{between:je,compare:(t,e)=>t-e,normalize:t=>t}}function qc({start:n,end:t,count:e,loop:r,style:i}){return{start:n%e,end:t%e,loop:r&&(t-n+1)%e===0,style:i}}function em(n,t,e){const{property:r,start:i,end:a}=e,{between:s,normalize:o}=Vc(r),l=t.length;let{start:c,end:u,loop:d}=n,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&s(o(t[c%l][r]),i,a);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:n.style}}function Xc(n,t,e){if(!e)return[n];const{property:r,start:i,end:a}=e,s=t.length,{compare:o,between:l,normalize:c}=Vc(r),{start:u,end:d,loop:f,style:p}=em(n,t,e),v=[];let x=!1,g=null,m,b,y;const _=()=>l(i,y,m)&&o(i,y)!==0,T=()=>o(a,m)===0||l(a,y,m),D=()=>x||_(),O=()=>!x||T();for(let S=u,M=u;S<=d;++S)b=t[S%s],!b.skip&&(m=c(b[r]),m!==y&&(x=l(m,i,a),g===null&&D()&&(g=o(m,i)===0?S:M),g!==null&&O()&&(v.push(qc({start:g,end:S,loop:f,count:s,style:p})),g=null),M=S,y=m));return g!==null&&v.push(qc({start:g,end:d,loop:f,count:s,style:p})),v}function Gc(n,t){const e=[],r=n.segments;for(let i=0;i<r.length;i++){const a=Xc(r[i],n.points,t);a.length&&e.push(...a)}return e}function nm(n,t,e,r){let i=0,a=t-1;if(e&&!r)for(;i<t&&!n[i].skip;)i++;for(;i<t&&n[i].skip;)i++;for(i%=t,e&&(a+=i);a>i&&n[a%t].skip;)a--;return a%=t,{start:i,end:a}}function rm(n,t,e,r){const i=n.length,a=[];let s=t,o=n[t],l;for(l=t+1;l<=e;++l){const c=n[l%i];c.skip||c.stop?o.skip||(r=!1,a.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,o.skip&&(t=l)),o=c}return s!==null&&a.push({start:t%i,end:s%i,loop:r}),a}function im(n,t){const e=n.points,r=n.options.spanGaps,i=e.length;if(!i)return[];const a=!!n._loop,{start:s,end:o}=nm(e,i,a,r);if(r===!0)return Kc(n,[{start:s,end:o,loop:a}],e,t);const l=o<s?o+i:o,c=!!n._fullLoop&&s===0&&o===i-1;return Kc(n,rm(e,s,l,c),e,t)}function Kc(n,t,e,r){return!r||!r.setContext||!e?t:am(n,t,e,r)}function am(n,t,e,r){const i=n._chart.getContext(),a=Qc(n.options),{_datasetIndex:s,options:{spanGaps:o}}=n,l=e.length,c=[];let u=a,d=t[0].start,f=d;function p(v,x,g,m){const b=o?-1:1;if(v!==x){for(v+=l;e[v%l].skip;)v-=b;for(;e[x%l].skip;)x+=b;v%l!==x%l&&(c.push({start:v%l,end:x%l,loop:g,style:m}),u=m,d=x%l)}}for(const v of t){d=o?d:v.start;let x=e[d%l],g;for(f=d+1;f<=v.end;f++){const m=e[f%l];g=Qc(r.setContext(hn(i,{type:"segment",p0:x,p1:m,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:s}))),sm(g,u)&&p(d,f-1,v.loop,u),x=m,u=g}d<f-1&&p(d,f-1,v.loop,u)}return c}function Qc(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function sm(n,t){if(!t)return!1;const e=[],r=function(i,a){return Ya(a)?(e.includes(a)||e.push(a),e.indexOf(a)):a};return JSON.stringify(n,r)!==JSON.stringify(t,r)}/*!
|
|
12
12
|
* Chart.js v4.4.2
|
|
13
13
|
* https://www.chartjs.org
|
|
14
14
|
* (c) 2024 Chart.js Contributors
|
|
15
15
|
* Released under the MIT License
|
|
16
|
-
*/class om{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,r,i){const a=e.listeners[i],s=e.duration;a.forEach(o=>o({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(r-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=wc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const a=r.items;let s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(i.draw(),this._notify(i,r,t,"progress")),a.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),e+=a.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let r=e.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,r)),r}listen(t,e,r){this._getAnims(t).listeners[e].push(r)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const r=e.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Xe=new om;const Zc="transparent",lm={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const r=kc(n||Zc),i=r.valid&&kc(t||Zc);return i&&i.valid?i.mix(r,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class cm{constructor(t,e,r,i){const a=e[r];i=Rr([t.to,i,a,t.from]);const s=Rr([t.from,a,i]);this._active=!0,this._fn=t.fn||lm[t.type||typeof s],this._easing=Dr[t.easing]||Dr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,r){if(this._active){this._notify(!1);const i=this._target[this._prop],a=r-this._start,s=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Rr([t.to,e,i,t.from]),this._from=Rr([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,r=this._duration,i=this._prop,a=this._from,s=this._loop,o=this._to;let l;if(this._active=a!==o&&(s||e<r),!this._active){this._target[i]=o,this._notify(!0);return}if(e<0){this._target[i]=a;return}l=e/r%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,r)=>{t.push({res:e,rej:r})})}_notify(t){const e=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][e]()}}class Ja{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!lt(t))return;const e=Object.keys(Ut.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!lt(a))return;const s={};for(const o of e)s[o]=a[o];(mt(a.properties)&&a.properties||[i]).forEach(o=>{(o===i||!r.has(o))&&r.set(o,s)})})}_animateOptions(t,e){const r=e.options,i=dm(t,r);if(!i)return[];const a=this._createAnimations(i,r);return r.$shared&&um(t.options.$animations,r).then(()=>{t.options=r},()=>{}),a}_createAnimations(t,e){const r=this._properties,i=[],a=t.$animations||(t.$animations={}),s=Object.keys(e),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,e));continue}const u=e[c];let d=a[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,o);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}a[c]=d=new cm(f,t,c,u),i.push(d)}return i}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const r=this._createAnimations(t,e);if(r.length)return Xe.add(this._chart,r),!0}}function um(n,t){const e=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const a=n[r[i]];a&&a.active()&&e.push(a.wait())}return Promise.all(e)}function dm(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Jc(n,t){const e=n&&n.options||{},r=e.reverse,i=e.min===void 0?t:0,a=e.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function fm(n,t,e){if(e===!1)return!1;const r=Jc(n,e),i=Jc(t,e);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function hm(n){let t,e,r,i;return lt(n)?(t=n.top,e=n.right,r=n.bottom,i=n.left):t=e=r=i=n,{top:t,right:e,bottom:r,left:i,disabled:n===!1}}function tu(n,t){const e=[],r=n._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i<a;++i)e.push(r[i].index);return e}function eu(n,t,e,r={}){const i=n.keys,a=r.mode==="single";let s,o,l,c;if(t!==null){for(s=0,o=i.length;s<o;++s){if(l=+i[s],l===e){if(r.all)continue;break}c=n.values[l],It(c)&&(a||t===0||Le(t)===Le(c))&&(t+=c)}return t}}function pm(n){const t=Object.keys(n),e=new Array(t.length);let r,i,a;for(r=0,i=t.length;r<i;++r)a=t[r],e[r]={x:a,y:n[a]};return e}function nu(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function gm(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function mm(n){const{min:t,max:e,minDefined:r,maxDefined:i}=n.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?e:Number.POSITIVE_INFINITY}}function ym(n,t,e){const r=n[t]||(n[t]={});return r[e]||(r[e]={})}function ru(n,t,e,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const a=n[i.index];if(e&&a>0||!e&&a<0)return i.index}return null}function iu(n,t){const{chart:e,_cachedMeta:r}=n,i=e._stacks||(e._stacks={}),{iScale:a,vScale:s,index:o}=r,l=a.axis,c=s.axis,u=gm(a,s,r),d=t.length;let f;for(let p=0;p<d;++p){const b=t[p],{[l]:x,[c]:g}=b,m=b._stacks||(b._stacks={});f=m[c]=ym(i,u,x),f[o]=g,f._top=ru(f,s,!0,r.type),f._bottom=ru(f,s,!1,r.type);const v=f._visualValues||(f._visualValues={});v[o]=g}}function ts(n,t){const e=n.scales;return Object.keys(e).filter(r=>e[r].axis===t).shift()}function bm(n,t){return hn(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function vm(n,t,e){return hn(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Ar(n,t){const e=n.controller.index,r=n.vScale&&n.vScale.axis;if(r){t=t||n._parsed;for(const i of t){const a=i._stacks;if(!a||a[r]===void 0||a[r][e]===void 0)return;delete a[r][e],a[r]._visualValues!==void 0&&a[r]._visualValues[e]!==void 0&&delete a[r]._visualValues[e]}}}const es=n=>n==="reset"||n==="none",au=(n,t)=>t?n:Object.assign({},n),xm=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:tu(e,!0),values:null};class Oe{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=nu(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ar(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,r=this.getDataset(),i=(d,f,p,b)=>d==="x"?f:d==="r"?b:p,a=e.xAxisID=rt(r.xAxisID,ts(t,"x")),s=e.yAxisID=rt(r.yAxisID,ts(t,"y")),o=e.rAxisID=rt(r.rAxisID,ts(t,"r")),l=e.indexAxis,c=e.iAxisID=i(l,a,s,o),u=e.vAxisID=i(l,s,a,o);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&xc(this._data,this),t._stacked&&Ar(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),r=this._data;if(lt(e))this._data=pm(e);else if(r!==e){if(r){xc(r,this);const i=this._cachedMeta;Ar(i),i._parsed=[]}e&&Object.isExtensible(e)&&ag(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const a=e._stacked;e._stacked=nu(e.vScale,e),e.stack!==r.stack&&(i=!0,Ar(e),e.stack=r.stack),this._resyncElements(t),(i||a!==e._stacked)&&iu(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:s}=r,o=a.axis;let l=t===0&&e===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{mt(i[t])?f=this.parseArrayData(r,i,t,e):lt(i[t])?f=this.parseObjectData(r,i,t,e):f=this.parsePrimitiveData(r,i,t,e);const p=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<e;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}s&&iu(this,f)}parsePrimitiveData(t,e,r,i){const{iScale:a,vScale:s}=t,o=a.axis,l=s.axis,c=a.getLabels(),u=a===s,d=new Array(i);let f,p,b;for(f=0,p=i;f<p;++f)b=f+r,d[f]={[o]:u||a.parse(c[b],b),[l]:s.parse(e[b],b)};return d}parseArrayData(t,e,r,i){const{xScale:a,yScale:s}=t,o=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=e[u],o[l]={x:a.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,e,r,i){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=e[f],c[u]={x:a.parse(cn(p,o),f),y:s.parse(cn(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,r){const i=this.chart,a=this._cachedMeta,s=e[t.axis],o={keys:tu(i,!0),values:e._stacks[t.axis]._visualValues};return eu(o,s,a.index,{mode:r})}updateRangeFromParsed(t,e,r,i){const a=r[e.axis];let s=a===null?NaN:a;const o=i&&r._stacks[e.axis];i&&o&&(i.values=o,s=eu(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const r=this._cachedMeta,i=r._parsed,a=r._sorted&&t===r.iScale,s=i.length,o=this._getOtherScale(t),l=xm(e,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=mm(o);let f,p;function b(){p=i[f];const x=p[o.axis];return!It(p[t.axis])||u>x||d<x}for(f=0;f<s&&!(!b()&&(this.updateRangeFromParsed(c,t,p,l),a));++f);if(a){for(f=s-1;f>=0;--f)if(!b()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,r=[];let i,a,s;for(i=0,a=e.length;i<a;++i)s=e[i][t.axis],It(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,r=e.iScale,i=e.vScale,a=this.getParsed(t);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=hm(rt(this.options.clip,fm(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,r=this._cachedMeta,i=r.data||[],a=e.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||i.length-o,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,a,o,l),u=o;u<o+l;++u){const d=i[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,a))}for(u=0;u<s.length;++u)s[u].draw(t,a)}getStyle(t,e){const r=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,e,r){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];a=s.$context||(s.$context=vm(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=bm(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=r,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",r){const i=e==="active",a=this._cachedDataOpts,s=t+"-"+e,o=a[s],l=this.enableOptionSharing&&de(r);if(o)return au(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Ut.elements[t]),b=()=>this.getContext(r,i,e),x=c.resolveNamedOptions(f,p,b,d);return x.$shared&&(x.$shared=l,a[s]=Object.freeze(au(x,l))),x}_resolveAnimations(t,e,r){const i=this.chart,a=this._cachedDataOpts,s=`animation-${e}`,o=a[s];if(o)return o;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,e),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,e))}const c=new Ja(i,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||es(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const r=this.resolveDataElementOptions(t,e),i=this._sharedOptions,a=this.getSharedOptions(r),s=this.includeOptions(e,a)||a!==i;return this.updateSharedOptions(a,e,r),{sharedOptions:a,includeOptions:s}}updateElement(t,e,r,i){es(i)?Object.assign(t,r):this._resolveAnimations(e,i).update(t,r)}updateSharedOptions(t,e,r){t&&!es(e)&&this._resolveAnimations(void 0,e).update(t,r)}_setStyle(t,e,r,i){t.active=i;const a=this.getStyle(e,i);this._resolveAnimations(e,r,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,e,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,r=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const i=r.length,a=e.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,e,r=!0){const i=this._cachedMeta,a=i.data,s=t+e;let o;const l=c=>{for(c.length+=e,o=c.length-1;o>=s;o--)c[o]=c[o-e]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,e),r&&this.updateElements(a,t,e,"reset")}updateElements(t,e,r,i){}_removeElements(t,e){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,e);r._stacked&&Ar(r,i)}r.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,r,i]=t;this[e](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}H(Oe,"defaults",{}),H(Oe,"datasetElementType",null),H(Oe,"dataElementType",null);function _m(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let r=[];for(let i=0,a=e.length;i<a;i++)r=r.concat(e[i].controller.getAllParsedValues(n));n._cache.$bar=_c(r.sort((i,a)=>i-a))}return n._cache.$bar}function wm(n){const t=n.iScale,e=_m(t,n.type);let r=t._length,i,a,s,o;const l=()=>{s===32767||s===-32768||(de(o)&&(r=Math.min(r,Math.abs(s-o)||r)),o=s)};for(i=0,a=e.length;i<a;++i)s=t.getPixelForValue(e[i]),l();for(o=void 0,i=0,a=t.ticks.length;i<a;++i)s=t.getPixelForTick(i),l();return r}function Tm(n,t,e,r){const i=e.barThickness;let a,s;return st(i)?(a=t.min*e.categoryPercentage,s=e.barPercentage):(a=i*r,s=1),{chunk:a/r,ratio:s,start:t.pixels[n]-a/2}}function Sm(n,t,e,r){const i=t.pixels,a=i[n];let s=n>0?i[n-1]:null,o=n<i.length-1?i[n+1]:null;const l=e.categoryPercentage;s===null&&(s=a-(o===null?t.end-t.start:o-a)),o===null&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/r,ratio:e.barPercentage,start:c}}function Mm(n,t,e,r){const i=e.parse(n[0],r),a=e.parse(n[1],r),s=Math.min(i,a),o=Math.max(i,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:a,min:s,max:o}}function su(n,t,e,r){return mt(n)?Mm(n,t,e,r):t[e.axis]=e.parse(n,r),t}function ou(n,t,e,r){const i=n.iScale,a=n.vScale,s=i.getLabels(),o=i===a,l=[];let c,u,d,f;for(c=e,u=e+r;c<u;++c)f=t[c],d={},d[i.axis]=o||i.parse(s[c],c),l.push(su(f,d,a,c));return l}function ns(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Cm(n,t,e){return n!==0?Le(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Dm(n){let t,e,r,i,a;return n.horizontal?(t=n.base>n.x,e="left",r="right"):(t=n.base<n.y,e="bottom",r="top"),t?(i="end",a="start"):(i="start",a="end"),{start:e,end:r,reverse:t,top:i,bottom:a}}function km(n,t,e,r){let i=t.borderSkipped;const a={};if(!i){n.borderSkipped=a;return}if(i===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=Dm(n);i==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===r?i=c:(e._bottom||0)===r?i=u:(a[lu(u,s,o,l)]=!0,i=c)),a[lu(i,s,o,l)]=!0,n.borderSkipped=a}function lu(n,t,e,r){return r?(n=Om(n,t,e),n=cu(n,e,t)):n=cu(n,t,e),n}function Om(n,t,e){return n===t?e:n===e?t:n}function cu(n,t,e){return n==="start"?t:n==="end"?e:n}function Pm(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class Lr extends Oe{parsePrimitiveData(t,e,r,i){return ou(t,e,r,i)}parseArrayData(t,e,r,i){return ou(t,e,r,i)}parseObjectData(t,e,r,i){const{iScale:a,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?o:l,u=s.axis==="x"?o:l,d=[];let f,p,b,x;for(f=r,p=r+i;f<p;++f)x=e[f],b={},b[a.axis]=a.parse(cn(x,c),f),d.push(su(cn(x,u),b,s,f));return d}updateRangeFromParsed(t,e,r,i){super.updateRangeFromParsed(t,e,r,i);const a=r._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:r,vScale:i}=e,a=this.getParsed(t),s=a._custom,o=ns(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,r,i){const a=i==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(e,i);for(let p=e;p<e+r;p++){const b=this.getParsed(p),x=a||st(b[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),m=(b._stacks||{})[o.axis],v={horizontal:c,base:x.base,enableBorderRadius:!m||ns(b._custom)||s===m._top||s===m._bottom,x:c?x.head:g.center,y:c?g.center:x.head,height:c?g.size:Math.abs(x.size),width:c?Math.abs(x.size):g.size};f&&(v.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const y=v.options||t[p].options;km(v,y,m,s),Pm(v,y,u.ratio),this.updateElement(t[p],p,v,i)}}_getStacks(t,e){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),a=r.options.stacked,s=[],o=l=>{const c=l.controller.getParsed(e),u=c&&c[l.vScale.axis];if(st(u)||isNaN(u))return!0};for(const l of i)if(!(e!==void 0&&o(l))&&((a===!1||s.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,r){const i=this._getStacks(t,r),a=e!==void 0?i.indexOf(e):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,r=e.iScale,i=[];let a,s;for(a=0,s=e.data.length;a<s;++a)i.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));const o=t.barThickness;return{min:o||wm(e),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:r,index:i},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),c=l._custom,u=ns(c);let d=l[e.axis],f=0,p=r?this.applyStack(e,l,r):d,b,x;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Le(d)!==Le(c.barEnd)&&(f=0),f+=d);const g=!st(a)&&!u?a:f;let m=e.getPixelForValue(g);if(this.chart.getDataVisibility(t)?b=e.getPixelForValue(f+p):b=m,x=b-m,Math.abs(x)<s){x=Cm(x,e,o)*s,d===o&&(m-=x/2);const v=e.getPixelForDecimal(0),y=e.getPixelForDecimal(1),_=Math.min(v,y),T=Math.max(v,y);m=Math.max(Math.min(m,T),_),b=m+x,r&&!u&&(l._stacks[e.axis]._visualValues[i]=e.getValueForPixel(b)-e.getValueForPixel(m))}if(m===e.getPixelForValue(o)){const v=Le(x)*e.getLineWidthForValue(o)/2;m+=v,x-=v}return{size:x,base:m,head:b,center:b+x/2}}_calculateBarIndexPixels(t,e){const r=e.scale,i=this.options,a=i.skipNull,s=rt(i.maxBarThickness,1/0);let o,l;if(e.grouped){const c=a?this._getStackCount(t):e.stackCount,u=i.barThickness==="flex"?Sm(t,e,i,c):Tm(t,e,i,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else o=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,e.min*e.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,r=t.data,i=r.length;let a=0;for(;a<i;++a)this.getParsed(a)[e.axis]!==null&&r[a].draw(this._ctx)}}H(Lr,"id","bar"),H(Lr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),H(Lr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ki extends Oe{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,r,i){const a=super.parsePrimitiveData(t,e,r,i);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+r).radius;return a}parseArrayData(t,e,r,i){const a=super.parseArrayData(t,e,r,i);for(let s=0;s<a.length;s++){const o=e[r+s];a[s]._custom=rt(o[2],this.resolveDataElementOptions(s+r).radius)}return a}parseObjectData(t,e,r,i){const a=super.parseObjectData(t,e,r,i);for(let s=0;s<a.length;s++){const o=e[r+s];a[s]._custom=rt(o&&o.r&&+o.r,this.resolveDataElementOptions(s+r).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let r=t.length-1;r>=0;--r)e=Math.max(e,t[r].size(this.resolveDataElementOptions(r))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=e,s=this.getParsed(t),o=i.getLabelForValue(s.x),l=a.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+o+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,r,i){const a=i==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,i),u=s.axis,d=o.axis;for(let f=e;f<e+r;f++){const p=t[f],b=!a&&this.getParsed(f),x={},g=x[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(b[u]),m=x[d]=a?o.getBasePixel():o.getPixelForValue(b[d]);x.skip=isNaN(g)||isNaN(m),c&&(x.options=l||this.resolveDataElementOptions(f,p.active?"active":i),a&&(x.options.radius=0)),this.updateElement(p,f,x,i)}}resolveDataElementOptions(t,e){const r=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const a=i.radius;return e!=="active"&&(i.radius=0),i.radius+=rt(r&&r._custom,a),i}}H(ki,"id","bubble"),H(ki,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),H(ki,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Em(n,t,e){let r=1,i=1,a=0,s=0;if(t<kt){const o=n,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),f=Math.sin(l),p=(y,_,T)=>Cr(y,o,l,!0)?1:Math.max(_,_*e,T,T*e),b=(y,_,T)=>Cr(y,o,l,!0)?-1:Math.min(_,_*e,T,T*e),x=p(0,c,d),g=p(Et,u,f),m=b(dt,c,d),v=b(dt+Et,u,f);r=(x-m)/2,i=(g-v)/2,a=-(x+m)/2,s=-(g+v)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:s}}class gn extends Oe{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let a=l=>+r[l];if(lt(r[t])){const{key:l="value"}=this._parsing;a=c=>+cn(r[c],l)}let s,o;for(s=t,o=t+e;s<o;++s)i._parsed[s]=a(s)}}_getRotation(){return Xt(this.options.rotation-90)}_getCircumference(){return Xt(this.options.circumference)}_getRotationExtents(){let t=kt,e=-kt;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,a=i._getRotation(),s=i._getCircumference();t=Math.min(t,a),e=Math.max(e,a+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:r}=e,i=this._cachedMeta,a=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,o=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(Vp(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:b,offsetY:x}=Em(d,u,l),g=(r.width-s)/f,m=(r.height-s)/p,v=Math.max(Math.min(g,m)/2,0),y=dc(this.options.radius,v),_=Math.max(y*l,0),T=(y-_)/this._getVisibleDatasetWeightTotal();this.offsetX=b*y,this.offsetY=x*y,i.total=this.calculateTotal(),this.outerRadius=y-T*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-T*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const r=this.options,i=this._cachedMeta,a=this._getCircumference();return e&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/kt)}updateElements(t,e,r,i){const a=i==="reset",s=this.chart,o=s.chartArea,c=s.options.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,f=a&&c.animateScale,p=f?0:this.innerRadius,b=f?0:this.outerRadius,{sharedOptions:x,includeOptions:g}=this._getSharedOptions(e,i);let m=this._getRotation(),v;for(v=0;v<e;++v)m+=this._circumference(v,a);for(v=e;v<e+r;++v){const y=this._circumference(v,a),_=t[v],T={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+y,circumference:y,outerRadius:b,innerRadius:p};g&&(T.options=x||this.resolveDataElementOptions(v,_.active?"active":i)),m+=y,this.updateElement(_,v,T,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let r=0,i;for(i=0;i<e.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!e[i].hidden&&(r+=Math.abs(a))}return r}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?kt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=kr(e._parsed[t],r.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const r=this.chart;let i,a,s,o,l;if(!t){for(i=0,a=r.data.datasets.length;i<a;++i)if(r.isDatasetVisible(i)){s=r.getDatasetMeta(i),t=s.data,o=s.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)l=o.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let r=0,i=t.length;r<i;++r){const a=this.resolveDataElementOptions(r);e=Math.max(e,a.offset||0,a.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(e+=this._getRingWeight(r));return e}_getRingWeight(t){return Math.max(rt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}H(gn,"id","doughnut"),H(gn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),H(gn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),H(gn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}}});class Ir extends Oe{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=e,s=this.chart._animationsDisabled;let{start:o,count:l}=Sc(e,i,s);this._drawStart=o,this._drawCount=l,Mc(e)&&(o=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,o,l,t)}updateElements(t,e,r,i){const a=i==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,i),f=s.axis,p=o.axis,{spanGaps:b,segment:x}=this.options,g=dn(b)?b:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||i==="none",v=e+r,y=t.length;let _=e>0&&this.getParsed(e-1);for(let T=0;T<y;++T){const D=t[T],O=m?D:{};if(T<e||T>=v){O.skip=!0;continue}const S=this.getParsed(T),M=st(S[p]),k=O[f]=s.getPixelForValue(S[f],T),P=O[p]=a||M?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[p],T);O.skip=isNaN(k)||isNaN(P)||M,O.stop=T>0&&Math.abs(S[f]-_[f])>g,x&&(O.parsed=S,O.raw=c.data[T]),d&&(O.options=u||this.resolveDataElementOptions(T,D.active?"active":i)),m||this.updateElement(D,T,O,i),_=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,r=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}H(Ir,"id","line"),H(Ir,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),H(Ir,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Nr extends Oe{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=kr(e._parsed[t].r,r.options.locale);return{label:i[t]||"",value:a}}parseObjectData(t,e,r,i){return Wc.bind(this)(t,e,r,i)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,r=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),o=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,r,i){const a=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*dt;let p=f,b;const x=360/this.countVisibleElements();for(b=0;b<e;++b)p+=this._computeAngle(b,i,x);for(b=e;b<e+r;b++){const g=t[b];let m=p,v=p+this._computeAngle(b,i,x),y=s.getDataVisibility(b)?c.getDistanceFromCenterForValue(this.getParsed(b).r):0;p=v,a&&(l.animateScale&&(y=0),l.animateRotate&&(m=v=f));const _={x:u,y:d,innerRadius:0,outerRadius:y,startAngle:m,endAngle:v,options:this.resolveDataElementOptions(b,g.active?"active":i)};this.updateElement(g,b,_,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,r){return this.chart.getDataVisibility(t)?Xt(this.resolveDataElementOptions(t,e).angle||r):0}}H(Nr,"id","polarArea"),H(Nr,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),H(Nr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class rs extends gn{}H(rs,"id","pie"),H(rs,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Oi extends Oe{getLabelAndValue(t){const e=this._cachedMeta.vScale,r=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(r[e.axis])}}parseObjectData(t,e,r,i){return Wc.bind(this)(t,e,r,i)}update(t){const e=this._cachedMeta,r=e.dataset,i=e.data||[],a=e.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:a.length===i.length,options:s};this.updateElement(r,void 0,o,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,r,i){const a=this._cachedMeta.rScale,s=i==="reset";for(let o=e;o<e+r;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":i),u=a.getPointPositionForValue(o,this.getParsed(o).r),d=s?a.xCenter:u.x,f=s?a.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,o,p,i)}}}H(Oi,"id","radar"),H(Oi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),H(Oi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Pi extends Oe{getLabelAndValue(t){const e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=e,s=this.getParsed(t),o=i.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:r[t]||"",value:"("+o+", "+l+")"}}update(t){const e=this._cachedMeta,{data:r=[]}=e,i=this.chart._animationsDisabled;let{start:a,count:s}=Sc(e,r,i);if(this._drawStart=a,this._drawCount=s,Mc(e)&&(a=0,s=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:l}=e;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=r;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!i,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(r,a,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,r,i){const a=i==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(e,i),d=this.getSharedOptions(u),f=this.includeOptions(i,d),p=s.axis,b=o.axis,{spanGaps:x,segment:g}=this.options,m=dn(x)?x:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||i==="none";let y=e>0&&this.getParsed(e-1);for(let _=e;_<e+r;++_){const T=t[_],D=this.getParsed(_),O=v?T:{},S=st(D[b]),M=O[p]=s.getPixelForValue(D[p],_),k=O[b]=a||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,D,l):D[b],_);O.skip=isNaN(M)||isNaN(k)||S,O.stop=_>0&&Math.abs(D[p]-y[p])>m,g&&(O.parsed=D,O.raw=c.data[_]),f&&(O.options=d||this.resolveDataElementOptions(_,T.active?"active":i)),v||this.updateElement(T,_,O,i),y=D}this.updateSharedOptions(d,i,u)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let o=0;for(let l=e.length-1;l>=0;--l)o=Math.max(o,e[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!e.length)return i;const a=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,a,s)/2}}H(Pi,"id","scatter"),H(Pi,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),H(Pi,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Rm=Object.freeze({__proto__:null,BarController:Lr,BubbleController:ki,DoughnutController:gn,LineController:Ir,PieController:rs,PolarAreaController:Nr,RadarController:Oi,ScatterController:Pi});function Ln(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class is{constructor(t){H(this,"options");this.options=t||{}}static override(t){Object.assign(is.prototype,t)}init(){}formats(){return Ln()}parse(){return Ln()}format(){return Ln()}add(){return Ln()}diff(){return Ln()}startOf(){return Ln()}endOf(){return Ln()}}var uu={_date:is};function Am(n,t,e,r){const{controller:i,data:a,_sorted:s}=n,o=i._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?rg:Ve;if(r){if(i._sharedOptions){const c=a[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(a,t,e-u),f=l(a,t,e+u);return{lo:d.lo,hi:f.hi}}}}else return l(a,t,e)}return{lo:0,hi:a.length-1}}function Fr(n,t,e,r,i){const a=n.getSortedVisibleDatasetMetas(),s=e[t];for(let o=0,l=a.length;o<l;++o){const{index:c,data:u}=a[o],{lo:d,hi:f}=Am(a[o],t,s,i);for(let p=d;p<=f;++p){const b=u[p];b.skip||r(b,c,p)}}}function Lm(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(r,i){const a=t?Math.abs(r.x-i.x):0,s=e?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function as(n,t,e,r,i){const a=[];return!i&&!n.isPointInArea(t)||Fr(n,e,t,function(o,l,c){!i&&!qe(o,n.chartArea,0)||o.inRange(t.x,t.y,r)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function Im(n,t,e,r){let i=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],r),{angle:d}=bc(s,{x:t.x,y:t.y});Cr(d,c,u)&&i.push({element:s,datasetIndex:o,index:l})}return Fr(n,e,t,a),i}function Nm(n,t,e,r,i,a){let s=[];const o=Lm(e);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const b=u.getCenterPoint(i);if(!(!!a||n.isPointInArea(b))&&!p)return;const g=o(t,b);g<l?(s=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&s.push({element:u,datasetIndex:d,index:f})}return Fr(n,e,t,c),s}function ss(n,t,e,r,i,a){return!a&&!n.isPointInArea(t)?[]:e==="r"&&!r?Im(n,t,e,i):Nm(n,t,e,r,i,a)}function du(n,t,e,r,i){const a=[],s=e==="x"?"inXRange":"inYRange";let o=!1;return Fr(n,e,t,(l,c,u)=>{l[s](t[e],i)&&(a.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,i))}),r&&!o?[]:a}var os={evaluateInteractionItems:Fr,modes:{index(n,t,e,r){const i=pn(t,n),a=e.axis||"x",s=e.includeInvisible||!1,o=e.intersect?as(n,i,a,r,s):ss(n,i,a,!1,r,s),l=[];return o.length?(n.getSortedVisibleDatasetMetas().forEach(c=>{const u=o[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(n,t,e,r){const i=pn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;let o=e.intersect?as(n,i,a,r,s):ss(n,i,a,!1,r,s);if(o.length>0){const l=o[0].datasetIndex,c=n.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(n,t,e,r){const i=pn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return as(n,i,a,r,s)},nearest(n,t,e,r){const i=pn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return ss(n,i,a,e.intersect,r,s)},x(n,t,e,r){const i=pn(t,n);return du(n,i,"x",e.intersect,r)},y(n,t,e,r){const i=pn(t,n);return du(n,i,"y",e.intersect,r)}}};const fu=["left","top","right","bottom"];function Ur(n,t){return n.filter(e=>e.pos===t)}function hu(n,t){return n.filter(e=>fu.indexOf(e.pos)===-1&&e.box.axis===t)}function Br(n,t){return n.sort((e,r)=>{const i=t?r:e,a=t?e:r;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function Fm(n){const t=[];let e,r,i,a,s,o;for(e=0,r=(n||[]).length;e<r;++e)i=n[e],{position:a,options:{stack:s,stackWeight:o=1}}=i,t.push({index:e,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&a+s,stackWeight:o});return t}function Um(n){const t={};for(const e of n){const{stack:r,pos:i,stackWeight:a}=e;if(!r||!fu.includes(i))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return t}function Bm(n,t){const e=Um(n),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,s,o;for(a=0,s=n.length;a<s;++a){o=n[a];const{fullSize:l}=o.box,c=e[o.stack],u=c&&o.stackWeight/c.weight;o.horizontal?(o.width=u?u*r:l&&t.availableWidth,o.height=i):(o.width=r,o.height=u?u*i:l&&t.availableHeight)}return e}function Wm(n){const t=Fm(n),e=Br(t.filter(c=>c.box.fullSize),!0),r=Br(Ur(t,"left"),!0),i=Br(Ur(t,"right")),a=Br(Ur(t,"top"),!0),s=Br(Ur(t,"bottom")),o=hu(t,"x"),l=hu(t,"y");return{fullSize:e,leftAndTop:r.concat(a),rightAndBottom:i.concat(l).concat(s).concat(o),chartArea:Ur(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:a.concat(s).concat(o)}}function pu(n,t,e,r){return Math.max(n[e],t[e])+Math.max(n[r],t[r])}function gu(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 zm(n,t,e,r){const{pos:i,box:a}=e,s=n.maxPadding;if(!lt(i)){e.size&&(n[i]-=e.size);const d=r[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?a.height:a.width),e.size=d.size/d.count,n[i]+=e.size}a.getPadding&&gu(s,a.getPadding());const o=Math.max(0,t.outerWidth-pu(s,n,"left","right")),l=Math.max(0,t.outerHeight-pu(s,n,"top","bottom")),c=o!==n.w,u=l!==n.h;return n.w=o,n.h=l,e.horizontal?{same:c,other:u}:{same:u,other:c}}function Ym(n){const t=n.maxPadding;function e(r){const i=Math.max(t[r]-n[r],0);return n[r]+=i,i}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function Hm(n,t){const e=t.maxPadding;function r(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(t[s],e[s])}),a}return r(n?["left","right"]:["top","bottom"])}function Wr(n,t,e,r){const i=[];let a,s,o,l,c,u;for(a=0,s=n.length,c=0;a<s;++a){o=n[a],l=o.box,l.update(o.width||t.w,o.height||t.h,Hm(o.horizontal,t));const{same:d,other:f}=zm(t,e,o,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(o)}return c&&Wr(i,t,e,r)||u}function Ei(n,t,e,r,i){n.top=e,n.left=t,n.right=t+r,n.bottom=e+i,n.width=r,n.height=i}function mu(n,t,e,r){const i=e.padding;let{x:a,y:s}=t;for(const o of n){const l=o.box,c=r[o.stack]||{count:1,placed:0,weight:1},u=o.stackWeight/c.weight||1;if(o.horizontal){const d=t.w*u,f=c.size||l.height;de(c.start)&&(s=c.start),l.fullSize?Ei(l,i.left,s,e.outerWidth-i.right-i.left,f):Ei(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;de(c.start)&&(a=c.start),l.fullSize?Ei(l,a,i.top,f,e.outerHeight-i.bottom-i.top):Ei(l,a,t.top+c.placed,f,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var ie={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(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,r){if(!n)return;const i=Gt(n.options.layout.padding),a=Math.max(t-i.width,0),s=Math.max(e-i.height,0),o=Wm(n.boxes),l=o.vertical,c=o.horizontal;St(n.boxes,x=>{typeof x.beforeLayout=="function"&&x.beforeLayout()});const u=l.reduce((x,g)=>g.box.options&&g.box.options.display===!1?x:x+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},i);gu(f,Gt(r));const p=Object.assign({maxPadding:f,w:a,h:s,x:i.left,y:i.top},i),b=Bm(l.concat(c),d);Wr(o.fullSize,p,d,b),Wr(l,p,d,b),Wr(c,p,d,b)&&Wr(l,p,d,b),Ym(p),mu(o.leftAndTop,p,d,b),p.x+=p.w,p.y+=p.h,mu(o.rightAndBottom,p,d,b),n.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},St(o.chartArea,x=>{const g=x.box;Object.assign(g,n.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class yu{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,r){}removeEventListener(t,e,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,r,i){return e=Math.max(0,e||t.width),r=r||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):r)}}isAttached(t){return!0}updateConfig(t){}}class $m extends yu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ri="$chartjs",jm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},bu=n=>n===null||n==="";function Vm(n,t){const e=n.style,r=n.getAttribute("height"),i=n.getAttribute("width");if(n[Ri]={initial:{height:r,width:i,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",bu(i)){const a=Hc(n,"width");a!==void 0&&(n.width=a)}if(bu(r))if(n.style.height==="")n.height=n.width/(t||2);else{const a=Hc(n,"height");a!==void 0&&(n.height=a)}return n}const vu=Kg?{passive:!0}:!1;function qm(n,t,e){n&&n.addEventListener(t,e,vu)}function Xm(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,vu)}function Gm(n,t){const e=jm[n.type]||n.type,{x:r,y:i}=pn(n,t);return{type:e,chart:t,native:n,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Ai(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Km(n,t,e){const r=n.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ai(o.addedNodes,r),s=s&&!Ai(o.removedNodes,r);s&&e()});return i.observe(document,{childList:!0,subtree:!0}),i}function Qm(n,t,e){const r=n.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ai(o.removedNodes,r),s=s&&!Ai(o.addedNodes,r);s&&e()});return i.observe(document,{childList:!0,subtree:!0}),i}const zr=new Map;let xu=0;function _u(){const n=window.devicePixelRatio;n!==xu&&(xu=n,zr.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Zm(n,t){zr.size||window.addEventListener("resize",_u),zr.set(n,t)}function Jm(n){zr.delete(n),zr.size||window.removeEventListener("resize",_u)}function t0(n,t,e){const r=n.canvas,i=r&&Za(r);if(!i)return;const a=Tc((o,l)=>{const c=i.clientWidth;e(o,l),c<i.clientWidth&&e()},window),s=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return s.observe(i),Zm(n,a),s}function ls(n,t,e){e&&e.disconnect(),t==="resize"&&Jm(n)}function e0(n,t,e){const r=n.canvas,i=Tc(a=>{n.ctx!==null&&e(Gm(a,n))},n);return qm(r,t,i),i}class n0 extends yu{acquireContext(t,e){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Vm(t,e),r):null}releaseContext(t){const e=t.canvas;if(!e[Ri])return!1;const r=e[Ri].initial;["height","width"].forEach(a=>{const s=r[a];st(s)?e.removeAttribute(a):e.setAttribute(a,s)});const i=r.style||{};return Object.keys(i).forEach(a=>{e.style[a]=i[a]}),e.width=e.width,delete e[Ri],!0}addEventListener(t,e,r){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),s={attach:Km,detach:Qm,resize:t0}[e]||e0;i[e]=s(t,e,r)}removeEventListener(t,e){const r=t.$proxies||(t.$proxies={}),i=r[e];if(!i)return;({attach:ls,detach:ls,resize:ls}[e]||Xm)(t,e,i),r[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,r,i){return Gg(t,e,r,i)}isAttached(t){const e=Za(t);return!!(e&&e.isConnected)}}function r0(n){return!Qa()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?$m:n0}class te{constructor(){H(this,"x");H(this,"y");H(this,"active",!1);H(this,"options");H(this,"$animations")}tooltipPosition(t){const{x:e,y:r}=this.getProps(["x","y"],t);return{x:e,y:r}}hasValue(){return dn(this.x)&&dn(this.y)}getProps(t,e){const r=this.$animations;if(!e||!r)return this;const i={};return t.forEach(a=>{i[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),i}}H(te,"defaults",{}),H(te,"defaultRoutes");function i0(n,t){const e=n.options.ticks,r=a0(n),i=Math.min(e.maxTicksLimit||r,r),a=e.major.enabled?o0(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>i)return l0(t,c,a,s/i),c;const u=s0(a,t,i);if(s>0){let d,f;const p=s>1?Math.round((l-o)/(s-1)):null;for(Li(t,c,u,st(p)?0:o-p,o),d=0,f=s-1;d<f;d++)Li(t,c,u,a[d],a[d+1]);return Li(t,c,u,l,st(p)?t.length:l+p),c}return Li(t,c,u),c}function a0(n){const t=n.options.offset,e=n._tickSize(),r=n._length/e+(t?0:1),i=n._maxLength/e;return Math.floor(Math.min(r,i))}function s0(n,t,e){const r=c0(n),i=t.length/e;if(!r)return Math.max(i,1);const a=Jp(r);for(let s=0,o=a.length-1;s<o;s++){const l=a[s];if(l>i)return l}return Math.max(i,1)}function o0(n){const t=[];let e,r;for(e=0,r=n.length;e<r;e++)n[e].major&&t.push(e);return t}function l0(n,t,e,r){let i=0,a=e[0],s;for(r=Math.ceil(r),s=0;s<n.length;s++)s===a&&(t.push(n[s]),i++,a=e[i*r])}function Li(n,t,e,r,i){const a=rt(r,0),s=Math.min(rt(i,n.length),n.length);let o=0,l,c,u;for(e=Math.ceil(e),i&&(l=i-r,e=l/Math.floor(l/e)),u=a;u<0;)o++,u=Math.round(a+o*e);for(c=Math.max(a,0);c<s;c++)c===u&&(t.push(n[c]),o++,u=Math.round(a+o*e))}function c0(n){const t=n.length;let e,r;if(t<2)return!1;for(r=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==r)return!1;return r}const u0=n=>n==="left"?"right":n==="right"?"left":n,wu=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,Tu=(n,t)=>Math.min(t||n,n);function Su(n,t){const e=[],r=n.length/t,i=n.length;let a=0;for(;a<i;a+=r)e.push(n[Math.floor(a)]);return e}function d0(n,t,e){const r=n.ticks.length,i=Math.min(t,r-1),a=n._startPixel,s=n._endPixel,o=1e-6;let l=n.getPixelForTick(i),c;if(!(e&&(r===1?c=Math.max(l-a,s-l):t===0?c=(n.getPixelForTick(1)-l)/2:c=(l-n.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<a-o||l>s+o)))return l}function f0(n,t){St(n,e=>{const r=e.gc,i=r.length/2;let a;if(i>t){for(a=0;a<i;++a)delete e.data[r[a]];r.splice(0,i)}})}function Yr(n){return n.drawTicks?n.tickLength:0}function Mu(n,t){if(!n.display)return 0;const e=Rt(n.font,t),r=Gt(n.padding);return(mt(n.text)?n.text.length:1)*e.lineHeight+r.height}function h0(n,t){return hn(n,{scale:t,type:"scale"})}function p0(n,t,e){return hn(n,{tick:e,index:t,type:"tick"})}function g0(n,t,e){let r=za(n);return(e&&t!=="right"||!e&&t==="right")&&(r=u0(r)),r}function m0(n,t,e,r){const{top:i,left:a,bottom:s,right:o,chart:l}=n,{chartArea:c,scales:u}=l;let d=0,f,p,b;const x=s-i,g=o-a;if(n.isHorizontal()){if(p=re(r,a,o),lt(e)){const m=Object.keys(e)[0],v=e[m];b=u[m].getPixelForValue(v)+x-t}else e==="center"?b=(c.bottom+c.top)/2+x-t:b=wu(n,e,t);f=o-a}else{if(lt(e)){const m=Object.keys(e)[0],v=e[m];p=u[m].getPixelForValue(v)-g+t}else e==="center"?p=(c.left+c.right)/2-g+t:p=wu(n,e,t);b=re(r,s,i),d=e==="left"?-Et:Et}return{titleX:p,titleY:b,maxWidth:f,rotation:d}}class In extends te{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._range=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){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:r,_suggestedMax:i}=this;return t=ve(t,Number.POSITIVE_INFINITY),e=ve(e,Number.NEGATIVE_INFINITY),r=ve(r,Number.POSITIVE_INFINITY),i=ve(i,Number.NEGATIVE_INFINITY),{min:ve(t,r),max:ve(e,i),minDefined:It(t),maxDefined:It(e)}}getMinMax(t){let{min:e,max:r,minDefined:i,maxDefined:a}=this.getUserBounds(),s;if(i&&a)return{min:e,max:r};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),i||(e=Math.min(e,s.min)),a||(r=Math.max(r,s.max));return e=a&&e>r?r:e,r=i&&e>r?e:r,{min:ve(e,ve(r,e)),max:ve(r,ve(e,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Tt(this.options.beforeUpdate,[this])}update(t,e,r){const{beginAtZero:i,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Dg(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?Su(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=i0(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,r;this.isHorizontal()?(e=this.left,r=this.right):(e=this.top,r=this.bottom,t=!t),this._startPixel=e,this._endPixel=r,this._reversePixels=t,this._length=r-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Tt(this.options.afterUpdate,[this])}beforeSetDimensions(){Tt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Tt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Tt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Tt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let r,i,a;for(r=0,i=t.length;r<i;r++)a=t[r],a.label=Tt(e.callback,[a.value,r,t],this)}afterTickToLabelConversion(){Tt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Tt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,r=Tu(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,a=e.maxRotation;let s=i,o,l,c;if(!this._isVisible()||!e.display||i>=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=Qt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/r:p/(r-1),d+6>o&&(o=p/(r-(t.offset?.5:1)),l=this.maxHeight-Yr(t.grid)-e.padding-Mu(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=xi(Math.min(Math.asin(Qt((u.highest.height+6)/o,-1,1)),Math.asin(Qt(l/c,-1,1))-Math.asin(Qt(f/c,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){Tt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Tt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:r,title:i,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=Mu(i,e.options.font);if(o?(t.width=this.maxWidth,t.height=Yr(a)+l):(t.height=this.maxHeight,t.width=Yr(a)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,b=Xt(this.labelRotation),x=Math.cos(b),g=Math.sin(b);if(o){const m=r.mirror?0:g*d.width+x*f.height;t.height=Math.min(this.maxHeight,t.height+m+p)}else{const m=r.mirror?0:x*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+m+p)}this._calculatePadding(c,u,g,x)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,r,i){const{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*e.height):(f=r*t.height,p=i*e.width):a==="start"?p=e.width:a==="end"?f=t.width:a!=="inner"&&(f=t.width/2,p=e.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+s)*this.width/(this.width-d),0)}else{let u=e.height/2,d=t.height/2;a==="start"?(u=0,d=t.height):a==="end"&&(u=e.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Tt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,r;for(e=0,r=t.length;e<r;e++)st(t[e].label)&&(t.splice(e,1),r--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let r=this.ticks;e<r.length&&(r=Su(r,e)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,r){const{ctx:i,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(e/Tu(e,r));let c=0,u=0,d,f,p,b,x,g,m,v,y,_,T;for(d=0;d<e;d+=l){if(b=t[d].label,x=this._resolveTickFontOptions(d),i.font=g=x.string,m=a[g]=a[g]||{data:{},gc:[]},v=x.lineHeight,y=_=0,!st(b)&&!mt(b))y=Ti(i,m.data,m.gc,y,b),_=v;else if(mt(b))for(f=0,p=b.length;f<p;++f)T=b[f],!st(T)&&!mt(T)&&(y=Ti(i,m.data,m.gc,y,T),_+=v);s.push(y),o.push(_),c=Math.max(y,c),u=Math.max(_,u)}f0(a,e);const D=s.indexOf(c),O=o.indexOf(u),S=M=>({width:s[M]||0,height:o[M]||0});return{first:S(0),last:S(e-1),widest:S(D),highest:S(O),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ng(this._alignToPixels?Pn(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const r=e[t];return r.$context||(r.$context=p0(this.getContext(),t,r))}return this.$context||(this.$context=h0(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Xt(this.labelRotation),r=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),s=t.autoSkipPadding||0,o=a?a.widest.width+s:0,l=a?a.highest.height+s:0;return this.isHorizontal()?l*r>o*i?o/r:l/i:l*i<o*r?l/r:o/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,r=this.chart,i=this.options,{grid:a,position:s,border:o}=i,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Yr(a),p=[],b=o.setContext(this.getContext()),x=b.display?b.width:0,g=x/2,m=function(Y){return Pn(r,Y,x)};let v,y,_,T,D,O,S,M,k,P,E,F;if(s==="top")v=m(this.bottom),O=this.bottom-f,M=v-g,P=m(t.top)+g,F=t.bottom;else if(s==="bottom")v=m(this.top),P=t.top,F=m(t.bottom)-g,O=v+g,M=this.top+f;else if(s==="left")v=m(this.right),D=this.right-f,S=v-g,k=m(t.left)+g,E=t.right;else if(s==="right")v=m(this.left),k=t.left,E=m(t.right)-g,D=v+g,S=this.left+f;else if(e==="x"){if(s==="center")v=m((t.top+t.bottom)/2+.5);else if(lt(s)){const Y=Object.keys(s)[0],I=s[Y];v=m(this.chart.scales[Y].getPixelForValue(I))}P=t.top,F=t.bottom,O=v+g,M=O+f}else if(e==="y"){if(s==="center")v=m((t.left+t.right)/2);else if(lt(s)){const Y=Object.keys(s)[0],I=s[Y];v=m(this.chart.scales[Y].getPixelForValue(I))}D=v-g,S=D-f,k=t.left,E=t.right}const q=rt(i.ticks.maxTicksLimit,d),$=Math.max(1,Math.ceil(d/q));for(y=0;y<d;y+=$){const Y=this.getContext(y),I=a.setContext(Y),it=o.setContext(Y),B=I.lineWidth,yt=I.color,ut=it.dash||[],z=it.dashOffset,L=I.tickWidth,U=I.tickColor,j=I.tickBorderDash||[],Z=I.tickBorderDashOffset;_=d0(this,y,l),_!==void 0&&(T=Pn(r,_,B),c?D=S=k=E=T:O=M=P=F=T,p.push({tx1:D,ty1:O,tx2:S,ty2:M,x1:k,y1:P,x2:E,y2:F,width:B,color:yt,borderDash:ut,borderDashOffset:z,tickWidth:L,tickColor:U,tickBorderDash:j,tickBorderDashOffset:Z}))}return this._ticksLength=d,this._borderValue=v,p}_computeLabelItems(t){const e=this.axis,r=this.options,{position:i,ticks:a}=r,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=a,f=Yr(r.grid),p=f+u,b=d?-u:p,x=-Xt(this.labelRotation),g=[];let m,v,y,_,T,D,O,S,M,k,P,E,F="middle";if(i==="top")D=this.bottom-b,O=this._getXAxisLabelAlignment();else if(i==="bottom")D=this.top+b,O=this._getXAxisLabelAlignment();else if(i==="left"){const $=this._getYAxisLabelAlignment(f);O=$.textAlign,T=$.x}else if(i==="right"){const $=this._getYAxisLabelAlignment(f);O=$.textAlign,T=$.x}else if(e==="x"){if(i==="center")D=(t.top+t.bottom)/2+p;else if(lt(i)){const $=Object.keys(i)[0],Y=i[$];D=this.chart.scales[$].getPixelForValue(Y)+p}O=this._getXAxisLabelAlignment()}else if(e==="y"){if(i==="center")T=(t.left+t.right)/2-p;else if(lt(i)){const $=Object.keys(i)[0],Y=i[$];T=this.chart.scales[$].getPixelForValue(Y)}O=this._getYAxisLabelAlignment(f).textAlign}e==="y"&&(l==="start"?F="top":l==="end"&&(F="bottom"));const q=this._getLabelSizes();for(m=0,v=o.length;m<v;++m){y=o[m],_=y.label;const $=a.setContext(this.getContext(m));S=this.getPixelForTick(m)+a.labelOffset,M=this._resolveTickFontOptions(m),k=M.lineHeight,P=mt(_)?_.length:1;const Y=P/2,I=$.color,it=$.textStrokeColor,B=$.textStrokeWidth;let yt=O;s?(T=S,O==="inner"&&(m===v-1?yt=this.options.reverse?"left":"right":m===0?yt=this.options.reverse?"right":"left":yt="center"),i==="top"?c==="near"||x!==0?E=-P*k+k/2:c==="center"?E=-q.highest.height/2-Y*k+k:E=-q.highest.height+k/2:c==="near"||x!==0?E=k/2:c==="center"?E=q.highest.height/2-Y*k:E=q.highest.height-P*k,d&&(E*=-1),x!==0&&!$.showLabelBackdrop&&(T+=k/2*Math.sin(x))):(D=S,E=(1-P)*k/2);let ut;if($.showLabelBackdrop){const z=Gt($.backdropPadding),L=q.heights[m],U=q.widths[m];let j=E-z.top,Z=0-z.left;switch(F){case"middle":j-=L/2;break;case"bottom":j-=L;break}switch(O){case"center":Z-=U/2;break;case"right":Z-=U;break;case"inner":m===v-1?Z-=U:m>0&&(Z-=U/2);break}ut={left:Z,top:j,width:U+z.width,height:L+z.height,color:$.backdropColor}}g.push({label:_,font:M,textOffset:E,options:{rotation:x,color:I,strokeColor:it,strokeWidth:B,textAlign:yt,textBaseline:F,translation:[T,D],backdrop:ut}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Xt(this.labelRotation))return t==="top"?"left":"right";let i="center";return e.align==="start"?i="left":e.align==="end"?i="right":e.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:r,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let c,u;return e==="left"?i?(u=this.right+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):e==="right"?i?(u=this.left+a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:r,top:i,width:a,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(r,i,a,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(e.display)for(a=0,s=i.length;a<s;++a){const l=i[a];e.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:r,grid:i}}=this,a=r.setContext(this.getContext()),s=r.display?a.width:0;if(!s)return;const o=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=Pn(t,this.left,s)-s/2,u=Pn(t,this.right,o)+o/2,d=f=l):(d=Pn(t,this.top,s)-s/2,f=Pn(t,this.bottom,o)+o/2,c=u=l),e.save(),e.lineWidth=a.width,e.strokeStyle=a.color,e.beginPath(),e.moveTo(c,d),e.lineTo(u,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Pr(r,i);const a=this.getLabelItems(t);for(const s of a){const o=s.options,l=s.font,c=s.label,u=s.textOffset;En(r,c,0,u,l,o)}i&&Er(r)}drawTitle(){const{ctx:t,options:{position:e,title:r,reverse:i}}=this;if(!r.display)return;const a=Rt(r.font),s=Gt(r.padding),o=r.align;let l=a.lineHeight/2;e==="bottom"||e==="center"||lt(e)?(l+=s.bottom,mt(r.text)&&(l+=a.lineHeight*(r.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=m0(this,l,e,o);En(t,r.text,0,0,a,{color:r.color,maxWidth:d,rotation:f,textAlign:g0(o,e,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,r=rt(t.grid&&t.grid.z,-1),i=rt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==In.prototype.draw?[{z:e,draw:a=>{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let a,s;for(a=0,s=e.length;a<s;++a){const o=e[a];o[r]===this.id&&(!t||o.type===t)&&i.push(o)}return i}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return Rt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ii{constructor(t,e,r){this.type=t,this.scope=e,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let r;v0(e)&&(r=this.register(e));const i=this.items,a=t.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,y0(t,s,r),this.override&&Ut.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,r=t.id,i=this.scope;r in e&&delete e[r],i&&r in Ut[i]&&(delete Ut[i][r],this.override&&delete On[r])}}function y0(n,t,e){const r=Tr(Object.create(null),[e?Ut.get(e):{},Ut.get(t),n.defaults]);Ut.set(t,r),n.defaultRoutes&&b0(t,n.defaultRoutes),n.descriptors&&Ut.describe(t,n.descriptors)}function b0(n,t){Object.keys(t).forEach(e=>{const r=e.split("."),i=r.pop(),a=[n].concat(r).join("."),s=t[e].split("."),o=s.pop(),l=s.join(".");Ut.route(a,i,l,o)})}function v0(n){return"id"in n&&"defaults"in n}class x0{constructor(){this.controllers=new Ii(Oe,"datasets",!0),this.elements=new Ii(te,"elements"),this.plugins=new Ii(Object,"plugins"),this.scales=new Ii(In,"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")}removeControllers(...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,e,r){[...e].forEach(i=>{const a=r||this._getRegistryForType(i);r||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):St(i,s=>{const o=r||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,e,r){const i=Ua(t);Tt(r["before"+i],[],r),e[t](r),Tt(r["after"+i],[],r)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const r=this._typedRegistries[e];if(r.isForType(t))return r}return this.plugins}_get(t,e,r){const i=e.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Ie=new x0;class _0{constructor(){this._init=[]}notify(t,e,r,i){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(a,t,e,r);return e==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,r,i){i=i||{};for(const a of t){const s=a.plugin,o=s[r],l=[e,i,a.options];if(Tt(o,l,s)===!1&&i.cancelable)return!1}return!0}invalidate(){st(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const r=t&&t.config,i=rt(r.options&&r.options.plugins,{}),a=w0(r);return i===!1&&!e?[]:S0(t,a,i,e)}_notifyStateChanges(t){const e=this._oldCache||[],r=this._cache,i=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(i(e,r),t,"stop"),this._notify(i(r,e),t,"start")}}function w0(n){const t={},e=[],r=Object.keys(Ie.plugins.items);for(let a=0;a<r.length;a++)e.push(Ie.getPlugin(r[a]));const i=n.plugins||[];for(let a=0;a<i.length;a++){const s=i[a];e.indexOf(s)===-1&&(e.push(s),t[s.id]=!0)}return{plugins:e,localIds:t}}function T0(n,t){return!t&&n===!1?null:n===!0?{}:n}function S0(n,{plugins:t,localIds:e},r,i){const a=[],s=n.getContext();for(const o of t){const l=o.id,c=T0(r[l],i);c!==null&&a.push({plugin:o,options:M0(n.config,{plugin:o,local:e[l]},c,s)})}return a}function M0(n,{plugin:t,local:e},r,i){const a=n.pluginScopeKeys(t),s=n.getOptionScopes(r,a);return e&&t.defaults&&s.push(t.defaults),n.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function cs(n,t){const e=Ut.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function C0(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function D0(n,t){return n===t?"_index_":"_value_"}function Cu(n){if(n==="x"||n==="y"||n==="r")return n}function k0(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function us(n,...t){if(Cu(n))return n;for(const e of t){const r=e.axis||k0(e.position)||n.length>1&&Cu(n[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function Du(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function O0(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(r=>r.xAxisID===n||r.yAxisID===n);if(e.length)return Du(n,"x",e[0])||Du(n,"y",e[0])}return{}}function P0(n,t){const e=On[n.type]||{scales:{}},r=t.scales||{},i=cs(n.type,t),a=Object.create(null);return Object.keys(r).forEach(s=>{const o=r[s];if(!lt(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=us(s,o,O0(s,n),Ut.scales[o.type]),c=D0(l,i),u=e.scales||{};a[s]=Sr(Object.create(null),[{axis:l},o,u[l],u[c]])}),n.data.datasets.forEach(s=>{const o=s.type||n.type,l=s.indexAxis||cs(o,t),u=(On[o]||{}).scales||{};Object.keys(u).forEach(d=>{const f=C0(d,l),p=s[f+"AxisID"]||f;a[p]=a[p]||Object.create(null),Sr(a[p],[{axis:f},r[p],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Sr(o,[Ut.scales[o.type],Ut.scale])}),a}function ku(n){const t=n.options||(n.options={});t.plugins=rt(t.plugins,{}),t.scales=P0(n,t)}function Ou(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function E0(n){return n=n||{},n.data=Ou(n.data),ku(n),n}const Pu=new Map,Eu=new Set;function Ni(n,t){let e=Pu.get(n);return e||(e=t(),Pu.set(n,e),Eu.add(e)),e}const Hr=(n,t,e)=>{const r=cn(t,e);r!==void 0&&n.add(r)};class R0{constructor(t){this._config=E0(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}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=Ou(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(),ku(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ni(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ni(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ni(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,r=this.type;return Ni(`${r}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const r=this._scopeCache;let i=r.get(t);return(!i||e)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,e,r){const{options:i,type:a}=this,s=this._cachedScopes(t,r),o=s.get(e);if(o)return o;const l=new Set;e.forEach(u=>{t&&(l.add(t),u.forEach(d=>Hr(l,t,d))),u.forEach(d=>Hr(l,i,d)),u.forEach(d=>Hr(l,On[a]||{},d)),u.forEach(d=>Hr(l,Ut,d)),u.forEach(d=>Hr(l,$a,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Eu.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,On[e]||{},Ut.datasets[e]||{},{type:e},Ut,$a]}resolveNamedOptions(t,e,r,i=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=Ru(this._resolverCache,t,i);let l=s;if(L0(s,e)){a.$shared=!1,r=fe(r)?r():r;const c=this.createResolver(t,r,o);l=er(s,r,c)}for(const c of e)a[c]=l[c];return a}createResolver(t,e,r=[""],i){const{resolver:a}=Ru(this._resolverCache,t,r);return lt(e)?er(a,e,void 0,i):a}}function Ru(n,t,e){let r=n.get(t);r||(r=new Map,n.set(t,r));const i=e.join();let a=r.get(i);return a||(a={resolver:Xa(t,e),subPrefixes:e.filter(o=>!o.toLowerCase().includes("hover"))},r.set(i,a)),a}const A0=n=>lt(n)&&Object.getOwnPropertyNames(n).some(t=>fe(n[t]));function L0(n,t){const{isScriptable:e,isIndexable:r}=Lc(n);for(const i of t){const a=e(i),s=r(i),o=(s||a)&&n[i];if(a&&(fe(o)||A0(o))||s&&mt(o))return!0}return!1}var I0="4.4.2";const N0=["top","bottom","left","right","chartArea"];function Au(n,t){return n==="top"||n==="bottom"||N0.indexOf(n)===-1&&t==="x"}function Lu(n,t){return function(e,r){return e[n]===r[n]?e[t]-r[t]:e[n]-r[n]}}function Iu(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Tt(e&&e.onComplete,[n],t)}function F0(n){const t=n.chart,e=t.options.animation;Tt(e&&e.onProgress,[n],t)}function Nu(n){return Qa()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Fi={},Fu=n=>{const t=Nu(n);return Object.values(Fi).filter(e=>e.canvas===t).pop()};function U0(n,t,e){const r=Object.keys(n);for(const i of r){const a=+i;if(a>=t){const s=n[i];delete n[i],(e>0||a>t)&&(n[a+e]=s)}}}function B0(n,t,e,r){return!e||n.type==="mouseout"?null:r?t:n}function Ui(n,t,e){return n.options.clip?n[e]:t[e]}function W0(n,t){const{xScale:e,yScale:r}=n;return e&&r?{left:Ui(e,t,"left"),right:Ui(e,t,"right"),top:Ui(r,t,"top"),bottom:Ui(r,t,"bottom")}:t}let Se=(Mn=class{static register(...t){Ie.add(...t),Uu()}static unregister(...t){Ie.remove(...t),Uu()}constructor(t,e){const r=this.config=new R0(e),i=Nu(t),a=Fu(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||r0(i)),this.platform.updateConfig(r);const o=this.platform.acquireContext(i,s.aspectRatio),l=o&&o.canvas,c=l&&l.height,u=l&&l.width;if(this.id=jp(),this.ctx=o,this.canvas=l,this.width=u,this.height=c,this._options=s,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._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _0,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=sg(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Fi[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Xe.listen(this,"complete",Iu),Xe.listen(this,"progress",F0),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:r,height:i,_aspectRatio:a}=this;return st(t)?e&&a?a:i?r/i: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}get registry(){return Ie}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Yc(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ec(this.canvas,this.ctx),this}stop(){return Xe.stop(this),this}resize(t,e){Xe.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,e,a),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Yc(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),Tt(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};St(e,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,e=t.scales,r=this.scales,i=Object.keys(r).reduce((s,o)=>(s[o]=!1,s),{});let a=[];e&&(a=a.concat(Object.keys(e).map(s=>{const o=e[s],l=us(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),St(a,s=>{const o=s.options,l=o.id,c=us(l,o),u=rt(o.type,s.dtype);(o.position===void 0||Au(o.position,c)!==Au(s.dposition))&&(o.position=s.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=Ie.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(o,t)}),St(i,(s,o)=>{s||delete r[o]}),St(r,s=>{ie.configure(this,s,s.options),ie.addBox(this,s)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,r=t.length;if(t.sort((i,a)=>i.index-a.index),r>e){for(let i=e;i<r;++i)this._destroyDatasetMeta(i);t.splice(e,r-e)}this._sortedMetasets=t.slice(0).sort(Lu("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((r,i)=>{e.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=e.length;r<i;r++){const a=e[r];let s=this.getDatasetMeta(r);const o=a.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=o,s.indexAxis=a.indexAxis||cs(o,this.options),s.order=a.order||0,s.index=r,s.label=""+a.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const l=Ie.getController(o),{datasetElementType:c,dataElementType:u}=Ut.datasets[o];Object.assign(l,{dataElementType:Ie.getElement(u),datasetElementType:c&&Ie.getElement(c)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){St(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const r=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&a.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||St(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Lu("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){St(this.scales,t=>{ie.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!pc(e,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:a}of e){const s=r==="_removeElements"?-a:a;U0(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,r=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),i=r(0);for(let a=1;a<e;a++)if(!pc(i,r(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ie.update(this,this.width,this.height,t);const e=this.chartArea,r=e.width<=0||e.height<=0;this._layers=[],St(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,r=this.data.datasets.length;e<r;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,r=this.data.datasets.length;e<r;++e)this._updateDataset(e,fe(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Xe.has(this)?this.attached&&!Xe.running(this)&&Xe.start(this):(this.draw(),Iu({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,r=[];let i,a;for(i=0,a=e.length;i<a;++i){const s=e[i];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,r=t._clip,i=!r.disabled,a=W0(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&Pr(e,{left:r.left===!1?0:a.left-r.left,right:r.right===!1?this.width:a.right+r.right,top:r.top===!1?0:a.top-r.top,bottom:r.bottom===!1?this.height:a.bottom+r.bottom}),t.controller.draw(),i&&Er(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return qe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,r,i){const a=os.modes[e];return typeof a=="function"?a(this,t,r,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],r=this._metasets;let i=r.filter(a=>a&&a._dataset===e).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=hn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!e.hidden}setDatasetVisibility(t,e){const r=this.getDatasetMeta(t);r.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,r){const i=r?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,i);de(e)?(a.data[e].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(a,{visible:r}),this.update(o=>o.datasetIndex===t?i:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Xe.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ec(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Fi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,r=(a,s)=>{e.addEventListener(this,a,s),t[a]=s},i=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};St(this.options.events,a=>r(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,r=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const o=()=>{i("attach",o),this.attached=!0,this.resize(),r("resize",a),r("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),r("attach",o)},e.isAttached(this.canvas)?o():s()}unbindEvents(){St(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},St(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,r){const i=r?"set":"remove";let a,s,o,l;for(e==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],r=t.map(({datasetIndex:a,index:s})=>{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!mi(r,e)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,e))}notifyPlugins(t,e,r){return this._plugins.notify(this,t,e,r)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,r){const i=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=a(e,t),o=r?t:a(t,e);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){const r={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const a=this._handleEvent(t,e,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(a||r.changed)&&this.render(),this}_handleEvent(t,e,r){const{_active:i=[],options:a}=this,s=e,o=this._getActiveElements(t,i,r,s),l=Qp(t),c=B0(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Tt(a.onHover,[t,o,this],this),l&&Tt(a.onClick,[t,o,this],this));const u=!mi(o,i);return(u||e)&&(this._active=o,this._updateHoverStyles(o,i,e)),this._lastEvent=c,u}_getActiveElements(t,e,r,i){if(t.type==="mouseout")return[];if(!r)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}},H(Mn,"defaults",Ut),H(Mn,"instances",Fi),H(Mn,"overrides",On),H(Mn,"registry",Ie),H(Mn,"version",I0),H(Mn,"getChart",Fu),Mn);function Uu(){return St(Se.instances,n=>n._plugins.invalidate())}function z0(n,t,e){const{startAngle:r,pixelMargin:i,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=i/o;n.beginPath(),n.arc(a,s,o,r-c,e+c),l>i?(c=i/l,n.arc(a,s,l,e+c,r-c,!0)):n.arc(a,s,i,e+Et,r-Et),n.closePath(),n.clip()}function Y0(n){return qa(n,["outerStart","outerEnd","innerStart","innerEnd"])}function H0(n,t,e,r){const i=Y0(n.options.borderRadius),a=(e-t)/2,s=Math.min(a,r*t/2),o=l=>{const c=(e-Math.min(a,l))*r/2;return Qt(l,0,Math.min(a,c))};return{outerStart:o(i.outerStart),outerEnd:o(i.outerEnd),innerStart:Qt(i.innerStart,0,s),innerEnd:Qt(i.innerEnd,0,s)}}function ir(n,t,e,r){return{x:e+n*Math.cos(t),y:r+n*Math.sin(t)}}function Bi(n,t,e,r,i,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+e-c,0),f=u>0?u+r+e+c:0;let p=0;const b=i-l;if(r){const $=u>0?u-r:0,Y=d>0?d-r:0,I=($+Y)/2,it=I!==0?b*I/(I+r):b;p=(b-it)/2}const x=Math.max(.001,b*d-e/dt)/d,g=(b-x)/2,m=l+g+p,v=i-g-p,{outerStart:y,outerEnd:_,innerStart:T,innerEnd:D}=H0(t,f,d,v-m),O=d-y,S=d-_,M=m+y/O,k=v-_/S,P=f+T,E=f+D,F=m+T/P,q=v-D/E;if(n.beginPath(),a){const $=(M+k)/2;if(n.arc(s,o,d,M,$),n.arc(s,o,d,$,k),_>0){const B=ir(S,k,s,o);n.arc(B.x,B.y,_,k,v+Et)}const Y=ir(E,v,s,o);if(n.lineTo(Y.x,Y.y),D>0){const B=ir(E,q,s,o);n.arc(B.x,B.y,D,v+Et,q+Math.PI)}const I=(v-D/f+(m+T/f))/2;if(n.arc(s,o,f,v-D/f,I,!0),n.arc(s,o,f,I,m+T/f,!0),T>0){const B=ir(P,F,s,o);n.arc(B.x,B.y,T,F+Math.PI,m-Et)}const it=ir(O,m,s,o);if(n.lineTo(it.x,it.y),y>0){const B=ir(O,M,s,o);n.arc(B.x,B.y,y,m-Et,M)}}else{n.moveTo(s,o);const $=Math.cos(M)*d+s,Y=Math.sin(M)*d+o;n.lineTo($,Y);const I=Math.cos(k)*d+s,it=Math.sin(k)*d+o;n.lineTo(I,it)}n.closePath()}function $0(n,t,e,r,i){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){Bi(n,t,e,r,l,i);for(let c=0;c<a;++c)n.fill();isNaN(o)||(l=s+(o%kt||kt))}return Bi(n,t,e,r,l,i),n.fill(),l}function j0(n,t,e,r,i){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,p=l.borderAlign==="inner";if(!c)return;n.setLineDash(d||[]),n.lineDashOffset=f,p?(n.lineWidth=c*2,n.lineJoin=u||"round"):(n.lineWidth=c,n.lineJoin=u||"bevel");let b=t.endAngle;if(a){Bi(n,t,e,r,b,i);for(let x=0;x<a;++x)n.stroke();isNaN(o)||(b=s+(o%kt||kt))}p&&z0(n,t,b),a||(Bi(n,t,e,r,b,i),n.stroke())}class $r extends te{constructor(e){super();H(this,"circumference");H(this,"endAngle");H(this,"fullCircles");H(this,"innerRadius");H(this,"outerRadius");H(this,"pixelMargin");H(this,"startAngle");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,e&&Object.assign(this,e)}inRange(e,r,i){const a=this.getProps(["x","y"],i),{angle:s,distance:o}=bc(a,{x:e,y:r}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,x=rt(f,c-l)>=kt||Cr(s,l,c),g=je(o,u+p,d+p);return x&&g}getCenterPoint(e){const{x:r,y:i,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:u}=this.options,d=(a+s)/2,f=(o+l+u+c)/2;return{x:r+Math.cos(d)*f,y:i+Math.sin(d)*f}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:r,circumference:i}=this,a=(r.offset||0)/4,s=(r.spacing||0)/2,o=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>kt?Math.floor(i/kt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(dt,i||0)),u=a*c;e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,$0(e,this,u,s,o),j0(e,this,u,s,o),e.restore()}}H($r,"id","arc"),H($r,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),H($r,"defaultRoutes",{backgroundColor:"backgroundColor"}),H($r,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Bu(n,t,e=t){n.lineCap=rt(e.borderCapStyle,t.borderCapStyle),n.setLineDash(rt(e.borderDash,t.borderDash)),n.lineDashOffset=rt(e.borderDashOffset,t.borderDashOffset),n.lineJoin=rt(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=rt(e.borderWidth,t.borderWidth),n.strokeStyle=rt(e.borderColor,t.borderColor)}function V0(n,t,e){n.lineTo(e.x,e.y)}function q0(n){return n.stepped?bg:n.tension||n.cubicInterpolationMode==="monotone"?vg:V0}function Wu(n,t,e={}){const r=n.length,{start:i=0,end:a=r-1}=e,{start:s,end:o}=t,l=Math.max(i,s),c=Math.min(a,o),u=i<s&&a<s||i>o&&a>o;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function X0(n,t,e,r){const{points:i,options:a}=t,{count:s,start:o,loop:l,ilen:c}=Wu(i,e,r),u=q0(a);let{move:d=!0,reverse:f}=r||{},p,b,x;for(p=0;p<=c;++p)b=i[(o+(f?c-p:p))%s],!b.skip&&(d?(n.moveTo(b.x,b.y),d=!1):u(n,x,b,f,a.stepped),x=b);return l&&(b=i[(o+(f?c:0))%s],u(n,x,b,f,a.stepped)),!!l}function G0(n,t,e,r){const i=t.points,{count:a,start:s,ilen:o}=Wu(i,e,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,b,x,g,m;const v=_=>(s+(c?o-_:_))%a,y=()=>{x!==g&&(n.lineTo(u,g),n.lineTo(u,x),n.lineTo(u,m))};for(l&&(p=i[v(0)],n.moveTo(p.x,p.y)),f=0;f<=o;++f){if(p=i[v(f)],p.skip)continue;const _=p.x,T=p.y,D=_|0;D===b?(T<x?x=T:T>g&&(g=T),u=(d*u+_)/++d):(y(),n.lineTo(_,T),b=D,d=0,x=g=T),m=T}y()}function ds(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?G0:X0}function K0(n){return n.stepped?Qg:n.tension||n.cubicInterpolationMode==="monotone"?Zg:An}function Q0(n,t,e,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,e,r)&&i.closePath()),Bu(n,t.options),n.stroke(i)}function Z0(n,t,e,r){const{segments:i,options:a}=t,s=ds(t);for(const o of i)Bu(n,a,o.style),n.beginPath(),s(n,t,o,{start:e,end:e+r-1})&&n.closePath(),n.stroke()}const J0=typeof Path2D=="function";function ty(n,t,e,r){J0&&!t.options.segment?Q0(n,t,e,r):Z0(n,t,e,r)}class mn extends te{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=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,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;Hg(this._points,r,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=im(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,r=t.length;return r&&e[t[r-1].end]}interpolate(t,e){const r=this.options,i=t[e],a=this.points,s=Gc(this,{property:e,start:i,end:i});if(!s.length)return;const o=[],l=K0(r);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],p=a[d],b=a[f];if(p===b){o.push(p);continue}const x=Math.abs((i-p[e])/(b[e]-p[e])),g=l(p,b,x,r.stepped);g[e]=t[e],o.push(g)}return o.length===1?o[0]:o}pathSegment(t,e,r){return ds(this)(t,this,e,r)}path(t,e,r){const i=this.segments,a=ds(this);let s=this._loop;e=e||0,r=r||this.points.length-e;for(const o of i)s&=a(t,this,o,{start:e,end:e+r-1});return!!s}draw(t,e,r,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),ty(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}H(mn,"id","line"),H(mn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),H(mn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),H(mn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function zu(n,t,e,r){const i=n.options,{[e]:a}=n.getProps([e],r);return Math.abs(t-a)<i.radius+i.hitRadius}class Wi extends te{constructor(e){super();H(this,"parsed");H(this,"skip");H(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,r,i){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],i);return Math.pow(e-s,2)+Math.pow(r-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(e,r){return zu(this,e,"x",r)}inYRange(e,r){return zu(this,e,"y",r)}getCenterPoint(e){const{x:r,y:i}=this.getProps(["x","y"],e);return{x:r,y:i}}size(e){e=e||this.options||{};let r=e.radius||0;r=Math.max(r,r&&e.hoverRadius||0);const i=r&&e.borderWidth||0;return(r+i)*2}draw(e,r){const i=this.options;this.skip||i.radius<.1||!qe(this,r,this.size(i)/2)||(e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.fillStyle=i.backgroundColor,Va(e,i,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}H(Wi,"id","point"),H(Wi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),H(Wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Yu(n,t){const{x:e,y:r,base:i,width:a,height:s}=n.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return n.horizontal?(d=s/2,o=Math.min(e,i),l=Math.max(e,i),c=r-d,u=r+d):(d=a/2,o=e-d,l=e+d,c=Math.min(r,i),u=Math.max(r,i)),{left:o,top:c,right:l,bottom:u}}function yn(n,t,e,r){return n?0:Qt(t,e,r)}function ey(n,t,e){const r=n.options.borderWidth,i=n.borderSkipped,a=Ac(r);return{t:yn(i.top,a.top,0,e),r:yn(i.right,a.right,0,t),b:yn(i.bottom,a.bottom,0,e),l:yn(i.left,a.left,0,t)}}function ny(n,t,e){const{enableBorderRadius:r}=n.getProps(["enableBorderRadius"]),i=n.options.borderRadius,a=fn(i),s=Math.min(t,e),o=n.borderSkipped,l=r||lt(i);return{topLeft:yn(!l||o.top||o.left,a.topLeft,0,s),topRight:yn(!l||o.top||o.right,a.topRight,0,s),bottomLeft:yn(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:yn(!l||o.bottom||o.right,a.bottomRight,0,s)}}function ry(n){const t=Yu(n),e=t.right-t.left,r=t.bottom-t.top,i=ey(n,e/2,r/2),a=ny(n,e/2,r/2);return{outer:{x:t.left,y:t.top,w:e,h:r,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:e-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function fs(n,t,e,r){const i=t===null,a=e===null,o=n&&!(i&&a)&&Yu(n,r);return o&&(i||je(t,o.left,o.right))&&(a||je(e,o.top,o.bottom))}function iy(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function ay(n,t){n.rect(t.x,t.y,t.w,t.h)}function hs(n,t,e={}){const r=n.x!==e.x?-t:0,i=n.y!==e.y?-t:0,a=(n.x+n.w!==e.x+e.w?t:0)-r,s=(n.y+n.h!==e.y+e.h?t:0)-i;return{x:n.x+r,y:n.y+i,w:n.w+a,h:n.h+s,radius:n.radius}}class zi extends te{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:r,backgroundColor:i}}=this,{inner:a,outer:s}=ry(this),o=iy(s.radius)?tr:ay;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,hs(s,e,a)),t.clip(),o(t,hs(a,-e,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),o(t,hs(a,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,r){return fs(this,t,e,r)}inXRange(t,e){return fs(this,t,null,e)}inYRange(t,e){return fs(this,null,t,e)}getCenterPoint(t){const{x:e,y:r,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+i)/2:e,y:a?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}H(zi,"id","bar"),H(zi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),H(zi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var sy=Object.freeze({__proto__:null,ArcElement:$r,BarElement:zi,LineElement:mn,PointElement:Wi});const ps=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Hu=ps.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function $u(n){return ps[n%ps.length]}function ju(n){return Hu[n%Hu.length]}function oy(n,t){return n.borderColor=$u(t),n.backgroundColor=ju(t),++t}function ly(n,t){return n.backgroundColor=n.data.map(()=>$u(t++)),t}function cy(n,t){return n.backgroundColor=n.data.map(()=>ju(t++)),t}function uy(n){let t=0;return(e,r)=>{const i=n.getDatasetMeta(r).controller;i instanceof gn?t=ly(e,t):i instanceof Nr?t=cy(e,t):i&&(t=oy(e,t))}}function Vu(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function dy(n){return n&&(n.borderColor||n.backgroundColor)}var fy={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:r},options:i}=n.config,{elements:a}=i;if(!e.forceOverride&&(Vu(r)||dy(i)||a&&Vu(a)))return;const s=uy(n);r.forEach(s)}};function hy(n,t,e,r,i){const a=i.samples||r;if(a>=e)return n.slice(t,t+e);const s=[],o=(e-2)/(a-2);let l=0;const c=t+e-1;let u=t,d,f,p,b,x;for(s[l++]=n[u],d=0;d<a-2;d++){let g=0,m=0,v;const y=Math.floor((d+1)*o)+1+t,_=Math.min(Math.floor((d+2)*o)+1,e)+t,T=_-y;for(v=y;v<_;v++)g+=n[v].x,m+=n[v].y;g/=T,m/=T;const D=Math.floor(d*o)+1+t,O=Math.min(Math.floor((d+1)*o)+1,e)+t,{x:S,y:M}=n[u];for(p=b=-1,v=D;v<O;v++)b=.5*Math.abs((S-g)*(n[v].y-M)-(S-n[v].x)*(m-M)),b>p&&(p=b,f=n[v],x=v);s[l++]=f,u=x}return s[l++]=n[c],s}function py(n,t,e,r){let i=0,a=0,s,o,l,c,u,d,f,p,b,x;const g=[],m=t+e-1,v=n[t].x,_=n[m].x-v;for(s=t;s<t+e;++s){o=n[s],l=(o.x-v)/_*r,c=o.y;const T=l|0;if(T===u)c<b?(b=c,d=s):c>x&&(x=c,f=s),i=(a*i+o.x)/++a;else{const D=s-1;if(!st(d)&&!st(f)){const O=Math.min(d,f),S=Math.max(d,f);O!==p&&O!==D&&g.push({...n[O],x:i}),S!==p&&S!==D&&g.push({...n[S],x:i})}s>0&&D!==p&&g.push(n[D]),g.push(o),u=T,a=0,b=x=c,d=f=p=s}}return g}function qu(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Xu(n){n.data.datasets.forEach(t=>{qu(t)})}function gy(n,t){const e=t.length;let r=0,i;const{iScale:a}=n,{min:s,max:o,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(r=Qt(Ve(t,a.axis,s).lo,0,e-1)),c?i=Qt(Ve(t,a.axis,o).hi+1,r,e)-r:i=e-r,{start:r,count:i}}var my={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Xu(n);return}const r=n.width;n.data.datasets.forEach((i,a)=>{const{_data:s,indexAxis:o}=i,l=n.getDatasetMeta(a),c=s||i.data;if(Rr([o,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=n.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||n.options.parsing)return;let{start:d,count:f}=gy(l,c);const p=e.threshold||4*r;if(f<=p){qu(i);return}st(s)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(x){this._data=x}}));let b;switch(e.algorithm){case"lttb":b=hy(c,d,f,r,e);break;case"min-max":b=py(c,d,f,r);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}i._decimated=b})},destroy(n){Xu(n)}};function yy(n,t,e){const r=n.segments,i=n.points,a=t.points,s=[];for(const o of r){let{start:l,end:c}=o;c=ms(l,c,i);const u=gs(e,i[l],i[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:i[l],end:i[c]});continue}const d=Gc(t,u);for(const f of d){const p=gs(e,a[f.start],a[f.end],f.loop),b=Xc(o,i,p);for(const x of b)s.push({source:x,target:f,start:{[e]:Gu(u,p,"start",Math.max)},end:{[e]:Gu(u,p,"end",Math.min)}})}}return s}function gs(n,t,e,r){if(r)return;let i=t[n],a=e[n];return n==="angle"&&(i=xe(i),a=xe(a)),{property:n,start:i,end:a}}function by(n,t){const{x:e=null,y:r=null}=n||{},i=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=ms(s,o,i);const l=i[s],c=i[o];r!==null?(a.push({x:l.x,y:r}),a.push({x:c.x,y:r})):e!==null&&(a.push({x:e,y:l.y}),a.push({x:e,y:c.y}))}),a}function ms(n,t,e){for(;t>n;t--){const r=e[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function Gu(n,t,e,r){return n&&t?r(n[e],t[e]):n?n[e]:t?t[e]:0}function Ku(n,t){let e=[],r=!1;return mt(n)?(r=!0,e=n):e=by(n,t),e.length?new mn({points:e,options:{tension:0},_loop:r,_fullLoop:r}):null}function Qu(n){return n&&n.fill!==!1}function vy(n,t,e){let i=n[t].fill;const a=[t];let s;if(!e)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!It(i))return i;if(s=n[i],!s)return!1;if(s.visible)return i;a.push(i),i=s.fill}return!1}function xy(n,t,e){const r=Sy(n);if(lt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return It(i)&&Math.floor(i)===i?_y(r[0],t,i,e):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function _y(n,t,e,r){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=r?!1:e}function wy(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:lt(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Ty(n,t,e){let r;return n==="start"?r=e:n==="end"?r=t.options.reverse?t.min:t.max:lt(n)?r=n.value:r=t.getBaseValue(),r}function Sy(n){const t=n.options,e=t.fill;let r=rt(e&&e.target,e);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function My(n){const{scale:t,index:e,line:r}=n,i=[],a=r.segments,s=r.points,o=Cy(t,e);o.push(Ku({x:null,y:t.bottom},r));for(let l=0;l<a.length;l++){const c=a[l];for(let u=c.start;u<=c.end;u++)Dy(i,s[u],o)}return new mn({points:i,options:{}})}function Cy(n,t){const e=[],r=n.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const a=r[i];if(a.index===t)break;a.hidden||e.unshift(a.dataset)}return e}function Dy(n,t,e){const r=[];for(let i=0;i<e.length;i++){const a=e[i],{first:s,last:o,point:l}=ky(a,t,"x");if(!(!l||s&&o)){if(s)r.unshift(l);else if(n.push(l),!o)break}}n.push(...r)}function ky(n,t,e){const r=n.interpolate(t,e);if(!r)return{};const i=r[e],a=n.segments,s=n.points;let o=!1,l=!1;for(let c=0;c<a.length;c++){const u=a[c],d=s[u.start][e],f=s[u.end][e];if(je(i,d,f)){o=i===d,l=i===f;break}}return{first:o,last:l,point:r}}class Zu{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,r){const{x:i,y:a,radius:s}=this;return e=e||{start:0,end:kt},t.arc(i,a,s,e.end,e.start,!0),!r.bounds}interpolate(t){const{x:e,y:r,radius:i}=this,a=t.angle;return{x:e+Math.cos(a)*i,y:r+Math.sin(a)*i,angle:a}}}function Oy(n){const{chart:t,fill:e,line:r}=n;if(It(e))return Py(t,e);if(e==="stack")return My(n);if(e==="shape")return!0;const i=Ey(n);return i instanceof Zu?i:Ku(i,r)}function Py(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function Ey(n){return(n.scale||{}).getPointPositionForValue?Ay(n):Ry(n)}function Ry(n){const{scale:t={},fill:e}=n,r=wy(e,t);if(It(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function Ay(n){const{scale:t,fill:e}=n,r=t.options,i=t.getLabels().length,a=r.reverse?t.max:t.min,s=Ty(e,t,a),o=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,a);return new Zu({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<i;++l)o.push(t.getPointPositionForValue(l,s));return o}function ys(n,t,e){const r=Oy(t),{line:i,scale:a,axis:s}=t,o=i.options,l=o.fill,c=o.backgroundColor,{above:u=c,below:d=c}=l||{};r&&i.points.length&&(Pr(n,e),Ly(n,{line:i,target:r,above:u,below:d,area:e,scale:a,axis:s}),Er(n))}function Ly(n,t){const{line:e,target:r,above:i,below:a,area:s,scale:o}=t,l=e._loop?"angle":t.axis;n.save(),l==="x"&&a!==i&&(Ju(n,r,s.top),td(n,{line:e,target:r,color:i,scale:o,property:l}),n.restore(),n.save(),Ju(n,r,s.bottom)),td(n,{line:e,target:r,color:a,scale:o,property:l}),n.restore()}function Ju(n,t,e){const{segments:r,points:i}=t;let a=!0,s=!1;n.beginPath();for(const o of r){const{start:l,end:c}=o,u=i[l],d=i[ms(l,c,i)];a?(n.moveTo(u.x,u.y),a=!1):(n.lineTo(u.x,e),n.lineTo(u.x,u.y)),s=!!t.pathSegment(n,o,{move:s}),s?n.closePath():n.lineTo(d.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function td(n,t){const{line:e,target:r,property:i,color:a,scale:s}=t,o=yy(e,r,i);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:f=a}={}}=l,p=r!==!0;n.save(),n.fillStyle=f,Iy(n,s,p&&gs(i,u,d)),n.beginPath();const b=!!e.pathSegment(n,l);let x;if(p){b?n.closePath():ed(n,r,d,i);const g=!!r.pathSegment(n,c,{move:b,reverse:!0});x=b&&g,x||ed(n,r,u,i)}n.closePath(),n.fill(x?"evenodd":"nonzero"),n.restore()}}function Iy(n,t,e){const{top:r,bottom:i}=t.chart.chartArea,{property:a,start:s,end:o}=e||{};a==="x"&&(n.beginPath(),n.rect(s,r,o-s,i-r),n.clip())}function ed(n,t,e,r){const i=t.interpolate(e,r);i&&n.lineTo(i.x,i.y)}var Ny={id:"filler",afterDatasetsUpdate(n,t,e){const r=(n.data.datasets||[]).length,i=[];let a,s,o,l;for(s=0;s<r;++s)a=n.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof mn&&(l={visible:n.isDatasetVisible(s),index:s,fill:xy(o,s,r),chart:n,axis:a.controller.options.indexAxis,scale:a.vScale,line:o}),a.$filler=l,i.push(l);for(s=0;s<r;++s)l=i[s],!(!l||l.fill===!1)&&(l.fill=vy(i,s,e.propagate))},beforeDraw(n,t,e){const r=e.drawTime==="beforeDraw",i=n.getSortedVisibleDatasetMetas(),a=n.chartArea;for(let s=i.length-1;s>=0;--s){const o=i[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),r&&o.fill&&ys(n.ctx,o,a))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const r=n.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const a=r[i].$filler;Qu(a)&&ys(n.ctx,a,n.chartArea)}},beforeDatasetDraw(n,t,e){const r=t.meta.$filler;!Qu(r)||e.drawTime!=="beforeDatasetDraw"||ys(n.ctx,r,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const nd=(n,t)=>{let{boxHeight:e=t,boxWidth:r=t}=n;return n.usePointStyle&&(e=Math.min(e,t),r=n.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:e,itemHeight:Math.max(t,e)}},Fy=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class rd extends te{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,e,r){this.maxWidth=t,this.maxHeight=e,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Tt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(r=>t.filter(r,this.chart.data))),t.sort&&(e=e.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=Rt(r.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=nd(r,a);let c,u;e.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,a,o,l)+10):(u=this.maxHeight,c=this._fitCols(s,i,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,r,i){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+o;let d=t;a.textAlign="left",a.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((b,x)=>{const g=r+e/2+a.measureText(b.text).width;(x===0||c[c.length-1]+g+2*o>s)&&(d+=u,c[c.length-(x>0?0:1)]=0,p+=u,f++),l[x]={left:0,top:p,row:f,width:g,height:i},c[c.length-1]+=g+o}),d}_fitCols(t,e,r,i){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,f=0,p=0,b=0,x=0;return this.legendItems.forEach((g,m)=>{const{itemWidth:v,itemHeight:y}=Uy(r,e,a,g,i);m>0&&p+y+2*o>u&&(d+=f+o,c.push({width:f,height:p}),b+=f+o,x++,f=p=0),l[m]={left:b,top:p,col:x,width:v,height:y},f=Math.max(f,v),p+=y+o}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:r,labels:{padding:i},rtl:a}}=this,s=rr(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=re(r,this.left+i,this.right-this.lineWidths[o]);for(const c of e)o!==c.row&&(o=c.row,l=re(r,this.left+i,this.right-this.lineWidths[o])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let o=0,l=re(r,this.top+t+i,this.bottom-this.columnSizes[o].height);for(const c of e)c.col!==o&&(o=c.col,l=re(r,this.top+t+i,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Pr(t,this),this._draw(),Er(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:r,ctx:i}=this,{align:a,labels:s}=t,o=Ut.color,l=rr(t.rtl,this.left,this.width),c=Rt(s.font),{padding:u}=s,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:b,boxHeight:x,itemHeight:g}=nd(s,d),m=function(D,O,S){if(isNaN(b)||b<=0||isNaN(x)||x<0)return;i.save();const M=rt(S.lineWidth,1);if(i.fillStyle=rt(S.fillStyle,o),i.lineCap=rt(S.lineCap,"butt"),i.lineDashOffset=rt(S.lineDashOffset,0),i.lineJoin=rt(S.lineJoin,"miter"),i.lineWidth=M,i.strokeStyle=rt(S.strokeStyle,o),i.setLineDash(rt(S.lineDash,[])),s.usePointStyle){const k={radius:x*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:M},P=l.xPlus(D,b/2),E=O+f;Rc(i,k,P,E,s.pointStyleWidth&&b)}else{const k=O+Math.max((d-x)/2,0),P=l.leftForLtr(D,b),E=fn(S.borderRadius);i.beginPath(),Object.values(E).some(F=>F!==0)?tr(i,{x:P,y:k,w:b,h:x,radius:E}):i.rect(P,k,b,x),i.fill(),M!==0&&i.stroke()}i.restore()},v=function(D,O,S){En(i,S.text,D,O+g/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},y=this.isHorizontal(),_=this._computeTitleHeight();y?p={x:re(a,this.left+u,this.right-r[0]),y:this.top+u+_,line:0}:p={x:this.left+u,y:re(a,this.top+_+u,this.bottom-e[0].height),line:0},$c(this.ctx,t.textDirection);const T=g+u;this.legendItems.forEach((D,O)=>{i.strokeStyle=D.fontColor,i.fillStyle=D.fontColor;const S=i.measureText(D.text).width,M=l.textAlign(D.textAlign||(D.textAlign=s.textAlign)),k=b+f+S;let P=p.x,E=p.y;l.setWidth(this.width),y?O>0&&P+k+u>this.right&&(E=p.y+=T,p.line++,P=p.x=re(a,this.left+u,this.right-r[p.line])):O>0&&E+T>this.bottom&&(P=p.x=P+e[p.line].width+u,p.line++,E=p.y=re(a,this.top+_+u,this.bottom-e[p.line].height));const F=l.x(P);if(m(F,E,D),P=og(M,P+b+f,y?P+k:this.right,t.rtl),v(l.x(P),E,D),y)p.x+=k+u;else if(typeof D.text!="string"){const q=c.lineHeight;p.y+=id(D,q)+u}else p.y+=T}),jc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,r=Rt(e.font),i=Gt(e.padding);if(!e.display)return;const a=rr(t.rtl,this.left,this.width),s=this.ctx,o=e.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=re(t.align,d,this.right-f);else{const b=this.columnSizes.reduce((x,g)=>Math.max(x,g.height),0);u=c+re(t.align,this.top,this.bottom-b-t.labels.padding-this._computeTitleHeight())}const p=re(o,d,d+f);s.textAlign=a.textAlign(za(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=r.string,En(s,e.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,e=Rt(t.font),r=Gt(t.padding);return t.display?e.lineHeight+r.height:0}_getLegendItemAt(t,e){let r,i,a;if(je(t,this.left,this.right)&&je(e,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;r<a.length;++r)if(i=a[r],je(t,i.left,i.left+i.width)&&je(e,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const e=this.options;if(!zy(t.type,e))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=Fy(i,r);i&&!a&&Tt(e.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!a&&Tt(e.onHover,[t,r,this],this)}else r&&Tt(e.onClick,[t,r,this],this)}}function Uy(n,t,e,r,i){const a=By(r,n,t,e),s=Wy(i,r,t.lineHeight);return{itemWidth:a,itemHeight:s}}function By(n,t,e,r){let i=n.text;return i&&typeof i!="string"&&(i=i.reduce((a,s)=>a.length>s.length?a:s)),t+e.size/2+r.measureText(i).width}function Wy(n,t,e){let r=n;return typeof t.text!="string"&&(r=id(t,e)),r}function id(n,t){const e=n.text?n.text.length:0;return t*e}function zy(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var Yy={id:"legend",_element:rd,start(n,t,e){const r=n.legend=new rd({ctx:n.ctx,options:e,chart:n});ie.configure(n,r,e),ie.addBox(n,r)},stop(n){ie.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const r=n.legend;ie.configure(n,r,e),r.options=e},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,e){const r=t.datasetIndex,i=e.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),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:e,pointStyle:r,textAlign:i,color:a,useBorderRadius:s,borderRadius:o}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),u=Gt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:s&&(o||c.borderRadius),datasetIndex:l.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 bs extends te{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,e){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const i=mt(r.text)?r.text.length:1;this._padding=Gt(r.padding);const a=i*Rt(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:r,bottom:i,right:a,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=re(o,r,a),d=e+t,c=a-r):(s.position==="left"?(u=r+t,d=re(o,i,e),l=dt*-.5):(u=a-t,d=re(o,e,i),l=dt*.5),c=i-e),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const r=Rt(e.font),a=r.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);En(t,e.text,0,0,r,{color:e.color,maxWidth:l,rotation:c,textAlign:za(e.align),textBaseline:"middle",translation:[s,o]})}}function Hy(n,t){const e=new bs({ctx:n.ctx,options:t,chart:n});ie.configure(n,e,t),ie.addBox(n,e),n.titleBlock=e}var $y={id:"title",_element:bs,start(n,t,e){Hy(n,e)},stop(n){const t=n.titleBlock;ie.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const r=n.titleBlock;ie.configure(n,r,e),r.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yi=new WeakMap;var jy={id:"subtitle",start(n,t,e){const r=new bs({ctx:n.ctx,options:e,chart:n});ie.configure(n,r,e),ie.addBox(n,r),Yi.set(n,r)},stop(n){ie.removeBox(n,Yi.get(n)),Yi.delete(n)},beforeUpdate(n,t,e){const r=Yi.get(n);ie.configure(n,r,e),r.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const jr={average(n){if(!n.length)return!1;let t,e,r=new Set,i=0,a=0;for(t=0,e=n.length;t<e;++t){const o=n[t].element;if(o&&o.hasValue()){const l=o.tooltipPosition();r.add(l.x),i+=l.y,++a}}return{x:[...r].reduce((o,l)=>o+l)/r.size,y:i/a}},nearest(n,t){if(!n.length)return!1;let e=t.x,r=t.y,i=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=n.length;a<s;++a){const l=n[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Jn(t,c);u<i&&(i=u,o=l)}}if(o){const l=o.tooltipPosition();e=l.x,r=l.y}return{x:e,y:r}}};function Ne(n,t){return t&&(mt(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Ge(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
16
|
+
*/class om{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,r,i){const a=e.listeners[i],s=e.duration;a.forEach(o=>o({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(r-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=wc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const a=r.items;let s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(i.draw(),this._notify(i,r,t,"progress")),a.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),e+=a.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let r=e.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,r)),r}listen(t,e,r){this._getAnims(t).listeners[e].push(r)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const r=e.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Xe=new om;const Zc="transparent",lm={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const r=kc(n||Zc),i=r.valid&&kc(t||Zc);return i&&i.valid?i.mix(r,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class cm{constructor(t,e,r,i){const a=e[r];i=Rr([t.to,i,a,t.from]);const s=Rr([t.from,a,i]);this._active=!0,this._fn=t.fn||lm[t.type||typeof s],this._easing=Dr[t.easing]||Dr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,r){if(this._active){this._notify(!1);const i=this._target[this._prop],a=r-this._start,s=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Rr([t.to,e,i,t.from]),this._from=Rr([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,r=this._duration,i=this._prop,a=this._from,s=this._loop,o=this._to;let l;if(this._active=a!==o&&(s||e<r),!this._active){this._target[i]=o,this._notify(!0);return}if(e<0){this._target[i]=a;return}l=e/r%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,r)=>{t.push({res:e,rej:r})})}_notify(t){const e=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][e]()}}class Ja{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!lt(t))return;const e=Object.keys(Ut.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!lt(a))return;const s={};for(const o of e)s[o]=a[o];(mt(a.properties)&&a.properties||[i]).forEach(o=>{(o===i||!r.has(o))&&r.set(o,s)})})}_animateOptions(t,e){const r=e.options,i=dm(t,r);if(!i)return[];const a=this._createAnimations(i,r);return r.$shared&&um(t.options.$animations,r).then(()=>{t.options=r},()=>{}),a}_createAnimations(t,e){const r=this._properties,i=[],a=t.$animations||(t.$animations={}),s=Object.keys(e),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,e));continue}const u=e[c];let d=a[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,o);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}a[c]=d=new cm(f,t,c,u),i.push(d)}return i}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const r=this._createAnimations(t,e);if(r.length)return Xe.add(this._chart,r),!0}}function um(n,t){const e=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const a=n[r[i]];a&&a.active()&&e.push(a.wait())}return Promise.all(e)}function dm(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Jc(n,t){const e=n&&n.options||{},r=e.reverse,i=e.min===void 0?t:0,a=e.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function fm(n,t,e){if(e===!1)return!1;const r=Jc(n,e),i=Jc(t,e);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function hm(n){let t,e,r,i;return lt(n)?(t=n.top,e=n.right,r=n.bottom,i=n.left):t=e=r=i=n,{top:t,right:e,bottom:r,left:i,disabled:n===!1}}function tu(n,t){const e=[],r=n._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i<a;++i)e.push(r[i].index);return e}function eu(n,t,e,r={}){const i=n.keys,a=r.mode==="single";let s,o,l,c;if(t!==null){for(s=0,o=i.length;s<o;++s){if(l=+i[s],l===e){if(r.all)continue;break}c=n.values[l],It(c)&&(a||t===0||Le(t)===Le(c))&&(t+=c)}return t}}function pm(n){const t=Object.keys(n),e=new Array(t.length);let r,i,a;for(r=0,i=t.length;r<i;++r)a=t[r],e[r]={x:a,y:n[a]};return e}function nu(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function gm(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function mm(n){const{min:t,max:e,minDefined:r,maxDefined:i}=n.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?e:Number.POSITIVE_INFINITY}}function ym(n,t,e){const r=n[t]||(n[t]={});return r[e]||(r[e]={})}function ru(n,t,e,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const a=n[i.index];if(e&&a>0||!e&&a<0)return i.index}return null}function iu(n,t){const{chart:e,_cachedMeta:r}=n,i=e._stacks||(e._stacks={}),{iScale:a,vScale:s,index:o}=r,l=a.axis,c=s.axis,u=gm(a,s,r),d=t.length;let f;for(let p=0;p<d;++p){const v=t[p],{[l]:x,[c]:g}=v,m=v._stacks||(v._stacks={});f=m[c]=ym(i,u,x),f[o]=g,f._top=ru(f,s,!0,r.type),f._bottom=ru(f,s,!1,r.type);const b=f._visualValues||(f._visualValues={});b[o]=g}}function ts(n,t){const e=n.scales;return Object.keys(e).filter(r=>e[r].axis===t).shift()}function vm(n,t){return hn(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function bm(n,t,e){return hn(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Ar(n,t){const e=n.controller.index,r=n.vScale&&n.vScale.axis;if(r){t=t||n._parsed;for(const i of t){const a=i._stacks;if(!a||a[r]===void 0||a[r][e]===void 0)return;delete a[r][e],a[r]._visualValues!==void 0&&a[r]._visualValues[e]!==void 0&&delete a[r]._visualValues[e]}}}const es=n=>n==="reset"||n==="none",au=(n,t)=>t?n:Object.assign({},n),xm=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:tu(e,!0),values:null};class Oe{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=nu(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ar(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,r=this.getDataset(),i=(d,f,p,v)=>d==="x"?f:d==="r"?v:p,a=e.xAxisID=rt(r.xAxisID,ts(t,"x")),s=e.yAxisID=rt(r.yAxisID,ts(t,"y")),o=e.rAxisID=rt(r.rAxisID,ts(t,"r")),l=e.indexAxis,c=e.iAxisID=i(l,a,s,o),u=e.vAxisID=i(l,s,a,o);e.xScale=this.getScaleForId(a),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&xc(this._data,this),t._stacked&&Ar(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),r=this._data;if(lt(e))this._data=pm(e);else if(r!==e){if(r){xc(r,this);const i=this._cachedMeta;Ar(i),i._parsed=[]}e&&Object.isExtensible(e)&&ag(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const a=e._stacked;e._stacked=nu(e.vScale,e),e.stack!==r.stack&&(i=!0,Ar(e),e.stack=r.stack),this._resyncElements(t),(i||a!==e._stacked)&&iu(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:s}=r,o=a.axis;let l=t===0&&e===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{mt(i[t])?f=this.parseArrayData(r,i,t,e):lt(i[t])?f=this.parseObjectData(r,i,t,e):f=this.parsePrimitiveData(r,i,t,e);const p=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<e;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}s&&iu(this,f)}parsePrimitiveData(t,e,r,i){const{iScale:a,vScale:s}=t,o=a.axis,l=s.axis,c=a.getLabels(),u=a===s,d=new Array(i);let f,p,v;for(f=0,p=i;f<p;++f)v=f+r,d[f]={[o]:u||a.parse(c[v],v),[l]:s.parse(e[v],v)};return d}parseArrayData(t,e,r,i){const{xScale:a,yScale:s}=t,o=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=e[u],o[l]={x:a.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,e,r,i){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=e[f],c[u]={x:a.parse(cn(p,o),f),y:s.parse(cn(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,r){const i=this.chart,a=this._cachedMeta,s=e[t.axis],o={keys:tu(i,!0),values:e._stacks[t.axis]._visualValues};return eu(o,s,a.index,{mode:r})}updateRangeFromParsed(t,e,r,i){const a=r[e.axis];let s=a===null?NaN:a;const o=i&&r._stacks[e.axis];i&&o&&(i.values=o,s=eu(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const r=this._cachedMeta,i=r._parsed,a=r._sorted&&t===r.iScale,s=i.length,o=this._getOtherScale(t),l=xm(e,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=mm(o);let f,p;function v(){p=i[f];const x=p[o.axis];return!It(p[t.axis])||u>x||d<x}for(f=0;f<s&&!(!v()&&(this.updateRangeFromParsed(c,t,p,l),a));++f);if(a){for(f=s-1;f>=0;--f)if(!v()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,r=[];let i,a,s;for(i=0,a=e.length;i<a;++i)s=e[i][t.axis],It(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,r=e.iScale,i=e.vScale,a=this.getParsed(t);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=hm(rt(this.options.clip,fm(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,r=this._cachedMeta,i=r.data||[],a=e.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||i.length-o,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,a,o,l),u=o;u<o+l;++u){const d=i[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,a))}for(u=0;u<s.length;++u)s[u].draw(t,a)}getStyle(t,e){const r=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,e,r){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];a=s.$context||(s.$context=bm(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=vm(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=r,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",r){const i=e==="active",a=this._cachedDataOpts,s=t+"-"+e,o=a[s],l=this.enableOptionSharing&&de(r);if(o)return au(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Ut.elements[t]),v=()=>this.getContext(r,i,e),x=c.resolveNamedOptions(f,p,v,d);return x.$shared&&(x.$shared=l,a[s]=Object.freeze(au(x,l))),x}_resolveAnimations(t,e,r){const i=this.chart,a=this._cachedDataOpts,s=`animation-${e}`,o=a[s];if(o)return o;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,e),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,e))}const c=new Ja(i,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||es(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const r=this.resolveDataElementOptions(t,e),i=this._sharedOptions,a=this.getSharedOptions(r),s=this.includeOptions(e,a)||a!==i;return this.updateSharedOptions(a,e,r),{sharedOptions:a,includeOptions:s}}updateElement(t,e,r,i){es(i)?Object.assign(t,r):this._resolveAnimations(e,i).update(t,r)}updateSharedOptions(t,e,r){t&&!es(e)&&this._resolveAnimations(void 0,e).update(t,r)}_setStyle(t,e,r,i){t.active=i;const a=this.getStyle(e,i);this._resolveAnimations(e,r,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,e,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,e,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,r=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const i=r.length,a=e.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,e,r=!0){const i=this._cachedMeta,a=i.data,s=t+e;let o;const l=c=>{for(c.length+=e,o=c.length-1;o>=s;o--)c[o]=c[o-e]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,e),r&&this.updateElements(a,t,e,"reset")}updateElements(t,e,r,i){}_removeElements(t,e){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,e);r._stacked&&Ar(r,i)}r.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,r,i]=t;this[e](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}H(Oe,"defaults",{}),H(Oe,"datasetElementType",null),H(Oe,"dataElementType",null);function _m(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let r=[];for(let i=0,a=e.length;i<a;i++)r=r.concat(e[i].controller.getAllParsedValues(n));n._cache.$bar=_c(r.sort((i,a)=>i-a))}return n._cache.$bar}function wm(n){const t=n.iScale,e=_m(t,n.type);let r=t._length,i,a,s,o;const l=()=>{s===32767||s===-32768||(de(o)&&(r=Math.min(r,Math.abs(s-o)||r)),o=s)};for(i=0,a=e.length;i<a;++i)s=t.getPixelForValue(e[i]),l();for(o=void 0,i=0,a=t.ticks.length;i<a;++i)s=t.getPixelForTick(i),l();return r}function Tm(n,t,e,r){const i=e.barThickness;let a,s;return st(i)?(a=t.min*e.categoryPercentage,s=e.barPercentage):(a=i*r,s=1),{chunk:a/r,ratio:s,start:t.pixels[n]-a/2}}function Sm(n,t,e,r){const i=t.pixels,a=i[n];let s=n>0?i[n-1]:null,o=n<i.length-1?i[n+1]:null;const l=e.categoryPercentage;s===null&&(s=a-(o===null?t.end-t.start:o-a)),o===null&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/r,ratio:e.barPercentage,start:c}}function Mm(n,t,e,r){const i=e.parse(n[0],r),a=e.parse(n[1],r),s=Math.min(i,a),o=Math.max(i,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:a,min:s,max:o}}function su(n,t,e,r){return mt(n)?Mm(n,t,e,r):t[e.axis]=e.parse(n,r),t}function ou(n,t,e,r){const i=n.iScale,a=n.vScale,s=i.getLabels(),o=i===a,l=[];let c,u,d,f;for(c=e,u=e+r;c<u;++c)f=t[c],d={},d[i.axis]=o||i.parse(s[c],c),l.push(su(f,d,a,c));return l}function ns(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Cm(n,t,e){return n!==0?Le(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Dm(n){let t,e,r,i,a;return n.horizontal?(t=n.base>n.x,e="left",r="right"):(t=n.base<n.y,e="bottom",r="top"),t?(i="end",a="start"):(i="start",a="end"),{start:e,end:r,reverse:t,top:i,bottom:a}}function km(n,t,e,r){let i=t.borderSkipped;const a={};if(!i){n.borderSkipped=a;return}if(i===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=Dm(n);i==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===r?i=c:(e._bottom||0)===r?i=u:(a[lu(u,s,o,l)]=!0,i=c)),a[lu(i,s,o,l)]=!0,n.borderSkipped=a}function lu(n,t,e,r){return r?(n=Om(n,t,e),n=cu(n,e,t)):n=cu(n,t,e),n}function Om(n,t,e){return n===t?e:n===e?t:n}function cu(n,t,e){return n==="start"?t:n==="end"?e:n}function Pm(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class Lr extends Oe{parsePrimitiveData(t,e,r,i){return ou(t,e,r,i)}parseArrayData(t,e,r,i){return ou(t,e,r,i)}parseObjectData(t,e,r,i){const{iScale:a,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?o:l,u=s.axis==="x"?o:l,d=[];let f,p,v,x;for(f=r,p=r+i;f<p;++f)x=e[f],v={},v[a.axis]=a.parse(cn(x,c),f),d.push(su(cn(x,u),v,s,f));return d}updateRangeFromParsed(t,e,r,i){super.updateRangeFromParsed(t,e,r,i);const a=r._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:r,vScale:i}=e,a=this.getParsed(t),s=a._custom,o=ns(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,r,i){const a=i==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(e,i);for(let p=e;p<e+r;p++){const v=this.getParsed(p),x=a||st(v[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),m=(v._stacks||{})[o.axis],b={horizontal:c,base:x.base,enableBorderRadius:!m||ns(v._custom)||s===m._top||s===m._bottom,x:c?x.head:g.center,y:c?g.center:x.head,height:c?g.size:Math.abs(x.size),width:c?Math.abs(x.size):g.size};f&&(b.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const y=b.options||t[p].options;km(b,y,m,s),Pm(b,y,u.ratio),this.updateElement(t[p],p,b,i)}}_getStacks(t,e){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),a=r.options.stacked,s=[],o=l=>{const c=l.controller.getParsed(e),u=c&&c[l.vScale.axis];if(st(u)||isNaN(u))return!0};for(const l of i)if(!(e!==void 0&&o(l))&&((a===!1||s.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,r){const i=this._getStacks(t,r),a=e!==void 0?i.indexOf(e):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,e=this._cachedMeta,r=e.iScale,i=[];let a,s;for(a=0,s=e.data.length;a<s;++a)i.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));const o=t.barThickness;return{min:o||wm(e),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:r,index:i},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),c=l._custom,u=ns(c);let d=l[e.axis],f=0,p=r?this.applyStack(e,l,r):d,v,x;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Le(d)!==Le(c.barEnd)&&(f=0),f+=d);const g=!st(a)&&!u?a:f;let m=e.getPixelForValue(g);if(this.chart.getDataVisibility(t)?v=e.getPixelForValue(f+p):v=m,x=v-m,Math.abs(x)<s){x=Cm(x,e,o)*s,d===o&&(m-=x/2);const b=e.getPixelForDecimal(0),y=e.getPixelForDecimal(1),_=Math.min(b,y),T=Math.max(b,y);m=Math.max(Math.min(m,T),_),v=m+x,r&&!u&&(l._stacks[e.axis]._visualValues[i]=e.getValueForPixel(v)-e.getValueForPixel(m))}if(m===e.getPixelForValue(o)){const b=Le(x)*e.getLineWidthForValue(o)/2;m+=b,x-=b}return{size:x,base:m,head:v,center:v+x/2}}_calculateBarIndexPixels(t,e){const r=e.scale,i=this.options,a=i.skipNull,s=rt(i.maxBarThickness,1/0);let o,l;if(e.grouped){const c=a?this._getStackCount(t):e.stackCount,u=i.barThickness==="flex"?Sm(t,e,i,c):Tm(t,e,i,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else o=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,e.min*e.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,r=t.data,i=r.length;let a=0;for(;a<i;++a)this.getParsed(a)[e.axis]!==null&&r[a].draw(this._ctx)}}H(Lr,"id","bar"),H(Lr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),H(Lr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ki extends Oe{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,r,i){const a=super.parsePrimitiveData(t,e,r,i);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+r).radius;return a}parseArrayData(t,e,r,i){const a=super.parseArrayData(t,e,r,i);for(let s=0;s<a.length;s++){const o=e[r+s];a[s]._custom=rt(o[2],this.resolveDataElementOptions(s+r).radius)}return a}parseObjectData(t,e,r,i){const a=super.parseObjectData(t,e,r,i);for(let s=0;s<a.length;s++){const o=e[r+s];a[s]._custom=rt(o&&o.r&&+o.r,this.resolveDataElementOptions(s+r).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let r=t.length-1;r>=0;--r)e=Math.max(e,t[r].size(this.resolveDataElementOptions(r))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=e,s=this.getParsed(t),o=i.getLabelForValue(s.x),l=a.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+o+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,r,i){const a=i==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,i),u=s.axis,d=o.axis;for(let f=e;f<e+r;f++){const p=t[f],v=!a&&this.getParsed(f),x={},g=x[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(v[u]),m=x[d]=a?o.getBasePixel():o.getPixelForValue(v[d]);x.skip=isNaN(g)||isNaN(m),c&&(x.options=l||this.resolveDataElementOptions(f,p.active?"active":i),a&&(x.options.radius=0)),this.updateElement(p,f,x,i)}}resolveDataElementOptions(t,e){const r=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const a=i.radius;return e!=="active"&&(i.radius=0),i.radius+=rt(r&&r._custom,a),i}}H(ki,"id","bubble"),H(ki,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),H(ki,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Em(n,t,e){let r=1,i=1,a=0,s=0;if(t<kt){const o=n,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),f=Math.sin(l),p=(y,_,T)=>Cr(y,o,l,!0)?1:Math.max(_,_*e,T,T*e),v=(y,_,T)=>Cr(y,o,l,!0)?-1:Math.min(_,_*e,T,T*e),x=p(0,c,d),g=p(Et,u,f),m=v(dt,c,d),b=v(dt+Et,u,f);r=(x-m)/2,i=(g-b)/2,a=-(x+m)/2,s=-(g+b)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:s}}class gn extends Oe{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let a=l=>+r[l];if(lt(r[t])){const{key:l="value"}=this._parsing;a=c=>+cn(r[c],l)}let s,o;for(s=t,o=t+e;s<o;++s)i._parsed[s]=a(s)}}_getRotation(){return Xt(this.options.rotation-90)}_getCircumference(){return Xt(this.options.circumference)}_getRotationExtents(){let t=kt,e=-kt;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,a=i._getRotation(),s=i._getCircumference();t=Math.min(t,a),e=Math.max(e,a+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:r}=e,i=this._cachedMeta,a=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,o=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(Vp(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:v,offsetY:x}=Em(d,u,l),g=(r.width-s)/f,m=(r.height-s)/p,b=Math.max(Math.min(g,m)/2,0),y=dc(this.options.radius,b),_=Math.max(y*l,0),T=(y-_)/this._getVisibleDatasetWeightTotal();this.offsetX=v*y,this.offsetY=x*y,i.total=this.calculateTotal(),this.outerRadius=y-T*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-T*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,e){const r=this.options,i=this._cachedMeta,a=this._getCircumference();return e&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/kt)}updateElements(t,e,r,i){const a=i==="reset",s=this.chart,o=s.chartArea,c=s.options.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,f=a&&c.animateScale,p=f?0:this.innerRadius,v=f?0:this.outerRadius,{sharedOptions:x,includeOptions:g}=this._getSharedOptions(e,i);let m=this._getRotation(),b;for(b=0;b<e;++b)m+=this._circumference(b,a);for(b=e;b<e+r;++b){const y=this._circumference(b,a),_=t[b],T={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+y,circumference:y,outerRadius:v,innerRadius:p};g&&(T.options=x||this.resolveDataElementOptions(b,_.active?"active":i)),m+=y,this.updateElement(_,b,T,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let r=0,i;for(i=0;i<e.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!e[i].hidden&&(r+=Math.abs(a))}return r}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?kt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=kr(e._parsed[t],r.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let e=0;const r=this.chart;let i,a,s,o,l;if(!t){for(i=0,a=r.data.datasets.length;i<a;++i)if(r.isDatasetVisible(i)){s=r.getDatasetMeta(i),t=s.data,o=s.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)l=o.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let r=0,i=t.length;r<i;++r){const a=this.resolveDataElementOptions(r);e=Math.max(e,a.offset||0,a.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(e+=this._getRingWeight(r));return e}_getRingWeight(t){return Math.max(rt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}H(gn,"id","doughnut"),H(gn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),H(gn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),H(gn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}}});class Ir extends Oe{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=e,s=this.chart._animationsDisabled;let{start:o,count:l}=Sc(e,i,s);this._drawStart=o,this._drawCount=l,Mc(e)&&(o=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,o,l,t)}updateElements(t,e,r,i){const a=i==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,i),f=s.axis,p=o.axis,{spanGaps:v,segment:x}=this.options,g=dn(v)?v:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||i==="none",b=e+r,y=t.length;let _=e>0&&this.getParsed(e-1);for(let T=0;T<y;++T){const D=t[T],O=m?D:{};if(T<e||T>=b){O.skip=!0;continue}const S=this.getParsed(T),M=st(S[p]),k=O[f]=s.getPixelForValue(S[f],T),P=O[p]=a||M?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[p],T);O.skip=isNaN(k)||isNaN(P)||M,O.stop=T>0&&Math.abs(S[f]-_[f])>g,x&&(O.parsed=S,O.raw=c.data[T]),d&&(O.options=u||this.resolveDataElementOptions(T,D.active?"active":i)),m||this.updateElement(D,T,O,i),_=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,r=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}H(Ir,"id","line"),H(Ir,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),H(Ir,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Nr extends Oe{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=kr(e._parsed[t].r,r.options.locale);return{label:i[t]||"",value:a}}parseObjectData(t,e,r,i){return Wc.bind(this)(t,e,r,i)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<e.min&&(e.min=a),a>e.max&&(e.max=a))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,r=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),a=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),o=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,r,i){const a=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*dt;let p=f,v;const x=360/this.countVisibleElements();for(v=0;v<e;++v)p+=this._computeAngle(v,i,x);for(v=e;v<e+r;v++){const g=t[v];let m=p,b=p+this._computeAngle(v,i,x),y=s.getDataVisibility(v)?c.getDistanceFromCenterForValue(this.getParsed(v).r):0;p=b,a&&(l.animateScale&&(y=0),l.animateRotate&&(m=b=f));const _={x:u,y:d,innerRadius:0,outerRadius:y,startAngle:m,endAngle:b,options:this.resolveDataElementOptions(v,g.active?"active":i)};this.updateElement(g,v,_,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,r){return this.chart.getDataVisibility(t)?Xt(this.resolveDataElementOptions(t,e).angle||r):0}}H(Nr,"id","polarArea"),H(Nr,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),H(Nr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return e.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class rs extends gn{}H(rs,"id","pie"),H(rs,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Oi extends Oe{getLabelAndValue(t){const e=this._cachedMeta.vScale,r=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(r[e.axis])}}parseObjectData(t,e,r,i){return Wc.bind(this)(t,e,r,i)}update(t){const e=this._cachedMeta,r=e.dataset,i=e.data||[],a=e.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:a.length===i.length,options:s};this.updateElement(r,void 0,o,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,r,i){const a=this._cachedMeta.rScale,s=i==="reset";for(let o=e;o<e+r;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":i),u=a.getPointPositionForValue(o,this.getParsed(o).r),d=s?a.xCenter:u.x,f=s?a.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,o,p,i)}}}H(Oi,"id","radar"),H(Oi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),H(Oi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Pi extends Oe{getLabelAndValue(t){const e=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=e,s=this.getParsed(t),o=i.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:r[t]||"",value:"("+o+", "+l+")"}}update(t){const e=this._cachedMeta,{data:r=[]}=e,i=this.chart._animationsDisabled;let{start:a,count:s}=Sc(e,r,i);if(this._drawStart=a,this._drawCount=s,Mc(e)&&(a=0,s=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:l}=e;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=r;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!i,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(r,a,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,r,i){const a=i==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(e,i),d=this.getSharedOptions(u),f=this.includeOptions(i,d),p=s.axis,v=o.axis,{spanGaps:x,segment:g}=this.options,m=dn(x)?x:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||a||i==="none";let y=e>0&&this.getParsed(e-1);for(let _=e;_<e+r;++_){const T=t[_],D=this.getParsed(_),O=b?T:{},S=st(D[v]),M=O[p]=s.getPixelForValue(D[p],_),k=O[v]=a||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,D,l):D[v],_);O.skip=isNaN(M)||isNaN(k)||S,O.stop=_>0&&Math.abs(D[p]-y[p])>m,g&&(O.parsed=D,O.raw=c.data[_]),f&&(O.options=d||this.resolveDataElementOptions(_,T.active?"active":i)),b||this.updateElement(T,_,O,i),y=D}this.updateSharedOptions(d,i,u)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let o=0;for(let l=e.length-1;l>=0;--l)o=Math.max(o,e[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!e.length)return i;const a=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,a,s)/2}}H(Pi,"id","scatter"),H(Pi,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),H(Pi,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Rm=Object.freeze({__proto__:null,BarController:Lr,BubbleController:ki,DoughnutController:gn,LineController:Ir,PieController:rs,PolarAreaController:Nr,RadarController:Oi,ScatterController:Pi});function Ln(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class is{constructor(t){H(this,"options");this.options=t||{}}static override(t){Object.assign(is.prototype,t)}init(){}formats(){return Ln()}parse(){return Ln()}format(){return Ln()}add(){return Ln()}diff(){return Ln()}startOf(){return Ln()}endOf(){return Ln()}}var uu={_date:is};function Am(n,t,e,r){const{controller:i,data:a,_sorted:s}=n,o=i._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?rg:Ve;if(r){if(i._sharedOptions){const c=a[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(a,t,e-u),f=l(a,t,e+u);return{lo:d.lo,hi:f.hi}}}}else return l(a,t,e)}return{lo:0,hi:a.length-1}}function Fr(n,t,e,r,i){const a=n.getSortedVisibleDatasetMetas(),s=e[t];for(let o=0,l=a.length;o<l;++o){const{index:c,data:u}=a[o],{lo:d,hi:f}=Am(a[o],t,s,i);for(let p=d;p<=f;++p){const v=u[p];v.skip||r(v,c,p)}}}function Lm(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(r,i){const a=t?Math.abs(r.x-i.x):0,s=e?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function as(n,t,e,r,i){const a=[];return!i&&!n.isPointInArea(t)||Fr(n,e,t,function(o,l,c){!i&&!qe(o,n.chartArea,0)||o.inRange(t.x,t.y,r)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function Im(n,t,e,r){let i=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],r),{angle:d}=vc(s,{x:t.x,y:t.y});Cr(d,c,u)&&i.push({element:s,datasetIndex:o,index:l})}return Fr(n,e,t,a),i}function Nm(n,t,e,r,i,a){let s=[];const o=Lm(e);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const v=u.getCenterPoint(i);if(!(!!a||n.isPointInArea(v))&&!p)return;const g=o(t,v);g<l?(s=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&s.push({element:u,datasetIndex:d,index:f})}return Fr(n,e,t,c),s}function ss(n,t,e,r,i,a){return!a&&!n.isPointInArea(t)?[]:e==="r"&&!r?Im(n,t,e,i):Nm(n,t,e,r,i,a)}function du(n,t,e,r,i){const a=[],s=e==="x"?"inXRange":"inYRange";let o=!1;return Fr(n,e,t,(l,c,u)=>{l[s](t[e],i)&&(a.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,i))}),r&&!o?[]:a}var os={evaluateInteractionItems:Fr,modes:{index(n,t,e,r){const i=pn(t,n),a=e.axis||"x",s=e.includeInvisible||!1,o=e.intersect?as(n,i,a,r,s):ss(n,i,a,!1,r,s),l=[];return o.length?(n.getSortedVisibleDatasetMetas().forEach(c=>{const u=o[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(n,t,e,r){const i=pn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;let o=e.intersect?as(n,i,a,r,s):ss(n,i,a,!1,r,s);if(o.length>0){const l=o[0].datasetIndex,c=n.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(n,t,e,r){const i=pn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return as(n,i,a,r,s)},nearest(n,t,e,r){const i=pn(t,n),a=e.axis||"xy",s=e.includeInvisible||!1;return ss(n,i,a,e.intersect,r,s)},x(n,t,e,r){const i=pn(t,n);return du(n,i,"x",e.intersect,r)},y(n,t,e,r){const i=pn(t,n);return du(n,i,"y",e.intersect,r)}}};const fu=["left","top","right","bottom"];function Ur(n,t){return n.filter(e=>e.pos===t)}function hu(n,t){return n.filter(e=>fu.indexOf(e.pos)===-1&&e.box.axis===t)}function Br(n,t){return n.sort((e,r)=>{const i=t?r:e,a=t?e:r;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function Fm(n){const t=[];let e,r,i,a,s,o;for(e=0,r=(n||[]).length;e<r;++e)i=n[e],{position:a,options:{stack:s,stackWeight:o=1}}=i,t.push({index:e,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&a+s,stackWeight:o});return t}function Um(n){const t={};for(const e of n){const{stack:r,pos:i,stackWeight:a}=e;if(!r||!fu.includes(i))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return t}function Bm(n,t){const e=Um(n),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,s,o;for(a=0,s=n.length;a<s;++a){o=n[a];const{fullSize:l}=o.box,c=e[o.stack],u=c&&o.stackWeight/c.weight;o.horizontal?(o.width=u?u*r:l&&t.availableWidth,o.height=i):(o.width=r,o.height=u?u*i:l&&t.availableHeight)}return e}function Wm(n){const t=Fm(n),e=Br(t.filter(c=>c.box.fullSize),!0),r=Br(Ur(t,"left"),!0),i=Br(Ur(t,"right")),a=Br(Ur(t,"top"),!0),s=Br(Ur(t,"bottom")),o=hu(t,"x"),l=hu(t,"y");return{fullSize:e,leftAndTop:r.concat(a),rightAndBottom:i.concat(l).concat(s).concat(o),chartArea:Ur(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:a.concat(s).concat(o)}}function pu(n,t,e,r){return Math.max(n[e],t[e])+Math.max(n[r],t[r])}function gu(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 zm(n,t,e,r){const{pos:i,box:a}=e,s=n.maxPadding;if(!lt(i)){e.size&&(n[i]-=e.size);const d=r[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?a.height:a.width),e.size=d.size/d.count,n[i]+=e.size}a.getPadding&&gu(s,a.getPadding());const o=Math.max(0,t.outerWidth-pu(s,n,"left","right")),l=Math.max(0,t.outerHeight-pu(s,n,"top","bottom")),c=o!==n.w,u=l!==n.h;return n.w=o,n.h=l,e.horizontal?{same:c,other:u}:{same:u,other:c}}function Ym(n){const t=n.maxPadding;function e(r){const i=Math.max(t[r]-n[r],0);return n[r]+=i,i}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function Hm(n,t){const e=t.maxPadding;function r(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(t[s],e[s])}),a}return r(n?["left","right"]:["top","bottom"])}function Wr(n,t,e,r){const i=[];let a,s,o,l,c,u;for(a=0,s=n.length,c=0;a<s;++a){o=n[a],l=o.box,l.update(o.width||t.w,o.height||t.h,Hm(o.horizontal,t));const{same:d,other:f}=zm(t,e,o,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(o)}return c&&Wr(i,t,e,r)||u}function Ei(n,t,e,r,i){n.top=e,n.left=t,n.right=t+r,n.bottom=e+i,n.width=r,n.height=i}function mu(n,t,e,r){const i=e.padding;let{x:a,y:s}=t;for(const o of n){const l=o.box,c=r[o.stack]||{count:1,placed:0,weight:1},u=o.stackWeight/c.weight||1;if(o.horizontal){const d=t.w*u,f=c.size||l.height;de(c.start)&&(s=c.start),l.fullSize?Ei(l,i.left,s,e.outerWidth-i.right-i.left,f):Ei(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;de(c.start)&&(a=c.start),l.fullSize?Ei(l,a,i.top,f,e.outerHeight-i.bottom-i.top):Ei(l,a,t.top+c.placed,f,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var ie={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(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,r){if(!n)return;const i=Gt(n.options.layout.padding),a=Math.max(t-i.width,0),s=Math.max(e-i.height,0),o=Wm(n.boxes),l=o.vertical,c=o.horizontal;St(n.boxes,x=>{typeof x.beforeLayout=="function"&&x.beforeLayout()});const u=l.reduce((x,g)=>g.box.options&&g.box.options.display===!1?x:x+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},i);gu(f,Gt(r));const p=Object.assign({maxPadding:f,w:a,h:s,x:i.left,y:i.top},i),v=Bm(l.concat(c),d);Wr(o.fullSize,p,d,v),Wr(l,p,d,v),Wr(c,p,d,v)&&Wr(l,p,d,v),Ym(p),mu(o.leftAndTop,p,d,v),p.x+=p.w,p.y+=p.h,mu(o.rightAndBottom,p,d,v),n.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},St(o.chartArea,x=>{const g=x.box;Object.assign(g,n.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class yu{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,r){}removeEventListener(t,e,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,r,i){return e=Math.max(0,e||t.width),r=r||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):r)}}isAttached(t){return!0}updateConfig(t){}}class $m extends yu{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ri="$chartjs",jm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},vu=n=>n===null||n==="";function Vm(n,t){const e=n.style,r=n.getAttribute("height"),i=n.getAttribute("width");if(n[Ri]={initial:{height:r,width:i,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",vu(i)){const a=Hc(n,"width");a!==void 0&&(n.width=a)}if(vu(r))if(n.style.height==="")n.height=n.width/(t||2);else{const a=Hc(n,"height");a!==void 0&&(n.height=a)}return n}const bu=Kg?{passive:!0}:!1;function qm(n,t,e){n&&n.addEventListener(t,e,bu)}function Xm(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,bu)}function Gm(n,t){const e=jm[n.type]||n.type,{x:r,y:i}=pn(n,t);return{type:e,chart:t,native:n,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Ai(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Km(n,t,e){const r=n.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ai(o.addedNodes,r),s=s&&!Ai(o.removedNodes,r);s&&e()});return i.observe(document,{childList:!0,subtree:!0}),i}function Qm(n,t,e){const r=n.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Ai(o.removedNodes,r),s=s&&!Ai(o.addedNodes,r);s&&e()});return i.observe(document,{childList:!0,subtree:!0}),i}const zr=new Map;let xu=0;function _u(){const n=window.devicePixelRatio;n!==xu&&(xu=n,zr.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Zm(n,t){zr.size||window.addEventListener("resize",_u),zr.set(n,t)}function Jm(n){zr.delete(n),zr.size||window.removeEventListener("resize",_u)}function t0(n,t,e){const r=n.canvas,i=r&&Za(r);if(!i)return;const a=Tc((o,l)=>{const c=i.clientWidth;e(o,l),c<i.clientWidth&&e()},window),s=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return s.observe(i),Zm(n,a),s}function ls(n,t,e){e&&e.disconnect(),t==="resize"&&Jm(n)}function e0(n,t,e){const r=n.canvas,i=Tc(a=>{n.ctx!==null&&e(Gm(a,n))},n);return qm(r,t,i),i}class n0 extends yu{acquireContext(t,e){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Vm(t,e),r):null}releaseContext(t){const e=t.canvas;if(!e[Ri])return!1;const r=e[Ri].initial;["height","width"].forEach(a=>{const s=r[a];st(s)?e.removeAttribute(a):e.setAttribute(a,s)});const i=r.style||{};return Object.keys(i).forEach(a=>{e.style[a]=i[a]}),e.width=e.width,delete e[Ri],!0}addEventListener(t,e,r){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),s={attach:Km,detach:Qm,resize:t0}[e]||e0;i[e]=s(t,e,r)}removeEventListener(t,e){const r=t.$proxies||(t.$proxies={}),i=r[e];if(!i)return;({attach:ls,detach:ls,resize:ls}[e]||Xm)(t,e,i),r[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,r,i){return Gg(t,e,r,i)}isAttached(t){const e=Za(t);return!!(e&&e.isConnected)}}function r0(n){return!Qa()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?$m:n0}class te{constructor(){H(this,"x");H(this,"y");H(this,"active",!1);H(this,"options");H(this,"$animations")}tooltipPosition(t){const{x:e,y:r}=this.getProps(["x","y"],t);return{x:e,y:r}}hasValue(){return dn(this.x)&&dn(this.y)}getProps(t,e){const r=this.$animations;if(!e||!r)return this;const i={};return t.forEach(a=>{i[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),i}}H(te,"defaults",{}),H(te,"defaultRoutes");function i0(n,t){const e=n.options.ticks,r=a0(n),i=Math.min(e.maxTicksLimit||r,r),a=e.major.enabled?o0(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>i)return l0(t,c,a,s/i),c;const u=s0(a,t,i);if(s>0){let d,f;const p=s>1?Math.round((l-o)/(s-1)):null;for(Li(t,c,u,st(p)?0:o-p,o),d=0,f=s-1;d<f;d++)Li(t,c,u,a[d],a[d+1]);return Li(t,c,u,l,st(p)?t.length:l+p),c}return Li(t,c,u),c}function a0(n){const t=n.options.offset,e=n._tickSize(),r=n._length/e+(t?0:1),i=n._maxLength/e;return Math.floor(Math.min(r,i))}function s0(n,t,e){const r=c0(n),i=t.length/e;if(!r)return Math.max(i,1);const a=Jp(r);for(let s=0,o=a.length-1;s<o;s++){const l=a[s];if(l>i)return l}return Math.max(i,1)}function o0(n){const t=[];let e,r;for(e=0,r=n.length;e<r;e++)n[e].major&&t.push(e);return t}function l0(n,t,e,r){let i=0,a=e[0],s;for(r=Math.ceil(r),s=0;s<n.length;s++)s===a&&(t.push(n[s]),i++,a=e[i*r])}function Li(n,t,e,r,i){const a=rt(r,0),s=Math.min(rt(i,n.length),n.length);let o=0,l,c,u;for(e=Math.ceil(e),i&&(l=i-r,e=l/Math.floor(l/e)),u=a;u<0;)o++,u=Math.round(a+o*e);for(c=Math.max(a,0);c<s;c++)c===u&&(t.push(n[c]),o++,u=Math.round(a+o*e))}function c0(n){const t=n.length;let e,r;if(t<2)return!1;for(r=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==r)return!1;return r}const u0=n=>n==="left"?"right":n==="right"?"left":n,wu=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,Tu=(n,t)=>Math.min(t||n,n);function Su(n,t){const e=[],r=n.length/t,i=n.length;let a=0;for(;a<i;a+=r)e.push(n[Math.floor(a)]);return e}function d0(n,t,e){const r=n.ticks.length,i=Math.min(t,r-1),a=n._startPixel,s=n._endPixel,o=1e-6;let l=n.getPixelForTick(i),c;if(!(e&&(r===1?c=Math.max(l-a,s-l):t===0?c=(n.getPixelForTick(1)-l)/2:c=(l-n.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<a-o||l>s+o)))return l}function f0(n,t){St(n,e=>{const r=e.gc,i=r.length/2;let a;if(i>t){for(a=0;a<i;++a)delete e.data[r[a]];r.splice(0,i)}})}function Yr(n){return n.drawTicks?n.tickLength:0}function Mu(n,t){if(!n.display)return 0;const e=Rt(n.font,t),r=Gt(n.padding);return(mt(n.text)?n.text.length:1)*e.lineHeight+r.height}function h0(n,t){return hn(n,{scale:t,type:"scale"})}function p0(n,t,e){return hn(n,{tick:e,index:t,type:"tick"})}function g0(n,t,e){let r=za(n);return(e&&t!=="right"||!e&&t==="right")&&(r=u0(r)),r}function m0(n,t,e,r){const{top:i,left:a,bottom:s,right:o,chart:l}=n,{chartArea:c,scales:u}=l;let d=0,f,p,v;const x=s-i,g=o-a;if(n.isHorizontal()){if(p=re(r,a,o),lt(e)){const m=Object.keys(e)[0],b=e[m];v=u[m].getPixelForValue(b)+x-t}else e==="center"?v=(c.bottom+c.top)/2+x-t:v=wu(n,e,t);f=o-a}else{if(lt(e)){const m=Object.keys(e)[0],b=e[m];p=u[m].getPixelForValue(b)-g+t}else e==="center"?p=(c.left+c.right)/2-g+t:p=wu(n,e,t);v=re(r,s,i),d=e==="left"?-Et:Et}return{titleX:p,titleY:v,maxWidth:f,rotation:d}}class In extends te{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._range=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){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:r,_suggestedMax:i}=this;return t=be(t,Number.POSITIVE_INFINITY),e=be(e,Number.NEGATIVE_INFINITY),r=be(r,Number.POSITIVE_INFINITY),i=be(i,Number.NEGATIVE_INFINITY),{min:be(t,r),max:be(e,i),minDefined:It(t),maxDefined:It(e)}}getMinMax(t){let{min:e,max:r,minDefined:i,maxDefined:a}=this.getUserBounds(),s;if(i&&a)return{min:e,max:r};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),i||(e=Math.min(e,s.min)),a||(r=Math.max(r,s.max));return e=a&&e>r?r:e,r=i&&e>r?e:r,{min:be(e,be(r,e)),max:be(r,be(e,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Tt(this.options.beforeUpdate,[this])}update(t,e,r){const{beginAtZero:i,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Dg(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?Su(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=i0(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,r;this.isHorizontal()?(e=this.left,r=this.right):(e=this.top,r=this.bottom,t=!t),this._startPixel=e,this._endPixel=r,this._reversePixels=t,this._length=r-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Tt(this.options.afterUpdate,[this])}beforeSetDimensions(){Tt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Tt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Tt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Tt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let r,i,a;for(r=0,i=t.length;r<i;r++)a=t[r],a.label=Tt(e.callback,[a.value,r,t],this)}afterTickToLabelConversion(){Tt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Tt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,r=Tu(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,a=e.maxRotation;let s=i,o,l,c;if(!this._isVisible()||!e.display||i>=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=Qt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/r:p/(r-1),d+6>o&&(o=p/(r-(t.offset?.5:1)),l=this.maxHeight-Yr(t.grid)-e.padding-Mu(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=xi(Math.min(Math.asin(Qt((u.highest.height+6)/o,-1,1)),Math.asin(Qt(l/c,-1,1))-Math.asin(Qt(f/c,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){Tt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Tt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:r,title:i,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=Mu(i,e.options.font);if(o?(t.width=this.maxWidth,t.height=Yr(a)+l):(t.height=this.maxHeight,t.width=Yr(a)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,v=Xt(this.labelRotation),x=Math.cos(v),g=Math.sin(v);if(o){const m=r.mirror?0:g*d.width+x*f.height;t.height=Math.min(this.maxHeight,t.height+m+p)}else{const m=r.mirror?0:x*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+m+p)}this._calculatePadding(c,u,g,x)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,r,i){const{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*e.height):(f=r*t.height,p=i*e.width):a==="start"?p=e.width:a==="end"?f=t.width:a!=="inner"&&(f=t.width/2,p=e.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+s)*this.width/(this.width-d),0)}else{let u=e.height/2,d=t.height/2;a==="start"?(u=0,d=t.height):a==="end"&&(u=e.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Tt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,r;for(e=0,r=t.length;e<r;e++)st(t[e].label)&&(t.splice(e,1),r--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let r=this.ticks;e<r.length&&(r=Su(r,e)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,r){const{ctx:i,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(e/Tu(e,r));let c=0,u=0,d,f,p,v,x,g,m,b,y,_,T;for(d=0;d<e;d+=l){if(v=t[d].label,x=this._resolveTickFontOptions(d),i.font=g=x.string,m=a[g]=a[g]||{data:{},gc:[]},b=x.lineHeight,y=_=0,!st(v)&&!mt(v))y=Ti(i,m.data,m.gc,y,v),_=b;else if(mt(v))for(f=0,p=v.length;f<p;++f)T=v[f],!st(T)&&!mt(T)&&(y=Ti(i,m.data,m.gc,y,T),_+=b);s.push(y),o.push(_),c=Math.max(y,c),u=Math.max(_,u)}f0(a,e);const D=s.indexOf(c),O=o.indexOf(u),S=M=>({width:s[M]||0,height:o[M]||0});return{first:S(0),last:S(e-1),widest:S(D),highest:S(O),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ng(this._alignToPixels?Pn(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const r=e[t];return r.$context||(r.$context=p0(this.getContext(),t,r))}return this.$context||(this.$context=h0(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Xt(this.labelRotation),r=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),s=t.autoSkipPadding||0,o=a?a.widest.width+s:0,l=a?a.highest.height+s:0;return this.isHorizontal()?l*r>o*i?o/r:l/i:l*i<o*r?l/r:o/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,r=this.chart,i=this.options,{grid:a,position:s,border:o}=i,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Yr(a),p=[],v=o.setContext(this.getContext()),x=v.display?v.width:0,g=x/2,m=function(Y){return Pn(r,Y,x)};let b,y,_,T,D,O,S,M,k,P,E,F;if(s==="top")b=m(this.bottom),O=this.bottom-f,M=b-g,P=m(t.top)+g,F=t.bottom;else if(s==="bottom")b=m(this.top),P=t.top,F=m(t.bottom)-g,O=b+g,M=this.top+f;else if(s==="left")b=m(this.right),D=this.right-f,S=b-g,k=m(t.left)+g,E=t.right;else if(s==="right")b=m(this.left),k=t.left,E=m(t.right)-g,D=b+g,S=this.left+f;else if(e==="x"){if(s==="center")b=m((t.top+t.bottom)/2+.5);else if(lt(s)){const Y=Object.keys(s)[0],I=s[Y];b=m(this.chart.scales[Y].getPixelForValue(I))}P=t.top,F=t.bottom,O=b+g,M=O+f}else if(e==="y"){if(s==="center")b=m((t.left+t.right)/2);else if(lt(s)){const Y=Object.keys(s)[0],I=s[Y];b=m(this.chart.scales[Y].getPixelForValue(I))}D=b-g,S=D-f,k=t.left,E=t.right}const q=rt(i.ticks.maxTicksLimit,d),$=Math.max(1,Math.ceil(d/q));for(y=0;y<d;y+=$){const Y=this.getContext(y),I=a.setContext(Y),it=o.setContext(Y),B=I.lineWidth,yt=I.color,ut=it.dash||[],z=it.dashOffset,L=I.tickWidth,U=I.tickColor,j=I.tickBorderDash||[],Z=I.tickBorderDashOffset;_=d0(this,y,l),_!==void 0&&(T=Pn(r,_,B),c?D=S=k=E=T:O=M=P=F=T,p.push({tx1:D,ty1:O,tx2:S,ty2:M,x1:k,y1:P,x2:E,y2:F,width:B,color:yt,borderDash:ut,borderDashOffset:z,tickWidth:L,tickColor:U,tickBorderDash:j,tickBorderDashOffset:Z}))}return this._ticksLength=d,this._borderValue=b,p}_computeLabelItems(t){const e=this.axis,r=this.options,{position:i,ticks:a}=r,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=a,f=Yr(r.grid),p=f+u,v=d?-u:p,x=-Xt(this.labelRotation),g=[];let m,b,y,_,T,D,O,S,M,k,P,E,F="middle";if(i==="top")D=this.bottom-v,O=this._getXAxisLabelAlignment();else if(i==="bottom")D=this.top+v,O=this._getXAxisLabelAlignment();else if(i==="left"){const $=this._getYAxisLabelAlignment(f);O=$.textAlign,T=$.x}else if(i==="right"){const $=this._getYAxisLabelAlignment(f);O=$.textAlign,T=$.x}else if(e==="x"){if(i==="center")D=(t.top+t.bottom)/2+p;else if(lt(i)){const $=Object.keys(i)[0],Y=i[$];D=this.chart.scales[$].getPixelForValue(Y)+p}O=this._getXAxisLabelAlignment()}else if(e==="y"){if(i==="center")T=(t.left+t.right)/2-p;else if(lt(i)){const $=Object.keys(i)[0],Y=i[$];T=this.chart.scales[$].getPixelForValue(Y)}O=this._getYAxisLabelAlignment(f).textAlign}e==="y"&&(l==="start"?F="top":l==="end"&&(F="bottom"));const q=this._getLabelSizes();for(m=0,b=o.length;m<b;++m){y=o[m],_=y.label;const $=a.setContext(this.getContext(m));S=this.getPixelForTick(m)+a.labelOffset,M=this._resolveTickFontOptions(m),k=M.lineHeight,P=mt(_)?_.length:1;const Y=P/2,I=$.color,it=$.textStrokeColor,B=$.textStrokeWidth;let yt=O;s?(T=S,O==="inner"&&(m===b-1?yt=this.options.reverse?"left":"right":m===0?yt=this.options.reverse?"right":"left":yt="center"),i==="top"?c==="near"||x!==0?E=-P*k+k/2:c==="center"?E=-q.highest.height/2-Y*k+k:E=-q.highest.height+k/2:c==="near"||x!==0?E=k/2:c==="center"?E=q.highest.height/2-Y*k:E=q.highest.height-P*k,d&&(E*=-1),x!==0&&!$.showLabelBackdrop&&(T+=k/2*Math.sin(x))):(D=S,E=(1-P)*k/2);let ut;if($.showLabelBackdrop){const z=Gt($.backdropPadding),L=q.heights[m],U=q.widths[m];let j=E-z.top,Z=0-z.left;switch(F){case"middle":j-=L/2;break;case"bottom":j-=L;break}switch(O){case"center":Z-=U/2;break;case"right":Z-=U;break;case"inner":m===b-1?Z-=U:m>0&&(Z-=U/2);break}ut={left:Z,top:j,width:U+z.width,height:L+z.height,color:$.backdropColor}}g.push({label:_,font:M,textOffset:E,options:{rotation:x,color:I,strokeColor:it,strokeWidth:B,textAlign:yt,textBaseline:F,translation:[T,D],backdrop:ut}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Xt(this.labelRotation))return t==="top"?"left":"right";let i="center";return e.align==="start"?i="left":e.align==="end"?i="right":e.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:r,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let c,u;return e==="left"?i?(u=this.right+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):e==="right"?i?(u=this.left+a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:r,top:i,width:a,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(r,i,a,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(e.display)for(a=0,s=i.length;a<s;++a){const l=i[a];e.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:r,grid:i}}=this,a=r.setContext(this.getContext()),s=r.display?a.width:0;if(!s)return;const o=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=Pn(t,this.left,s)-s/2,u=Pn(t,this.right,o)+o/2,d=f=l):(d=Pn(t,this.top,s)-s/2,f=Pn(t,this.bottom,o)+o/2,c=u=l),e.save(),e.lineWidth=a.width,e.strokeStyle=a.color,e.beginPath(),e.moveTo(c,d),e.lineTo(u,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Pr(r,i);const a=this.getLabelItems(t);for(const s of a){const o=s.options,l=s.font,c=s.label,u=s.textOffset;En(r,c,0,u,l,o)}i&&Er(r)}drawTitle(){const{ctx:t,options:{position:e,title:r,reverse:i}}=this;if(!r.display)return;const a=Rt(r.font),s=Gt(r.padding),o=r.align;let l=a.lineHeight/2;e==="bottom"||e==="center"||lt(e)?(l+=s.bottom,mt(r.text)&&(l+=a.lineHeight*(r.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=m0(this,l,e,o);En(t,r.text,0,0,a,{color:r.color,maxWidth:d,rotation:f,textAlign:g0(o,e,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,r=rt(t.grid&&t.grid.z,-1),i=rt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==In.prototype.draw?[{z:e,draw:a=>{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let a,s;for(a=0,s=e.length;a<s;++a){const o=e[a];o[r]===this.id&&(!t||o.type===t)&&i.push(o)}return i}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return Rt(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ii{constructor(t,e,r){this.type=t,this.scope=e,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let r;b0(e)&&(r=this.register(e));const i=this.items,a=t.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,y0(t,s,r),this.override&&Ut.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,r=t.id,i=this.scope;r in e&&delete e[r],i&&r in Ut[i]&&(delete Ut[i][r],this.override&&delete On[r])}}function y0(n,t,e){const r=Tr(Object.create(null),[e?Ut.get(e):{},Ut.get(t),n.defaults]);Ut.set(t,r),n.defaultRoutes&&v0(t,n.defaultRoutes),n.descriptors&&Ut.describe(t,n.descriptors)}function v0(n,t){Object.keys(t).forEach(e=>{const r=e.split("."),i=r.pop(),a=[n].concat(r).join("."),s=t[e].split("."),o=s.pop(),l=s.join(".");Ut.route(a,i,l,o)})}function b0(n){return"id"in n&&"defaults"in n}class x0{constructor(){this.controllers=new Ii(Oe,"datasets",!0),this.elements=new Ii(te,"elements"),this.plugins=new Ii(Object,"plugins"),this.scales=new Ii(In,"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")}removeControllers(...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,e,r){[...e].forEach(i=>{const a=r||this._getRegistryForType(i);r||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):St(i,s=>{const o=r||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,e,r){const i=Ua(t);Tt(r["before"+i],[],r),e[t](r),Tt(r["after"+i],[],r)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const r=this._typedRegistries[e];if(r.isForType(t))return r}return this.plugins}_get(t,e,r){const i=e.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Ie=new x0;class _0{constructor(){this._init=[]}notify(t,e,r,i){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(a,t,e,r);return e==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,r,i){i=i||{};for(const a of t){const s=a.plugin,o=s[r],l=[e,i,a.options];if(Tt(o,l,s)===!1&&i.cancelable)return!1}return!0}invalidate(){st(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const r=t&&t.config,i=rt(r.options&&r.options.plugins,{}),a=w0(r);return i===!1&&!e?[]:S0(t,a,i,e)}_notifyStateChanges(t){const e=this._oldCache||[],r=this._cache,i=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(i(e,r),t,"stop"),this._notify(i(r,e),t,"start")}}function w0(n){const t={},e=[],r=Object.keys(Ie.plugins.items);for(let a=0;a<r.length;a++)e.push(Ie.getPlugin(r[a]));const i=n.plugins||[];for(let a=0;a<i.length;a++){const s=i[a];e.indexOf(s)===-1&&(e.push(s),t[s.id]=!0)}return{plugins:e,localIds:t}}function T0(n,t){return!t&&n===!1?null:n===!0?{}:n}function S0(n,{plugins:t,localIds:e},r,i){const a=[],s=n.getContext();for(const o of t){const l=o.id,c=T0(r[l],i);c!==null&&a.push({plugin:o,options:M0(n.config,{plugin:o,local:e[l]},c,s)})}return a}function M0(n,{plugin:t,local:e},r,i){const a=n.pluginScopeKeys(t),s=n.getOptionScopes(r,a);return e&&t.defaults&&s.push(t.defaults),n.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function cs(n,t){const e=Ut.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function C0(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function D0(n,t){return n===t?"_index_":"_value_"}function Cu(n){if(n==="x"||n==="y"||n==="r")return n}function k0(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function us(n,...t){if(Cu(n))return n;for(const e of t){const r=e.axis||k0(e.position)||n.length>1&&Cu(n[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function Du(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function O0(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(r=>r.xAxisID===n||r.yAxisID===n);if(e.length)return Du(n,"x",e[0])||Du(n,"y",e[0])}return{}}function P0(n,t){const e=On[n.type]||{scales:{}},r=t.scales||{},i=cs(n.type,t),a=Object.create(null);return Object.keys(r).forEach(s=>{const o=r[s];if(!lt(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=us(s,o,O0(s,n),Ut.scales[o.type]),c=D0(l,i),u=e.scales||{};a[s]=Sr(Object.create(null),[{axis:l},o,u[l],u[c]])}),n.data.datasets.forEach(s=>{const o=s.type||n.type,l=s.indexAxis||cs(o,t),u=(On[o]||{}).scales||{};Object.keys(u).forEach(d=>{const f=C0(d,l),p=s[f+"AxisID"]||f;a[p]=a[p]||Object.create(null),Sr(a[p],[{axis:f},r[p],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Sr(o,[Ut.scales[o.type],Ut.scale])}),a}function ku(n){const t=n.options||(n.options={});t.plugins=rt(t.plugins,{}),t.scales=P0(n,t)}function Ou(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function E0(n){return n=n||{},n.data=Ou(n.data),ku(n),n}const Pu=new Map,Eu=new Set;function Ni(n,t){let e=Pu.get(n);return e||(e=t(),Pu.set(n,e),Eu.add(e)),e}const Hr=(n,t,e)=>{const r=cn(t,e);r!==void 0&&n.add(r)};class R0{constructor(t){this._config=E0(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}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=Ou(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(),ku(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ni(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ni(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ni(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,r=this.type;return Ni(`${r}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const r=this._scopeCache;let i=r.get(t);return(!i||e)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,e,r){const{options:i,type:a}=this,s=this._cachedScopes(t,r),o=s.get(e);if(o)return o;const l=new Set;e.forEach(u=>{t&&(l.add(t),u.forEach(d=>Hr(l,t,d))),u.forEach(d=>Hr(l,i,d)),u.forEach(d=>Hr(l,On[a]||{},d)),u.forEach(d=>Hr(l,Ut,d)),u.forEach(d=>Hr(l,$a,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Eu.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,On[e]||{},Ut.datasets[e]||{},{type:e},Ut,$a]}resolveNamedOptions(t,e,r,i=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=Ru(this._resolverCache,t,i);let l=s;if(L0(s,e)){a.$shared=!1,r=fe(r)?r():r;const c=this.createResolver(t,r,o);l=er(s,r,c)}for(const c of e)a[c]=l[c];return a}createResolver(t,e,r=[""],i){const{resolver:a}=Ru(this._resolverCache,t,r);return lt(e)?er(a,e,void 0,i):a}}function Ru(n,t,e){let r=n.get(t);r||(r=new Map,n.set(t,r));const i=e.join();let a=r.get(i);return a||(a={resolver:Xa(t,e),subPrefixes:e.filter(o=>!o.toLowerCase().includes("hover"))},r.set(i,a)),a}const A0=n=>lt(n)&&Object.getOwnPropertyNames(n).some(t=>fe(n[t]));function L0(n,t){const{isScriptable:e,isIndexable:r}=Lc(n);for(const i of t){const a=e(i),s=r(i),o=(s||a)&&n[i];if(a&&(fe(o)||A0(o))||s&&mt(o))return!0}return!1}var I0="4.4.2";const N0=["top","bottom","left","right","chartArea"];function Au(n,t){return n==="top"||n==="bottom"||N0.indexOf(n)===-1&&t==="x"}function Lu(n,t){return function(e,r){return e[n]===r[n]?e[t]-r[t]:e[n]-r[n]}}function Iu(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Tt(e&&e.onComplete,[n],t)}function F0(n){const t=n.chart,e=t.options.animation;Tt(e&&e.onProgress,[n],t)}function Nu(n){return Qa()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Fi={},Fu=n=>{const t=Nu(n);return Object.values(Fi).filter(e=>e.canvas===t).pop()};function U0(n,t,e){const r=Object.keys(n);for(const i of r){const a=+i;if(a>=t){const s=n[i];delete n[i],(e>0||a>t)&&(n[a+e]=s)}}}function B0(n,t,e,r){return!e||n.type==="mouseout"?null:r?t:n}function Ui(n,t,e){return n.options.clip?n[e]:t[e]}function W0(n,t){const{xScale:e,yScale:r}=n;return e&&r?{left:Ui(e,t,"left"),right:Ui(e,t,"right"),top:Ui(r,t,"top"),bottom:Ui(r,t,"bottom")}:t}let Se=(Mn=class{static register(...t){Ie.add(...t),Uu()}static unregister(...t){Ie.remove(...t),Uu()}constructor(t,e){const r=this.config=new R0(e),i=Nu(t),a=Fu(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||r0(i)),this.platform.updateConfig(r);const o=this.platform.acquireContext(i,s.aspectRatio),l=o&&o.canvas,c=l&&l.height,u=l&&l.width;if(this.id=jp(),this.ctx=o,this.canvas=l,this.width=u,this.height=c,this._options=s,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._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _0,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=sg(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Fi[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Xe.listen(this,"complete",Iu),Xe.listen(this,"progress",F0),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:r,height:i,_aspectRatio:a}=this;return st(t)?e&&a?a:i?r/i: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}get registry(){return Ie}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Yc(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ec(this.canvas,this.ctx),this}stop(){return Xe.stop(this),this}resize(t,e){Xe.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,e,a),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Yc(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),Tt(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};St(e,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,e=t.scales,r=this.scales,i=Object.keys(r).reduce((s,o)=>(s[o]=!1,s),{});let a=[];e&&(a=a.concat(Object.keys(e).map(s=>{const o=e[s],l=us(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),St(a,s=>{const o=s.options,l=o.id,c=us(l,o),u=rt(o.type,s.dtype);(o.position===void 0||Au(o.position,c)!==Au(s.dposition))&&(o.position=s.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=Ie.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(o,t)}),St(i,(s,o)=>{s||delete r[o]}),St(r,s=>{ie.configure(this,s,s.options),ie.addBox(this,s)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,r=t.length;if(t.sort((i,a)=>i.index-a.index),r>e){for(let i=e;i<r;++i)this._destroyDatasetMeta(i);t.splice(e,r-e)}this._sortedMetasets=t.slice(0).sort(Lu("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((r,i)=>{e.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=e.length;r<i;r++){const a=e[r];let s=this.getDatasetMeta(r);const o=a.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=o,s.indexAxis=a.indexAxis||cs(o,this.options),s.order=a.order||0,s.index=r,s.label=""+a.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const l=Ie.getController(o),{datasetElementType:c,dataElementType:u}=Ut.datasets[o];Object.assign(l,{dataElementType:Ie.getElement(u),datasetElementType:c&&Ie.getElement(c)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){St(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const r=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&a.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||St(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Lu("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){St(this.scales,t=>{ie.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!pc(e,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:a}of e){const s=r==="_removeElements"?-a:a;U0(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,r=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),i=r(0);for(let a=1;a<e;a++)if(!pc(i,r(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ie.update(this,this.width,this.height,t);const e=this.chartArea,r=e.width<=0||e.height<=0;this._layers=[],St(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,r=this.data.datasets.length;e<r;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,r=this.data.datasets.length;e<r;++e)this._updateDataset(e,fe(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Xe.has(this)?this.attached&&!Xe.running(this)&&Xe.start(this):(this.draw(),Iu({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,r=[];let i,a;for(i=0,a=e.length;i<a;++i){const s=e[i];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,r=t._clip,i=!r.disabled,a=W0(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&Pr(e,{left:r.left===!1?0:a.left-r.left,right:r.right===!1?this.width:a.right+r.right,top:r.top===!1?0:a.top-r.top,bottom:r.bottom===!1?this.height:a.bottom+r.bottom}),t.controller.draw(),i&&Er(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return qe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,r,i){const a=os.modes[e];return typeof a=="function"?a(this,t,r,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],r=this._metasets;let i=r.filter(a=>a&&a._dataset===e).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=hn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!e.hidden}setDatasetVisibility(t,e){const r=this.getDatasetMeta(t);r.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,r){const i=r?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,i);de(e)?(a.data[e].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(a,{visible:r}),this.update(o=>o.datasetIndex===t?i:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Xe.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ec(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Fi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,r=(a,s)=>{e.addEventListener(this,a,s),t[a]=s},i=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};St(this.options.events,a=>r(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,r=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const o=()=>{i("attach",o),this.attached=!0,this.resize(),r("resize",a),r("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),r("attach",o)},e.isAttached(this.canvas)?o():s()}unbindEvents(){St(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},St(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,r){const i=r?"set":"remove";let a,s,o,l;for(e==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],r=t.map(({datasetIndex:a,index:s})=>{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!mi(r,e)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,e))}notifyPlugins(t,e,r){return this._plugins.notify(this,t,e,r)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,r){const i=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=a(e,t),o=r?t:a(t,e);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){const r={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const a=this._handleEvent(t,e,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(a||r.changed)&&this.render(),this}_handleEvent(t,e,r){const{_active:i=[],options:a}=this,s=e,o=this._getActiveElements(t,i,r,s),l=Qp(t),c=B0(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Tt(a.onHover,[t,o,this],this),l&&Tt(a.onClick,[t,o,this],this));const u=!mi(o,i);return(u||e)&&(this._active=o,this._updateHoverStyles(o,i,e)),this._lastEvent=c,u}_getActiveElements(t,e,r,i){if(t.type==="mouseout")return[];if(!r)return e;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}},H(Mn,"defaults",Ut),H(Mn,"instances",Fi),H(Mn,"overrides",On),H(Mn,"registry",Ie),H(Mn,"version",I0),H(Mn,"getChart",Fu),Mn);function Uu(){return St(Se.instances,n=>n._plugins.invalidate())}function z0(n,t,e){const{startAngle:r,pixelMargin:i,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=i/o;n.beginPath(),n.arc(a,s,o,r-c,e+c),l>i?(c=i/l,n.arc(a,s,l,e+c,r-c,!0)):n.arc(a,s,i,e+Et,r-Et),n.closePath(),n.clip()}function Y0(n){return qa(n,["outerStart","outerEnd","innerStart","innerEnd"])}function H0(n,t,e,r){const i=Y0(n.options.borderRadius),a=(e-t)/2,s=Math.min(a,r*t/2),o=l=>{const c=(e-Math.min(a,l))*r/2;return Qt(l,0,Math.min(a,c))};return{outerStart:o(i.outerStart),outerEnd:o(i.outerEnd),innerStart:Qt(i.innerStart,0,s),innerEnd:Qt(i.innerEnd,0,s)}}function ir(n,t,e,r){return{x:e+n*Math.cos(t),y:r+n*Math.sin(t)}}function Bi(n,t,e,r,i,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+e-c,0),f=u>0?u+r+e+c:0;let p=0;const v=i-l;if(r){const $=u>0?u-r:0,Y=d>0?d-r:0,I=($+Y)/2,it=I!==0?v*I/(I+r):v;p=(v-it)/2}const x=Math.max(.001,v*d-e/dt)/d,g=(v-x)/2,m=l+g+p,b=i-g-p,{outerStart:y,outerEnd:_,innerStart:T,innerEnd:D}=H0(t,f,d,b-m),O=d-y,S=d-_,M=m+y/O,k=b-_/S,P=f+T,E=f+D,F=m+T/P,q=b-D/E;if(n.beginPath(),a){const $=(M+k)/2;if(n.arc(s,o,d,M,$),n.arc(s,o,d,$,k),_>0){const B=ir(S,k,s,o);n.arc(B.x,B.y,_,k,b+Et)}const Y=ir(E,b,s,o);if(n.lineTo(Y.x,Y.y),D>0){const B=ir(E,q,s,o);n.arc(B.x,B.y,D,b+Et,q+Math.PI)}const I=(b-D/f+(m+T/f))/2;if(n.arc(s,o,f,b-D/f,I,!0),n.arc(s,o,f,I,m+T/f,!0),T>0){const B=ir(P,F,s,o);n.arc(B.x,B.y,T,F+Math.PI,m-Et)}const it=ir(O,m,s,o);if(n.lineTo(it.x,it.y),y>0){const B=ir(O,M,s,o);n.arc(B.x,B.y,y,m-Et,M)}}else{n.moveTo(s,o);const $=Math.cos(M)*d+s,Y=Math.sin(M)*d+o;n.lineTo($,Y);const I=Math.cos(k)*d+s,it=Math.sin(k)*d+o;n.lineTo(I,it)}n.closePath()}function $0(n,t,e,r,i){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){Bi(n,t,e,r,l,i);for(let c=0;c<a;++c)n.fill();isNaN(o)||(l=s+(o%kt||kt))}return Bi(n,t,e,r,l,i),n.fill(),l}function j0(n,t,e,r,i){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,p=l.borderAlign==="inner";if(!c)return;n.setLineDash(d||[]),n.lineDashOffset=f,p?(n.lineWidth=c*2,n.lineJoin=u||"round"):(n.lineWidth=c,n.lineJoin=u||"bevel");let v=t.endAngle;if(a){Bi(n,t,e,r,v,i);for(let x=0;x<a;++x)n.stroke();isNaN(o)||(v=s+(o%kt||kt))}p&&z0(n,t,v),a||(Bi(n,t,e,r,v,i),n.stroke())}class $r extends te{constructor(e){super();H(this,"circumference");H(this,"endAngle");H(this,"fullCircles");H(this,"innerRadius");H(this,"outerRadius");H(this,"pixelMargin");H(this,"startAngle");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,e&&Object.assign(this,e)}inRange(e,r,i){const a=this.getProps(["x","y"],i),{angle:s,distance:o}=vc(a,{x:e,y:r}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,x=rt(f,c-l)>=kt||Cr(s,l,c),g=je(o,u+p,d+p);return x&&g}getCenterPoint(e){const{x:r,y:i,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:u}=this.options,d=(a+s)/2,f=(o+l+u+c)/2;return{x:r+Math.cos(d)*f,y:i+Math.sin(d)*f}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:r,circumference:i}=this,a=(r.offset||0)/4,s=(r.spacing||0)/2,o=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>kt?Math.floor(i/kt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(dt,i||0)),u=a*c;e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,$0(e,this,u,s,o),j0(e,this,u,s,o),e.restore()}}H($r,"id","arc"),H($r,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),H($r,"defaultRoutes",{backgroundColor:"backgroundColor"}),H($r,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Bu(n,t,e=t){n.lineCap=rt(e.borderCapStyle,t.borderCapStyle),n.setLineDash(rt(e.borderDash,t.borderDash)),n.lineDashOffset=rt(e.borderDashOffset,t.borderDashOffset),n.lineJoin=rt(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=rt(e.borderWidth,t.borderWidth),n.strokeStyle=rt(e.borderColor,t.borderColor)}function V0(n,t,e){n.lineTo(e.x,e.y)}function q0(n){return n.stepped?vg:n.tension||n.cubicInterpolationMode==="monotone"?bg:V0}function Wu(n,t,e={}){const r=n.length,{start:i=0,end:a=r-1}=e,{start:s,end:o}=t,l=Math.max(i,s),c=Math.min(a,o),u=i<s&&a<s||i>o&&a>o;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function X0(n,t,e,r){const{points:i,options:a}=t,{count:s,start:o,loop:l,ilen:c}=Wu(i,e,r),u=q0(a);let{move:d=!0,reverse:f}=r||{},p,v,x;for(p=0;p<=c;++p)v=i[(o+(f?c-p:p))%s],!v.skip&&(d?(n.moveTo(v.x,v.y),d=!1):u(n,x,v,f,a.stepped),x=v);return l&&(v=i[(o+(f?c:0))%s],u(n,x,v,f,a.stepped)),!!l}function G0(n,t,e,r){const i=t.points,{count:a,start:s,ilen:o}=Wu(i,e,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,v,x,g,m;const b=_=>(s+(c?o-_:_))%a,y=()=>{x!==g&&(n.lineTo(u,g),n.lineTo(u,x),n.lineTo(u,m))};for(l&&(p=i[b(0)],n.moveTo(p.x,p.y)),f=0;f<=o;++f){if(p=i[b(f)],p.skip)continue;const _=p.x,T=p.y,D=_|0;D===v?(T<x?x=T:T>g&&(g=T),u=(d*u+_)/++d):(y(),n.lineTo(_,T),v=D,d=0,x=g=T),m=T}y()}function ds(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?G0:X0}function K0(n){return n.stepped?Qg:n.tension||n.cubicInterpolationMode==="monotone"?Zg:An}function Q0(n,t,e,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,e,r)&&i.closePath()),Bu(n,t.options),n.stroke(i)}function Z0(n,t,e,r){const{segments:i,options:a}=t,s=ds(t);for(const o of i)Bu(n,a,o.style),n.beginPath(),s(n,t,o,{start:e,end:e+r-1})&&n.closePath(),n.stroke()}const J0=typeof Path2D=="function";function ty(n,t,e,r){J0&&!t.options.segment?Q0(n,t,e,r):Z0(n,t,e,r)}class mn extends te{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=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,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;Hg(this._points,r,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=im(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,r=t.length;return r&&e[t[r-1].end]}interpolate(t,e){const r=this.options,i=t[e],a=this.points,s=Gc(this,{property:e,start:i,end:i});if(!s.length)return;const o=[],l=K0(r);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],p=a[d],v=a[f];if(p===v){o.push(p);continue}const x=Math.abs((i-p[e])/(v[e]-p[e])),g=l(p,v,x,r.stepped);g[e]=t[e],o.push(g)}return o.length===1?o[0]:o}pathSegment(t,e,r){return ds(this)(t,this,e,r)}path(t,e,r){const i=this.segments,a=ds(this);let s=this._loop;e=e||0,r=r||this.points.length-e;for(const o of i)s&=a(t,this,o,{start:e,end:e+r-1});return!!s}draw(t,e,r,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),ty(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}H(mn,"id","line"),H(mn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),H(mn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),H(mn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function zu(n,t,e,r){const i=n.options,{[e]:a}=n.getProps([e],r);return Math.abs(t-a)<i.radius+i.hitRadius}class Wi extends te{constructor(e){super();H(this,"parsed");H(this,"skip");H(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,r,i){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],i);return Math.pow(e-s,2)+Math.pow(r-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(e,r){return zu(this,e,"x",r)}inYRange(e,r){return zu(this,e,"y",r)}getCenterPoint(e){const{x:r,y:i}=this.getProps(["x","y"],e);return{x:r,y:i}}size(e){e=e||this.options||{};let r=e.radius||0;r=Math.max(r,r&&e.hoverRadius||0);const i=r&&e.borderWidth||0;return(r+i)*2}draw(e,r){const i=this.options;this.skip||i.radius<.1||!qe(this,r,this.size(i)/2)||(e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.fillStyle=i.backgroundColor,Va(e,i,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}H(Wi,"id","point"),H(Wi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),H(Wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Yu(n,t){const{x:e,y:r,base:i,width:a,height:s}=n.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return n.horizontal?(d=s/2,o=Math.min(e,i),l=Math.max(e,i),c=r-d,u=r+d):(d=a/2,o=e-d,l=e+d,c=Math.min(r,i),u=Math.max(r,i)),{left:o,top:c,right:l,bottom:u}}function yn(n,t,e,r){return n?0:Qt(t,e,r)}function ey(n,t,e){const r=n.options.borderWidth,i=n.borderSkipped,a=Ac(r);return{t:yn(i.top,a.top,0,e),r:yn(i.right,a.right,0,t),b:yn(i.bottom,a.bottom,0,e),l:yn(i.left,a.left,0,t)}}function ny(n,t,e){const{enableBorderRadius:r}=n.getProps(["enableBorderRadius"]),i=n.options.borderRadius,a=fn(i),s=Math.min(t,e),o=n.borderSkipped,l=r||lt(i);return{topLeft:yn(!l||o.top||o.left,a.topLeft,0,s),topRight:yn(!l||o.top||o.right,a.topRight,0,s),bottomLeft:yn(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:yn(!l||o.bottom||o.right,a.bottomRight,0,s)}}function ry(n){const t=Yu(n),e=t.right-t.left,r=t.bottom-t.top,i=ey(n,e/2,r/2),a=ny(n,e/2,r/2);return{outer:{x:t.left,y:t.top,w:e,h:r,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:e-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function fs(n,t,e,r){const i=t===null,a=e===null,o=n&&!(i&&a)&&Yu(n,r);return o&&(i||je(t,o.left,o.right))&&(a||je(e,o.top,o.bottom))}function iy(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function ay(n,t){n.rect(t.x,t.y,t.w,t.h)}function hs(n,t,e={}){const r=n.x!==e.x?-t:0,i=n.y!==e.y?-t:0,a=(n.x+n.w!==e.x+e.w?t:0)-r,s=(n.y+n.h!==e.y+e.h?t:0)-i;return{x:n.x+r,y:n.y+i,w:n.w+a,h:n.h+s,radius:n.radius}}class zi extends te{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:r,backgroundColor:i}}=this,{inner:a,outer:s}=ry(this),o=iy(s.radius)?tr:ay;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,hs(s,e,a)),t.clip(),o(t,hs(a,-e,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),o(t,hs(a,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,r){return fs(this,t,e,r)}inXRange(t,e){return fs(this,t,null,e)}inYRange(t,e){return fs(this,null,t,e)}getCenterPoint(t){const{x:e,y:r,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(e+i)/2:e,y:a?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}H(zi,"id","bar"),H(zi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),H(zi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var sy=Object.freeze({__proto__:null,ArcElement:$r,BarElement:zi,LineElement:mn,PointElement:Wi});const ps=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Hu=ps.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function $u(n){return ps[n%ps.length]}function ju(n){return Hu[n%Hu.length]}function oy(n,t){return n.borderColor=$u(t),n.backgroundColor=ju(t),++t}function ly(n,t){return n.backgroundColor=n.data.map(()=>$u(t++)),t}function cy(n,t){return n.backgroundColor=n.data.map(()=>ju(t++)),t}function uy(n){let t=0;return(e,r)=>{const i=n.getDatasetMeta(r).controller;i instanceof gn?t=ly(e,t):i instanceof Nr?t=cy(e,t):i&&(t=oy(e,t))}}function Vu(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function dy(n){return n&&(n.borderColor||n.backgroundColor)}var fy={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:r},options:i}=n.config,{elements:a}=i;if(!e.forceOverride&&(Vu(r)||dy(i)||a&&Vu(a)))return;const s=uy(n);r.forEach(s)}};function hy(n,t,e,r,i){const a=i.samples||r;if(a>=e)return n.slice(t,t+e);const s=[],o=(e-2)/(a-2);let l=0;const c=t+e-1;let u=t,d,f,p,v,x;for(s[l++]=n[u],d=0;d<a-2;d++){let g=0,m=0,b;const y=Math.floor((d+1)*o)+1+t,_=Math.min(Math.floor((d+2)*o)+1,e)+t,T=_-y;for(b=y;b<_;b++)g+=n[b].x,m+=n[b].y;g/=T,m/=T;const D=Math.floor(d*o)+1+t,O=Math.min(Math.floor((d+1)*o)+1,e)+t,{x:S,y:M}=n[u];for(p=v=-1,b=D;b<O;b++)v=.5*Math.abs((S-g)*(n[b].y-M)-(S-n[b].x)*(m-M)),v>p&&(p=v,f=n[b],x=b);s[l++]=f,u=x}return s[l++]=n[c],s}function py(n,t,e,r){let i=0,a=0,s,o,l,c,u,d,f,p,v,x;const g=[],m=t+e-1,b=n[t].x,_=n[m].x-b;for(s=t;s<t+e;++s){o=n[s],l=(o.x-b)/_*r,c=o.y;const T=l|0;if(T===u)c<v?(v=c,d=s):c>x&&(x=c,f=s),i=(a*i+o.x)/++a;else{const D=s-1;if(!st(d)&&!st(f)){const O=Math.min(d,f),S=Math.max(d,f);O!==p&&O!==D&&g.push({...n[O],x:i}),S!==p&&S!==D&&g.push({...n[S],x:i})}s>0&&D!==p&&g.push(n[D]),g.push(o),u=T,a=0,v=x=c,d=f=p=s}}return g}function qu(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Xu(n){n.data.datasets.forEach(t=>{qu(t)})}function gy(n,t){const e=t.length;let r=0,i;const{iScale:a}=n,{min:s,max:o,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(r=Qt(Ve(t,a.axis,s).lo,0,e-1)),c?i=Qt(Ve(t,a.axis,o).hi+1,r,e)-r:i=e-r,{start:r,count:i}}var my={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Xu(n);return}const r=n.width;n.data.datasets.forEach((i,a)=>{const{_data:s,indexAxis:o}=i,l=n.getDatasetMeta(a),c=s||i.data;if(Rr([o,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=n.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||n.options.parsing)return;let{start:d,count:f}=gy(l,c);const p=e.threshold||4*r;if(f<=p){qu(i);return}st(s)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(x){this._data=x}}));let v;switch(e.algorithm){case"lttb":v=hy(c,d,f,r,e);break;case"min-max":v=py(c,d,f,r);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}i._decimated=v})},destroy(n){Xu(n)}};function yy(n,t,e){const r=n.segments,i=n.points,a=t.points,s=[];for(const o of r){let{start:l,end:c}=o;c=ms(l,c,i);const u=gs(e,i[l],i[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:i[l],end:i[c]});continue}const d=Gc(t,u);for(const f of d){const p=gs(e,a[f.start],a[f.end],f.loop),v=Xc(o,i,p);for(const x of v)s.push({source:x,target:f,start:{[e]:Gu(u,p,"start",Math.max)},end:{[e]:Gu(u,p,"end",Math.min)}})}}return s}function gs(n,t,e,r){if(r)return;let i=t[n],a=e[n];return n==="angle"&&(i=xe(i),a=xe(a)),{property:n,start:i,end:a}}function vy(n,t){const{x:e=null,y:r=null}=n||{},i=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=ms(s,o,i);const l=i[s],c=i[o];r!==null?(a.push({x:l.x,y:r}),a.push({x:c.x,y:r})):e!==null&&(a.push({x:e,y:l.y}),a.push({x:e,y:c.y}))}),a}function ms(n,t,e){for(;t>n;t--){const r=e[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function Gu(n,t,e,r){return n&&t?r(n[e],t[e]):n?n[e]:t?t[e]:0}function Ku(n,t){let e=[],r=!1;return mt(n)?(r=!0,e=n):e=vy(n,t),e.length?new mn({points:e,options:{tension:0},_loop:r,_fullLoop:r}):null}function Qu(n){return n&&n.fill!==!1}function by(n,t,e){let i=n[t].fill;const a=[t];let s;if(!e)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!It(i))return i;if(s=n[i],!s)return!1;if(s.visible)return i;a.push(i),i=s.fill}return!1}function xy(n,t,e){const r=Sy(n);if(lt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return It(i)&&Math.floor(i)===i?_y(r[0],t,i,e):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function _y(n,t,e,r){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=r?!1:e}function wy(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:lt(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Ty(n,t,e){let r;return n==="start"?r=e:n==="end"?r=t.options.reverse?t.min:t.max:lt(n)?r=n.value:r=t.getBaseValue(),r}function Sy(n){const t=n.options,e=t.fill;let r=rt(e&&e.target,e);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function My(n){const{scale:t,index:e,line:r}=n,i=[],a=r.segments,s=r.points,o=Cy(t,e);o.push(Ku({x:null,y:t.bottom},r));for(let l=0;l<a.length;l++){const c=a[l];for(let u=c.start;u<=c.end;u++)Dy(i,s[u],o)}return new mn({points:i,options:{}})}function Cy(n,t){const e=[],r=n.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const a=r[i];if(a.index===t)break;a.hidden||e.unshift(a.dataset)}return e}function Dy(n,t,e){const r=[];for(let i=0;i<e.length;i++){const a=e[i],{first:s,last:o,point:l}=ky(a,t,"x");if(!(!l||s&&o)){if(s)r.unshift(l);else if(n.push(l),!o)break}}n.push(...r)}function ky(n,t,e){const r=n.interpolate(t,e);if(!r)return{};const i=r[e],a=n.segments,s=n.points;let o=!1,l=!1;for(let c=0;c<a.length;c++){const u=a[c],d=s[u.start][e],f=s[u.end][e];if(je(i,d,f)){o=i===d,l=i===f;break}}return{first:o,last:l,point:r}}class Zu{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,r){const{x:i,y:a,radius:s}=this;return e=e||{start:0,end:kt},t.arc(i,a,s,e.end,e.start,!0),!r.bounds}interpolate(t){const{x:e,y:r,radius:i}=this,a=t.angle;return{x:e+Math.cos(a)*i,y:r+Math.sin(a)*i,angle:a}}}function Oy(n){const{chart:t,fill:e,line:r}=n;if(It(e))return Py(t,e);if(e==="stack")return My(n);if(e==="shape")return!0;const i=Ey(n);return i instanceof Zu?i:Ku(i,r)}function Py(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function Ey(n){return(n.scale||{}).getPointPositionForValue?Ay(n):Ry(n)}function Ry(n){const{scale:t={},fill:e}=n,r=wy(e,t);if(It(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function Ay(n){const{scale:t,fill:e}=n,r=t.options,i=t.getLabels().length,a=r.reverse?t.max:t.min,s=Ty(e,t,a),o=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,a);return new Zu({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<i;++l)o.push(t.getPointPositionForValue(l,s));return o}function ys(n,t,e){const r=Oy(t),{line:i,scale:a,axis:s}=t,o=i.options,l=o.fill,c=o.backgroundColor,{above:u=c,below:d=c}=l||{};r&&i.points.length&&(Pr(n,e),Ly(n,{line:i,target:r,above:u,below:d,area:e,scale:a,axis:s}),Er(n))}function Ly(n,t){const{line:e,target:r,above:i,below:a,area:s,scale:o}=t,l=e._loop?"angle":t.axis;n.save(),l==="x"&&a!==i&&(Ju(n,r,s.top),td(n,{line:e,target:r,color:i,scale:o,property:l}),n.restore(),n.save(),Ju(n,r,s.bottom)),td(n,{line:e,target:r,color:a,scale:o,property:l}),n.restore()}function Ju(n,t,e){const{segments:r,points:i}=t;let a=!0,s=!1;n.beginPath();for(const o of r){const{start:l,end:c}=o,u=i[l],d=i[ms(l,c,i)];a?(n.moveTo(u.x,u.y),a=!1):(n.lineTo(u.x,e),n.lineTo(u.x,u.y)),s=!!t.pathSegment(n,o,{move:s}),s?n.closePath():n.lineTo(d.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function td(n,t){const{line:e,target:r,property:i,color:a,scale:s}=t,o=yy(e,r,i);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:f=a}={}}=l,p=r!==!0;n.save(),n.fillStyle=f,Iy(n,s,p&&gs(i,u,d)),n.beginPath();const v=!!e.pathSegment(n,l);let x;if(p){v?n.closePath():ed(n,r,d,i);const g=!!r.pathSegment(n,c,{move:v,reverse:!0});x=v&&g,x||ed(n,r,u,i)}n.closePath(),n.fill(x?"evenodd":"nonzero"),n.restore()}}function Iy(n,t,e){const{top:r,bottom:i}=t.chart.chartArea,{property:a,start:s,end:o}=e||{};a==="x"&&(n.beginPath(),n.rect(s,r,o-s,i-r),n.clip())}function ed(n,t,e,r){const i=t.interpolate(e,r);i&&n.lineTo(i.x,i.y)}var Ny={id:"filler",afterDatasetsUpdate(n,t,e){const r=(n.data.datasets||[]).length,i=[];let a,s,o,l;for(s=0;s<r;++s)a=n.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof mn&&(l={visible:n.isDatasetVisible(s),index:s,fill:xy(o,s,r),chart:n,axis:a.controller.options.indexAxis,scale:a.vScale,line:o}),a.$filler=l,i.push(l);for(s=0;s<r;++s)l=i[s],!(!l||l.fill===!1)&&(l.fill=by(i,s,e.propagate))},beforeDraw(n,t,e){const r=e.drawTime==="beforeDraw",i=n.getSortedVisibleDatasetMetas(),a=n.chartArea;for(let s=i.length-1;s>=0;--s){const o=i[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),r&&o.fill&&ys(n.ctx,o,a))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const r=n.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const a=r[i].$filler;Qu(a)&&ys(n.ctx,a,n.chartArea)}},beforeDatasetDraw(n,t,e){const r=t.meta.$filler;!Qu(r)||e.drawTime!=="beforeDatasetDraw"||ys(n.ctx,r,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const nd=(n,t)=>{let{boxHeight:e=t,boxWidth:r=t}=n;return n.usePointStyle&&(e=Math.min(e,t),r=n.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:e,itemHeight:Math.max(t,e)}},Fy=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class rd extends te{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,e,r){this.maxWidth=t,this.maxHeight=e,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Tt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(r=>t.filter(r,this.chart.data))),t.sort&&(e=e.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=Rt(r.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=nd(r,a);let c,u;e.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,a,o,l)+10):(u=this.maxHeight,c=this._fitCols(s,i,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,r,i){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+o;let d=t;a.textAlign="left",a.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((v,x)=>{const g=r+e/2+a.measureText(v.text).width;(x===0||c[c.length-1]+g+2*o>s)&&(d+=u,c[c.length-(x>0?0:1)]=0,p+=u,f++),l[x]={left:0,top:p,row:f,width:g,height:i},c[c.length-1]+=g+o}),d}_fitCols(t,e,r,i){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,f=0,p=0,v=0,x=0;return this.legendItems.forEach((g,m)=>{const{itemWidth:b,itemHeight:y}=Uy(r,e,a,g,i);m>0&&p+y+2*o>u&&(d+=f+o,c.push({width:f,height:p}),v+=f+o,x++,f=p=0),l[m]={left:v,top:p,col:x,width:b,height:y},f=Math.max(f,b),p+=y+o}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:r,labels:{padding:i},rtl:a}}=this,s=rr(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=re(r,this.left+i,this.right-this.lineWidths[o]);for(const c of e)o!==c.row&&(o=c.row,l=re(r,this.left+i,this.right-this.lineWidths[o])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let o=0,l=re(r,this.top+t+i,this.bottom-this.columnSizes[o].height);for(const c of e)c.col!==o&&(o=c.col,l=re(r,this.top+t+i,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Pr(t,this),this._draw(),Er(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:r,ctx:i}=this,{align:a,labels:s}=t,o=Ut.color,l=rr(t.rtl,this.left,this.width),c=Rt(s.font),{padding:u}=s,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:v,boxHeight:x,itemHeight:g}=nd(s,d),m=function(D,O,S){if(isNaN(v)||v<=0||isNaN(x)||x<0)return;i.save();const M=rt(S.lineWidth,1);if(i.fillStyle=rt(S.fillStyle,o),i.lineCap=rt(S.lineCap,"butt"),i.lineDashOffset=rt(S.lineDashOffset,0),i.lineJoin=rt(S.lineJoin,"miter"),i.lineWidth=M,i.strokeStyle=rt(S.strokeStyle,o),i.setLineDash(rt(S.lineDash,[])),s.usePointStyle){const k={radius:x*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:M},P=l.xPlus(D,v/2),E=O+f;Rc(i,k,P,E,s.pointStyleWidth&&v)}else{const k=O+Math.max((d-x)/2,0),P=l.leftForLtr(D,v),E=fn(S.borderRadius);i.beginPath(),Object.values(E).some(F=>F!==0)?tr(i,{x:P,y:k,w:v,h:x,radius:E}):i.rect(P,k,v,x),i.fill(),M!==0&&i.stroke()}i.restore()},b=function(D,O,S){En(i,S.text,D,O+g/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},y=this.isHorizontal(),_=this._computeTitleHeight();y?p={x:re(a,this.left+u,this.right-r[0]),y:this.top+u+_,line:0}:p={x:this.left+u,y:re(a,this.top+_+u,this.bottom-e[0].height),line:0},$c(this.ctx,t.textDirection);const T=g+u;this.legendItems.forEach((D,O)=>{i.strokeStyle=D.fontColor,i.fillStyle=D.fontColor;const S=i.measureText(D.text).width,M=l.textAlign(D.textAlign||(D.textAlign=s.textAlign)),k=v+f+S;let P=p.x,E=p.y;l.setWidth(this.width),y?O>0&&P+k+u>this.right&&(E=p.y+=T,p.line++,P=p.x=re(a,this.left+u,this.right-r[p.line])):O>0&&E+T>this.bottom&&(P=p.x=P+e[p.line].width+u,p.line++,E=p.y=re(a,this.top+_+u,this.bottom-e[p.line].height));const F=l.x(P);if(m(F,E,D),P=og(M,P+v+f,y?P+k:this.right,t.rtl),b(l.x(P),E,D),y)p.x+=k+u;else if(typeof D.text!="string"){const q=c.lineHeight;p.y+=id(D,q)+u}else p.y+=T}),jc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,r=Rt(e.font),i=Gt(e.padding);if(!e.display)return;const a=rr(t.rtl,this.left,this.width),s=this.ctx,o=e.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=re(t.align,d,this.right-f);else{const v=this.columnSizes.reduce((x,g)=>Math.max(x,g.height),0);u=c+re(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const p=re(o,d,d+f);s.textAlign=a.textAlign(za(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=r.string,En(s,e.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,e=Rt(t.font),r=Gt(t.padding);return t.display?e.lineHeight+r.height:0}_getLegendItemAt(t,e){let r,i,a;if(je(t,this.left,this.right)&&je(e,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;r<a.length;++r)if(i=a[r],je(t,i.left,i.left+i.width)&&je(e,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const e=this.options;if(!zy(t.type,e))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=Fy(i,r);i&&!a&&Tt(e.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!a&&Tt(e.onHover,[t,r,this],this)}else r&&Tt(e.onClick,[t,r,this],this)}}function Uy(n,t,e,r,i){const a=By(r,n,t,e),s=Wy(i,r,t.lineHeight);return{itemWidth:a,itemHeight:s}}function By(n,t,e,r){let i=n.text;return i&&typeof i!="string"&&(i=i.reduce((a,s)=>a.length>s.length?a:s)),t+e.size/2+r.measureText(i).width}function Wy(n,t,e){let r=n;return typeof t.text!="string"&&(r=id(t,e)),r}function id(n,t){const e=n.text?n.text.length:0;return t*e}function zy(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var Yy={id:"legend",_element:rd,start(n,t,e){const r=n.legend=new rd({ctx:n.ctx,options:e,chart:n});ie.configure(n,r,e),ie.addBox(n,r)},stop(n){ie.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const r=n.legend;ie.configure(n,r,e),r.options=e},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,e){const r=t.datasetIndex,i=e.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),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:e,pointStyle:r,textAlign:i,color:a,useBorderRadius:s,borderRadius:o}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),u=Gt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:s&&(o||c.borderRadius),datasetIndex:l.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 vs extends te{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,e){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const i=mt(r.text)?r.text.length:1;this._padding=Gt(r.padding);const a=i*Rt(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:r,bottom:i,right:a,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=re(o,r,a),d=e+t,c=a-r):(s.position==="left"?(u=r+t,d=re(o,i,e),l=dt*-.5):(u=a-t,d=re(o,e,i),l=dt*.5),c=i-e),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const r=Rt(e.font),a=r.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);En(t,e.text,0,0,r,{color:e.color,maxWidth:l,rotation:c,textAlign:za(e.align),textBaseline:"middle",translation:[s,o]})}}function Hy(n,t){const e=new vs({ctx:n.ctx,options:t,chart:n});ie.configure(n,e,t),ie.addBox(n,e),n.titleBlock=e}var $y={id:"title",_element:vs,start(n,t,e){Hy(n,e)},stop(n){const t=n.titleBlock;ie.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const r=n.titleBlock;ie.configure(n,r,e),r.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yi=new WeakMap;var jy={id:"subtitle",start(n,t,e){const r=new vs({ctx:n.ctx,options:e,chart:n});ie.configure(n,r,e),ie.addBox(n,r),Yi.set(n,r)},stop(n){ie.removeBox(n,Yi.get(n)),Yi.delete(n)},beforeUpdate(n,t,e){const r=Yi.get(n);ie.configure(n,r,e),r.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const jr={average(n){if(!n.length)return!1;let t,e,r=new Set,i=0,a=0;for(t=0,e=n.length;t<e;++t){const o=n[t].element;if(o&&o.hasValue()){const l=o.tooltipPosition();r.add(l.x),i+=l.y,++a}}return{x:[...r].reduce((o,l)=>o+l)/r.size,y:i/a}},nearest(n,t){if(!n.length)return!1;let e=t.x,r=t.y,i=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=n.length;a<s;++a){const l=n[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Jn(t,c);u<i&&(i=u,o=l)}}if(o){const l=o.tooltipPosition();e=l.x,r=l.y}return{x:e,y:r}}};function Ne(n,t){return t&&(mt(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Ge(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
17
17
|
`)>-1?n.split(`
|
|
18
|
-
`):n}function Vy(n,t){const{element:e,datasetIndex:r,index:i}=t,a=n.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(i);return{chart:n,label:s,parsed:a.getParsed(i),raw:n.data.datasets[r].data[i],formattedValue:o,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:e}}function ad(n,t){const e=n.chart.ctx,{body:r,footer:i,title:a}=n,{boxWidth:s,boxHeight:o}=t,l=Rt(t.bodyFont),c=Rt(t.titleFont),u=Rt(t.footerFont),d=a.length,f=i.length,p=r.length,b=Gt(t.padding);let x=b.height,g=0,m=r.reduce((_,T)=>_+T.before.length+T.lines.length+T.after.length,0);if(m+=n.beforeBody.length+n.afterBody.length,d&&(x+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const _=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;x+=p*_+(m-p)*l.lineHeight+(m-1)*t.bodySpacing}f&&(x+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0;const y=function(_){g=Math.max(g,e.measureText(_).width+v)};return e.save(),e.font=c.string,St(n.title,y),e.font=l.string,St(n.beforeBody.concat(n.afterBody),y),v=t.displayColors?s+2+t.boxPadding:0,St(r,_=>{St(_.before,y),St(_.lines,y),St(_.after,y)}),v=0,e.font=u.string,St(n.footer,y),e.restore(),g+=b.width,{width:g,height:x}}function qy(n,t){const{y:e,height:r}=t;return e<r/2?"top":e>n.height-r/2?"bottom":"center"}function Xy(n,t,e,r){const{x:i,width:a}=r,s=e.caretSize+e.caretPadding;if(n==="left"&&i+a+s>t.width||n==="right"&&i-a-s<0)return!0}function Gy(n,t,e,r){const{x:i,width:a}=e,{width:s,chartArea:{left:o,right:l}}=n;let c="center";return r==="center"?c=i<=(o+l)/2?"left":"right":i<=a/2?c="left":i>=s-a/2&&(c="right"),Xy(c,n,t,e)&&(c="center"),c}function sd(n,t,e){const r=e.yAlign||t.yAlign||qy(n,e);return{xAlign:e.xAlign||t.xAlign||Gy(n,t,e,r),yAlign:r}}function Ky(n,t){let{x:e,width:r}=n;return t==="right"?e-=r:t==="center"&&(e-=r/2),e}function Qy(n,t,e){let{y:r,height:i}=n;return t==="top"?r+=e:t==="bottom"?r-=i+e:r-=i/2,r}function od(n,t,e,r){const{caretSize:i,caretPadding:a,cornerRadius:s}=n,{xAlign:o,yAlign:l}=e,c=i+a,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=fn(s);let b=Ky(t,o);const x=Qy(t,l,c);return l==="center"?o==="left"?b+=c:o==="right"&&(b-=c):o==="left"?b-=Math.max(u,f)+i:o==="right"&&(b+=Math.max(d,p)+i),{x:Qt(b,0,r.width-t.width),y:Qt(x,0,r.height-t.height)}}function Hi(n,t,e){const r=Gt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-r.right:n.x+r.left}function ld(n){return Ne([],Ge(n))}function Zy(n,t,e){return hn(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function cd(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const ud={beforeTitle:$e,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,r=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return e[t.dataIndex]}return""},afterTitle:$e,beforeBody:$e,beforeLabel:$e,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 e=n.formattedValue;return st(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:$e,afterBody:$e,beforeFooter:$e,footer:$e,afterFooter:$e};function he(n,t,e,r){const i=n[t].call(e,r);return typeof i>"u"?ud[t].call(e,r):i}class vs extends te{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,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._cachedAnimations;if(t)return t;const e=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&e.options.animation&&r.animations,a=new Ja(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Zy(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:r}=e,i=he(r,"beforeTitle",this,t),a=he(r,"title",this,t),s=he(r,"afterTitle",this,t);let o=[];return o=Ne(o,Ge(i)),o=Ne(o,Ge(a)),o=Ne(o,Ge(s)),o}getBeforeBody(t,e){return ld(he(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:r}=e,i=[];return St(t,a=>{const s={before:[],lines:[],after:[]},o=cd(r,a);Ne(s.before,Ge(he(o,"beforeLabel",this,a))),Ne(s.lines,he(o,"label",this,a)),Ne(s.after,Ge(he(o,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(t,e){return ld(he(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:r}=e,i=he(r,"beforeFooter",this,t),a=he(r,"footer",this,t),s=he(r,"afterFooter",this,t);let o=[];return o=Ne(o,Ge(i)),o=Ne(o,Ge(a)),o=Ne(o,Ge(s)),o}_createItems(t){const e=this._active,r=this.chart.data,i=[],a=[],s=[];let o=[],l,c;for(l=0,c=e.length;l<c;++l)o.push(Vy(this.chart,e[l]));return t.filter&&(o=o.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,r))),St(o,u=>{const d=cd(t.callbacks,u);i.push(he(d,"labelColor",this,u)),a.push(he(d,"labelPointStyle",this,u)),s.push(he(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,e){const r=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const o=jr[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=ad(this,r),c=Object.assign({},o,l),u=sd(this.chart,r,c),d=od(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,r,i){const a=this.getCaretPosition(t,r,i);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,r){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:o}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=fn(o),{x:f,y:p}=t,{width:b,height:x}=e;let g,m,v,y,_,T;return a==="center"?(_=p+x/2,i==="left"?(g=f,m=g-s,y=_+s,T=_-s):(g=f+b,m=g+s,y=_-s,T=_+s),v=g):(i==="left"?m=f+Math.max(l,u)+s:i==="right"?m=f+b-Math.max(c,d)-s:m=this.caretX,a==="top"?(y=p,_=y-s,g=m-s,v=m+s):(y=p+x,_=y+s,g=m+s,v=m-s),T=y),{x1:g,x2:m,x3:v,y1:y,y2:_,y3:T}}drawTitle(t,e,r){const i=this.title,a=i.length;let s,o,l;if(a){const c=rr(r.rtl,this.x,this.width);for(t.x=Hi(this,r.titleAlign,r),e.textAlign=c.textAlign(r.titleAlign),e.textBaseline="middle",s=Rt(r.titleFont),o=r.titleSpacing,e.fillStyle=r.titleColor,e.font=s.string,l=0;l<a;++l)e.fillText(i[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===a&&(t.y+=r.titleMarginBottom-o)}}_drawColorBox(t,e,r,i,a){const s=this.labelColors[r],o=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=a,u=Rt(a.bodyFont),d=Hi(this,"left",a),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,b=e.y+p;if(a.usePointStyle){const x={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},g=i.leftForLtr(f,c)+c/2,m=b+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Va(t,x,g,m),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Va(t,x,g,m)}else{t.lineWidth=lt(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const x=i.leftForLtr(f,c),g=i.leftForLtr(i.xPlus(f,1),c-2),m=fn(s.borderRadius);Object.values(m).some(v=>v!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,tr(t,{x,y:b,w:c,h:l,radius:m}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),tr(t,{x:g,y:b+1,w:c-2,h:l-2,radius:m}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(x,b,c,l),t.strokeRect(x,b,c,l),t.fillStyle=s.backgroundColor,t.fillRect(g,b+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,e,r){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=Rt(r.bodyFont);let f=d.lineHeight,p=0;const b=rr(r.rtl,this.x,this.width),x=function(S){e.fillText(S,b.x(t.x+p),t.y+f/2),t.y+=f+a},g=b.textAlign(s);let m,v,y,_,T,D,O;for(e.textAlign=s,e.textBaseline="middle",e.font=d.string,t.x=Hi(this,g,r),e.fillStyle=r.bodyColor,St(this.beforeBody,x),p=o&&g!=="right"?s==="center"?c/2+u:c+2+u:0,_=0,D=i.length;_<D;++_){for(m=i[_],v=this.labelTextColors[_],e.fillStyle=v,St(m.before,x),y=m.lines,o&&y.length&&(this._drawColorBox(e,t,_,b,r),f=Math.max(d.lineHeight,l)),T=0,O=y.length;T<O;++T)x(y[T]),f=d.lineHeight;St(m.after,x)}p=0,f=d.lineHeight,St(this.afterBody,x),t.y-=a}drawFooter(t,e,r){const i=this.footer,a=i.length;let s,o;if(a){const l=rr(r.rtl,this.x,this.width);for(t.x=Hi(this,r.footerAlign,r),t.y+=r.footerMarginTop,e.textAlign=l.textAlign(r.footerAlign),e.textBaseline="middle",s=Rt(r.footerFont),e.fillStyle=r.footerColor,e.font=s.string,o=0;o<a;++o)e.fillText(i[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,e,r,i){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:b}=fn(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(o+d,l),s==="top"&&this.drawCaret(t,e,r,i),e.lineTo(o+c-f,l),e.quadraticCurveTo(o+c,l,o+c,l+f),s==="center"&&a==="right"&&this.drawCaret(t,e,r,i),e.lineTo(o+c,l+u-b),e.quadraticCurveTo(o+c,l+u,o+c-b,l+u),s==="bottom"&&this.drawCaret(t,e,r,i),e.lineTo(o+p,l+u),e.quadraticCurveTo(o,l+u,o,l+u-p),s==="center"&&a==="left"&&this.drawCaret(t,e,r,i),e.lineTo(o,l+d),e.quadraticCurveTo(o,l,o+d,l),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const s=jr[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=ad(this,t),l=Object.assign({},s,this._size),c=sd(e,t,l),u=od(t,l,c,e);(i._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Gt(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,e),$c(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),jc(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const r=this._active,i=t.map(({datasetIndex:o,index:l})=>{const c=this.chart.getDatasetMeta(o);if(!c)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:c.data[l],index:l}}),a=!mi(r,i),s=this._positionChanged(i,e);(a||s)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,r=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(t,a,e,r),o=this._positionChanged(s,t),l=e||!mi(s,a)||o;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return e.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const s=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:r,caretY:i,options:a}=this,s=jr[a.position].call(this,t,e);return s!==!1&&(r!==s.x||i!==s.y)}}H(vs,"positioners",jr);var $i={id:"tooltip",_element:vs,positioners:jr,afterInit(n,t,e){e&&(n.tooltip=new vs({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"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,boxPadding: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:ud},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"]},Jy=Object.freeze({__proto__:null,Colors:fy,Decimation:my,Filler:Ny,Legend:Yy,SubTitle:jy,Title:$y,Tooltip:$i});const tb=(n,t,e,r)=>(typeof t=="string"?(e=n.push(t)-1,r.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function eb(n,t,e,r){const i=n.indexOf(t);if(i===-1)return tb(n,t,e,r);const a=n.lastIndexOf(t);return i!==a?e:i}const nb=(n,t)=>n===null?null:Qt(Math.round(n),0,t);function dd(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class xs extends In{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const r=this.getLabels();for(const{index:i,label:a}of e)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(st(t))return null;const r=this.getLabels();return e=isFinite(e)&&r[e]===t?e:eb(r,t,rt(e,t),this._addedLabels),nb(e,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),e||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,e=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=e;s++)i.push({value:s});return i}getLabelForValue(t){return dd.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}H(xs,"id","category"),H(xs,"defaults",{ticks:{callback:dd}});function rb(n,t){const e=[],{bounds:i,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=n,p=a||1,b=u-1,{min:x,max:g}=t,m=!st(s),v=!st(o),y=!st(c),_=(g-x)/(d+1);let T=gc((g-x)/b/p)*p,D,O,S,M;if(T<1e-14&&!m&&!v)return[{value:x},{value:g}];M=Math.ceil(g/T)-Math.floor(x/T),M>b&&(T=gc(M*T/b/p)*p),st(l)||(D=Math.pow(10,l),T=Math.ceil(T*D)/D),i==="ticks"?(O=Math.floor(x/T)*T,S=Math.ceil(g/T)*T):(O=x,S=g),m&&v&&a&&tg((o-s)/a,T/1e3)?(M=Math.round(Math.min((o-s)/T,u)),T=(o-s)/M,O=s,S=o):y?(O=m?s:O,S=v?o:S,M=c-1,T=(S-O)/M):(M=(S-O)/T,Mr(M,Math.round(M),T/1e3)?M=Math.round(M):M=Math.ceil(M));const k=Math.max(yc(T),yc(O));D=Math.pow(10,st(l)?k:l),O=Math.round(O*D)/D,S=Math.round(S*D)/D;let P=0;for(m&&(f&&O!==s?(e.push({value:s}),O<s&&P++,Mr(Math.round((O+P*T)*D)/D,s,fd(s,_,n))&&P++):O<s&&P++);P<M;++P){const E=Math.round((O+P*T)*D)/D;if(v&&E>o)break;e.push({value:E})}return v&&f&&S!==o?e.length&&Mr(e[e.length-1].value,o,fd(o,_,n))?e[e.length-1].value=o:e.push({value:o}):(!v||S===o)&&e.push({value:S}),e}function fd(n,t,{horizontal:e,minRotation:r}){const i=Xt(r),a=(e?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+n).length;return Math.min(t/a,s)}class ji extends In{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,e){return st(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const s=l=>i=e?i:l,o=l=>a=r?a:l;if(t){const l=Le(i),c=Le(a);l<0&&c<0?o(0):l>0&&c>0&&s(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),e=e||11),e&&(i=Math.min(e,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},a=this._range||this,s=rb(i,a);return t.bounds==="ticks"&&mc(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-e)/Math.max(t.length-1,1)/2;e-=i,r+=i}this._startValue=e,this._endValue=r,this._valueRange=r-e}getLabelForValue(t){return kr(t,this.chart.options.locale,this.options.ticks.format)}}class _s extends ji{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=It(t)?t:0,this.max=It(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,r=Xt(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}H(_s,"id","linear"),H(_s,"defaults",{ticks:{callback:wi.formatters.numeric}});const Vr=n=>Math.floor(un(n)),Nn=(n,t)=>Math.pow(10,Vr(n)+t);function hd(n){return n/Math.pow(10,Vr(n))===1}function pd(n,t,e){const r=Math.pow(10,e),i=Math.floor(n/r);return Math.ceil(t/r)-i}function ib(n,t){const e=t-n;let r=Vr(e);for(;pd(n,t,r)>10;)r++;for(;pd(n,t,r)<10;)r--;return Math.min(r,Vr(n))}function ab(n,{min:t,max:e}){t=ve(n.min,t);const r=[],i=Vr(t);let a=ib(t,e),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=i>a?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((c-u)/Math.pow(10,a)),f=ve(n.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;f<e;)r.push({value:f,major:hd(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),f=Math.round((l+u+d*Math.pow(10,a))*s)/s;const p=ve(n.max,f);return r.push({value:p,major:hd(p),significand:d}),r}class ws extends In{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const r=ji.prototype.parse.apply(this,[t,e]);if(r===0){this._zero=!0;return}return It(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=It(t)?Math.max(0,t):null,this.max=It(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!It(this._userMin)&&(this.min=t===Nn(this.min,0)?Nn(this.min,-1):Nn(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let r=this.min,i=this.max;const a=o=>r=t?r:o,s=o=>i=e?i:o;r===i&&(r<=0?(a(1),s(10)):(a(Nn(r,-1)),s(Nn(i,1)))),r<=0&&a(Nn(i,-1)),i<=0&&s(Nn(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},r=ab(e,this);return t.bounds==="ticks"&&mc(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":kr(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=un(t),this._valueRange=un(this.max)-un(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(un(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}H(ws,"id","logarithmic"),H(ws,"defaults",{ticks:{callback:wi.formatters.logarithmic,major:{enabled:!0}}});function Ts(n){const t=n.ticks;if(t.display&&n.display){const e=Gt(t.backdropPadding);return rt(t.font&&t.font.size,Ut.font.size)+e.height}return 0}function sb(n,t,e){return e=mt(e)?e:[e],{w:yg(n,t.string,e),h:e.length*t.lineHeight}}function gd(n,t,e,r,i){return n===r||n===i?{start:t-e/2,end:t+e/2}:n<r||n>i?{start:t-e,end:t}:{start:t,end:t+e}}function ob(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),r=[],i=[],a=n._pointLabels.length,s=n.options.pointLabels,o=s.centerPointLabels?dt/a:0;for(let l=0;l<a;l++){const c=s.setContext(n.getPointLabelContext(l));i[l]=c.padding;const u=n.getPointPosition(l,n.drawingArea+i[l],o),d=Rt(c.font),f=sb(n.ctx,d,n._pointLabels[l]);r[l]=f;const p=xe(n.getIndexAngle(l)+o),b=Math.round(xi(p)),x=gd(b,u.x,f.w,0,180),g=gd(b,u.y,f.h,90,270);lb(e,t,p,x,g)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=db(n,r,i)}function lb(n,t,e,r,i){const a=Math.abs(Math.sin(e)),s=Math.abs(Math.cos(e));let o=0,l=0;r.start<t.l?(o=(t.l-r.start)/a,n.l=Math.min(n.l,t.l-o)):r.end>t.r&&(o=(r.end-t.r)/a,n.r=Math.max(n.r,t.r+o)),i.start<t.t?(l=(t.t-i.start)/s,n.t=Math.min(n.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/s,n.b=Math.max(n.b,t.b+l))}function cb(n,t,e){const r=n.drawingArea,{extra:i,additionalAngle:a,padding:s,size:o}=e,l=n.getPointPosition(t,r+i+s,a),c=Math.round(xi(xe(l.angle+Et))),u=pb(l.y,o.h,c),d=fb(c),f=hb(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+o.w,bottom:u+o.h}}function ub(n,t){if(!t)return!0;const{left:e,top:r,right:i,bottom:a}=n;return!(qe({x:e,y:r},t)||qe({x:e,y:a},t)||qe({x:i,y:r},t)||qe({x:i,y:a},t))}function db(n,t,e){const r=[],i=n._pointLabels.length,a=n.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:Ts(a)/2,additionalAngle:s?dt/i:0};let c;for(let u=0;u<i;u++){l.padding=e[u],l.size=t[u];const d=cb(n,u,l);r.push(d),o==="auto"&&(d.visible=ub(d,c),d.visible&&(c=d))}return r}function fb(n){return n===0||n===180?"center":n<180?"left":"right"}function hb(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function pb(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function gb(n,t,e){const{left:r,top:i,right:a,bottom:s}=e,{backdropColor:o}=t;if(!st(o)){const l=fn(t.borderRadius),c=Gt(t.backdropPadding);n.fillStyle=o;const u=r-c.left,d=i-c.top,f=a-r+c.width,p=s-i+c.height;Object.values(l).some(b=>b!==0)?(n.beginPath(),tr(n,{x:u,y:d,w:f,h:p,radius:l}),n.fill()):n.fillRect(u,d,f,p)}}function mb(n,t){const{ctx:e,options:{pointLabels:r}}=n;for(let i=t-1;i>=0;i--){const a=n._pointLabelItems[i];if(!a.visible)continue;const s=r.setContext(n.getPointLabelContext(i));gb(e,s,a);const o=Rt(s.font),{x:l,y:c,textAlign:u}=a;En(e,n._pointLabels[i],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function md(n,t,e,r){const{ctx:i}=n;if(e)i.arc(n.xCenter,n.yCenter,t,0,kt);else{let a=n.getPointPosition(0,t);i.moveTo(a.x,a.y);for(let s=1;s<r;s++)a=n.getPointPosition(s,t),i.lineTo(a.x,a.y)}}function yb(n,t,e,r,i){const a=n.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!r||!o||!l||e<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(i.dash),a.lineDashOffset=i.dashOffset,a.beginPath(),md(n,e,s,r),a.closePath(),a.stroke(),a.restore())}function bb(n,t,e){return hn(n,{label:e,index:t,type:"pointLabel"})}class qr extends ji{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Gt(Ts(this.options)/2),e=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(e,r)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=It(t)&&!isNaN(t)?t:0,this.max=It(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ts(this.options))}generateTickLabels(t){ji.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,r)=>{const i=Tt(this.options.pointLabels.callback,[e,r],this);return i||i===0?i:""}).filter((e,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?ob(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,r,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,r,i))}getIndexAngle(t){const e=kt/(this._pointLabels.length||1),r=this.options.startAngle||0;return xe(t*e+Xt(r))}getDistanceFromCenterForValue(t){if(st(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(st(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const r=e[t];return bb(this.getContext(),t,r)}}getPointPosition(t,e,r=0){const i=this.getIndexAngle(t)-Et+r;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:r,right:i,bottom:a}=this._pointLabelItems[t];return{left:e,top:r,right:i,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),md(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:r,grid:i,border:a}=e,s=this._pointLabels.length;let o,l,c;if(e.pointLabels.display&&mb(this,s),i.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),p=i.setContext(f),b=a.setContext(f);yb(this,p,l,s,b)}}),r.display){for(t.save(),o=s-1;o>=0;o--){const u=r.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,r=e.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;const c=r.setContext(this.getContext(l)),u=Rt(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const d=Gt(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}En(t,o.label,0,-a,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}H(qr,"id","radialLinear"),H(qr,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:wi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),H(qr,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),H(qr,"descriptors",{angleLines:{_fallback:"grid"}});const Vi={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}},pe=Object.keys(Vi);function yd(n,t){return n-t}function bd(n,t){if(st(t))return null;const e=n._adapter,{parser:r,round:i,isoWeekday:a}=n._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),It(s)||(s=typeof r=="string"?e.parse(s,r):e.parse(s)),s===null?null:(i&&(s=i==="week"&&(dn(a)||a===!0)?e.startOf(s,"isoWeek",a):e.startOf(s,i)),+s)}function vd(n,t,e,r){const i=pe.length;for(let a=pe.indexOf(n);a<i-1;++a){const s=Vi[pe[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((e-t)/(o*s.size))<=r)return pe[a]}return pe[i-1]}function vb(n,t,e,r,i){for(let a=pe.length-1;a>=pe.indexOf(e);a--){const s=pe[a];if(Vi[s].common&&n._adapter.diff(i,r,s)>=t-1)return s}return pe[e?pe.indexOf(e):0]}function xb(n){for(let t=pe.indexOf(n)+1,e=pe.length;t<e;++t)if(Vi[pe[t]].common)return pe[t]}function xd(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:r,hi:i}=Wa(e,t),a=e[r]>=t?e[r]:e[i];n[a]=!0}}function _b(n,t,e,r){const i=n._adapter,a=+i.startOf(t[0].value,r),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+i.add(o,1,r))l=e[o],l>=0&&(t[l].major=!0);return t}function _d(n,t,e){const r=[],i={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],i[o]=s,r.push({value:o,major:!1});return a===0||!e?r:_b(n,r,i,e)}class Xr extends In{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const r=t.time||(t.time={}),i=this._adapter=new uu._date(t.adapters.date);i.init(e),Sr(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:bd(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!o&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=It(i)&&!isNaN(i)?i:+e.startOf(Date.now(),r),a=It(a)&&!isNaN(a)?a:+e.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],r=t[t.length-1]),{min:e,max:r}}buildTicks(){const t=this.options,e=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,s=this.max,o=ig(i,a,s);return this._unit=e.unit||(r.autoSkip?vd(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):vb(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:xb(this._unit),this.initOffsets(i),t.reverse&&o.reverse(),_d(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?e=1-i:e=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;e=Qt(e,0,s),r=Qt(r,0,s),this._offsets={start:e,end:r,factor:1/(e+1+r)}}_generate(){const t=this._adapter,e=this.min,r=this.max,i=this.options,a=i.time,s=a.unit||vd(a.minUnit,e,r,this._getLabelCapacity(e)),o=rt(i.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=dn(l)||l===!0,u={};let d=e,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,e,s)>1e5*o)throw new Error(e+" and "+r+" are too far apart with stepSize of "+o+" "+s);const b=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,o,s),p++)xd(u,f,b);return(f===r||i.bounds==="ticks"||p===1)&&xd(u,f,b),Object.keys(u).sort(yd).map(x=>+x)}getLabelForValue(t){const e=this._adapter,r=this.options.time;return r.tooltipFormat?e.format(t,r.tooltipFormat):e.format(t,r.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,a=this._unit,s=e||i[a];return this._adapter.format(t,s)}_tickFormatFunction(t,e,r,i){const a=this.options,s=a.ticks.callback;if(s)return Tt(s,[t,e,r],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],f=r[e],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let e,r,i;for(e=0,r=t.length;e<r;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+r)*e.factor)}getValueForPixel(t){const e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,r=this.ctx.measureText(t).width,i=Xt(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),s=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:r*a+o*s,h:r*s+o*a}}_getLabelCapacity(t){const e=this.options.time,r=e.displayFormats,i=r[e.unit]||r.millisecond,a=this._tickFormatFunction(t,0,_d(this,[t],this._majorUnit),i),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],e,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(e=0,r=i.length;e<r;++e)t=t.concat(i[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,r;if(t.length)return t;const i=this.getLabels();for(e=0,r=i.length;e<r;++e)t.push(bd(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return _c(t.sort(yd))}}H(Xr,"id","time"),H(Xr,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function qi(n,t,e){let r=0,i=n.length-1,a,s,o,l;e?(t>=n[r].pos&&t<=n[i].pos&&({lo:r,hi:i}=Ve(n,"pos",t)),{pos:a,time:o}=n[r],{pos:s,time:l}=n[i]):(t>=n[r].time&&t<=n[i].time&&({lo:r,hi:i}=Ve(n,"time",t)),{time:a,pos:o}=n[r],{time:s,pos:l}=n[i]);const c=s-a;return c?o+(l-o)*(t-a)/c:o}class Ss extends Xr{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=qi(e,this.min),this._tableRange=qi(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:r}=this,i=[],a=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=e&&c<=r&&i.push(c);if(i.length<2)return[{time:e,pos:0},{time:r,pos:1}];for(s=0,o=i.length;s<o;++s)u=i[s+1],l=i[s-1],c=i[s],Math.round((u+l)/2)!==c&&a.push({time:c,pos:s/(o-1)});return a}_generate(){const t=this.min,e=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(e)||r.length===1)&&r.push(e),r.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),r=this.getLabelTimestamps();return e.length&&r.length?t=this.normalize(e.concat(r)):t=e.length?e:r,t=this._cache.all=t,t}getDecimalForValue(t){return(qi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return qi(this._table,r*this._tableRange+this._minPos,!0)}}H(Ss,"id","timeseries"),H(Ss,"defaults",Xr.defaults);var wb=Object.freeze({__proto__:null,CategoryScale:xs,LinearScale:_s,LogarithmicScale:ws,RadialLinearScale:qr,TimeScale:Xr,TimeSeriesScale:Ss});const Tb=[Rm,sy,Jy,wb],Sb=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Mb=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Cb=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Db=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],wd=(n,t,e)=>{let r=n;return typeof t=="string"||Array.isArray(t)?r=n.toLocaleString(t,e):(t===!0||e!==void 0)&&(r=n.toLocaleString(void 0,e)),r};function Ms(n,t){if(!Number.isFinite(n))throw new TypeError(`Expected a finite number, got ${typeof n}: ${n}`);t={bits:!1,binary:!1,space:!0,...t};const e=t.bits?t.binary?Db:Cb:t.binary?Mb:Sb,r=t.space?" ":"";if(t.signed&&n===0)return` 0${r}${e[0]}`;const i=n<0,a=i?"-":t.signed?"+":"";i&&(n=-n);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),n<1){const u=wd(n,t.locale,s);return a+u+r+e[0]}const o=Math.min(Math.floor(t.binary?Math.log(n)/Math.log(1024):Math.log10(n)/3),e.length-1);n/=(t.binary?1024:1e3)**o,s||(n=n.toPrecision(3));const l=wd(Number(n),t.locale,s),c=e[o];return a+l+r+c}function Ke(n){"@babel/helpers - typeof";return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(n)}function At(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function J(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function nt(n){J(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||Ke(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Td(n,t){J(2,arguments);var e=nt(n),r=At(t);return isNaN(r)?new Date(NaN):(r&&e.setDate(e.getDate()+r),e)}function Cs(n,t){J(2,arguments);var e=nt(n),r=At(t);if(isNaN(r))return new Date(NaN);if(!r)return e;var i=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+r+1,0);var s=a.getDate();return i>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),i),e)}function Gr(n,t){J(2,arguments);var e=nt(n).getTime(),r=At(t);return new Date(e+r)}var kb=36e5;function Ob(n,t){J(2,arguments);var e=At(t);return Gr(n,e*kb)}var Pb={};function bn(){return Pb}function Sd(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=bn(),d=At((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getDay(),b=(p<d?7:0)+p-d;return f.setDate(f.getDate()-b),f.setHours(0,0,0,0),f}function Xi(n){var t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),n.getTime()-t.getTime()}function Ds(n){J(1,arguments);var t=nt(n);return t.setHours(0,0,0,0),t}var Eb=864e5;function Rb(n,t){J(2,arguments);var e=Ds(n),r=Ds(t),i=e.getTime()-Xi(e),a=r.getTime()-Xi(r);return Math.round((i-a)/Eb)}var Ab=6e4;function Lb(n,t){J(2,arguments);var e=At(t);return Gr(n,e*Ab)}function Ib(n,t){J(2,arguments);var e=At(t),r=e*3;return Cs(n,r)}function Nb(n,t){J(2,arguments);var e=At(t);return Gr(n,e*1e3)}function Fb(n,t){J(2,arguments);var e=At(t),r=e*7;return Td(n,r)}function Ub(n,t){J(2,arguments);var e=At(t);return Cs(n,e*12)}function Kr(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=e.getTime()-r.getTime();return i<0?-1:i>0?1:i}var Gi=6e4,Qr=36e5,Bb=1e3;function Wb(n){return J(1,arguments),n instanceof Date||Ke(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ks(n){if(J(1,arguments),!Wb(n)&&typeof n!="number")return!1;var t=nt(n);return!isNaN(Number(t))}function zb(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=e.getFullYear()-r.getFullYear(),a=e.getMonth()-r.getMonth();return i*12+a}function Yb(n,t){J(2,arguments);var e=nt(n),r=nt(t);return e.getFullYear()-r.getFullYear()}function Md(n,t){var e=n.getFullYear()-t.getFullYear()||n.getMonth()-t.getMonth()||n.getDate()-t.getDate()||n.getHours()-t.getHours()||n.getMinutes()-t.getMinutes()||n.getSeconds()-t.getSeconds()||n.getMilliseconds()-t.getMilliseconds();return e<0?-1:e>0?1:e}function Cd(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=Md(e,r),a=Math.abs(Rb(e,r));e.setDate(e.getDate()-i*a);var s=+(Md(e,r)===-i),o=i*(a-s);return o===0?0:o}function Ki(n,t){return J(2,arguments),nt(n).getTime()-nt(t).getTime()}var Dd={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Hb="trunc";function Zr(n){return n?Dd[n]:Dd[Hb]}function $b(n,t,e){J(2,arguments);var r=Ki(n,t)/Qr;return Zr(e==null?void 0:e.roundingMethod)(r)}function jb(n,t,e){J(2,arguments);var r=Ki(n,t)/Gi;return Zr(e==null?void 0:e.roundingMethod)(r)}function kd(n){J(1,arguments);var t=nt(n);return t.setHours(23,59,59,999),t}function Od(n){J(1,arguments);var t=nt(n),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Vb(n){J(1,arguments);var t=nt(n);return kd(t).getTime()===Od(t).getTime()}function Pd(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=Kr(e,r),a=Math.abs(zb(e,r)),s;if(a<1)s=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-i*a);var o=Kr(e,r)===-i;Vb(nt(n))&&a===1&&Kr(n,r)===1&&(o=!1),s=i*(a-Number(o))}return s===0?0:s}function qb(n,t,e){J(2,arguments);var r=Pd(n,t)/3;return Zr(e==null?void 0:e.roundingMethod)(r)}function Xb(n,t,e){J(2,arguments);var r=Ki(n,t)/1e3;return Zr(e==null?void 0:e.roundingMethod)(r)}function Gb(n,t,e){J(2,arguments);var r=Cd(n,t)/7;return Zr(e==null?void 0:e.roundingMethod)(r)}function Kb(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=Kr(e,r),a=Math.abs(Yb(e,r));e.setFullYear(1584),r.setFullYear(1584);var s=Kr(e,r)===-i,o=i*(a-Number(s));return o===0?0:o}function Qb(n){J(1,arguments);var t=nt(n);return t.setSeconds(0,0),t}function Zb(n){J(1,arguments);var t=nt(n),e=t.getMonth(),r=e-e%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Jb(n){J(1,arguments);var t=nt(n);return t.setDate(1),t.setHours(0,0,0,0),t}function tv(n){J(1,arguments);var t=nt(n),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function ev(n){J(1,arguments);var t=nt(n),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}function nv(n){J(1,arguments);var t=nt(n);return t.setMinutes(59,59,999),t}function rv(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=bn(),d=At((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getDay(),b=(p<d?-7:0)+6-(p-d);return f.setDate(f.getDate()+b),f.setHours(23,59,59,999),f}function iv(n){J(1,arguments);var t=nt(n);return t.setSeconds(59,999),t}function av(n){J(1,arguments);var t=nt(n),e=t.getMonth(),r=e-e%3+3;return t.setMonth(r,0),t.setHours(23,59,59,999),t}function sv(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(999),t}function Ed(n,t){J(2,arguments);var e=At(t);return Gr(n,-e)}var ov=864e5;function lv(n){J(1,arguments);var t=nt(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=e-r;return Math.floor(i/ov)+1}function ar(n){J(1,arguments);var t=1,e=nt(n),r=e.getUTCDay(),i=(r<t?7:0)+r-t;return e.setUTCDate(e.getUTCDate()-i),e.setUTCHours(0,0,0,0),e}function Rd(n){J(1,arguments);var t=nt(n),e=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(e+1,0,4),r.setUTCHours(0,0,0,0);var i=ar(r),a=new Date(0);a.setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0);var s=ar(a);return t.getTime()>=i.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function cv(n){J(1,arguments);var t=Rd(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var r=ar(e);return r}var uv=6048e5;function Ad(n){J(1,arguments);var t=nt(n),e=ar(t).getTime()-cv(t).getTime();return Math.round(e/uv)+1}function Fn(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=bn(),d=At((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getUTCDay(),b=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-b),f.setUTCHours(0,0,0,0),f}function Os(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=nt(n),d=u.getUTCFullYear(),f=bn(),p=At((e=(r=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(d+1,0,p),b.setUTCHours(0,0,0,0);var x=Fn(b,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var m=Fn(g,t);return u.getTime()>=x.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function dv(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=bn(),d=At((e=(r=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1),f=Os(n,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var b=Fn(p,t);return b}var fv=6048e5;function Ld(n,t){J(1,arguments);var e=nt(n),r=Fn(e,t).getTime()-dv(e,t).getTime();return Math.round(r/fv)+1}function Mt(n,t){for(var e=n<0?"-":"",r=Math.abs(n).toString();r.length<t;)r="0"+r;return e+r}var hv={y:function(t,e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return Mt(e==="yy"?i%100:i,e.length)},M:function(t,e){var r=t.getUTCMonth();return e==="M"?String(r+1):Mt(r+1,2)},d:function(t,e){return Mt(t.getUTCDate(),e.length)},a:function(t,e){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,e){return Mt(t.getUTCHours()%12||12,e.length)},H:function(t,e){return Mt(t.getUTCHours(),e.length)},m:function(t,e){return Mt(t.getUTCMinutes(),e.length)},s:function(t,e){return Mt(t.getUTCSeconds(),e.length)},S:function(t,e){var r=e.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,r-3));return Mt(a,e.length)}};const vn=hv;var sr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pv={G:function(t,e,r){var i=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,e,r){if(e==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return r.ordinalNumber(a,{unit:"year"})}return vn.y(t,e)},Y:function(t,e,r,i){var a=Os(t,i),s=a>0?a:1-a;if(e==="YY"){var o=s%100;return Mt(o,2)}return e==="Yo"?r.ordinalNumber(s,{unit:"year"}):Mt(s,e.length)},R:function(t,e){var r=Rd(t);return Mt(r,e.length)},u:function(t,e){var r=t.getUTCFullYear();return Mt(r,e.length)},Q:function(t,e,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return Mt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return Mt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,r){var i=t.getUTCMonth();switch(e){case"M":case"MM":return vn.M(t,e);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,r){var i=t.getUTCMonth();switch(e){case"L":return String(i+1);case"LL":return Mt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,r,i){var a=Ld(t,i);return e==="wo"?r.ordinalNumber(a,{unit:"week"}):Mt(a,e.length)},I:function(t,e,r){var i=Ad(t);return e==="Io"?r.ordinalNumber(i,{unit:"week"}):Mt(i,e.length)},d:function(t,e,r){return e==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):vn.d(t,e)},D:function(t,e,r){var i=lv(t);return e==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):Mt(i,e.length)},E:function(t,e,r){var i=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,r,i){var a=t.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Mt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,r,i){var a=t.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Mt(s,e.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,r){var i=t.getUTCDay(),a=i===0?7:i;switch(e){case"i":return String(a);case"ii":return Mt(a,e.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,r){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,r){var i=t.getUTCHours(),a;switch(i===12?a=sr.noon:i===0?a=sr.midnight:a=i/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,r){var i=t.getUTCHours(),a;switch(i>=17?a=sr.evening:i>=12?a=sr.afternoon:i>=4?a=sr.morning:a=sr.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,r){if(e==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return vn.h(t,e)},H:function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):vn.H(t,e)},K:function(t,e,r){var i=t.getUTCHours()%12;return e==="Ko"?r.ordinalNumber(i,{unit:"hour"}):Mt(i,e.length)},k:function(t,e,r){var i=t.getUTCHours();return i===0&&(i=24),e==="ko"?r.ordinalNumber(i,{unit:"hour"}):Mt(i,e.length)},m:function(t,e,r){return e==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):vn.m(t,e)},s:function(t,e,r){return e==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):vn.s(t,e)},S:function(t,e){return vn.S(t,e)},X:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return Nd(s);case"XXXX":case"XX":return Un(s);case"XXXXX":case"XXX":default:return Un(s,":")}},x:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(e){case"x":return Nd(s);case"xxxx":case"xx":return Un(s);case"xxxxx":case"xxx":default:return Un(s,":")}},O:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Id(s,":");case"OOOO":default:return"GMT"+Un(s,":")}},z:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Id(s,":");case"zzzz":default:return"GMT"+Un(s,":")}},t:function(t,e,r,i){var a=i._originalDate||t,s=Math.floor(a.getTime()/1e3);return Mt(s,e.length)},T:function(t,e,r,i){var a=i._originalDate||t,s=a.getTime();return Mt(s,e.length)}};function Id(n,t){var e=n>0?"-":"+",r=Math.abs(n),i=Math.floor(r/60),a=r%60;if(a===0)return e+String(i);var s=t||"";return e+String(i)+s+Mt(a,2)}function Nd(n,t){if(n%60===0){var e=n>0?"-":"+";return e+Mt(Math.abs(n)/60,2)}return Un(n,t)}function Un(n,t){var e=t||"",r=n>0?"-":"+",i=Math.abs(n),a=Mt(Math.floor(i/60),2),s=Mt(i%60,2);return r+a+e+s}var Fd=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Ud=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},gv=function(t,e){var r=t.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return Fd(t,e);var s;switch(i){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Fd(i,e)).replace("{{time}}",Ud(a,e))},Ps={p:Ud,P:gv},mv=["D","DD"],yv=["YY","YYYY"];function Bd(n){return mv.indexOf(n)!==-1}function Wd(n){return yv.indexOf(n)!==-1}function Qi(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var bv={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vv=function(t,e,r){var i,a=bv[t];return typeof a=="string"?i=a:e===1?i=a.one:i=a.other.replace("{{count}}",e.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const xv=vv;function Es(n){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.width?String(t.width):n.defaultWidth,r=n.formats[e]||n.formats[n.defaultWidth];return r}}var _v={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Sv={date:Es({formats:_v,defaultWidth:"full"}),time:Es({formats:wv,defaultWidth:"full"}),dateTime:Es({formats:Tv,defaultWidth:"full"})};const Mv=Sv;var Cv={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Dv=function(t,e,r,i){return Cv[t]};const kv=Dv;function Jr(n){return function(t,e){var r=e!=null&&e.context?String(e.context):"standalone",i;if(r==="formatting"&&n.formattingValues){var a=n.defaultFormattingWidth||n.defaultWidth,s=e!=null&&e.width?String(e.width):a;i=n.formattingValues[s]||n.formattingValues[a]}else{var o=n.defaultWidth,l=e!=null&&e.width?String(e.width):n.defaultWidth;i=n.values[l]||n.values[o]}var c=n.argumentCallback?n.argumentCallback(t):t;return i[c]}}var Ov={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ev={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Rv={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Av={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Lv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Iv=function(t,e){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Nv={ordinalNumber:Iv,era:Jr({values:Ov,defaultWidth:"wide"}),quarter:Jr({values:Pv,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Jr({values:Ev,defaultWidth:"wide"}),day:Jr({values:Rv,defaultWidth:"wide"}),dayPeriod:Jr({values:Av,defaultWidth:"wide",formattingValues:Lv,defaultFormattingWidth:"wide"})};const Fv=Nv;function ti(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.width,i=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],a=t.match(i);if(!a)return null;var s=a[0],o=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(o)?Bv(o,function(d){return d.test(s)}):Uv(o,function(d){return d.test(s)}),c;c=n.valueCallback?n.valueCallback(l):l,c=e.valueCallback?e.valueCallback(c):c;var u=t.slice(s.length);return{value:c,rest:u}}}function Uv(n,t){for(var e in n)if(n.hasOwnProperty(e)&&t(n[e]))return e}function Bv(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e}function Wv(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(n.matchPattern);if(!r)return null;var i=r[0],a=t.match(n.parsePattern);if(!a)return null;var s=n.valueCallback?n.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;var o=t.slice(i.length);return{value:s,rest:o}}}var zv=/^(\d+)(th|st|nd|rd)?/i,Yv=/\d+/i,Hv={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},$v={any:[/^b/i,/^(a|c)/i]},jv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vv={any:[/1/i,/2/i,/3/i,/4/i]},qv={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Xv={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gv={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Kv={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Qv={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Zv={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Jv={ordinalNumber:Wv({matchPattern:zv,parsePattern:Yv,valueCallback:function(t){return parseInt(t,10)}}),era:ti({matchPatterns:Hv,defaultMatchWidth:"wide",parsePatterns:$v,defaultParseWidth:"any"}),quarter:ti({matchPatterns:jv,defaultMatchWidth:"wide",parsePatterns:Vv,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ti({matchPatterns:qv,defaultMatchWidth:"wide",parsePatterns:Xv,defaultParseWidth:"any"}),day:ti({matchPatterns:Gv,defaultMatchWidth:"wide",parsePatterns:Kv,defaultParseWidth:"any"}),dayPeriod:ti({matchPatterns:Qv,defaultMatchWidth:"any",parsePatterns:Zv,defaultParseWidth:"any"})},tx={code:"en-US",formatDistance:xv,formatLong:Mv,formatRelative:kv,localize:Fv,match:Jv,options:{weekStartsOn:0,firstWeekContainsDate:1}};const zd=tx;var ex=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rx=/^'([^]*?)'?$/,ix=/''/g,ax=/[a-zA-Z]/;function sx(n,t,e){var r,i,a,s,o,l,c,u,d,f,p,b,x,g,m,v,y,_;J(2,arguments);var T=String(t),D=bn(),O=(r=(i=e==null?void 0:e.locale)!==null&&i!==void 0?i:D.locale)!==null&&r!==void 0?r:zd,S=At((a=(s=(o=(l=e==null?void 0:e.firstWeekContainsDate)!==null&&l!==void 0?l:e==null||(c=e.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:D.firstWeekContainsDate)!==null&&s!==void 0?s:(d=D.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=At((p=(b=(x=(g=e==null?void 0:e.weekStartsOn)!==null&&g!==void 0?g:e==null||(m=e.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&x!==void 0?x:D.weekStartsOn)!==null&&b!==void 0?b:(y=D.locale)===null||y===void 0||(_=y.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&p!==void 0?p:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var k=nt(n);if(!ks(k))throw new RangeError("Invalid time value");var P=Xi(k),E=Ed(k,P),F={firstWeekContainsDate:S,weekStartsOn:M,locale:O,_originalDate:k},q=T.match(nx).map(function($){var Y=$[0];if(Y==="p"||Y==="P"){var I=Ps[Y];return I($,O.formatLong)}return $}).join("").match(ex).map(function($){if($==="''")return"'";var Y=$[0];if(Y==="'")return ox($);var I=pv[Y];if(I)return!(e!=null&&e.useAdditionalWeekYearTokens)&&Wd($)&&Qi($,t,String(n)),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Bd($)&&Qi($,t,String(n)),I(E,$,O.localize,F);if(Y.match(ax))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return $}).join("");return q}function ox(n){var t=n.match(rx);return t?t[1].replace(ix,"'"):n}function lx(n,t){if(n==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function Yd(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function cx(n,t){if(n){if(typeof n=="string")return Yd(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Yd(n,t)}}function Hd(n,t){var e=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=cx(n))||t&&n&&typeof n.length=="number"){e&&(n=e);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
19
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){e=e.call(n)},n:function(){var c=e.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(s)throw o}}}}function G(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Rs(n,t){return Rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Rs(n,t)}function pt(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&Rs(n,t)}function Zi(n){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zi(n)}function ux(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dx(n,t){if(t&&(Ke(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G(n)}function gt(n){var t=ux();return function(){var r=Zi(n),i;if(t){var a=Zi(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return dx(this,i)}}function ft(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function fx(n,t){if(Ke(n)!=="object"||n===null)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var r=e.call(n,t||"default");if(Ke(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function $d(n){var t=fx(n,"string");return Ke(t)==="symbol"?t:String(t)}function jd(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,$d(r.key),r)}}function ht(n,t,e){return t&&jd(n.prototype,t),e&&jd(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function V(n,t,e){return t=$d(t),t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var hx=10,Vd=function(){function n(){ft(this,n),V(this,"priority",void 0),V(this,"subPriority",0)}return ht(n,[{key:"validate",value:function(e,r){return!0}}]),n}(),px=function(n){pt(e,n);var t=gt(e);function e(r,i,a,s,o){var l;return ft(this,e),l=t.call(this),l.value=r,l.validateValue=i,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return ht(e,[{key:"validate",value:function(i,a){return this.validateValue(i,this.value,a)}},{key:"set",value:function(i,a,s){return this.setValue(i,a,this.value,s)}}]),e}(Vd),gx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",hx),V(G(r),"subPriority",-1),r}return ht(e,[{key:"set",value:function(i,a){if(a.timestampIsSet)return i;var s=new Date(0);return s.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),s.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),s}}]),e}(Vd),xt=function(){function n(){ft(this,n),V(this,"incompatibleTokens",void 0),V(this,"priority",void 0),V(this,"subPriority",void 0)}return ht(n,[{key:"run",value:function(e,r,i,a){var s=this.parse(e,r,i,a);return s?{setter:new px(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(e,r,i){return!0}}]),n}(),mx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",140),V(G(r),"incompatibleTokens",["R","u","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"G":case"GG":case"GGG":return s.era(i,{width:"abbreviated"})||s.era(i,{width:"narrow"});case"GGGGG":return s.era(i,{width:"narrow"});case"GGGG":default:return s.era(i,{width:"wide"})||s.era(i,{width:"abbreviated"})||s.era(i,{width:"narrow"})}}},{key:"set",value:function(i,a,s){return a.era=s,i.setUTCFullYear(s,0,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Vt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fe={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function qt(n,t){return n&&{value:t(n.value),rest:n.rest}}function Bt(n,t){var e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Ue(n,t){var e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};var r=e[1]==="+"?1:-1,i=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:r*(i*Qr+a*Gi+s*Bb),rest:t.slice(e[0].length)}}function qd(n){return Bt(Vt.anyDigitsSigned,n)}function jt(n,t){switch(n){case 1:return Bt(Vt.singleDigit,t);case 2:return Bt(Vt.twoDigits,t);case 3:return Bt(Vt.threeDigits,t);case 4:return Bt(Vt.fourDigits,t);default:return Bt(new RegExp("^\\d{1,"+n+"}"),t)}}function Ji(n,t){switch(n){case 1:return Bt(Vt.singleDigitSigned,t);case 2:return Bt(Vt.twoDigitsSigned,t);case 3:return Bt(Vt.threeDigitsSigned,t);case 4:return Bt(Vt.fourDigitsSigned,t);default:return Bt(new RegExp("^-?\\d{1,"+n+"}"),t)}}function As(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Xd(n,t){var e=t>0,r=e?t:1-t,i;if(r<=50)i=n||100;else{var a=r+50,s=Math.floor(a/100)*100,o=n>=a%100;i=n+s-(o?100:0)}return e?i:1-i}function Gd(n){return n%400===0||n%4===0&&n%100!==0}var yx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return qt(jt(4,i),o);case"yo":return qt(s.ordinalNumber(i,{unit:"year"}),o);default:return qt(jt(a.length,i),o)}}},{key:"validate",value:function(i,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(i,a,s){var o=i.getUTCFullYear();if(s.isTwoDigitYear){var l=Xd(s.year,o);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in a)||a.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),bx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return qt(jt(4,i),o);case"Yo":return qt(s.ordinalNumber(i,{unit:"year"}),o);default:return qt(jt(a.length,i),o)}}},{key:"validate",value:function(i,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(i,a,s,o){var l=Os(i,o);if(s.isTwoDigitYear){var c=Xd(s.year,l);return i.setUTCFullYear(c,0,o.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Fn(i,o)}var u=!("era"in a)||a.era===1?s.year:1-s.year;return i.setUTCFullYear(u,0,o.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Fn(i,o)}}]),e}(xt),vx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a){return Ji(a==="R"?4:a.length,i)}},{key:"set",value:function(i,a,s){var o=new Date(0);return o.setUTCFullYear(s,0,4),o.setUTCHours(0,0,0,0),ar(o)}}]),e}(xt),xx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a){return Ji(a==="u"?4:a.length,i)}},{key:"set",value:function(i,a,s){return i.setUTCFullYear(s,0,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),_x=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",120),V(G(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"Q":case"QQ":return jt(a.length,i);case"Qo":return s.ordinalNumber(i,{unit:"quarter"});case"QQQ":return s.quarter(i,{width:"abbreviated",context:"formatting"})||s.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(i,{width:"wide",context:"formatting"})||s.quarter(i,{width:"abbreviated",context:"formatting"})||s.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=1&&a<=4}},{key:"set",value:function(i,a,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),wx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",120),V(G(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"q":case"qq":return jt(a.length,i);case"qo":return s.ordinalNumber(i,{unit:"quarter"});case"qqq":return s.quarter(i,{width:"abbreviated",context:"standalone"})||s.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(i,{width:"wide",context:"standalone"})||s.quarter(i,{width:"abbreviated",context:"standalone"})||s.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=1&&a<=4}},{key:"set",value:function(i,a,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Tx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),V(G(r),"priority",110),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return c-1};switch(a){case"M":return qt(Bt(Vt.month,i),o);case"MM":return qt(jt(2,i),o);case"Mo":return qt(s.ordinalNumber(i,{unit:"month"}),o);case"MMM":return s.month(i,{width:"abbreviated",context:"formatting"})||s.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(i,{width:"wide",context:"formatting"})||s.month(i,{width:"abbreviated",context:"formatting"})||s.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Sx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",110),V(G(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return c-1};switch(a){case"L":return qt(Bt(Vt.month,i),o);case"LL":return qt(jt(2,i),o);case"Lo":return qt(s.ordinalNumber(i,{unit:"month"}),o);case"LLL":return s.month(i,{width:"abbreviated",context:"standalone"})||s.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(i,{width:"wide",context:"standalone"})||s.month(i,{width:"abbreviated",context:"standalone"})||s.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt);function Mx(n,t,e){J(2,arguments);var r=nt(n),i=At(t),a=Ld(r,e)-i;return r.setUTCDate(r.getUTCDate()-a*7),r}var Cx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",100),V(G(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"w":return Bt(Vt.week,i);case"wo":return s.ordinalNumber(i,{unit:"week"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=53}},{key:"set",value:function(i,a,s,o){return Fn(Mx(i,s,o),o)}}]),e}(xt);function Dx(n,t){J(2,arguments);var e=nt(n),r=At(t),i=Ad(e)-r;return e.setUTCDate(e.getUTCDate()-i*7),e}var kx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",100),V(G(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"I":return Bt(Vt.week,i);case"Io":return s.ordinalNumber(i,{unit:"week"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=53}},{key:"set",value:function(i,a,s){return ar(Dx(i,s))}}]),e}(xt),Ox=[31,28,31,30,31,30,31,31,30,31,30,31],Px=[31,29,31,30,31,30,31,31,30,31,30,31],Ex=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"subPriority",1),V(G(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"d":return Bt(Vt.date,i);case"do":return s.ordinalNumber(i,{unit:"date"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){var s=i.getUTCFullYear(),o=Gd(s),l=i.getUTCMonth();return o?a>=1&&a<=Px[l]:a>=1&&a<=Ox[l]}},{key:"set",value:function(i,a,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Rx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"subpriority",1),V(G(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"D":case"DD":return Bt(Vt.dayOfYear,i);case"Do":return s.ordinalNumber(i,{unit:"date"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){var s=i.getUTCFullYear(),o=Gd(s);return o?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(i,a,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),e}(xt);function Ls(n,t,e){var r,i,a,s,o,l,c,u;J(2,arguments);var d=bn(),f=At((r=(i=(a=(s=e==null?void 0:e.weekStartsOn)!==null&&s!==void 0?s:e==null||(o=e.locale)===null||o===void 0||(l=o.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:d.weekStartsOn)!==null&&i!==void 0?i:(c=d.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=nt(n),b=At(t),x=p.getUTCDay(),g=b%7,m=(g+7)%7,v=(m<f?7:0)+b-x;return p.setUTCDate(p.getUTCDate()+v),p}var Ax=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"E":case"EE":case"EEE":return s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,s,o){return i=Ls(i,s,o),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Lx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"e":case"ee":return qt(jt(a.length,i),l);case"eo":return qt(s.ordinalNumber(i,{unit:"day"}),l);case"eee":return s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"eeeee":return s.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,s,o){return i=Ls(i,s,o),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Ix=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"c":case"cc":return qt(jt(a.length,i),l);case"co":return qt(s.ordinalNumber(i,{unit:"day"}),l);case"ccc":return s.day(i,{width:"abbreviated",context:"standalone"})||s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"});case"ccccc":return s.day(i,{width:"narrow",context:"standalone"});case"cccccc":return s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(i,{width:"wide",context:"standalone"})||s.day(i,{width:"abbreviated",context:"standalone"})||s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,s,o){return i=Ls(i,s,o),i.setUTCHours(0,0,0,0),i}}]),e}(xt);function Nx(n,t){J(2,arguments);var e=At(t);e%7===0&&(e=e-7);var r=1,i=nt(n),a=i.getUTCDay(),s=e%7,o=(s+7)%7,l=(o<r?7:0)+e-a;return i.setUTCDate(i.getUTCDate()+l),i}var Fx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return jt(a.length,i);case"io":return s.ordinalNumber(i,{unit:"day"});case"iii":return qt(s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),o);case"iiiii":return qt(s.day(i,{width:"narrow",context:"formatting"}),o);case"iiiiii":return qt(s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),o);case"iiii":default:return qt(s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(i,a){return a>=1&&a<=7}},{key:"set",value:function(i,a,s){return i=Nx(i,s),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Ux=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",80),V(G(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"a":case"aa":case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,s){return i.setUTCHours(As(s),0,0,0),i}}]),e}(xt),Bx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",80),V(G(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"b":case"bb":case"bbb":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,s){return i.setUTCHours(As(s),0,0,0),i}}]),e}(xt),Wx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",80),V(G(r),"incompatibleTokens",["a","b","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"B":case"BB":case"BBB":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,s){return i.setUTCHours(As(s),0,0,0),i}}]),e}(xt),zx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["H","K","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"h":return Bt(Vt.hour12h,i);case"ho":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=12}},{key:"set",value:function(i,a,s){var o=i.getUTCHours()>=12;return o&&s<12?i.setUTCHours(s+12,0,0,0):!o&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),e}(xt),Yx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"H":return Bt(Vt.hour23h,i);case"Ho":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=23}},{key:"set",value:function(i,a,s){return i.setUTCHours(s,0,0,0),i}}]),e}(xt),Hx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["h","H","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"K":return Bt(Vt.hour11h,i);case"Ko":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,s){var o=i.getUTCHours()>=12;return o&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),e}(xt),$x=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"k":return Bt(Vt.hour24h,i);case"ko":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=24}},{key:"set",value:function(i,a,s){var o=s<=24?s%24:s;return i.setUTCHours(o,0,0,0),i}}]),e}(xt),jx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",60),V(G(r),"incompatibleTokens",["t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"m":return Bt(Vt.minute,i);case"mo":return s.ordinalNumber(i,{unit:"minute"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=59}},{key:"set",value:function(i,a,s){return i.setUTCMinutes(s,0,0),i}}]),e}(xt),Vx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",50),V(G(r),"incompatibleTokens",["t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"s":return Bt(Vt.second,i);case"so":return s.ordinalNumber(i,{unit:"second"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=59}},{key:"set",value:function(i,a,s){return i.setUTCSeconds(s,0),i}}]),e}(xt),qx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",30),V(G(r),"incompatibleTokens",["t","T"]),r}return ht(e,[{key:"parse",value:function(i,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return qt(jt(a.length,i),s)}},{key:"set",value:function(i,a,s){return i.setUTCMilliseconds(s),i}}]),e}(xt),Xx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",10),V(G(r),"incompatibleTokens",["t","T","x"]),r}return ht(e,[{key:"parse",value:function(i,a){switch(a){case"X":return Ue(Fe.basicOptionalMinutes,i);case"XX":return Ue(Fe.basic,i);case"XXXX":return Ue(Fe.basicOptionalSeconds,i);case"XXXXX":return Ue(Fe.extendedOptionalSeconds,i);case"XXX":default:return Ue(Fe.extended,i)}}},{key:"set",value:function(i,a,s){return a.timestampIsSet?i:new Date(i.getTime()-s)}}]),e}(xt),Gx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",10),V(G(r),"incompatibleTokens",["t","T","X"]),r}return ht(e,[{key:"parse",value:function(i,a){switch(a){case"x":return Ue(Fe.basicOptionalMinutes,i);case"xx":return Ue(Fe.basic,i);case"xxxx":return Ue(Fe.basicOptionalSeconds,i);case"xxxxx":return Ue(Fe.extendedOptionalSeconds,i);case"xxx":default:return Ue(Fe.extended,i)}}},{key:"set",value:function(i,a,s){return a.timestampIsSet?i:new Date(i.getTime()-s)}}]),e}(xt),Kx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",40),V(G(r),"incompatibleTokens","*"),r}return ht(e,[{key:"parse",value:function(i){return qd(i)}},{key:"set",value:function(i,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),e}(xt),Qx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",20),V(G(r),"incompatibleTokens","*"),r}return ht(e,[{key:"parse",value:function(i){return qd(i)}},{key:"set",value:function(i,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),e}(xt),Zx={G:new mx,y:new yx,Y:new bx,R:new vx,u:new xx,Q:new _x,q:new wx,M:new Tx,L:new Sx,w:new Cx,I:new kx,d:new Ex,D:new Rx,E:new Ax,e:new Lx,c:new Ix,i:new Fx,a:new Ux,b:new Bx,B:new Wx,h:new zx,H:new Yx,K:new Hx,k:new $x,m:new jx,s:new Vx,S:new qx,X:new Xx,x:new Gx,t:new Kx,T:new Qx},Jx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,t_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e_=/^'([^]*?)'?$/,n_=/''/g,r_=/\S/,i_=/[a-zA-Z]/;function a_(n,t,e,r){var i,a,s,o,l,c,u,d,f,p,b,x,g,m,v,y,_,T;J(3,arguments);var D=String(n),O=String(t),S=bn(),M=(i=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:S.locale)!==null&&i!==void 0?i:zd;if(!M.match)throw new RangeError("locale must contain match property");var k=At((s=(o=(l=(c=r==null?void 0:r.firstWeekContainsDate)!==null&&c!==void 0?c:r==null||(u=r.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:S.firstWeekContainsDate)!==null&&o!==void 0?o:(f=S.locale)===null||f===void 0||(p=f.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=At((b=(x=(g=(m=r==null?void 0:r.weekStartsOn)!==null&&m!==void 0?m:r==null||(v=r.locale)===null||v===void 0||(y=v.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&g!==void 0?g:S.weekStartsOn)!==null&&x!==void 0?x:(_=S.locale)===null||_===void 0||(T=_.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&b!==void 0?b:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(O==="")return D===""?nt(e):new Date(NaN);var E={firstWeekContainsDate:k,weekStartsOn:P,locale:M},F=[new gx],q=O.match(t_).map(function(N){var A=N[0];if(A in Ps){var Q=Ps[A];return Q(N,M.formatLong)}return N}).join("").match(Jx),$=[],Y=Hd(q),I;try{var it=function(){var A=I.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&Wd(A)&&Qi(A,O,n),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Bd(A)&&Qi(A,O,n);var Q=A[0],X=Zx[Q];if(X){var bt=X.incompatibleTokens;if(Array.isArray(bt)){var ct=$.find(function(_t){return bt.includes(_t.token)||_t.token===Q});if(ct)throw new RangeError("The format string mustn't contain `".concat(ct.fullToken,"` and `").concat(A,"` at the same time"))}else if(X.incompatibleTokens==="*"&&$.length>0)throw new RangeError("The format string mustn't contain `".concat(A,"` and any other token at the same time"));$.push({token:Q,fullToken:A});var Ot=X.run(D,A,M.match,E);if(!Ot)return{v:new Date(NaN)};F.push(Ot.setter),D=Ot.rest}else{if(Q.match(i_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(A==="''"?A="'":Q==="'"&&(A=s_(A)),D.indexOf(A)===0)D=D.slice(A.length);else return{v:new Date(NaN)}}};for(Y.s();!(I=Y.n()).done;){var B=it();if(Ke(B)==="object")return B.v}}catch(N){Y.e(N)}finally{Y.f()}if(D.length>0&&r_.test(D))return new Date(NaN);var yt=F.map(function(N){return N.priority}).sort(function(N,A){return A-N}).filter(function(N,A,Q){return Q.indexOf(N)===A}).map(function(N){return F.filter(function(A){return A.priority===N}).sort(function(A,Q){return Q.subPriority-A.subPriority})}).map(function(N){return N[0]}),ut=nt(e);if(isNaN(ut.getTime()))return new Date(NaN);var z=Ed(ut,Xi(ut)),L={},U=Hd(yt),j;try{for(U.s();!(j=U.n()).done;){var Z=j.value;if(!Z.validate(z,E))return new Date(NaN);var K=Z.set(z,L,E);Array.isArray(K)?(z=K[0],lx(L,K[1])):z=K}}catch(N){U.e(N)}finally{U.f()}return z}function s_(n){return n.match(e_)[1].replace(n_,"'")}function o_(n){J(1,arguments);var t=nt(n);return t.setMinutes(0,0,0),t}function l_(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(0),t}function c_(n){J(1,arguments);var t=n/Qr;return Math.floor(t)}function Kd(n,t){var e;J(1,arguments);var r=At((e=t==null?void 0:t.additionalDigits)!==null&&e!==void 0?e:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var i=h_(n),a;if(i.date){var s=p_(i.date,r);a=g_(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(i.time&&(l=m_(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=y_(i.timezone),isNaN(c))return new Date(NaN)}else{var u=new Date(o+l),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(o+l+c)}var ta={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},u_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,d_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,f_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function h_(n){var t={},e=n.split(ta.dateTimeDelimiter),r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],ta.timeZoneDelimiter.test(t.date)&&(t.date=n.split(ta.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){var i=ta.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function p_(n,t){var e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:n.slice((r[1]||r[2]).length)}}function g_(n,t){if(t===null)return new Date(NaN);var e=n.match(u_);if(!e)return new Date(NaN);var r=!!e[4],i=ei(e[1]),a=ei(e[2])-1,s=ei(e[3]),o=ei(e[4]),l=ei(e[5])-1;if(r)return w_(t,o,l)?b_(t,o,l):new Date(NaN);var c=new Date(0);return!x_(t,a,s)||!__(t,i)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(i,s)),c)}function ei(n){return n?parseInt(n):1}function m_(n){var t=n.match(d_);if(!t)return NaN;var e=Is(t[1]),r=Is(t[2]),i=Is(t[3]);return T_(e,r,i)?e*Qr+r*Gi+i*1e3:NaN}function Is(n){return n&&parseFloat(n.replace(",","."))||0}function y_(n){if(n==="Z")return 0;var t=n.match(f_);if(!t)return 0;var e=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return S_(r,i)?e*(r*Qr+i*Gi):NaN}function b_(n,t,e){var r=new Date(0);r.setUTCFullYear(n,0,4);var i=r.getUTCDay()||7,a=(t-1)*7+e+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var v_=[31,null,31,30,31,30,31,31,30,31,30,31];function Qd(n){return n%400===0||n%4===0&&n%100!==0}function x_(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(v_[t]||(Qd(n)?29:28))}function __(n,t){return t>=1&&t<=(Qd(n)?366:365)}function w_(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function T_(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function S_(n,t){return t>=0&&t<=59}var ee=(n=>(n.DOUGHNUT="Doughnut",n.HORIZONTAL_BAR="HorizontalBar",n.VERTICAL_BAR="VerticalBar",n.TIMESERIES_LINE="Line",n.TIMESERIES_BAR="TimeSeriesBar",n))(ee||{}),ea=(n=>(n.GAUGE="Gauge",n.TOPN="TopN",n))(ea||{}),Wt=(n=>(n.Hidden="hidden",n.Right="right",n.Bottom="bottom",n))(Wt||{}),or=(n=>(n.Hidden="hidden",n.SingleMetric="single",n.Full="full",n))(or||{});const Ns=(n,t)=>{var i,a;const{tooltip:e}=t;if(e.opacity===0&&!n.locked){n.showTooltip=!1;return}const r=n.chartTooltipSortFn||((s,o)=>o.rawValue-s.rawValue);if(e.body&&!n.locked){const s=e.labelColors,o=((a=(i=t.chart.config)==null?void 0:i.options)==null?void 0:a.indexAxis)==="y"?"x":"y",l=[ee.HORIZONTAL_BAR,ee.VERTICAL_BAR].includes(n.chartType),c=[ea.GAUGE,ee.DOUGHNUT].includes(n.chartType);n.tooltipContext=l?e.dataPoints.length>1?e.dataPoints[0].label:"":e.dataPoints[0].parsed.x,n.tooltipSeries=e.dataPoints.map((u,d)=>{const f=c?u.parsed:u.parsed[o];let p;if(n.units==="bytes")p=isNaN(f)?f:Ms(f);else{const x=n.translateUnit(n.units,f);p=`${f%1===0?ra.format(f):ra.format(Number(f.toFixed(_f)))} ${x}`}const b=l&&u.dataset.label!==u.label?u.dataset.label:c?u.dataset.labels[u.dataIndex]:u.dataset.label;return{backgroundColor:s[d].backgroundColor,borderColor:s[d].borderColor,label:b,value:p,rawValue:f}}).sort(r),n.left=`${e.x}px`,n.top=`${e.y}px`,n.showTooltip=!0}},M_=n=>n&&n.datasets&&n.datasets.length,C_=n=>M_(n)&&n.datasets.some(t=>t.data.length),D_=n=>C_(n)&&n.datasets.some(t=>t.data.length>1),k_=n=>D_(n)&&n.datasets.some(t=>t.data[0]&&ks(t.data[0].x)),O_=n=>k_(n)&&n.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),Fs=(n,t,e)=>{const i=Math.min(t/1150,1);return n.x<e?n.x+t*.15*(1-i):n.x-t*1.15*(1-i)},P_=(n,t,e)=>n.y<e?n.y+t*.15:n.y-t*.5;function Zd(n,t){let e;return(...r)=>{clearTimeout(e),e=window.setTimeout(()=>{n(...r)},t)}}var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Us={exports:{}},Jd={exports:{}};(function(n){function t(e){return e&&e.__esModule?e:{default:e}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Jd);var zt=Jd.exports,Bs={exports:{}},Ws={exports:{}},tf={exports:{}};(function(n){function t(e){"@babel/helpers - typeof";return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},n.exports.__esModule=!0,n.exports.default=n.exports,t(e)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(tf);var ef=tf.exports,zs={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(i.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+i.length+" present")}n.exports=t.default})(zs,zs.exports);var ae=zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(ef),i=e(ae);function a(s){return(0,i.default)(1,arguments),s instanceof Date||(0,r.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}n.exports=t.default})(Ws,Ws.exports);var E_=Ws.exports,Ys={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(ef),i=e(ae);function a(s){(0,i.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,r.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=t.default})(Ys,Ys.exports);var Be=Ys.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(E_),i=e(Be),a=e(ae);function s(o){if((0,a.default)(1,arguments),!(0,r.default)(o)&&typeof o!="number")return!1;var l=(0,i.default)(o);return!isNaN(Number(l))}n.exports=t.default})(Bs,Bs.exports);var R_=Bs.exports,Hs={exports:{}},$s={exports:{}},js={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){if(r===null||r===!0||r===!1)return NaN;var i=Number(r);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}n.exports=t.default})(js,js.exports);var Wn=js.exports;const A_=Bn(Wn);(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Wn),i=e(Be),a=e(ae);function s(o,l){(0,a.default)(2,arguments);var c=(0,i.default)(o).getTime(),u=(0,r.default)(l);return new Date(c+u)}n.exports=t.default})($s,$s.exports);var L_=$s.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(L_),i=e(ae),a=e(Wn);function s(o,l){(0,i.default)(2,arguments);var c=(0,a.default)(l);return(0,r.default)(o,-c)}n.exports=t.default})(Hs,Hs.exports);var I_=Hs.exports,Vs={exports:{}},qs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Be),i=e(ae),a=864e5;function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}n.exports=t.default})(qs,qs.exports);var N_=qs.exports,Xs={exports:{}},Gs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Be),i=e(ae);function a(s){(0,i.default)(1,arguments);var o=1,l=(0,r.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}n.exports=t.default})(Gs,Gs.exports);var Ks=Gs.exports,Qs={exports:{}},Zs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Be),i=e(ae),a=e(Ks);function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(Zs,Zs.exports);var nf=Zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(nf),i=e(Ks),a=e(ae);function s(o){(0,a.default)(1,arguments);var l=(0,r.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,i.default)(c);return u}n.exports=t.default})(Qs,Qs.exports);var F_=Qs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Be),i=e(Ks),a=e(F_),s=e(ae),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,r.default)(c),d=(0,i.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}n.exports=t.default})(Xs,Xs.exports);var U_=Xs.exports,Js={exports:{}},to={exports:{}},zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.getDefaultOptions=B_,zn.setDefaultOptions=W_;var rf={};function B_(){return rf}function W_(n){rf=n}(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=e(Be),i=e(ae),a=e(Wn),s=zn;function o(l,c){var u,d,f,p,b,x,g,m;(0,i.default)(1,arguments);var v=(0,s.getDefaultOptions)(),y=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(b=c.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:v.weekStartsOn)!==null&&d!==void 0?d:(g=v.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var _=(0,r.default)(l),T=_.getUTCDay(),D=(T<y?7:0)+T-y;return _.setUTCDate(_.getUTCDate()-D),_.setUTCHours(0,0,0,0),_}n.exports=t.default})(to,to.exports);var eo=to.exports,no={exports:{}},ro={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Be),i=e(ae),a=e(eo),s=e(Wn),o=zn;function l(c,u){var d,f,p,b,x,g,m,v;(0,i.default)(1,arguments);var y=(0,r.default)(c),_=y.getUTCFullYear(),T=(0,o.getDefaultOptions)(),D=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(m=T.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=new Date(0);O.setUTCFullYear(_+1,0,D),O.setUTCHours(0,0,0,0);var S=(0,a.default)(O,u),M=new Date(0);M.setUTCFullYear(_,0,D),M.setUTCHours(0,0,0,0);var k=(0,a.default)(M,u);return y.getTime()>=S.getTime()?_+1:y.getTime()>=k.getTime()?_:_-1}n.exports=t.default})(ro,ro.exports);var af=ro.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(af),i=e(ae),a=e(eo),s=e(Wn),o=zn;function l(c,u){var d,f,p,b,x,g,m,v;(0,i.default)(1,arguments);var y=(0,o.getDefaultOptions)(),_=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:y.firstWeekContainsDate)!==null&&f!==void 0?f:(m=y.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,r.default)(c,u),D=new Date(0);D.setUTCFullYear(T,0,_),D.setUTCHours(0,0,0,0);var O=(0,a.default)(D,u);return O}n.exports=t.default})(no,no.exports);var z_=no.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Be),i=e(eo),a=e(z_),s=e(ae),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,r.default)(c),f=(0,i.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(Js,Js.exports);var Y_=Js.exports,io={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){for(var a=r<0?"-":"",s=Math.abs(r).toString();s.length<i;)s="0"+s;return a+s}n.exports=t.default})(io,io.exports);var sf=io.exports,ao={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(sf),i={y:function(o,l){var c=o.getUTCFullYear(),u=c>0?c:1-c;return(0,r.default)(l==="yy"?u%100:u,l.length)},M:function(o,l){var c=o.getUTCMonth();return l==="M"?String(c+1):(0,r.default)(c+1,2)},d:function(o,l){return(0,r.default)(o.getUTCDate(),l.length)},a:function(o,l){var c=o.getUTCHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h:function(o,l){return(0,r.default)(o.getUTCHours()%12||12,l.length)},H:function(o,l){return(0,r.default)(o.getUTCHours(),l.length)},m:function(o,l){return(0,r.default)(o.getUTCMinutes(),l.length)},s:function(o,l){return(0,r.default)(o.getUTCSeconds(),l.length)},S:function(o,l){var c=l.length,u=o.getUTCMilliseconds(),d=Math.floor(u*Math.pow(10,c-3));return(0,r.default)(d,l.length)}},a=i;t.default=a,n.exports=t.default})(ao,ao.exports);var H_=ao.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(N_),i=e(U_),a=e(nf),s=e(Y_),o=e(af),l=e(sf),c=e(H_),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(m,v,y){var _=m.getUTCFullYear()>0?1:0;switch(v){case"G":case"GG":case"GGG":return y.era(_,{width:"abbreviated"});case"GGGGG":return y.era(_,{width:"narrow"});case"GGGG":default:return y.era(_,{width:"wide"})}},y:function(m,v,y){if(v==="yo"){var _=m.getUTCFullYear(),T=_>0?_:1-_;return y.ordinalNumber(T,{unit:"year"})}return c.default.y(m,v)},Y:function(m,v,y,_){var T=(0,o.default)(m,_),D=T>0?T:1-T;if(v==="YY"){var O=D%100;return(0,l.default)(O,2)}return v==="Yo"?y.ordinalNumber(D,{unit:"year"}):(0,l.default)(D,v.length)},R:function(m,v){var y=(0,a.default)(m);return(0,l.default)(y,v.length)},u:function(m,v){var y=m.getUTCFullYear();return(0,l.default)(y,v.length)},Q:function(m,v,y){var _=Math.ceil((m.getUTCMonth()+1)/3);switch(v){case"Q":return String(_);case"QQ":return(0,l.default)(_,2);case"Qo":return y.ordinalNumber(_,{unit:"quarter"});case"QQQ":return y.quarter(_,{width:"abbreviated",context:"formatting"});case"QQQQQ":return y.quarter(_,{width:"narrow",context:"formatting"});case"QQQQ":default:return y.quarter(_,{width:"wide",context:"formatting"})}},q:function(m,v,y){var _=Math.ceil((m.getUTCMonth()+1)/3);switch(v){case"q":return String(_);case"qq":return(0,l.default)(_,2);case"qo":return y.ordinalNumber(_,{unit:"quarter"});case"qqq":return y.quarter(_,{width:"abbreviated",context:"standalone"});case"qqqqq":return y.quarter(_,{width:"narrow",context:"standalone"});case"qqqq":default:return y.quarter(_,{width:"wide",context:"standalone"})}},M:function(m,v,y){var _=m.getUTCMonth();switch(v){case"M":case"MM":return c.default.M(m,v);case"Mo":return y.ordinalNumber(_+1,{unit:"month"});case"MMM":return y.month(_,{width:"abbreviated",context:"formatting"});case"MMMMM":return y.month(_,{width:"narrow",context:"formatting"});case"MMMM":default:return y.month(_,{width:"wide",context:"formatting"})}},L:function(m,v,y){var _=m.getUTCMonth();switch(v){case"L":return String(_+1);case"LL":return(0,l.default)(_+1,2);case"Lo":return y.ordinalNumber(_+1,{unit:"month"});case"LLL":return y.month(_,{width:"abbreviated",context:"standalone"});case"LLLLL":return y.month(_,{width:"narrow",context:"standalone"});case"LLLL":default:return y.month(_,{width:"wide",context:"standalone"})}},w:function(m,v,y,_){var T=(0,s.default)(m,_);return v==="wo"?y.ordinalNumber(T,{unit:"week"}):(0,l.default)(T,v.length)},I:function(m,v,y){var _=(0,i.default)(m);return v==="Io"?y.ordinalNumber(_,{unit:"week"}):(0,l.default)(_,v.length)},d:function(m,v,y){return v==="do"?y.ordinalNumber(m.getUTCDate(),{unit:"date"}):c.default.d(m,v)},D:function(m,v,y){var _=(0,r.default)(m);return v==="Do"?y.ordinalNumber(_,{unit:"dayOfYear"}):(0,l.default)(_,v.length)},E:function(m,v,y){var _=m.getUTCDay();switch(v){case"E":case"EE":case"EEE":return y.day(_,{width:"abbreviated",context:"formatting"});case"EEEEE":return y.day(_,{width:"narrow",context:"formatting"});case"EEEEEE":return y.day(_,{width:"short",context:"formatting"});case"EEEE":default:return y.day(_,{width:"wide",context:"formatting"})}},e:function(m,v,y,_){var T=m.getUTCDay(),D=(T-_.weekStartsOn+8)%7||7;switch(v){case"e":return String(D);case"ee":return(0,l.default)(D,2);case"eo":return y.ordinalNumber(D,{unit:"day"});case"eee":return y.day(T,{width:"abbreviated",context:"formatting"});case"eeeee":return y.day(T,{width:"narrow",context:"formatting"});case"eeeeee":return y.day(T,{width:"short",context:"formatting"});case"eeee":default:return y.day(T,{width:"wide",context:"formatting"})}},c:function(m,v,y,_){var T=m.getUTCDay(),D=(T-_.weekStartsOn+8)%7||7;switch(v){case"c":return String(D);case"cc":return(0,l.default)(D,v.length);case"co":return y.ordinalNumber(D,{unit:"day"});case"ccc":return y.day(T,{width:"abbreviated",context:"standalone"});case"ccccc":return y.day(T,{width:"narrow",context:"standalone"});case"cccccc":return y.day(T,{width:"short",context:"standalone"});case"cccc":default:return y.day(T,{width:"wide",context:"standalone"})}},i:function(m,v,y){var _=m.getUTCDay(),T=_===0?7:_;switch(v){case"i":return String(T);case"ii":return(0,l.default)(T,v.length);case"io":return y.ordinalNumber(T,{unit:"day"});case"iii":return y.day(_,{width:"abbreviated",context:"formatting"});case"iiiii":return y.day(_,{width:"narrow",context:"formatting"});case"iiiiii":return y.day(_,{width:"short",context:"formatting"});case"iiii":default:return y.day(_,{width:"wide",context:"formatting"})}},a:function(m,v,y){var _=m.getUTCHours(),T=_/12>=1?"pm":"am";switch(v){case"a":case"aa":return y.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"aaa":return y.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return y.dayPeriod(T,{width:"narrow",context:"formatting"});case"aaaa":default:return y.dayPeriod(T,{width:"wide",context:"formatting"})}},b:function(m,v,y){var _=m.getUTCHours(),T;switch(_===12?T=u.noon:_===0?T=u.midnight:T=_/12>=1?"pm":"am",v){case"b":case"bb":return y.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"bbb":return y.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return y.dayPeriod(T,{width:"narrow",context:"formatting"});case"bbbb":default:return y.dayPeriod(T,{width:"wide",context:"formatting"})}},B:function(m,v,y){var _=m.getUTCHours(),T;switch(_>=17?T=u.evening:_>=12?T=u.afternoon:_>=4?T=u.morning:T=u.night,v){case"B":case"BB":case"BBB":return y.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"BBBBB":return y.dayPeriod(T,{width:"narrow",context:"formatting"});case"BBBB":default:return y.dayPeriod(T,{width:"wide",context:"formatting"})}},h:function(m,v,y){if(v==="ho"){var _=m.getUTCHours()%12;return _===0&&(_=12),y.ordinalNumber(_,{unit:"hour"})}return c.default.h(m,v)},H:function(m,v,y){return v==="Ho"?y.ordinalNumber(m.getUTCHours(),{unit:"hour"}):c.default.H(m,v)},K:function(m,v,y){var _=m.getUTCHours()%12;return v==="Ko"?y.ordinalNumber(_,{unit:"hour"}):(0,l.default)(_,v.length)},k:function(m,v,y){var _=m.getUTCHours();return _===0&&(_=24),v==="ko"?y.ordinalNumber(_,{unit:"hour"}):(0,l.default)(_,v.length)},m:function(m,v,y){return v==="mo"?y.ordinalNumber(m.getUTCMinutes(),{unit:"minute"}):c.default.m(m,v)},s:function(m,v,y){return v==="so"?y.ordinalNumber(m.getUTCSeconds(),{unit:"second"}):c.default.s(m,v)},S:function(m,v){return c.default.S(m,v)},X:function(m,v,y,_){var T=_._originalDate||m,D=T.getTimezoneOffset();if(D===0)return"Z";switch(v){case"X":return p(D);case"XXXX":case"XX":return b(D);case"XXXXX":case"XXX":default:return b(D,":")}},x:function(m,v,y,_){var T=_._originalDate||m,D=T.getTimezoneOffset();switch(v){case"x":return p(D);case"xxxx":case"xx":return b(D);case"xxxxx":case"xxx":default:return b(D,":")}},O:function(m,v,y,_){var T=_._originalDate||m,D=T.getTimezoneOffset();switch(v){case"O":case"OO":case"OOO":return"GMT"+f(D,":");case"OOOO":default:return"GMT"+b(D,":")}},z:function(m,v,y,_){var T=_._originalDate||m,D=T.getTimezoneOffset();switch(v){case"z":case"zz":case"zzz":return"GMT"+f(D,":");case"zzzz":default:return"GMT"+b(D,":")}},t:function(m,v,y,_){var T=_._originalDate||m,D=Math.floor(T.getTime()/1e3);return(0,l.default)(D,v.length)},T:function(m,v,y,_){var T=_._originalDate||m,D=T.getTime();return(0,l.default)(D,v.length)}};function f(g,m){var v=g>0?"-":"+",y=Math.abs(g),_=Math.floor(y/60),T=y%60;if(T===0)return v+String(_);var D=m||"";return v+String(_)+D+(0,l.default)(T,2)}function p(g,m){if(g%60===0){var v=g>0?"-":"+";return v+(0,l.default)(Math.abs(g)/60,2)}return b(g,m)}function b(g,m){var v=m||"",y=g>0?"-":"+",_=Math.abs(g),T=(0,l.default)(Math.floor(_/60),2),D=(0,l.default)(_%60,2);return y+T+v+D}var x=d;t.default=x,n.exports=t.default})(Vs,Vs.exports);var $_=Vs.exports,so={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(l,c){switch(l){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},r=function(l,c){switch(l){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},i=function(l,c){var u=l.match(/(P+)(p+)?/)||[],d=u[1],f=u[2];if(!f)return e(l,c);var p;switch(d){case"P":p=c.dateTime({width:"short"});break;case"PP":p=c.dateTime({width:"medium"});break;case"PPP":p=c.dateTime({width:"long"});break;case"PPPP":default:p=c.dateTime({width:"full"});break}return p.replace("{{date}}",e(d,c)).replace("{{time}}",r(f,c))},a={p:r,P:i},s=a;t.default=s,n.exports=t.default})(so,so.exports);var j_=so.exports,oo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){var i=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return i.setUTCFullYear(r.getFullYear()),r.getTime()-i.getTime()}n.exports=t.default})(oo,oo.exports);var of=oo.exports;const lf=Bn(of);var ni={};Object.defineProperty(ni,"__esModule",{value:!0}),ni.isProtectedDayOfYearToken=X_,ni.isProtectedWeekYearToken=G_,ni.throwProtectedError=K_;var V_=["D","DD"],q_=["YY","YYYY"];function X_(n){return V_.indexOf(n)!==-1}function G_(n){return q_.indexOf(n)!==-1}function K_(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var lo={exports:{}},co={exports:{}},uo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},r=function(s,o,l){var c,u=e[s];return typeof u=="string"?c=u:o===1?c=u.one:c=u.other.replace("{{count}}",o.toString()),l!=null&&l.addSuffix?l.comparison&&l.comparison>0?"in "+c:c+" ago":c},i=r;t.default=i,n.exports=t.default})(uo,uo.exports);var Q_=uo.exports,fo={exports:{}},ho={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=i.width?String(i.width):r.defaultWidth,s=r.formats[a]||r.formats[r.defaultWidth];return s}}n.exports=t.default})(ho,ho.exports);var Z_=ho.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(Z_),i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,r.default)({formats:i,defaultWidth:"full"}),time:(0,r.default)({formats:a,defaultWidth:"full"}),dateTime:(0,r.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,n.exports=t.default})(fo,fo.exports);var J_=fo.exports,po={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r=function(s,o,l,c){return e[s]},i=r;t.default=i,n.exports=t.default})(po,po.exports);var tw=po.exports,go={exports:{}},mo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&r.formattingValues){var l=r.defaultFormattingWidth||r.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=r.formattingValues[c]||r.formattingValues[l]}else{var u=r.defaultWidth,d=a!=null&&a.width?String(a.width):r.defaultWidth;o=r.values[d]||r.values[u]}var f=r.argumentCallback?r.argumentCallback(i):i;return o[f]}}n.exports=t.default})(mo,mo.exports);var ew=mo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(ew),i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(b,x){var g=Number(b),m=g%100;if(m>20||m<10)switch(m%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},d={ordinalNumber:u,era:(0,r.default)({values:i,defaultWidth:"wide"}),quarter:(0,r.default)({values:a,defaultWidth:"wide",argumentCallback:function(b){return b-1}}),month:(0,r.default)({values:s,defaultWidth:"wide"}),day:(0,r.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},f=d;t.default=f,n.exports=t.default})(go,go.exports);var nw=go.exports,yo={exports:{}},bo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?i(f,function(g){return g.test(d)}):r(f,function(g){return g.test(d)}),b;b=a.valueCallback?a.valueCallback(p):p,b=o.valueCallback?o.valueCallback(b):b;var x=s.slice(d.length);return{value:b,rest:x}}}function r(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function i(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}n.exports=t.default})(bo,bo.exports);var rw=bo.exports,vo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.match(r.matchPattern);if(!s)return null;var o=s[0],l=i.match(r.parsePattern);if(!l)return null;var c=r.valueCallback?r.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=i.slice(o.length);return{value:c,rest:u}}}n.exports=t.default})(vo,vo.exports);var iw=vo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(rw),i=e(iw),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},b={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},x={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,i.default)({matchPattern:a,parsePattern:s,valueCallback:function(_){return parseInt(_,10)}}),era:(0,r.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(_){return _+1}}),month:(0,r.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:b,defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},v=m;t.default=v,n.exports=t.default})(yo,yo.exports);var aw=yo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(Q_),i=e(J_),a=e(tw),s=e(nw),o=e(aw),l={code:"en-US",formatDistance:r.default,formatLong:i.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,n.exports=t.default})(co,co.exports);var sw=co.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(sw),i=r.default;t.default=i,n.exports=t.default})(lo,lo.exports);var ow=lo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r=e(R_),i=e(I_),a=e(Be),s=e($_),o=e(j_),l=e(of),c=ni,u=e(Wn),d=e(ae),f=zn,p=e(ow),b=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,m=/''/g,v=/[a-zA-Z]/;function y(T,D,O){var S,M,k,P,E,F,q,$,Y,I,it,B,yt,ut,z,L,U,j;(0,d.default)(2,arguments);var Z=String(D),K=(0,f.getDefaultOptions)(),N=(S=(M=O==null?void 0:O.locale)!==null&&M!==void 0?M:K.locale)!==null&&S!==void 0?S:p.default,A=(0,u.default)((k=(P=(E=(F=O==null?void 0:O.firstWeekContainsDate)!==null&&F!==void 0?F:O==null||(q=O.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&E!==void 0?E:K.firstWeekContainsDate)!==null&&P!==void 0?P:(Y=K.locale)===null||Y===void 0||(I=Y.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&k!==void 0?k:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((it=(B=(yt=(ut=O==null?void 0:O.weekStartsOn)!==null&&ut!==void 0?ut:O==null||(z=O.locale)===null||z===void 0||(L=z.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&yt!==void 0?yt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&it!==void 0?it:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,r.default)(X))throw new RangeError("Invalid time value");var bt=(0,l.default)(X),ct=(0,i.default)(X,bt),Ot={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var vt=et[0];if(vt==="p"||vt==="P"){var Nt=o.default[vt];return Nt(et,N.formatLong)}return et}).join("").match(b).map(function(et){if(et==="''")return"'";var vt=et[0];if(vt==="'")return _(et);var Nt=s.default[vt];if(Nt)return!(O!=null&&O.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),!(O!=null&&O.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),Nt(ct,et,N.localize,Ot);if(vt.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+vt+"`");return et}).join("");return _t}function _(T){var D=T.match(g);return D?D[1].replace(m,"'"):T}n.exports=t.default})(Us,Us.exports);var lw=Us.exports;const cw=Bn(lw);function cf(n,t,e){var r=fw(n,e.timeZone,e.locale);return r.formatToParts?uw(r,t):dw(r,t)}function uw(n,t){for(var e=n.formatToParts(t),r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function dw(n,t){var e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function fw(n,t,e){if(e&&!e.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function hw(n,t){var e=yw(t);return e.formatToParts?gw(e,n):mw(e,n)}var pw={year:0,month:1,day:2,hour:3,minute:4,second:5};function gw(n,t){try{for(var e=n.formatToParts(t),r=[],i=0;i<e.length;i++){var a=pw[e[i].type];a>=0&&(r[a]=parseInt(e[i].value,10))}return r}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function mw(n,t){var e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var xo={};function yw(n){if(!xo[n]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),e=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";xo[n]=e?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return xo[n]}function uf(n,t,e,r,i,a,s){var o=new Date(0);return o.setUTCFullYear(n,t,e),o.setUTCHours(r,i,a,s),o}var df=36e5,bw=6e4,_o={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function wo(n,t,e){var r,i;if(!n||(r=_o.timezoneZ.exec(n),r))return 0;var a;if(r=_o.timezoneHH.exec(n),r)return a=parseInt(r[1],10),ff(a)?-(a*df):NaN;if(r=_o.timezoneHHMM.exec(n),r){a=parseInt(r[2],10);var s=parseInt(r[3],10);return ff(a,s)?(i=Math.abs(a)*df+s*bw,r[1]==="+"?-i:i):NaN}if(_w(n)){t=new Date(t||Date.now());var o=e?t:vw(t),l=To(o,n),c=e?l:xw(t,l,n);return-c}return NaN}function vw(n){return uf(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function To(n,t){var e=hw(n,t),r=uf(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime(),i=n.getTime(),a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function xw(n,t,e){var r=n.getTime(),i=r-t,a=To(new Date(i),e);if(t===a)return t;i-=a-t;var s=To(new Date(i),e);return a===s?a:Math.max(a,s)}function ff(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var hf={};function _w(n){if(hf[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),hf[n]=!0,!0}catch{return!1}}var ww=60*1e3,Tw={X:function(n,t,e,r){var i=So(r.timeZone,n);if(i===0)return"Z";switch(t){case"X":return pf(i);case"XXXX":case"XX":return lr(i);case"XXXXX":case"XXX":default:return lr(i,":")}},x:function(n,t,e,r){var i=So(r.timeZone,n);switch(t){case"x":return pf(i);case"xxxx":case"xx":return lr(i);case"xxxxx":case"xxx":default:return lr(i,":")}},O:function(n,t,e,r){var i=So(r.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+Sw(i,":");case"OOOO":default:return"GMT"+lr(i,":")}},z:function(n,t,e,r){switch(t){case"z":case"zz":case"zzz":return cf("short",n,r);case"zzzz":default:return cf("long",n,r)}}};function So(n,t){var e=n?wo(n,t,!0)/ww:t.getTimezoneOffset();if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function na(n,t){for(var e=n<0?"-":"",r=Math.abs(n).toString();r.length<t;)r="0"+r;return e+r}function lr(n,t){var e=t||"",r=n>0?"-":"+",i=Math.abs(n),a=na(Math.floor(i/60),2),s=na(Math.floor(i%60),2);return r+a+e+s}function pf(n,t){if(n%60===0){var e=n>0?"-":"+";return e+na(Math.abs(n)/60,2)}return lr(n,t)}function Sw(n,t){var e=n>0?"-":"+",r=Math.abs(n),i=Math.floor(r/60),a=r%60;if(a===0)return e+String(i);var s=t||"";return e+String(i)+s+na(a,2)}var Mw=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Mo=36e5,gf=6e4,Cw=2,se={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Mw};function mf(n,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);var e=t||{},r=e.additionalDigits==null?Cw:A_(e.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var i=Dw(n),a=kw(i.date,r),s=a.year,o=a.restDateString,l=Ow(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(i.time&&(u=Pw(i.time),isNaN(u)))return new Date(NaN);if(i.timeZone||e.timeZone){if(d=wo(i.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=lf(new Date(c+u)),d=lf(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function Dw(n){var t={},e=se.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=se.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){var i=se.timeZone.exec(r);i?(t.time=r.replace(i[1],""),t.timeZone=i[1].trim()):t.time=r}return t}function kw(n,t){var e=se.YYY[t],r=se.YYYYY[t],i;if(i=se.YYYY.exec(n)||r.exec(n),i){var a=i[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(i=se.YY.exec(n)||e.exec(n),i){var s=i[1];return{year:parseInt(s,10)*100,restDateString:n.slice(s.length)}}return{year:null}}function Ow(n,t){if(t===null)return null;var e,r,i,a;if(n.length===0)return r=new Date(0),r.setUTCFullYear(t),r;if(e=se.MM.exec(n),e)return r=new Date(0),i=parseInt(e[1],10)-1,vf(t,i)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(e=se.DDD.exec(n),e){r=new Date(0);var s=parseInt(e[1],10);return Aw(t,s)?(r.setUTCFullYear(t,0,s),r):new Date(NaN)}if(e=se.MMDD.exec(n),e){r=new Date(0),i=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return vf(t,i,o)?(r.setUTCFullYear(t,i,o),r):new Date(NaN)}if(e=se.Www.exec(n),e)return a=parseInt(e[1],10)-1,xf(t,a)?yf(t,a):new Date(NaN);if(e=se.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return xf(t,a,l)?yf(t,a,l):new Date(NaN)}return null}function Pw(n){var t,e,r;if(t=se.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),Co(e)?e%24*Mo:NaN;if(t=se.HHMM.exec(n),t)return e=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),Co(e,r)?e%24*Mo+r*gf:NaN;if(t=se.HHMMSS.exec(n),t){e=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Co(e,r,i)?e%24*Mo+r*gf+i*1e3:NaN}return null}function yf(n,t,e){t=t||0,e=e||0;var r=new Date(0);r.setUTCFullYear(n,0,4);var i=r.getUTCDay()||7,a=t*7+e+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var Ew=[31,28,31,30,31,30,31,31,30,31,30,31],Rw=[31,29,31,30,31,30,31,31,30,31,30,31];function bf(n){return n%400===0||n%4===0&&n%100!==0}function vf(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var r=bf(n);if(r&&e>Rw[t]||!r&&e>Ew[t])return!1}return!0}function Aw(n,t){if(t<1)return!1;var e=bf(n);return!(e&&t>366||!e&&t>365)}function xf(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Co(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var Lw=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Do(n,t,e){var r=String(t),i=e||{},a=r.match(Lw);if(a){var s=mf(i.originalDate||n,i);r=a.reduce(function(o,l){if(l[0]==="'")return o;var c=o.indexOf(l),u=o[c-1]==="'",d=o.replace(l,"'"+Tw[l[0]](s,l,null,i)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},r)}return cw(n,r,i)}var ko={exports:{}},Oo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(r==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a]);return r}n.exports=t.default})(Oo,Oo.exports);var Iw=Oo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=e(Iw);function i(a){return(0,r.default)({},a)}n.exports=t.default})(ko,ko.exports);var Nw=ko.exports;const Fw=Bn(Nw);function Uw(n,t,e){var r=mf(n,e),i=wo(t,r,!0),a=new Date(r.getTime()-i),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function Bw(n,t,e,r){var i=Fw(r);return i.timeZone=t,i.originalDate=n,Do(Uw(n,t),e,i)}const _f=2,wf=10,Tf=12,ra=new Intl.NumberFormat(((op=document==null?void 0:document.documentElement)==null?void 0:op.lang)||"en-US");function ia(n,t={}){if(!n)return n;const e=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let r="MMM dd, YYY hh:mm a";t.short&&(r="MMM dd, YYY"),t.includeTZ&&(r+=" (z)");const i=new Date(n);return Bw(i,e,r)}catch{return console.error("Invalid value passed to formatTime",n),"(invalid date)"}}const aa=10,Sf={"1XXCount|1XX|1[0-9][0-9]":{solid:"#0072E5",light:"#4DA6FF",description:"Informational"},"SuccessfulRequests|2XXCount|2XX|2[0-9][0-9]|SUCCESS":{solid:"#0BB652",light:"#6FCC83",description:"Success"},"3XXCount|3XX|3[0-9][0-9]":{solid:"#FDC53B",light:"#FFD982",description:"Redirection"},"4XXCount|4XX|4[0-9][0-9]":{solid:"#FE9439",light:"#FFBA81",description:"Client Errors"},"5XXCount|5XX|5[0-9][0-9]":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},"errorCount|FailedRequests|FAILURE":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},nonStandard:{solid:"#6f7787",light:"#e7e7ec"},standard:{solid:"#1155cb",light:"#8ab3fa"},p99:{solid:"#1356cb",light:"#1356cb"},p95:{solid:"#1fbecd",light:"#1fbecd"},p50:{solid:"#1df97d",light:"#1df97d"},LatencyP99:{solid:"#1356cb",light:"#1356cb"},LatencyP95:{solid:"#1fbecd",light:"#1fbecd"},LatencyP50:{solid:"#1df97d",light:"#1df97d"}},Qe=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],cr=(n,t)=>(t||Qe)[n%Qe.length],Mf=(n,t)=>{n[0]==="#"&&(n=n.slice(1));let e=parseInt(n.substring(0,2),16),r=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16);e=e-t,r=r-t,i=i-t,e>255?e=255:e<0&&(e=0),r>255?r=255:r<0&&(r=0),i>255?i=255:i<0&&(i=0);const a=e.toString(16).length===1?"0"+e.toString(16):e.toString(16),s=r.toString(16).length===1?"0"+r.toString(16):r.toString(16),o=i.toString(16).length===1?"0"+i.toString(16):i.toString(16);return`#${a}${s}${o}`},Cf="#6f7787",Df={100:{background:"#f0f5fd",text:"#10599e"},200:{background:"#e5f7f4",text:"#1b6955"},300:{background:"#fff1d5",text:"#a06027"},400:{background:"#fee3b6",text:"#944d19"},500:{background:"#fedada",text:"#852021"}},Ww=n=>{var e;const t=Math.floor(parseInt(n,10)/100)*100;return((e=Df[t])==null?void 0:e.background)||"#fafafa"},zw={SUCCESS:"#6FCC83",FAILURE:"#FF8484"},Yw={"4XX":"#FFBA81","5XX":"#FF8484"},Hw={LatencyP99:"#1356cb",LatencyP95:"#1fbecd",LatencyP50:"#1df97d"},$w="#dad4c7",jw=n=>{const t=Object.entries(Sf).find(([e])=>new RegExp(e).test(n));return t&&t[1]||Sf.standard},Vw={lineTension:0,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},qw=2,Xw=0,Po=new Map,Eo=(n,t)=>t==="bytes"?Ms(n):t==="count/minute"?n.toFixed(2):ra.format(n),kf=n=>{const e=document.createElement("canvas").getContext("2d"),r=Rt({});return e.font=r.string,e.measureText(n).width},Gw=()=>{const n="label_height";if(!Po.has(n)){const t=Rt({});Po.set(n,t.lineHeight)}return Po.get(n)},Kw=n=>n.datasets.reduce((t,e)=>t+e.data.reduce((r,i)=>isNaN(i)?r:r+i,0),0),Of=(n,t)=>t.datasets.reduce((e,r,i)=>n.isDatasetVisible(i)?e+r.data.reduce((a,s)=>isNaN(s)?a:a+s,0):e,0),Pf=(n,t)=>t===0?" (0.0%)":` (${(n/t*100).toFixed(1)}%)`,Ro="#e0e4ea",Qw={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},ri=(n,t)=>{let e=1;const r=Qw[n],i=new Map;for(const a of t)i.set(a,r[e]),e=e%(r.length-1)+1;return i.set(-1,r[0]),i},Ef=new Map([[100,ri("100",[100,101,102,103])],[200,ri("200",[200,201,202,203,204,205,206,207,208,226])],[300,ri("300",[300,301,302,303,304,305,307,308])],[400,ri("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,ri("500",[500,501,502,503,504,505,506,507,508,510,511])]]),Ao=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,r=Ef.get(e);return r===void 0?Ro:r.get(t)??r.get(-1)??Ro},Zw=n=>{const t=Ao(n);return{solid:t,light:t}},sa={...Array.from({length:500},(n,t)=>100+t).reduce((n,t)=>(n[`${t}`]=Ao(`${t}`),n),{}),____OTHER____:"#DAD4C7","1XX":"#4DA6FF","2XX":"#6FCC83","3XX":"#FFD982","4XX":"#FFBA81","5XX":"#FF8484"};function Jw(n){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};$i.positioners.barChartTooltipPosition=function(i,a){if(!i.length)return!1;const s=this.chart.canvas.getBoundingClientRect(),o=n.tooltipState.width||this.width,l=s.width/2,c=Fs(a,o,l),u=a.y,d=a.x<l?"left":"center";return{x:c-n.tooltipState.offsetX,y:u-n.tooltipState.offsetY,xAlign:d}},os.modes.customInteractionMode=function(i,a){const s=pn(a,i),o=[];return os.evaluateInteractionItems(i,i.options.indexAxis||"x",s,(l,c,u)=>{i.options.indexAxis==="y"&&l.inYRange(s.y,!0)&&i.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u}),i.options.indexAxis==="x"&&l.inXRange(s.x,!0)&&i.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u})}),o};const e=n.numLabels.value>25?wf:Tf;return h.computed(()=>{var i,a,s,o,l,c,u,d;return{indexAxis:n.indexAxis,skipNull:!0,scales:{x:{border:{display:!1},stacked:n.stacked.value,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,font:e,callback:function(f,p){const b=this;if(b.chart.options.indexAxis===b.axis){f=b.getLabelForValue(p);const x=10;return f&&f.length>x?f.slice(0,x)+"...":f}return b.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="y"?!st((i=n.metricAxesTitle)==null?void 0:i.value):!st((a=n.dimensionAxesTitle)==null?void 0:a.value),text:n.indexAxis==="y"?(s=n.metricAxesTitle)==null?void 0:s.value:(o=n.dimensionAxesTitle)==null?void 0:o.value,padding:{top:10},font:{weight:"bold"}}},y:{border:{display:!1},stacked:n.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{font:e,callback:function(f,p){const b=this;return b.chart.options.indexAxis===b.axis?(f=b.getLabelForValue(p),f&&f.length>aa?f.slice(0,aa)+"...":f):b.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="x"?!st((l=n.metricAxesTitle)==null?void 0:l.value):!st((c=n.dimensionAxesTitle)==null?void 0:c.value),text:n.indexAxis==="x"?(u=n.metricAxesTitle)==null?void 0:u.value:(d=n.dimensionAxesTitle)==null?void 0:d.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:f=>{Ns(n.tooltipState,f)}}},interaction:{mode:"customInteractionMode",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Se.register(...Tb);const t1=(n,t)=>{const e=t.datasets.map(i=>i.label),r=n.datasets.map(i=>i.label);return n.datasets.length===t.datasets.length&&e.every((i,a)=>i===r[a])};function e1(n,t,e,r,i){const a=h.shallowRef(null),s=(o,l)=>{if(t.value)return new Se(t.value,{type:n,data:o,plugins:r,options:l})};return h.onMounted(()=>{a.value=s(e.value,i.value)}),h.onBeforeUnmount(()=>{st(a.value)||a.value.destroy()}),h.watch(e,(o,l)=>{if(t1(l,o)&&!st(a.value)){for(const[c,u]of o.datasets.entries())Object.assign(a.value.data.datasets[c],u);a.value.data.labels=o.labels,a.value.update()}else st(a.value)||a.value.destroy(),a.value=s(o,i.value)}),h.watch(t,()=>{st(a.value)||a.value.destroy(),a.value=s(e.value,i.value)}),h.watch(i,(o,l)=>{(o.indexAxis!==l.indexAxis||JSON.stringify(o.scales.x.title)!==JSON.stringify(l.scales.x.title)||JSON.stringify(o.scales.y.title)!==JSON.stringify(l.scales.y.title))&&(st(a.value)||a.value.destroy(),a.value=s(e.value,o))}),a}var Rf={exports:{}};(function(n){(function(){function t(c,u){if(u.separator===!1||c<1e3)return c.toString();var d=typeof u.separator=="string"?u.separator:",",f=[],p=Math.round(c).toString().split("");return p.reverse().forEach(function(b,x){x&&x%3===0&&f.push(d),f.push(b)}),f.reverse().join("")}function e(c,u,d){var f=c/u,p=d.round?"round":"floor";return d.decimal===!1?(c=Math[p](f),c.toString()):(d.precision?c=f:c=f<10?Math[p](f*10)/10:Math[p](f),c=c.toString(),typeof d.decimal=="string"&&(c=c.replace(".",d.decimal)),c)}var r=1e3,i=1e4,a=1e6,s=1e9,o=1e12;function l(c,u){var d;u=u||{};var f=c<0;f&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var p=u.min10k?i:r;return c<p||u.precision&&u.precision>Math.log10(c)?d=t(e(c,1,u),u):c<a?d=e(c,r,u)+"k":c<s?d=e(c,a,u)+"m":c<o?d=t(e(c,s,u),u)+"b":d=t(e(c,o,u),u)+"t",f&&(d="-"+d),u.capital&&(d=d.toUpperCase()),u.prefix&&(d=u.prefix+d),u.suffix&&(d=d+u.suffix),d}l.addCommas=t,n.exports=l})()})(Rf);var n1=Rf.exports;const ii=Bn(n1);function r1(n,t,e){const{i18n:r}=Ct.useI18n(),{translateUnit:i}=Ct.useTranslatedUnits();return{legendValues:h.computed(()=>n.value.datasets.reduce((s,o)=>{const l=o.total?o.total:o.data.reduce((u,d)=>u+(typeof d=="number"?Number(d)||0:Number(d&&d.y)||0),0);let c;if(e.value==="bytes")c=isNaN(l)?"0":Ms(l);else{const u=i(e.value,l);c=r&&r.t("legend.datapointValueDisplay",{value:ii(l,{capital:!0}),unit:u})||`${ii(l,{capital:!0})} ${e.value}`}return{...s,[o.label]:{raw:l,formatted:c}}},{}))}}function i1(n){return h.computed(()=>{var i;if(!((i=n.value)!=null&&i.meta))return"";const e=n.value.meta.start_ms,r=n.value.meta.end_ms;return e&&r?`${ia(e)} - ${ia(r,{includeTZ:!0})}`:""})}function a1(n){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:r=>({label:r.dataset.label,value:r.label})}};return $i.positioners.doughnutChartTooltipPosition=function(r,i){if(!r.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=n.tooltipState.width||this.width,o=a.width/2,l=Fs(i,s,o),c=i.y,u=i.x<o?"left":"center";return{x:l-n.tooltipState.offsetX,y:c,xAlign:u}},{options:h.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:r=>{Ns(n.tooltipState,r)}}}}))}}function s1(n){const t=h.computed(()=>{var l,c;return{type:"timeseries",display:!0,grid:{display:!0,drawOnChartArea:!1,drawTicks:!0,drawBorder:!1},ticks:{padding:10,autoSkipPadding:100,source:"auto",maxRotation:0},title:{display:!st((l=n.dimensionAxesTitle)==null?void 0:l.value),text:(c=n.dimensionAxesTitle)==null?void 0:c.value,padding:{top:2},font:{weight:"bold"}}}}),e=h.computed(()=>{var l,c;return{title:{display:!st((l=n.metricAxesTitle)==null?void 0:l.value),text:(c=n.metricAxesTitle)==null?void 0:c.value,padding:{bottom:10},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),r={enabled:!1,position:"lineChartTooltipPosition"};$i.positioners.lineChartTooltipPosition=function(l,c){if(!l.length||n.tooltipState.locked)return!1;const u=this.chart.canvas.getBoundingClientRect(),d=n.tooltipState.width||this.width,f=n.tooltipState.height||this.height,p=u.width/2,b=u.height/2,x=Fs(c,d,p);let g=P_(c,f,b);const m=c.y<b?"top":"bottom",v=c.x<p?"left":"center";return f>u.height&&(g=0),{x,y:g,xAlign:v,yAlign:m}};const i=h.computed(()=>{switch(n.granularity.value){case"minutely":return"minute";case"hourly":return"hour";case"daily":return"day";default:return"day"}}),a=h.computed(()=>c_(Number(n.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=h.computed(()=>["daily","weekly"].includes(n.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:h.computed(()=>({hover:{mode:"index",intersect:!1},elements:{point:{radius:0,hitRadius:4,hoverRadius:4}},animation:{duration:250,easing:"linear"},scales:{x:{border:{display:!1},...t.value,stacked:n.stacked.value,time:{tooltipFormat:"h:mm:ss a",unit:i.value,displayFormats:{minute:"h:mm:ss a",hour:a.value,day:s.value}}},y:{border:{display:!1},...e.value,stacked:n.stacked.value}},responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},streaming:!1,tooltip:{...r,external:l=>{Ns(n.tooltipState,l)}}},interaction:{mode:"index",intersect:!1}}))}}function o1(n){const{isMultiMetric:t,hasDimensions:e,metricNames:r,barSegmentLabels:i,pivotRecords:a,rowLabels:s,colorPalette:o}=n,{i18n:l}=Ct.useI18n();return t?r.map(c=>({label:l&&l.te(`chartLabels.${c}`)&&l.t(`chartLabels.${c}`)||c,backgroundColor:cr(r.indexOf(c),Qe),data:s.map((u,d)=>e?a[`${u.id},${c}`]||0:a[`${d},${c}`]||null)})):Array.from(i).flatMap((c,u)=>{if(!c)return[];const d={},f=Array.isArray(o)?cr(u,o):o[c.name]||cr(u);return d[c.name]=f,{label:l&&l.te(`chartLabels.${c.name}`)&&l.t(`chartLabels.${c.name}`)||c.name,backgroundColor:f,data:s.map(p=>a[`${p.id},${c.id}`]||null)}})}function l1(n,t){const{i18n:e}=Ct.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const i=t.value.data,{display:a,metric_names:s}=t.value.meta,o=a&&Object.keys(a),l=s&&s.length>1,c=a&&o&&o.length>0;if(!i.length||!s)return{datasets:[],labels:[]};const u=c&&o||s,d=u[0],f=u.length>1?u[1]:u[0],p=Object.fromEntries(l?i.flatMap(y=>s.map((_,T)=>{const D=y.event[d],O=c?`${D},${_}`:`${T},${_}`,S=y.event[_];return[O,S]})):i.map(y=>{const _=c?`${y.event[d]},${y.event[f]}`:`${d},${f}`,T=y.event[s[0]];return[_,T]})),b=a[d],x=a[f],g=c&&b&&Object.entries(b).map(([y,_])=>({id:y,name:_.name}))||s.map(y=>({id:y,name:y})),m=c&&x&&Object.entries(x).map(([y,_])=>({id:y,name:_.name}))||s.map(y=>({id:y,name:y}));return!g||!m?{labels:[],datasets:[]}:{labels:c?Object.entries(a[d]).map(([,y])=>e&&e.te(`chartLabels.${y.name}`)&&e.t(`chartLabels.${y.name}`)||y.name):s.map(y=>e&&e.te(`chartLabels.${y}`)&&e.t(`chartLabels.${y}`)||y),datasets:o1({isMultiMetric:l,hasDimensions:c,metricNames:s,dimensionFieldNames:u,barSegmentLabels:m,pivotRecords:p,rowLabels:g,colorPalette:n.colorPalette||Qe})}}}catch(i){return console.error(i),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const c1=(n,t,e=1)=>Array(Math.ceil((t-n)/e)).fill(n).map((r,i)=>r+i*e),u1=n=>{if(typeof n=="string"){const t=+n;if(t)return t;try{return Kd(n).getTime()}catch(e){if(e instanceof RangeError)return 0;throw e}}return n},d1=(n,t,e,r,i)=>{const s=Math.max(t-6e4,Math.max(...(i||[]).map(c=>new Date(c.timestamp).valueOf()))),o=Math.floor((n-r)/e)*e+r,l=Math.floor((s-r)/e)*e+r+e;return c1(o,l,e)};function f1(n,t){const{i18n:e}=Ct.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const i=t.value.data,{display:a,metric_names:s,start_ms:o,end_ms:l}=t.value.meta;if(!s)return console.error("Cannot build chart data from this explore result. Missing metric names."),{datasets:[]};const c=a&&Object.keys(a)||s,u=c&&c[0],d=a[u],f=a&&d&&Object.keys(d).map(T=>({id:T,name:d[T].name}))||s.map(T=>({id:T,name:T})),p=t.value.meta.granularity_ms;if(typeof p!="number"||isNaN(p)||!isFinite(p)||p===0)return console.error("Invalid step value:",p),{datasets:[],labels:[]};if(!i.length)return{datasets:[],labels:[]};const b=u1(o),x=d1(o,l,p,b,i),g=new Set,m=i!=null&&i.length?i.reduce((T,D)=>{const O=new Date(D.timestamp).valueOf(),S=D.event;for(const M of s)g.add(M),O in T||(T[O]={}),M in T[O]||(T[O][M]={});for(const M of s)f.forEach(k=>{S[u]===k.id||M===k.id?(T[O][M]||(T[O][M]={}),T[O][M][k.name]=Math.round(Number(S[M])*1e3)/1e3):c.length||(T[O][M]||(T[O][M]={}),T[O][M][k.name]=Math.round(Number(S[k.id])*1e3)/1e3)});return T},{}):{},v=s.length===1?s.flatMap(T=>f.map(D=>[T,D.name])):f.map(T=>[T.name,T.name]),y={},_=[...v].map(([T,D],O)=>{const S=x.map(E=>E in m&&T in m[E]?{x:E,y:m[E][T][D]||0}:{x:E,y:0});let{colorPalette:M,fill:k}=n;st(M)&&(M=Qe);const P=Array.isArray(M)?cr(O,M):M[D]||cr(O);return y[D]=P,{rawDimension:D,rawMetric:T,label:e&&e.te(`chartLabels.${D}`)&&e.t(`chartLabels.${D}`)||D,borderColor:P,backgroundColor:P,data:S,total:S.reduce((E,{y:F})=>E+Number(F),0),...Vw,fill:k,borderWidth:k?Xw:qw}});return _.sort((T,D)=>Number(T.total)<Number(D.total)?-1:1),{datasets:_,colorMap:y}}}catch(i){return console.error(i),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const h1=(n,t)=>{h.watch([n,t],(e,r,i)=>{const[a,s]=e;!s||!window||(window._AnalyticsChartDataInternal||(window._AnalyticsChartDataInternal=new Map),window._AnalyticsChartDataInternal.set(s,a),i(()=>{var o;(o=window._AnalyticsChartDataInternal)==null||o.delete(s)}))},{immediate:!0})};function p1(){const{i18n:n}=Ct.useI18n();return{translateUnit:(e,r)=>{const i=r===1,a=`chartUnits.${e}`;return n.te(a)?n.t(a,{plural:i?"":"s"}):e}}}const Ct={useBarChartOptions:Jw,useChartJSCommon:e1,useChartLegendValues:r1,useChartSelectedRange:i1,useExploreResultToDatasets:l1,useExploreResultToTimeDataset:f1,useDoughnutChartOptions:a1,useLinechartOptions:s1,useI18n:wp,useReportChartDataForSynthetics:h1,useTranslatedUnits:p1};/*!
|
|
18
|
+
`):n}function Vy(n,t){const{element:e,datasetIndex:r,index:i}=t,a=n.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(i);return{chart:n,label:s,parsed:a.getParsed(i),raw:n.data.datasets[r].data[i],formattedValue:o,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:e}}function ad(n,t){const e=n.chart.ctx,{body:r,footer:i,title:a}=n,{boxWidth:s,boxHeight:o}=t,l=Rt(t.bodyFont),c=Rt(t.titleFont),u=Rt(t.footerFont),d=a.length,f=i.length,p=r.length,v=Gt(t.padding);let x=v.height,g=0,m=r.reduce((_,T)=>_+T.before.length+T.lines.length+T.after.length,0);if(m+=n.beforeBody.length+n.afterBody.length,d&&(x+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const _=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;x+=p*_+(m-p)*l.lineHeight+(m-1)*t.bodySpacing}f&&(x+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let b=0;const y=function(_){g=Math.max(g,e.measureText(_).width+b)};return e.save(),e.font=c.string,St(n.title,y),e.font=l.string,St(n.beforeBody.concat(n.afterBody),y),b=t.displayColors?s+2+t.boxPadding:0,St(r,_=>{St(_.before,y),St(_.lines,y),St(_.after,y)}),b=0,e.font=u.string,St(n.footer,y),e.restore(),g+=v.width,{width:g,height:x}}function qy(n,t){const{y:e,height:r}=t;return e<r/2?"top":e>n.height-r/2?"bottom":"center"}function Xy(n,t,e,r){const{x:i,width:a}=r,s=e.caretSize+e.caretPadding;if(n==="left"&&i+a+s>t.width||n==="right"&&i-a-s<0)return!0}function Gy(n,t,e,r){const{x:i,width:a}=e,{width:s,chartArea:{left:o,right:l}}=n;let c="center";return r==="center"?c=i<=(o+l)/2?"left":"right":i<=a/2?c="left":i>=s-a/2&&(c="right"),Xy(c,n,t,e)&&(c="center"),c}function sd(n,t,e){const r=e.yAlign||t.yAlign||qy(n,e);return{xAlign:e.xAlign||t.xAlign||Gy(n,t,e,r),yAlign:r}}function Ky(n,t){let{x:e,width:r}=n;return t==="right"?e-=r:t==="center"&&(e-=r/2),e}function Qy(n,t,e){let{y:r,height:i}=n;return t==="top"?r+=e:t==="bottom"?r-=i+e:r-=i/2,r}function od(n,t,e,r){const{caretSize:i,caretPadding:a,cornerRadius:s}=n,{xAlign:o,yAlign:l}=e,c=i+a,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=fn(s);let v=Ky(t,o);const x=Qy(t,l,c);return l==="center"?o==="left"?v+=c:o==="right"&&(v-=c):o==="left"?v-=Math.max(u,f)+i:o==="right"&&(v+=Math.max(d,p)+i),{x:Qt(v,0,r.width-t.width),y:Qt(x,0,r.height-t.height)}}function Hi(n,t,e){const r=Gt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-r.right:n.x+r.left}function ld(n){return Ne([],Ge(n))}function Zy(n,t,e){return hn(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function cd(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const ud={beforeTitle:$e,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,r=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return e[t.dataIndex]}return""},afterTitle:$e,beforeBody:$e,beforeLabel:$e,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 e=n.formattedValue;return st(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:$e,afterBody:$e,beforeFooter:$e,footer:$e,afterFooter:$e};function he(n,t,e,r){const i=n[t].call(e,r);return typeof i>"u"?ud[t].call(e,r):i}class bs extends te{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,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._cachedAnimations;if(t)return t;const e=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&e.options.animation&&r.animations,a=new Ja(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Zy(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:r}=e,i=he(r,"beforeTitle",this,t),a=he(r,"title",this,t),s=he(r,"afterTitle",this,t);let o=[];return o=Ne(o,Ge(i)),o=Ne(o,Ge(a)),o=Ne(o,Ge(s)),o}getBeforeBody(t,e){return ld(he(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:r}=e,i=[];return St(t,a=>{const s={before:[],lines:[],after:[]},o=cd(r,a);Ne(s.before,Ge(he(o,"beforeLabel",this,a))),Ne(s.lines,he(o,"label",this,a)),Ne(s.after,Ge(he(o,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(t,e){return ld(he(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:r}=e,i=he(r,"beforeFooter",this,t),a=he(r,"footer",this,t),s=he(r,"afterFooter",this,t);let o=[];return o=Ne(o,Ge(i)),o=Ne(o,Ge(a)),o=Ne(o,Ge(s)),o}_createItems(t){const e=this._active,r=this.chart.data,i=[],a=[],s=[];let o=[],l,c;for(l=0,c=e.length;l<c;++l)o.push(Vy(this.chart,e[l]));return t.filter&&(o=o.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,r))),St(o,u=>{const d=cd(t.callbacks,u);i.push(he(d,"labelColor",this,u)),a.push(he(d,"labelPointStyle",this,u)),s.push(he(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,e){const r=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const o=jr[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=ad(this,r),c=Object.assign({},o,l),u=sd(this.chart,r,c),d=od(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,r,i){const a=this.getCaretPosition(t,r,i);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,r){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:o}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=fn(o),{x:f,y:p}=t,{width:v,height:x}=e;let g,m,b,y,_,T;return a==="center"?(_=p+x/2,i==="left"?(g=f,m=g-s,y=_+s,T=_-s):(g=f+v,m=g+s,y=_-s,T=_+s),b=g):(i==="left"?m=f+Math.max(l,u)+s:i==="right"?m=f+v-Math.max(c,d)-s:m=this.caretX,a==="top"?(y=p,_=y-s,g=m-s,b=m+s):(y=p+x,_=y+s,g=m+s,b=m-s),T=y),{x1:g,x2:m,x3:b,y1:y,y2:_,y3:T}}drawTitle(t,e,r){const i=this.title,a=i.length;let s,o,l;if(a){const c=rr(r.rtl,this.x,this.width);for(t.x=Hi(this,r.titleAlign,r),e.textAlign=c.textAlign(r.titleAlign),e.textBaseline="middle",s=Rt(r.titleFont),o=r.titleSpacing,e.fillStyle=r.titleColor,e.font=s.string,l=0;l<a;++l)e.fillText(i[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===a&&(t.y+=r.titleMarginBottom-o)}}_drawColorBox(t,e,r,i,a){const s=this.labelColors[r],o=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=a,u=Rt(a.bodyFont),d=Hi(this,"left",a),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,v=e.y+p;if(a.usePointStyle){const x={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},g=i.leftForLtr(f,c)+c/2,m=v+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Va(t,x,g,m),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Va(t,x,g,m)}else{t.lineWidth=lt(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const x=i.leftForLtr(f,c),g=i.leftForLtr(i.xPlus(f,1),c-2),m=fn(s.borderRadius);Object.values(m).some(b=>b!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,tr(t,{x,y:v,w:c,h:l,radius:m}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),tr(t,{x:g,y:v+1,w:c-2,h:l-2,radius:m}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(x,v,c,l),t.strokeRect(x,v,c,l),t.fillStyle=s.backgroundColor,t.fillRect(g,v+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,e,r){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=Rt(r.bodyFont);let f=d.lineHeight,p=0;const v=rr(r.rtl,this.x,this.width),x=function(S){e.fillText(S,v.x(t.x+p),t.y+f/2),t.y+=f+a},g=v.textAlign(s);let m,b,y,_,T,D,O;for(e.textAlign=s,e.textBaseline="middle",e.font=d.string,t.x=Hi(this,g,r),e.fillStyle=r.bodyColor,St(this.beforeBody,x),p=o&&g!=="right"?s==="center"?c/2+u:c+2+u:0,_=0,D=i.length;_<D;++_){for(m=i[_],b=this.labelTextColors[_],e.fillStyle=b,St(m.before,x),y=m.lines,o&&y.length&&(this._drawColorBox(e,t,_,v,r),f=Math.max(d.lineHeight,l)),T=0,O=y.length;T<O;++T)x(y[T]),f=d.lineHeight;St(m.after,x)}p=0,f=d.lineHeight,St(this.afterBody,x),t.y-=a}drawFooter(t,e,r){const i=this.footer,a=i.length;let s,o;if(a){const l=rr(r.rtl,this.x,this.width);for(t.x=Hi(this,r.footerAlign,r),t.y+=r.footerMarginTop,e.textAlign=l.textAlign(r.footerAlign),e.textBaseline="middle",s=Rt(r.footerFont),e.fillStyle=r.footerColor,e.font=s.string,o=0;o<a;++o)e.fillText(i[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,e,r,i){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:v}=fn(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(o+d,l),s==="top"&&this.drawCaret(t,e,r,i),e.lineTo(o+c-f,l),e.quadraticCurveTo(o+c,l,o+c,l+f),s==="center"&&a==="right"&&this.drawCaret(t,e,r,i),e.lineTo(o+c,l+u-v),e.quadraticCurveTo(o+c,l+u,o+c-v,l+u),s==="bottom"&&this.drawCaret(t,e,r,i),e.lineTo(o+p,l+u),e.quadraticCurveTo(o,l+u,o,l+u-p),s==="center"&&a==="left"&&this.drawCaret(t,e,r,i),e.lineTo(o,l+d),e.quadraticCurveTo(o,l,o+d,l),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const s=jr[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=ad(this,t),l=Object.assign({},s,this._size),c=sd(e,t,l),u=od(t,l,c,e);(i._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Gt(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,e),$c(t,e.textDirection),a.y+=s.top,this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),jc(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const r=this._active,i=t.map(({datasetIndex:o,index:l})=>{const c=this.chart.getDatasetMeta(o);if(!c)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:c.data[l],index:l}}),a=!mi(r,i),s=this._positionChanged(i,e);(a||s)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,r=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(t,a,e,r),o=this._positionChanged(s,t),l=e||!mi(s,a)||o;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return e.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const s=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:r,caretY:i,options:a}=this,s=jr[a.position].call(this,t,e);return s!==!1&&(r!==s.x||i!==s.y)}}H(bs,"positioners",jr);var $i={id:"tooltip",_element:bs,positioners:jr,afterInit(n,t,e){e&&(n.tooltip=new bs({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"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,boxPadding: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:ud},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"]},Jy=Object.freeze({__proto__:null,Colors:fy,Decimation:my,Filler:Ny,Legend:Yy,SubTitle:jy,Title:$y,Tooltip:$i});const tv=(n,t,e,r)=>(typeof t=="string"?(e=n.push(t)-1,r.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function ev(n,t,e,r){const i=n.indexOf(t);if(i===-1)return tv(n,t,e,r);const a=n.lastIndexOf(t);return i!==a?e:i}const nv=(n,t)=>n===null?null:Qt(Math.round(n),0,t);function dd(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class xs extends In{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const r=this.getLabels();for(const{index:i,label:a}of e)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(st(t))return null;const r=this.getLabels();return e=isFinite(e)&&r[e]===t?e:ev(r,t,rt(e,t),this._addedLabels),nv(e,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),e||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,e=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&e===a.length-1?a:a.slice(t,e+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=e;s++)i.push({value:s});return i}getLabelForValue(t){return dd.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}H(xs,"id","category"),H(xs,"defaults",{ticks:{callback:dd}});function rv(n,t){const e=[],{bounds:i,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=n,p=a||1,v=u-1,{min:x,max:g}=t,m=!st(s),b=!st(o),y=!st(c),_=(g-x)/(d+1);let T=gc((g-x)/v/p)*p,D,O,S,M;if(T<1e-14&&!m&&!b)return[{value:x},{value:g}];M=Math.ceil(g/T)-Math.floor(x/T),M>v&&(T=gc(M*T/v/p)*p),st(l)||(D=Math.pow(10,l),T=Math.ceil(T*D)/D),i==="ticks"?(O=Math.floor(x/T)*T,S=Math.ceil(g/T)*T):(O=x,S=g),m&&b&&a&&tg((o-s)/a,T/1e3)?(M=Math.round(Math.min((o-s)/T,u)),T=(o-s)/M,O=s,S=o):y?(O=m?s:O,S=b?o:S,M=c-1,T=(S-O)/M):(M=(S-O)/T,Mr(M,Math.round(M),T/1e3)?M=Math.round(M):M=Math.ceil(M));const k=Math.max(yc(T),yc(O));D=Math.pow(10,st(l)?k:l),O=Math.round(O*D)/D,S=Math.round(S*D)/D;let P=0;for(m&&(f&&O!==s?(e.push({value:s}),O<s&&P++,Mr(Math.round((O+P*T)*D)/D,s,fd(s,_,n))&&P++):O<s&&P++);P<M;++P){const E=Math.round((O+P*T)*D)/D;if(b&&E>o)break;e.push({value:E})}return b&&f&&S!==o?e.length&&Mr(e[e.length-1].value,o,fd(o,_,n))?e[e.length-1].value=o:e.push({value:o}):(!b||S===o)&&e.push({value:S}),e}function fd(n,t,{horizontal:e,minRotation:r}){const i=Xt(r),a=(e?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+n).length;return Math.min(t/a,s)}class ji extends In{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,e){return st(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const s=l=>i=e?i:l,o=l=>a=r?a:l;if(t){const l=Le(i),c=Le(a);l<0&&c<0?o(0):l>0&&c>0&&s(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),e=e||11),e&&(i=Math.min(e,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},a=this._range||this,s=rv(i,a);return t.bounds==="ticks"&&mc(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-e)/Math.max(t.length-1,1)/2;e-=i,r+=i}this._startValue=e,this._endValue=r,this._valueRange=r-e}getLabelForValue(t){return kr(t,this.chart.options.locale,this.options.ticks.format)}}class _s extends ji{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=It(t)?t:0,this.max=It(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,r=Xt(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}H(_s,"id","linear"),H(_s,"defaults",{ticks:{callback:wi.formatters.numeric}});const Vr=n=>Math.floor(un(n)),Nn=(n,t)=>Math.pow(10,Vr(n)+t);function hd(n){return n/Math.pow(10,Vr(n))===1}function pd(n,t,e){const r=Math.pow(10,e),i=Math.floor(n/r);return Math.ceil(t/r)-i}function iv(n,t){const e=t-n;let r=Vr(e);for(;pd(n,t,r)>10;)r++;for(;pd(n,t,r)<10;)r--;return Math.min(r,Vr(n))}function av(n,{min:t,max:e}){t=be(n.min,t);const r=[],i=Vr(t);let a=iv(t,e),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=i>a?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((c-u)/Math.pow(10,a)),f=be(n.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;f<e;)r.push({value:f,major:hd(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),f=Math.round((l+u+d*Math.pow(10,a))*s)/s;const p=be(n.max,f);return r.push({value:p,major:hd(p),significand:d}),r}class ws extends In{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const r=ji.prototype.parse.apply(this,[t,e]);if(r===0){this._zero=!0;return}return It(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=It(t)?Math.max(0,t):null,this.max=It(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!It(this._userMin)&&(this.min=t===Nn(this.min,0)?Nn(this.min,-1):Nn(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let r=this.min,i=this.max;const a=o=>r=t?r:o,s=o=>i=e?i:o;r===i&&(r<=0?(a(1),s(10)):(a(Nn(r,-1)),s(Nn(i,1)))),r<=0&&a(Nn(i,-1)),i<=0&&s(Nn(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},r=av(e,this);return t.bounds==="ticks"&&mc(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":kr(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=un(t),this._valueRange=un(this.max)-un(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(un(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}H(ws,"id","logarithmic"),H(ws,"defaults",{ticks:{callback:wi.formatters.logarithmic,major:{enabled:!0}}});function Ts(n){const t=n.ticks;if(t.display&&n.display){const e=Gt(t.backdropPadding);return rt(t.font&&t.font.size,Ut.font.size)+e.height}return 0}function sv(n,t,e){return e=mt(e)?e:[e],{w:yg(n,t.string,e),h:e.length*t.lineHeight}}function gd(n,t,e,r,i){return n===r||n===i?{start:t-e/2,end:t+e/2}:n<r||n>i?{start:t-e,end:t}:{start:t,end:t+e}}function ov(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),r=[],i=[],a=n._pointLabels.length,s=n.options.pointLabels,o=s.centerPointLabels?dt/a:0;for(let l=0;l<a;l++){const c=s.setContext(n.getPointLabelContext(l));i[l]=c.padding;const u=n.getPointPosition(l,n.drawingArea+i[l],o),d=Rt(c.font),f=sv(n.ctx,d,n._pointLabels[l]);r[l]=f;const p=xe(n.getIndexAngle(l)+o),v=Math.round(xi(p)),x=gd(v,u.x,f.w,0,180),g=gd(v,u.y,f.h,90,270);lv(e,t,p,x,g)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=dv(n,r,i)}function lv(n,t,e,r,i){const a=Math.abs(Math.sin(e)),s=Math.abs(Math.cos(e));let o=0,l=0;r.start<t.l?(o=(t.l-r.start)/a,n.l=Math.min(n.l,t.l-o)):r.end>t.r&&(o=(r.end-t.r)/a,n.r=Math.max(n.r,t.r+o)),i.start<t.t?(l=(t.t-i.start)/s,n.t=Math.min(n.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/s,n.b=Math.max(n.b,t.b+l))}function cv(n,t,e){const r=n.drawingArea,{extra:i,additionalAngle:a,padding:s,size:o}=e,l=n.getPointPosition(t,r+i+s,a),c=Math.round(xi(xe(l.angle+Et))),u=pv(l.y,o.h,c),d=fv(c),f=hv(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+o.w,bottom:u+o.h}}function uv(n,t){if(!t)return!0;const{left:e,top:r,right:i,bottom:a}=n;return!(qe({x:e,y:r},t)||qe({x:e,y:a},t)||qe({x:i,y:r},t)||qe({x:i,y:a},t))}function dv(n,t,e){const r=[],i=n._pointLabels.length,a=n.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:Ts(a)/2,additionalAngle:s?dt/i:0};let c;for(let u=0;u<i;u++){l.padding=e[u],l.size=t[u];const d=cv(n,u,l);r.push(d),o==="auto"&&(d.visible=uv(d,c),d.visible&&(c=d))}return r}function fv(n){return n===0||n===180?"center":n<180?"left":"right"}function hv(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function pv(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function gv(n,t,e){const{left:r,top:i,right:a,bottom:s}=e,{backdropColor:o}=t;if(!st(o)){const l=fn(t.borderRadius),c=Gt(t.backdropPadding);n.fillStyle=o;const u=r-c.left,d=i-c.top,f=a-r+c.width,p=s-i+c.height;Object.values(l).some(v=>v!==0)?(n.beginPath(),tr(n,{x:u,y:d,w:f,h:p,radius:l}),n.fill()):n.fillRect(u,d,f,p)}}function mv(n,t){const{ctx:e,options:{pointLabels:r}}=n;for(let i=t-1;i>=0;i--){const a=n._pointLabelItems[i];if(!a.visible)continue;const s=r.setContext(n.getPointLabelContext(i));gv(e,s,a);const o=Rt(s.font),{x:l,y:c,textAlign:u}=a;En(e,n._pointLabels[i],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function md(n,t,e,r){const{ctx:i}=n;if(e)i.arc(n.xCenter,n.yCenter,t,0,kt);else{let a=n.getPointPosition(0,t);i.moveTo(a.x,a.y);for(let s=1;s<r;s++)a=n.getPointPosition(s,t),i.lineTo(a.x,a.y)}}function yv(n,t,e,r,i){const a=n.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!r||!o||!l||e<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(i.dash),a.lineDashOffset=i.dashOffset,a.beginPath(),md(n,e,s,r),a.closePath(),a.stroke(),a.restore())}function vv(n,t,e){return hn(n,{label:e,index:t,type:"pointLabel"})}class qr extends ji{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Gt(Ts(this.options)/2),e=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(e,r)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=It(t)&&!isNaN(t)?t:0,this.max=It(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ts(this.options))}generateTickLabels(t){ji.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,r)=>{const i=Tt(this.options.pointLabels.callback,[e,r],this);return i||i===0?i:""}).filter((e,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?ov(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,r,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,r,i))}getIndexAngle(t){const e=kt/(this._pointLabels.length||1),r=this.options.startAngle||0;return xe(t*e+Xt(r))}getDistanceFromCenterForValue(t){if(st(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(st(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const r=e[t];return vv(this.getContext(),t,r)}}getPointPosition(t,e,r=0){const i=this.getIndexAngle(t)-Et+r;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:r,right:i,bottom:a}=this._pointLabelItems[t];return{left:e,top:r,right:i,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),md(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:r,grid:i,border:a}=e,s=this._pointLabels.length;let o,l,c;if(e.pointLabels.display&&mv(this,s),i.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),p=i.setContext(f),v=a.setContext(f);yv(this,p,l,s,v)}}),r.display){for(t.save(),o=s-1;o>=0;o--){const u=r.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,r=e.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;const c=r.setContext(this.getContext(l)),u=Rt(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const d=Gt(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}En(t,o.label,0,-a,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}H(qr,"id","radialLinear"),H(qr,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:wi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),H(qr,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),H(qr,"descriptors",{angleLines:{_fallback:"grid"}});const Vi={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}},pe=Object.keys(Vi);function yd(n,t){return n-t}function vd(n,t){if(st(t))return null;const e=n._adapter,{parser:r,round:i,isoWeekday:a}=n._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),It(s)||(s=typeof r=="string"?e.parse(s,r):e.parse(s)),s===null?null:(i&&(s=i==="week"&&(dn(a)||a===!0)?e.startOf(s,"isoWeek",a):e.startOf(s,i)),+s)}function bd(n,t,e,r){const i=pe.length;for(let a=pe.indexOf(n);a<i-1;++a){const s=Vi[pe[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((e-t)/(o*s.size))<=r)return pe[a]}return pe[i-1]}function bv(n,t,e,r,i){for(let a=pe.length-1;a>=pe.indexOf(e);a--){const s=pe[a];if(Vi[s].common&&n._adapter.diff(i,r,s)>=t-1)return s}return pe[e?pe.indexOf(e):0]}function xv(n){for(let t=pe.indexOf(n)+1,e=pe.length;t<e;++t)if(Vi[pe[t]].common)return pe[t]}function xd(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:r,hi:i}=Wa(e,t),a=e[r]>=t?e[r]:e[i];n[a]=!0}}function _v(n,t,e,r){const i=n._adapter,a=+i.startOf(t[0].value,r),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+i.add(o,1,r))l=e[o],l>=0&&(t[l].major=!0);return t}function _d(n,t,e){const r=[],i={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],i[o]=s,r.push({value:o,major:!1});return a===0||!e?r:_v(n,r,i,e)}class Xr extends In{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const r=t.time||(t.time={}),i=this._adapter=new uu._date(t.adapters.date);i.init(e),Sr(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:vd(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!o&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=It(i)&&!isNaN(i)?i:+e.startOf(Date.now(),r),a=It(a)&&!isNaN(a)?a:+e.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],r=t[t.length-1]),{min:e,max:r}}buildTicks(){const t=this.options,e=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,s=this.max,o=ig(i,a,s);return this._unit=e.unit||(r.autoSkip?bd(e.minUnit,this.min,this.max,this._getLabelCapacity(a)):bv(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:xv(this._unit),this.initOffsets(i),t.reverse&&o.reverse(),_d(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?e=1-i:e=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;e=Qt(e,0,s),r=Qt(r,0,s),this._offsets={start:e,end:r,factor:1/(e+1+r)}}_generate(){const t=this._adapter,e=this.min,r=this.max,i=this.options,a=i.time,s=a.unit||bd(a.minUnit,e,r,this._getLabelCapacity(e)),o=rt(i.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=dn(l)||l===!0,u={};let d=e,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,e,s)>1e5*o)throw new Error(e+" and "+r+" are too far apart with stepSize of "+o+" "+s);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,o,s),p++)xd(u,f,v);return(f===r||i.bounds==="ticks"||p===1)&&xd(u,f,v),Object.keys(u).sort(yd).map(x=>+x)}getLabelForValue(t){const e=this._adapter,r=this.options.time;return r.tooltipFormat?e.format(t,r.tooltipFormat):e.format(t,r.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,a=this._unit,s=e||i[a];return this._adapter.format(t,s)}_tickFormatFunction(t,e,r,i){const a=this.options,s=a.ticks.callback;if(s)return Tt(s,[t,e,r],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],f=r[e],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let e,r,i;for(e=0,r=t.length;e<r;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+r)*e.factor)}getValueForPixel(t){const e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,r=this.ctx.measureText(t).width,i=Xt(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),s=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:r*a+o*s,h:r*s+o*a}}_getLabelCapacity(t){const e=this.options.time,r=e.displayFormats,i=r[e.unit]||r.millisecond,a=this._tickFormatFunction(t,0,_d(this,[t],this._majorUnit),i),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],e,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(e=0,r=i.length;e<r;++e)t=t.concat(i[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,r;if(t.length)return t;const i=this.getLabels();for(e=0,r=i.length;e<r;++e)t.push(vd(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return _c(t.sort(yd))}}H(Xr,"id","time"),H(Xr,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function qi(n,t,e){let r=0,i=n.length-1,a,s,o,l;e?(t>=n[r].pos&&t<=n[i].pos&&({lo:r,hi:i}=Ve(n,"pos",t)),{pos:a,time:o}=n[r],{pos:s,time:l}=n[i]):(t>=n[r].time&&t<=n[i].time&&({lo:r,hi:i}=Ve(n,"time",t)),{time:a,pos:o}=n[r],{time:s,pos:l}=n[i]);const c=s-a;return c?o+(l-o)*(t-a)/c:o}class Ss extends Xr{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=qi(e,this.min),this._tableRange=qi(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:r}=this,i=[],a=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=e&&c<=r&&i.push(c);if(i.length<2)return[{time:e,pos:0},{time:r,pos:1}];for(s=0,o=i.length;s<o;++s)u=i[s+1],l=i[s-1],c=i[s],Math.round((u+l)/2)!==c&&a.push({time:c,pos:s/(o-1)});return a}_generate(){const t=this.min,e=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(e)||r.length===1)&&r.push(e),r.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),r=this.getLabelTimestamps();return e.length&&r.length?t=this.normalize(e.concat(r)):t=e.length?e:r,t=this._cache.all=t,t}getDecimalForValue(t){return(qi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return qi(this._table,r*this._tableRange+this._minPos,!0)}}H(Ss,"id","timeseries"),H(Ss,"defaults",Xr.defaults);var wv=Object.freeze({__proto__:null,CategoryScale:xs,LinearScale:_s,LogarithmicScale:ws,RadialLinearScale:qr,TimeScale:Xr,TimeSeriesScale:Ss});const Tv=[Rm,sy,Jy,wv],Sv=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Mv=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Cv=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Dv=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],wd=(n,t,e)=>{let r=n;return typeof t=="string"||Array.isArray(t)?r=n.toLocaleString(t,e):(t===!0||e!==void 0)&&(r=n.toLocaleString(void 0,e)),r};function Ms(n,t){if(!Number.isFinite(n))throw new TypeError(`Expected a finite number, got ${typeof n}: ${n}`);t={bits:!1,binary:!1,space:!0,...t};const e=t.bits?t.binary?Dv:Cv:t.binary?Mv:Sv,r=t.space?" ":"";if(t.signed&&n===0)return` 0${r}${e[0]}`;const i=n<0,a=i?"-":t.signed?"+":"";i&&(n=-n);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),n<1){const u=wd(n,t.locale,s);return a+u+r+e[0]}const o=Math.min(Math.floor(t.binary?Math.log(n)/Math.log(1024):Math.log10(n)/3),e.length-1);n/=(t.binary?1024:1e3)**o,s||(n=n.toPrecision(3));const l=wd(Number(n),t.locale,s),c=e[o];return a+l+r+c}function Ke(n){"@babel/helpers - typeof";return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(n)}function At(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function J(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function nt(n){J(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||Ke(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Td(n,t){J(2,arguments);var e=nt(n),r=At(t);return isNaN(r)?new Date(NaN):(r&&e.setDate(e.getDate()+r),e)}function Cs(n,t){J(2,arguments);var e=nt(n),r=At(t);if(isNaN(r))return new Date(NaN);if(!r)return e;var i=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+r+1,0);var s=a.getDate();return i>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),i),e)}function Gr(n,t){J(2,arguments);var e=nt(n).getTime(),r=At(t);return new Date(e+r)}var kv=36e5;function Ov(n,t){J(2,arguments);var e=At(t);return Gr(n,e*kv)}var Pv={};function vn(){return Pv}function Sd(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=vn(),d=At((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getDay(),v=(p<d?7:0)+p-d;return f.setDate(f.getDate()-v),f.setHours(0,0,0,0),f}function Xi(n){var t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),n.getTime()-t.getTime()}function Ds(n){J(1,arguments);var t=nt(n);return t.setHours(0,0,0,0),t}var Ev=864e5;function Rv(n,t){J(2,arguments);var e=Ds(n),r=Ds(t),i=e.getTime()-Xi(e),a=r.getTime()-Xi(r);return Math.round((i-a)/Ev)}var Av=6e4;function Lv(n,t){J(2,arguments);var e=At(t);return Gr(n,e*Av)}function Iv(n,t){J(2,arguments);var e=At(t),r=e*3;return Cs(n,r)}function Nv(n,t){J(2,arguments);var e=At(t);return Gr(n,e*1e3)}function Fv(n,t){J(2,arguments);var e=At(t),r=e*7;return Td(n,r)}function Uv(n,t){J(2,arguments);var e=At(t);return Cs(n,e*12)}function Kr(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=e.getTime()-r.getTime();return i<0?-1:i>0?1:i}var Gi=6e4,Qr=36e5,Bv=1e3;function Wv(n){return J(1,arguments),n instanceof Date||Ke(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ks(n){if(J(1,arguments),!Wv(n)&&typeof n!="number")return!1;var t=nt(n);return!isNaN(Number(t))}function zv(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=e.getFullYear()-r.getFullYear(),a=e.getMonth()-r.getMonth();return i*12+a}function Yv(n,t){J(2,arguments);var e=nt(n),r=nt(t);return e.getFullYear()-r.getFullYear()}function Md(n,t){var e=n.getFullYear()-t.getFullYear()||n.getMonth()-t.getMonth()||n.getDate()-t.getDate()||n.getHours()-t.getHours()||n.getMinutes()-t.getMinutes()||n.getSeconds()-t.getSeconds()||n.getMilliseconds()-t.getMilliseconds();return e<0?-1:e>0?1:e}function Cd(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=Md(e,r),a=Math.abs(Rv(e,r));e.setDate(e.getDate()-i*a);var s=+(Md(e,r)===-i),o=i*(a-s);return o===0?0:o}function Ki(n,t){return J(2,arguments),nt(n).getTime()-nt(t).getTime()}var Dd={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Hv="trunc";function Zr(n){return n?Dd[n]:Dd[Hv]}function $v(n,t,e){J(2,arguments);var r=Ki(n,t)/Qr;return Zr(e==null?void 0:e.roundingMethod)(r)}function jv(n,t,e){J(2,arguments);var r=Ki(n,t)/Gi;return Zr(e==null?void 0:e.roundingMethod)(r)}function kd(n){J(1,arguments);var t=nt(n);return t.setHours(23,59,59,999),t}function Od(n){J(1,arguments);var t=nt(n),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Vv(n){J(1,arguments);var t=nt(n);return kd(t).getTime()===Od(t).getTime()}function Pd(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=Kr(e,r),a=Math.abs(zv(e,r)),s;if(a<1)s=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-i*a);var o=Kr(e,r)===-i;Vv(nt(n))&&a===1&&Kr(n,r)===1&&(o=!1),s=i*(a-Number(o))}return s===0?0:s}function qv(n,t,e){J(2,arguments);var r=Pd(n,t)/3;return Zr(e==null?void 0:e.roundingMethod)(r)}function Xv(n,t,e){J(2,arguments);var r=Ki(n,t)/1e3;return Zr(e==null?void 0:e.roundingMethod)(r)}function Gv(n,t,e){J(2,arguments);var r=Cd(n,t)/7;return Zr(e==null?void 0:e.roundingMethod)(r)}function Kv(n,t){J(2,arguments);var e=nt(n),r=nt(t),i=Kr(e,r),a=Math.abs(Yv(e,r));e.setFullYear(1584),r.setFullYear(1584);var s=Kr(e,r)===-i,o=i*(a-Number(s));return o===0?0:o}function Qv(n){J(1,arguments);var t=nt(n);return t.setSeconds(0,0),t}function Zv(n){J(1,arguments);var t=nt(n),e=t.getMonth(),r=e-e%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Jv(n){J(1,arguments);var t=nt(n);return t.setDate(1),t.setHours(0,0,0,0),t}function tb(n){J(1,arguments);var t=nt(n),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function eb(n){J(1,arguments);var t=nt(n),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}function nb(n){J(1,arguments);var t=nt(n);return t.setMinutes(59,59,999),t}function rb(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=vn(),d=At((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getDay(),v=(p<d?-7:0)+6-(p-d);return f.setDate(f.getDate()+v),f.setHours(23,59,59,999),f}function ib(n){J(1,arguments);var t=nt(n);return t.setSeconds(59,999),t}function ab(n){J(1,arguments);var t=nt(n),e=t.getMonth(),r=e-e%3+3;return t.setMonth(r,0),t.setHours(23,59,59,999),t}function sb(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(999),t}function Ed(n,t){J(2,arguments);var e=At(t);return Gr(n,-e)}var ob=864e5;function lb(n){J(1,arguments);var t=nt(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=e-r;return Math.floor(i/ob)+1}function ar(n){J(1,arguments);var t=1,e=nt(n),r=e.getUTCDay(),i=(r<t?7:0)+r-t;return e.setUTCDate(e.getUTCDate()-i),e.setUTCHours(0,0,0,0),e}function Rd(n){J(1,arguments);var t=nt(n),e=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(e+1,0,4),r.setUTCHours(0,0,0,0);var i=ar(r),a=new Date(0);a.setUTCFullYear(e,0,4),a.setUTCHours(0,0,0,0);var s=ar(a);return t.getTime()>=i.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function cb(n){J(1,arguments);var t=Rd(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var r=ar(e);return r}var ub=6048e5;function Ad(n){J(1,arguments);var t=nt(n),e=ar(t).getTime()-cb(t).getTime();return Math.round(e/ub)+1}function Fn(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=vn(),d=At((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=nt(n),p=f.getUTCDay(),v=(p<d?7:0)+p-d;return f.setUTCDate(f.getUTCDate()-v),f.setUTCHours(0,0,0,0),f}function Os(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=nt(n),d=u.getUTCFullYear(),f=vn(),p=At((e=(r=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(d+1,0,p),v.setUTCHours(0,0,0,0);var x=Fn(v,t),g=new Date(0);g.setUTCFullYear(d,0,p),g.setUTCHours(0,0,0,0);var m=Fn(g,t);return u.getTime()>=x.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function db(n,t){var e,r,i,a,s,o,l,c;J(1,arguments);var u=vn(),d=At((e=(r=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&e!==void 0?e:1),f=Os(n,t),p=new Date(0);p.setUTCFullYear(f,0,d),p.setUTCHours(0,0,0,0);var v=Fn(p,t);return v}var fb=6048e5;function Ld(n,t){J(1,arguments);var e=nt(n),r=Fn(e,t).getTime()-db(e,t).getTime();return Math.round(r/fb)+1}function Mt(n,t){for(var e=n<0?"-":"",r=Math.abs(n).toString();r.length<t;)r="0"+r;return e+r}var hb={y:function(t,e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return Mt(e==="yy"?i%100:i,e.length)},M:function(t,e){var r=t.getUTCMonth();return e==="M"?String(r+1):Mt(r+1,2)},d:function(t,e){return Mt(t.getUTCDate(),e.length)},a:function(t,e){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,e){return Mt(t.getUTCHours()%12||12,e.length)},H:function(t,e){return Mt(t.getUTCHours(),e.length)},m:function(t,e){return Mt(t.getUTCMinutes(),e.length)},s:function(t,e){return Mt(t.getUTCSeconds(),e.length)},S:function(t,e){var r=e.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,r-3));return Mt(a,e.length)}};const bn=hb;var sr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pb={G:function(t,e,r){var i=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,e,r){if(e==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return r.ordinalNumber(a,{unit:"year"})}return bn.y(t,e)},Y:function(t,e,r,i){var a=Os(t,i),s=a>0?a:1-a;if(e==="YY"){var o=s%100;return Mt(o,2)}return e==="Yo"?r.ordinalNumber(s,{unit:"year"}):Mt(s,e.length)},R:function(t,e){var r=Rd(t);return Mt(r,e.length)},u:function(t,e){var r=t.getUTCFullYear();return Mt(r,e.length)},Q:function(t,e,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return Mt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return Mt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,r){var i=t.getUTCMonth();switch(e){case"M":case"MM":return bn.M(t,e);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,r){var i=t.getUTCMonth();switch(e){case"L":return String(i+1);case"LL":return Mt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,r,i){var a=Ld(t,i);return e==="wo"?r.ordinalNumber(a,{unit:"week"}):Mt(a,e.length)},I:function(t,e,r){var i=Ad(t);return e==="Io"?r.ordinalNumber(i,{unit:"week"}):Mt(i,e.length)},d:function(t,e,r){return e==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):bn.d(t,e)},D:function(t,e,r){var i=lb(t);return e==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):Mt(i,e.length)},E:function(t,e,r){var i=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,r,i){var a=t.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Mt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,r,i){var a=t.getUTCDay(),s=(a-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Mt(s,e.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,r){var i=t.getUTCDay(),a=i===0?7:i;switch(e){case"i":return String(a);case"ii":return Mt(a,e.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,r){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,r){var i=t.getUTCHours(),a;switch(i===12?a=sr.noon:i===0?a=sr.midnight:a=i/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,r){var i=t.getUTCHours(),a;switch(i>=17?a=sr.evening:i>=12?a=sr.afternoon:i>=4?a=sr.morning:a=sr.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,r){if(e==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return bn.h(t,e)},H:function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):bn.H(t,e)},K:function(t,e,r){var i=t.getUTCHours()%12;return e==="Ko"?r.ordinalNumber(i,{unit:"hour"}):Mt(i,e.length)},k:function(t,e,r){var i=t.getUTCHours();return i===0&&(i=24),e==="ko"?r.ordinalNumber(i,{unit:"hour"}):Mt(i,e.length)},m:function(t,e,r){return e==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):bn.m(t,e)},s:function(t,e,r){return e==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):bn.s(t,e)},S:function(t,e){return bn.S(t,e)},X:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return Nd(s);case"XXXX":case"XX":return Un(s);case"XXXXX":case"XXX":default:return Un(s,":")}},x:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(e){case"x":return Nd(s);case"xxxx":case"xx":return Un(s);case"xxxxx":case"xxx":default:return Un(s,":")}},O:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Id(s,":");case"OOOO":default:return"GMT"+Un(s,":")}},z:function(t,e,r,i){var a=i._originalDate||t,s=a.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Id(s,":");case"zzzz":default:return"GMT"+Un(s,":")}},t:function(t,e,r,i){var a=i._originalDate||t,s=Math.floor(a.getTime()/1e3);return Mt(s,e.length)},T:function(t,e,r,i){var a=i._originalDate||t,s=a.getTime();return Mt(s,e.length)}};function Id(n,t){var e=n>0?"-":"+",r=Math.abs(n),i=Math.floor(r/60),a=r%60;if(a===0)return e+String(i);var s=t||"";return e+String(i)+s+Mt(a,2)}function Nd(n,t){if(n%60===0){var e=n>0?"-":"+";return e+Mt(Math.abs(n)/60,2)}return Un(n,t)}function Un(n,t){var e=t||"",r=n>0?"-":"+",i=Math.abs(n),a=Mt(Math.floor(i/60),2),s=Mt(i%60,2);return r+a+e+s}var Fd=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Ud=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},gb=function(t,e){var r=t.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return Fd(t,e);var s;switch(i){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Fd(i,e)).replace("{{time}}",Ud(a,e))},Ps={p:Ud,P:gb},mb=["D","DD"],yb=["YY","YYYY"];function Bd(n){return mb.indexOf(n)!==-1}function Wd(n){return yb.indexOf(n)!==-1}function Qi(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bb=function(t,e,r){var i,a=vb[t];return typeof a=="string"?i=a:e===1?i=a.one:i=a.other.replace("{{count}}",e.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const xb=bb;function Es(n){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.width?String(t.width):n.defaultWidth,r=n.formats[e]||n.formats[n.defaultWidth];return r}}var _b={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Sb={date:Es({formats:_b,defaultWidth:"full"}),time:Es({formats:wb,defaultWidth:"full"}),dateTime:Es({formats:Tb,defaultWidth:"full"})};const Mb=Sb;var Cb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Db=function(t,e,r,i){return Cb[t]};const kb=Db;function Jr(n){return function(t,e){var r=e!=null&&e.context?String(e.context):"standalone",i;if(r==="formatting"&&n.formattingValues){var a=n.defaultFormattingWidth||n.defaultWidth,s=e!=null&&e.width?String(e.width):a;i=n.formattingValues[s]||n.formattingValues[a]}else{var o=n.defaultWidth,l=e!=null&&e.width?String(e.width):n.defaultWidth;i=n.values[l]||n.values[o]}var c=n.argumentCallback?n.argumentCallback(t):t;return i[c]}}var Ob={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Eb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Rb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ab={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Lb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ib=function(t,e){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Nb={ordinalNumber:Ib,era:Jr({values:Ob,defaultWidth:"wide"}),quarter:Jr({values:Pb,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Jr({values:Eb,defaultWidth:"wide"}),day:Jr({values:Rb,defaultWidth:"wide"}),dayPeriod:Jr({values:Ab,defaultWidth:"wide",formattingValues:Lb,defaultFormattingWidth:"wide"})};const Fb=Nb;function ti(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.width,i=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],a=t.match(i);if(!a)return null;var s=a[0],o=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(o)?Bb(o,function(d){return d.test(s)}):Ub(o,function(d){return d.test(s)}),c;c=n.valueCallback?n.valueCallback(l):l,c=e.valueCallback?e.valueCallback(c):c;var u=t.slice(s.length);return{value:c,rest:u}}}function Ub(n,t){for(var e in n)if(n.hasOwnProperty(e)&&t(n[e]))return e}function Bb(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e}function Wb(n){return function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(n.matchPattern);if(!r)return null;var i=r[0],a=t.match(n.parsePattern);if(!a)return null;var s=n.valueCallback?n.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;var o=t.slice(i.length);return{value:s,rest:o}}}var zb=/^(\d+)(th|st|nd|rd)?/i,Yb=/\d+/i,Hb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},$b={any:[/^b/i,/^(a|c)/i]},jb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vb={any:[/1/i,/2/i,/3/i,/4/i]},qb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Xb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Kb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Qb={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Zb={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Jb={ordinalNumber:Wb({matchPattern:zb,parsePattern:Yb,valueCallback:function(t){return parseInt(t,10)}}),era:ti({matchPatterns:Hb,defaultMatchWidth:"wide",parsePatterns:$b,defaultParseWidth:"any"}),quarter:ti({matchPatterns:jb,defaultMatchWidth:"wide",parsePatterns:Vb,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ti({matchPatterns:qb,defaultMatchWidth:"wide",parsePatterns:Xb,defaultParseWidth:"any"}),day:ti({matchPatterns:Gb,defaultMatchWidth:"wide",parsePatterns:Kb,defaultParseWidth:"any"}),dayPeriod:ti({matchPatterns:Qb,defaultMatchWidth:"any",parsePatterns:Zb,defaultParseWidth:"any"})},tx={code:"en-US",formatDistance:xb,formatLong:Mb,formatRelative:kb,localize:Fb,match:Jb,options:{weekStartsOn:0,firstWeekContainsDate:1}};const zd=tx;var ex=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rx=/^'([^]*?)'?$/,ix=/''/g,ax=/[a-zA-Z]/;function sx(n,t,e){var r,i,a,s,o,l,c,u,d,f,p,v,x,g,m,b,y,_;J(2,arguments);var T=String(t),D=vn(),O=(r=(i=e==null?void 0:e.locale)!==null&&i!==void 0?i:D.locale)!==null&&r!==void 0?r:zd,S=At((a=(s=(o=(l=e==null?void 0:e.firstWeekContainsDate)!==null&&l!==void 0?l:e==null||(c=e.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:D.firstWeekContainsDate)!==null&&s!==void 0?s:(d=D.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=At((p=(v=(x=(g=e==null?void 0:e.weekStartsOn)!==null&&g!==void 0?g:e==null||(m=e.locale)===null||m===void 0||(b=m.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&x!==void 0?x:D.weekStartsOn)!==null&&v!==void 0?v:(y=D.locale)===null||y===void 0||(_=y.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&p!==void 0?p:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var k=nt(n);if(!ks(k))throw new RangeError("Invalid time value");var P=Xi(k),E=Ed(k,P),F={firstWeekContainsDate:S,weekStartsOn:M,locale:O,_originalDate:k},q=T.match(nx).map(function($){var Y=$[0];if(Y==="p"||Y==="P"){var I=Ps[Y];return I($,O.formatLong)}return $}).join("").match(ex).map(function($){if($==="''")return"'";var Y=$[0];if(Y==="'")return ox($);var I=pb[Y];if(I)return!(e!=null&&e.useAdditionalWeekYearTokens)&&Wd($)&&Qi($,t,String(n)),!(e!=null&&e.useAdditionalDayOfYearTokens)&&Bd($)&&Qi($,t,String(n)),I(E,$,O.localize,F);if(Y.match(ax))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return $}).join("");return q}function ox(n){var t=n.match(rx);return t?t[1].replace(ix,"'"):n}function lx(n,t){if(n==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function Yd(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function cx(n,t){if(n){if(typeof n=="string")return Yd(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Yd(n,t)}}function Hd(n,t){var e=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=cx(n))||t&&n&&typeof n.length=="number"){e&&(n=e);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
19
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){e=e.call(n)},n:function(){var c=e.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(s)throw o}}}}function G(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Rs(n,t){return Rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Rs(n,t)}function pt(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&Rs(n,t)}function Zi(n){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zi(n)}function ux(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dx(n,t){if(t&&(Ke(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G(n)}function gt(n){var t=ux();return function(){var r=Zi(n),i;if(t){var a=Zi(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return dx(this,i)}}function ft(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function fx(n,t){if(Ke(n)!=="object"||n===null)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var r=e.call(n,t||"default");if(Ke(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function $d(n){var t=fx(n,"string");return Ke(t)==="symbol"?t:String(t)}function jd(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,$d(r.key),r)}}function ht(n,t,e){return t&&jd(n.prototype,t),e&&jd(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function V(n,t,e){return t=$d(t),t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var hx=10,Vd=function(){function n(){ft(this,n),V(this,"priority",void 0),V(this,"subPriority",0)}return ht(n,[{key:"validate",value:function(e,r){return!0}}]),n}(),px=function(n){pt(e,n);var t=gt(e);function e(r,i,a,s,o){var l;return ft(this,e),l=t.call(this),l.value=r,l.validateValue=i,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return ht(e,[{key:"validate",value:function(i,a){return this.validateValue(i,this.value,a)}},{key:"set",value:function(i,a,s){return this.setValue(i,a,this.value,s)}}]),e}(Vd),gx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",hx),V(G(r),"subPriority",-1),r}return ht(e,[{key:"set",value:function(i,a){if(a.timestampIsSet)return i;var s=new Date(0);return s.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),s.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),s}}]),e}(Vd),xt=function(){function n(){ft(this,n),V(this,"incompatibleTokens",void 0),V(this,"priority",void 0),V(this,"subPriority",void 0)}return ht(n,[{key:"run",value:function(e,r,i,a){var s=this.parse(e,r,i,a);return s?{setter:new px(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(e,r,i){return!0}}]),n}(),mx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",140),V(G(r),"incompatibleTokens",["R","u","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"G":case"GG":case"GGG":return s.era(i,{width:"abbreviated"})||s.era(i,{width:"narrow"});case"GGGGG":return s.era(i,{width:"narrow"});case"GGGG":default:return s.era(i,{width:"wide"})||s.era(i,{width:"abbreviated"})||s.era(i,{width:"narrow"})}}},{key:"set",value:function(i,a,s){return a.era=s,i.setUTCFullYear(s,0,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Vt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fe={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function qt(n,t){return n&&{value:t(n.value),rest:n.rest}}function Bt(n,t){var e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Ue(n,t){var e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};var r=e[1]==="+"?1:-1,i=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:r*(i*Qr+a*Gi+s*Bv),rest:t.slice(e[0].length)}}function qd(n){return Bt(Vt.anyDigitsSigned,n)}function jt(n,t){switch(n){case 1:return Bt(Vt.singleDigit,t);case 2:return Bt(Vt.twoDigits,t);case 3:return Bt(Vt.threeDigits,t);case 4:return Bt(Vt.fourDigits,t);default:return Bt(new RegExp("^\\d{1,"+n+"}"),t)}}function Ji(n,t){switch(n){case 1:return Bt(Vt.singleDigitSigned,t);case 2:return Bt(Vt.twoDigitsSigned,t);case 3:return Bt(Vt.threeDigitsSigned,t);case 4:return Bt(Vt.fourDigitsSigned,t);default:return Bt(new RegExp("^-?\\d{1,"+n+"}"),t)}}function As(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Xd(n,t){var e=t>0,r=e?t:1-t,i;if(r<=50)i=n||100;else{var a=r+50,s=Math.floor(a/100)*100,o=n>=a%100;i=n+s-(o?100:0)}return e?i:1-i}function Gd(n){return n%400===0||n%4===0&&n%100!==0}var yx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return qt(jt(4,i),o);case"yo":return qt(s.ordinalNumber(i,{unit:"year"}),o);default:return qt(jt(a.length,i),o)}}},{key:"validate",value:function(i,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(i,a,s){var o=i.getUTCFullYear();if(s.isTwoDigitYear){var l=Xd(s.year,o);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in a)||a.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),vx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return qt(jt(4,i),o);case"Yo":return qt(s.ordinalNumber(i,{unit:"year"}),o);default:return qt(jt(a.length,i),o)}}},{key:"validate",value:function(i,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(i,a,s,o){var l=Os(i,o);if(s.isTwoDigitYear){var c=Xd(s.year,l);return i.setUTCFullYear(c,0,o.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Fn(i,o)}var u=!("era"in a)||a.era===1?s.year:1-s.year;return i.setUTCFullYear(u,0,o.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Fn(i,o)}}]),e}(xt),bx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a){return Ji(a==="R"?4:a.length,i)}},{key:"set",value:function(i,a,s){var o=new Date(0);return o.setUTCFullYear(s,0,4),o.setUTCHours(0,0,0,0),ar(o)}}]),e}(xt),xx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",130),V(G(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a){return Ji(a==="u"?4:a.length,i)}},{key:"set",value:function(i,a,s){return i.setUTCFullYear(s,0,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),_x=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",120),V(G(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"Q":case"QQ":return jt(a.length,i);case"Qo":return s.ordinalNumber(i,{unit:"quarter"});case"QQQ":return s.quarter(i,{width:"abbreviated",context:"formatting"})||s.quarter(i,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(i,{width:"wide",context:"formatting"})||s.quarter(i,{width:"abbreviated",context:"formatting"})||s.quarter(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=1&&a<=4}},{key:"set",value:function(i,a,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),wx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",120),V(G(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"q":case"qq":return jt(a.length,i);case"qo":return s.ordinalNumber(i,{unit:"quarter"});case"qqq":return s.quarter(i,{width:"abbreviated",context:"standalone"})||s.quarter(i,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(i,{width:"wide",context:"standalone"})||s.quarter(i,{width:"abbreviated",context:"standalone"})||s.quarter(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=1&&a<=4}},{key:"set",value:function(i,a,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Tx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),V(G(r),"priority",110),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return c-1};switch(a){case"M":return qt(Bt(Vt.month,i),o);case"MM":return qt(jt(2,i),o);case"Mo":return qt(s.ordinalNumber(i,{unit:"month"}),o);case"MMM":return s.month(i,{width:"abbreviated",context:"formatting"})||s.month(i,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(i,{width:"wide",context:"formatting"})||s.month(i,{width:"abbreviated",context:"formatting"})||s.month(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Sx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",110),V(G(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return c-1};switch(a){case"L":return qt(Bt(Vt.month,i),o);case"LL":return qt(jt(2,i),o);case"Lo":return qt(s.ordinalNumber(i,{unit:"month"}),o);case"LLL":return s.month(i,{width:"abbreviated",context:"standalone"})||s.month(i,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(i,{width:"wide",context:"standalone"})||s.month(i,{width:"abbreviated",context:"standalone"})||s.month(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),e}(xt);function Mx(n,t,e){J(2,arguments);var r=nt(n),i=At(t),a=Ld(r,e)-i;return r.setUTCDate(r.getUTCDate()-a*7),r}var Cx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",100),V(G(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"w":return Bt(Vt.week,i);case"wo":return s.ordinalNumber(i,{unit:"week"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=53}},{key:"set",value:function(i,a,s,o){return Fn(Mx(i,s,o),o)}}]),e}(xt);function Dx(n,t){J(2,arguments);var e=nt(n),r=At(t),i=Ad(e)-r;return e.setUTCDate(e.getUTCDate()-i*7),e}var kx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",100),V(G(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"I":return Bt(Vt.week,i);case"Io":return s.ordinalNumber(i,{unit:"week"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=53}},{key:"set",value:function(i,a,s){return ar(Dx(i,s))}}]),e}(xt),Ox=[31,28,31,30,31,30,31,31,30,31,30,31],Px=[31,29,31,30,31,30,31,31,30,31,30,31],Ex=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"subPriority",1),V(G(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"d":return Bt(Vt.date,i);case"do":return s.ordinalNumber(i,{unit:"date"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){var s=i.getUTCFullYear(),o=Gd(s),l=i.getUTCMonth();return o?a>=1&&a<=Px[l]:a>=1&&a<=Ox[l]}},{key:"set",value:function(i,a,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Rx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"subpriority",1),V(G(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"D":case"DD":return Bt(Vt.dayOfYear,i);case"Do":return s.ordinalNumber(i,{unit:"date"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){var s=i.getUTCFullYear(),o=Gd(s);return o?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(i,a,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),e}(xt);function Ls(n,t,e){var r,i,a,s,o,l,c,u;J(2,arguments);var d=vn(),f=At((r=(i=(a=(s=e==null?void 0:e.weekStartsOn)!==null&&s!==void 0?s:e==null||(o=e.locale)===null||o===void 0||(l=o.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:d.weekStartsOn)!==null&&i!==void 0?i:(c=d.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=nt(n),v=At(t),x=p.getUTCDay(),g=v%7,m=(g+7)%7,b=(m<f?7:0)+v-x;return p.setUTCDate(p.getUTCDate()+b),p}var Ax=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"E":case"EE":case"EEE":return s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,s,o){return i=Ls(i,s,o),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Lx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"e":case"ee":return qt(jt(a.length,i),l);case"eo":return qt(s.ordinalNumber(i,{unit:"day"}),l);case"eee":return s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"eeeee":return s.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,s,o){return i=Ls(i,s,o),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Ix=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"c":case"cc":return qt(jt(a.length,i),l);case"co":return qt(s.ordinalNumber(i,{unit:"day"}),l);case"ccc":return s.day(i,{width:"abbreviated",context:"standalone"})||s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"});case"ccccc":return s.day(i,{width:"narrow",context:"standalone"});case"cccccc":return s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(i,{width:"wide",context:"standalone"})||s.day(i,{width:"abbreviated",context:"standalone"})||s.day(i,{width:"short",context:"standalone"})||s.day(i,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(i,a){return a>=0&&a<=6}},{key:"set",value:function(i,a,s,o){return i=Ls(i,s,o),i.setUTCHours(0,0,0,0),i}}]),e}(xt);function Nx(n,t){J(2,arguments);var e=At(t);e%7===0&&(e=e-7);var r=1,i=nt(n),a=i.getUTCDay(),s=e%7,o=(s+7)%7,l=(o<r?7:0)+e-a;return i.setUTCDate(i.getUTCDate()+l),i}var Fx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",90),V(G(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return jt(a.length,i);case"io":return s.ordinalNumber(i,{unit:"day"});case"iii":return qt(s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),o);case"iiiii":return qt(s.day(i,{width:"narrow",context:"formatting"}),o);case"iiiiii":return qt(s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),o);case"iiii":default:return qt(s.day(i,{width:"wide",context:"formatting"})||s.day(i,{width:"abbreviated",context:"formatting"})||s.day(i,{width:"short",context:"formatting"})||s.day(i,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(i,a){return a>=1&&a<=7}},{key:"set",value:function(i,a,s){return i=Nx(i,s),i.setUTCHours(0,0,0,0),i}}]),e}(xt),Ux=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",80),V(G(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"a":case"aa":case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,s){return i.setUTCHours(As(s),0,0,0),i}}]),e}(xt),Bx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",80),V(G(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"b":case"bb":case"bbb":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,s){return i.setUTCHours(As(s),0,0,0),i}}]),e}(xt),Wx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",80),V(G(r),"incompatibleTokens",["a","b","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"B":case"BB":case"BBB":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(i,{width:"wide",context:"formatting"})||s.dayPeriod(i,{width:"abbreviated",context:"formatting"})||s.dayPeriod(i,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(i,a,s){return i.setUTCHours(As(s),0,0,0),i}}]),e}(xt),zx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["H","K","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"h":return Bt(Vt.hour12h,i);case"ho":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=12}},{key:"set",value:function(i,a,s){var o=i.getUTCHours()>=12;return o&&s<12?i.setUTCHours(s+12,0,0,0):!o&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),e}(xt),Yx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"H":return Bt(Vt.hour23h,i);case"Ho":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=23}},{key:"set",value:function(i,a,s){return i.setUTCHours(s,0,0,0),i}}]),e}(xt),Hx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["h","H","k","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"K":return Bt(Vt.hour11h,i);case"Ko":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=11}},{key:"set",value:function(i,a,s){var o=i.getUTCHours()>=12;return o&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),e}(xt),$x=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",70),V(G(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"k":return Bt(Vt.hour24h,i);case"ko":return s.ordinalNumber(i,{unit:"hour"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=1&&a<=24}},{key:"set",value:function(i,a,s){var o=s<=24?s%24:s;return i.setUTCHours(o,0,0,0),i}}]),e}(xt),jx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",60),V(G(r),"incompatibleTokens",["t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"m":return Bt(Vt.minute,i);case"mo":return s.ordinalNumber(i,{unit:"minute"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=59}},{key:"set",value:function(i,a,s){return i.setUTCMinutes(s,0,0),i}}]),e}(xt),Vx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",50),V(G(r),"incompatibleTokens",["t","T"]),r}return ht(e,[{key:"parse",value:function(i,a,s){switch(a){case"s":return Bt(Vt.second,i);case"so":return s.ordinalNumber(i,{unit:"second"});default:return jt(a.length,i)}}},{key:"validate",value:function(i,a){return a>=0&&a<=59}},{key:"set",value:function(i,a,s){return i.setUTCSeconds(s,0),i}}]),e}(xt),qx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",30),V(G(r),"incompatibleTokens",["t","T"]),r}return ht(e,[{key:"parse",value:function(i,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return qt(jt(a.length,i),s)}},{key:"set",value:function(i,a,s){return i.setUTCMilliseconds(s),i}}]),e}(xt),Xx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",10),V(G(r),"incompatibleTokens",["t","T","x"]),r}return ht(e,[{key:"parse",value:function(i,a){switch(a){case"X":return Ue(Fe.basicOptionalMinutes,i);case"XX":return Ue(Fe.basic,i);case"XXXX":return Ue(Fe.basicOptionalSeconds,i);case"XXXXX":return Ue(Fe.extendedOptionalSeconds,i);case"XXX":default:return Ue(Fe.extended,i)}}},{key:"set",value:function(i,a,s){return a.timestampIsSet?i:new Date(i.getTime()-s)}}]),e}(xt),Gx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",10),V(G(r),"incompatibleTokens",["t","T","X"]),r}return ht(e,[{key:"parse",value:function(i,a){switch(a){case"x":return Ue(Fe.basicOptionalMinutes,i);case"xx":return Ue(Fe.basic,i);case"xxxx":return Ue(Fe.basicOptionalSeconds,i);case"xxxxx":return Ue(Fe.extendedOptionalSeconds,i);case"xxx":default:return Ue(Fe.extended,i)}}},{key:"set",value:function(i,a,s){return a.timestampIsSet?i:new Date(i.getTime()-s)}}]),e}(xt),Kx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",40),V(G(r),"incompatibleTokens","*"),r}return ht(e,[{key:"parse",value:function(i){return qd(i)}},{key:"set",value:function(i,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),e}(xt),Qx=function(n){pt(e,n);var t=gt(e);function e(){var r;ft(this,e);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),V(G(r),"priority",20),V(G(r),"incompatibleTokens","*"),r}return ht(e,[{key:"parse",value:function(i){return qd(i)}},{key:"set",value:function(i,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),e}(xt),Zx={G:new mx,y:new yx,Y:new vx,R:new bx,u:new xx,Q:new _x,q:new wx,M:new Tx,L:new Sx,w:new Cx,I:new kx,d:new Ex,D:new Rx,E:new Ax,e:new Lx,c:new Ix,i:new Fx,a:new Ux,b:new Bx,B:new Wx,h:new zx,H:new Yx,K:new Hx,k:new $x,m:new jx,s:new Vx,S:new qx,X:new Xx,x:new Gx,t:new Kx,T:new Qx},Jx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,t_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e_=/^'([^]*?)'?$/,n_=/''/g,r_=/\S/,i_=/[a-zA-Z]/;function a_(n,t,e,r){var i,a,s,o,l,c,u,d,f,p,v,x,g,m,b,y,_,T;J(3,arguments);var D=String(n),O=String(t),S=vn(),M=(i=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:S.locale)!==null&&i!==void 0?i:zd;if(!M.match)throw new RangeError("locale must contain match property");var k=At((s=(o=(l=(c=r==null?void 0:r.firstWeekContainsDate)!==null&&c!==void 0?c:r==null||(u=r.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:S.firstWeekContainsDate)!==null&&o!==void 0?o:(f=S.locale)===null||f===void 0||(p=f.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=At((v=(x=(g=(m=r==null?void 0:r.weekStartsOn)!==null&&m!==void 0?m:r==null||(b=r.locale)===null||b===void 0||(y=b.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&g!==void 0?g:S.weekStartsOn)!==null&&x!==void 0?x:(_=S.locale)===null||_===void 0||(T=_.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&v!==void 0?v:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(O==="")return D===""?nt(e):new Date(NaN);var E={firstWeekContainsDate:k,weekStartsOn:P,locale:M},F=[new gx],q=O.match(t_).map(function(N){var A=N[0];if(A in Ps){var Q=Ps[A];return Q(N,M.formatLong)}return N}).join("").match(Jx),$=[],Y=Hd(q),I;try{var it=function(){var A=I.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&Wd(A)&&Qi(A,O,n),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Bd(A)&&Qi(A,O,n);var Q=A[0],X=Zx[Q];if(X){var vt=X.incompatibleTokens;if(Array.isArray(vt)){var ct=$.find(function(_t){return vt.includes(_t.token)||_t.token===Q});if(ct)throw new RangeError("The format string mustn't contain `".concat(ct.fullToken,"` and `").concat(A,"` at the same time"))}else if(X.incompatibleTokens==="*"&&$.length>0)throw new RangeError("The format string mustn't contain `".concat(A,"` and any other token at the same time"));$.push({token:Q,fullToken:A});var Ot=X.run(D,A,M.match,E);if(!Ot)return{v:new Date(NaN)};F.push(Ot.setter),D=Ot.rest}else{if(Q.match(i_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(A==="''"?A="'":Q==="'"&&(A=s_(A)),D.indexOf(A)===0)D=D.slice(A.length);else return{v:new Date(NaN)}}};for(Y.s();!(I=Y.n()).done;){var B=it();if(Ke(B)==="object")return B.v}}catch(N){Y.e(N)}finally{Y.f()}if(D.length>0&&r_.test(D))return new Date(NaN);var yt=F.map(function(N){return N.priority}).sort(function(N,A){return A-N}).filter(function(N,A,Q){return Q.indexOf(N)===A}).map(function(N){return F.filter(function(A){return A.priority===N}).sort(function(A,Q){return Q.subPriority-A.subPriority})}).map(function(N){return N[0]}),ut=nt(e);if(isNaN(ut.getTime()))return new Date(NaN);var z=Ed(ut,Xi(ut)),L={},U=Hd(yt),j;try{for(U.s();!(j=U.n()).done;){var Z=j.value;if(!Z.validate(z,E))return new Date(NaN);var K=Z.set(z,L,E);Array.isArray(K)?(z=K[0],lx(L,K[1])):z=K}}catch(N){U.e(N)}finally{U.f()}return z}function s_(n){return n.match(e_)[1].replace(n_,"'")}function o_(n){J(1,arguments);var t=nt(n);return t.setMinutes(0,0,0),t}function l_(n){J(1,arguments);var t=nt(n);return t.setMilliseconds(0),t}function c_(n){J(1,arguments);var t=n/Qr;return Math.floor(t)}function Kd(n,t){var e;J(1,arguments);var r=At((e=t==null?void 0:t.additionalDigits)!==null&&e!==void 0?e:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var i=h_(n),a;if(i.date){var s=p_(i.date,r);a=g_(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(i.time&&(l=m_(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=y_(i.timezone),isNaN(c))return new Date(NaN)}else{var u=new Date(o+l),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(o+l+c)}var ta={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},u_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,d_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,f_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function h_(n){var t={},e=n.split(ta.dateTimeDelimiter),r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],ta.timeZoneDelimiter.test(t.date)&&(t.date=n.split(ta.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){var i=ta.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function p_(n,t){var e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:n.slice((r[1]||r[2]).length)}}function g_(n,t){if(t===null)return new Date(NaN);var e=n.match(u_);if(!e)return new Date(NaN);var r=!!e[4],i=ei(e[1]),a=ei(e[2])-1,s=ei(e[3]),o=ei(e[4]),l=ei(e[5])-1;if(r)return w_(t,o,l)?v_(t,o,l):new Date(NaN);var c=new Date(0);return!x_(t,a,s)||!__(t,i)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(i,s)),c)}function ei(n){return n?parseInt(n):1}function m_(n){var t=n.match(d_);if(!t)return NaN;var e=Is(t[1]),r=Is(t[2]),i=Is(t[3]);return T_(e,r,i)?e*Qr+r*Gi+i*1e3:NaN}function Is(n){return n&&parseFloat(n.replace(",","."))||0}function y_(n){if(n==="Z")return 0;var t=n.match(f_);if(!t)return 0;var e=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return S_(r,i)?e*(r*Qr+i*Gi):NaN}function v_(n,t,e){var r=new Date(0);r.setUTCFullYear(n,0,4);var i=r.getUTCDay()||7,a=(t-1)*7+e+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var b_=[31,null,31,30,31,30,31,31,30,31,30,31];function Qd(n){return n%400===0||n%4===0&&n%100!==0}function x_(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(b_[t]||(Qd(n)?29:28))}function __(n,t){return t>=1&&t<=(Qd(n)?366:365)}function w_(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function T_(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function S_(n,t){return t>=0&&t<=59}var ee=(n=>(n.DOUGHNUT="Doughnut",n.HORIZONTAL_BAR="HorizontalBar",n.VERTICAL_BAR="VerticalBar",n.TIMESERIES_LINE="Line",n.TIMESERIES_BAR="TimeSeriesBar",n))(ee||{}),ea=(n=>(n.GAUGE="Gauge",n.TOPN="TopN",n))(ea||{}),Wt=(n=>(n.Hidden="hidden",n.Right="right",n.Bottom="bottom",n))(Wt||{}),or=(n=>(n.Hidden="hidden",n.SingleMetric="single",n.Full="full",n))(or||{});const Ns=(n,t)=>{var i,a;const{tooltip:e}=t;if(e.opacity===0&&!n.locked){n.showTooltip=!1;return}const r=n.chartTooltipSortFn||((s,o)=>o.rawValue-s.rawValue);if(e.body&&!n.locked){const s=e.labelColors,o=((a=(i=t.chart.config)==null?void 0:i.options)==null?void 0:a.indexAxis)==="y"?"x":"y",l=[ee.HORIZONTAL_BAR,ee.VERTICAL_BAR].includes(n.chartType),c=[ea.GAUGE,ee.DOUGHNUT].includes(n.chartType);n.tooltipContext=l?e.dataPoints.length>1?e.dataPoints[0].label:"":e.dataPoints[0].parsed.x,n.tooltipSeries=e.dataPoints.map((u,d)=>{const f=c?u.parsed:u.parsed[o];let p;if(n.units==="bytes")p=isNaN(f)?f:Ms(f);else{const x=n.translateUnit(n.units,f);p=`${f%1===0?ra.format(f):ra.format(Number(f.toFixed(_f)))} ${x}`}const v=l&&u.dataset.label!==u.label?u.dataset.label:c?u.dataset.labels[u.dataIndex]:u.dataset.label;return{backgroundColor:s[d].backgroundColor,borderColor:s[d].borderColor,label:v,value:p,rawValue:f}}).sort(r),n.left=`${e.x}px`,n.top=`${e.y}px`,n.showTooltip=!0}},M_=n=>n&&n.datasets&&n.datasets.length,C_=n=>M_(n)&&n.datasets.some(t=>t.data.length),D_=n=>C_(n)&&n.datasets.some(t=>t.data.length>1),k_=n=>D_(n)&&n.datasets.some(t=>t.data[0]&&ks(t.data[0].x)),O_=n=>k_(n)&&n.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),Fs=(n,t,e)=>{const i=Math.min(t/1150,1);return n.x<e?n.x+t*.15*(1-i):n.x-t*1.15*(1-i)},P_=(n,t,e)=>n.y<e?n.y+t*.15:n.y-t*.5;function Zd(n,t){let e;return(...r)=>{clearTimeout(e),e=window.setTimeout(()=>{n(...r)},t)}}var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Us={exports:{}},Jd={exports:{}};(function(n){function t(e){return e&&e.__esModule?e:{default:e}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Jd);var zt=Jd.exports,Bs={exports:{}},Ws={exports:{}},tf={exports:{}};(function(n){function t(e){"@babel/helpers - typeof";return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},n.exports.__esModule=!0,n.exports.default=n.exports,t(e)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(tf);var ef=tf.exports,zs={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(i.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+i.length+" present")}n.exports=t.default})(zs,zs.exports);var ae=zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(ef),i=e(ae);function a(s){return(0,i.default)(1,arguments),s instanceof Date||(0,r.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}n.exports=t.default})(Ws,Ws.exports);var E_=Ws.exports,Ys={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(ef),i=e(ae);function a(s){(0,i.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,r.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=t.default})(Ys,Ys.exports);var Be=Ys.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(E_),i=e(Be),a=e(ae);function s(o){if((0,a.default)(1,arguments),!(0,r.default)(o)&&typeof o!="number")return!1;var l=(0,i.default)(o);return!isNaN(Number(l))}n.exports=t.default})(Bs,Bs.exports);var R_=Bs.exports,Hs={exports:{}},$s={exports:{}},js={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){if(r===null||r===!0||r===!1)return NaN;var i=Number(r);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}n.exports=t.default})(js,js.exports);var Wn=js.exports;const A_=Bn(Wn);(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Wn),i=e(Be),a=e(ae);function s(o,l){(0,a.default)(2,arguments);var c=(0,i.default)(o).getTime(),u=(0,r.default)(l);return new Date(c+u)}n.exports=t.default})($s,$s.exports);var L_=$s.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(L_),i=e(ae),a=e(Wn);function s(o,l){(0,i.default)(2,arguments);var c=(0,a.default)(l);return(0,r.default)(o,-c)}n.exports=t.default})(Hs,Hs.exports);var I_=Hs.exports,Vs={exports:{}},qs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Be),i=e(ae),a=864e5;function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}n.exports=t.default})(qs,qs.exports);var N_=qs.exports,Xs={exports:{}},Gs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Be),i=e(ae);function a(s){(0,i.default)(1,arguments);var o=1,l=(0,r.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}n.exports=t.default})(Gs,Gs.exports);var Ks=Gs.exports,Qs={exports:{}},Zs={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Be),i=e(ae),a=e(Ks);function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(Zs,Zs.exports);var nf=Zs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(nf),i=e(Ks),a=e(ae);function s(o){(0,a.default)(1,arguments);var l=(0,r.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,i.default)(c);return u}n.exports=t.default})(Qs,Qs.exports);var F_=Qs.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Be),i=e(Ks),a=e(F_),s=e(ae),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,r.default)(c),d=(0,i.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}n.exports=t.default})(Xs,Xs.exports);var U_=Xs.exports,Js={exports:{}},to={exports:{}},zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.getDefaultOptions=B_,zn.setDefaultOptions=W_;var rf={};function B_(){return rf}function W_(n){rf=n}(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=e(Be),i=e(ae),a=e(Wn),s=zn;function o(l,c){var u,d,f,p,v,x,g,m;(0,i.default)(1,arguments);var b=(0,s.getDefaultOptions)(),y=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(v=c.locale)===null||v===void 0||(x=v.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:b.weekStartsOn)!==null&&d!==void 0?d:(g=b.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var _=(0,r.default)(l),T=_.getUTCDay(),D=(T<y?7:0)+T-y;return _.setUTCDate(_.getUTCDate()-D),_.setUTCHours(0,0,0,0),_}n.exports=t.default})(to,to.exports);var eo=to.exports,no={exports:{}},ro={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Be),i=e(ae),a=e(eo),s=e(Wn),o=zn;function l(c,u){var d,f,p,v,x,g,m,b;(0,i.default)(1,arguments);var y=(0,r.default)(c),_=y.getUTCFullYear(),T=(0,o.getDefaultOptions)(),D=(0,s.default)((d=(f=(p=(v=u==null?void 0:u.firstWeekContainsDate)!==null&&v!==void 0?v:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(m=T.locale)===null||m===void 0||(b=m.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=new Date(0);O.setUTCFullYear(_+1,0,D),O.setUTCHours(0,0,0,0);var S=(0,a.default)(O,u),M=new Date(0);M.setUTCFullYear(_,0,D),M.setUTCHours(0,0,0,0);var k=(0,a.default)(M,u);return y.getTime()>=S.getTime()?_+1:y.getTime()>=k.getTime()?_:_-1}n.exports=t.default})(ro,ro.exports);var af=ro.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(af),i=e(ae),a=e(eo),s=e(Wn),o=zn;function l(c,u){var d,f,p,v,x,g,m,b;(0,i.default)(1,arguments);var y=(0,o.getDefaultOptions)(),_=(0,s.default)((d=(f=(p=(v=u==null?void 0:u.firstWeekContainsDate)!==null&&v!==void 0?v:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:y.firstWeekContainsDate)!==null&&f!==void 0?f:(m=y.locale)===null||m===void 0||(b=m.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,r.default)(c,u),D=new Date(0);D.setUTCFullYear(T,0,_),D.setUTCHours(0,0,0,0);var O=(0,a.default)(D,u);return O}n.exports=t.default})(no,no.exports);var z_=no.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Be),i=e(eo),a=e(z_),s=e(ae),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,r.default)(c),f=(0,i.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(Js,Js.exports);var Y_=Js.exports,io={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){for(var a=r<0?"-":"",s=Math.abs(r).toString();s.length<i;)s="0"+s;return a+s}n.exports=t.default})(io,io.exports);var sf=io.exports,ao={exports:{}};(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(sf),i={y:function(o,l){var c=o.getUTCFullYear(),u=c>0?c:1-c;return(0,r.default)(l==="yy"?u%100:u,l.length)},M:function(o,l){var c=o.getUTCMonth();return l==="M"?String(c+1):(0,r.default)(c+1,2)},d:function(o,l){return(0,r.default)(o.getUTCDate(),l.length)},a:function(o,l){var c=o.getUTCHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h:function(o,l){return(0,r.default)(o.getUTCHours()%12||12,l.length)},H:function(o,l){return(0,r.default)(o.getUTCHours(),l.length)},m:function(o,l){return(0,r.default)(o.getUTCMinutes(),l.length)},s:function(o,l){return(0,r.default)(o.getUTCSeconds(),l.length)},S:function(o,l){var c=l.length,u=o.getUTCMilliseconds(),d=Math.floor(u*Math.pow(10,c-3));return(0,r.default)(d,l.length)}},a=i;t.default=a,n.exports=t.default})(ao,ao.exports);var H_=ao.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(N_),i=e(U_),a=e(nf),s=e(Y_),o=e(af),l=e(sf),c=e(H_),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(m,b,y){var _=m.getUTCFullYear()>0?1:0;switch(b){case"G":case"GG":case"GGG":return y.era(_,{width:"abbreviated"});case"GGGGG":return y.era(_,{width:"narrow"});case"GGGG":default:return y.era(_,{width:"wide"})}},y:function(m,b,y){if(b==="yo"){var _=m.getUTCFullYear(),T=_>0?_:1-_;return y.ordinalNumber(T,{unit:"year"})}return c.default.y(m,b)},Y:function(m,b,y,_){var T=(0,o.default)(m,_),D=T>0?T:1-T;if(b==="YY"){var O=D%100;return(0,l.default)(O,2)}return b==="Yo"?y.ordinalNumber(D,{unit:"year"}):(0,l.default)(D,b.length)},R:function(m,b){var y=(0,a.default)(m);return(0,l.default)(y,b.length)},u:function(m,b){var y=m.getUTCFullYear();return(0,l.default)(y,b.length)},Q:function(m,b,y){var _=Math.ceil((m.getUTCMonth()+1)/3);switch(b){case"Q":return String(_);case"QQ":return(0,l.default)(_,2);case"Qo":return y.ordinalNumber(_,{unit:"quarter"});case"QQQ":return y.quarter(_,{width:"abbreviated",context:"formatting"});case"QQQQQ":return y.quarter(_,{width:"narrow",context:"formatting"});case"QQQQ":default:return y.quarter(_,{width:"wide",context:"formatting"})}},q:function(m,b,y){var _=Math.ceil((m.getUTCMonth()+1)/3);switch(b){case"q":return String(_);case"qq":return(0,l.default)(_,2);case"qo":return y.ordinalNumber(_,{unit:"quarter"});case"qqq":return y.quarter(_,{width:"abbreviated",context:"standalone"});case"qqqqq":return y.quarter(_,{width:"narrow",context:"standalone"});case"qqqq":default:return y.quarter(_,{width:"wide",context:"standalone"})}},M:function(m,b,y){var _=m.getUTCMonth();switch(b){case"M":case"MM":return c.default.M(m,b);case"Mo":return y.ordinalNumber(_+1,{unit:"month"});case"MMM":return y.month(_,{width:"abbreviated",context:"formatting"});case"MMMMM":return y.month(_,{width:"narrow",context:"formatting"});case"MMMM":default:return y.month(_,{width:"wide",context:"formatting"})}},L:function(m,b,y){var _=m.getUTCMonth();switch(b){case"L":return String(_+1);case"LL":return(0,l.default)(_+1,2);case"Lo":return y.ordinalNumber(_+1,{unit:"month"});case"LLL":return y.month(_,{width:"abbreviated",context:"standalone"});case"LLLLL":return y.month(_,{width:"narrow",context:"standalone"});case"LLLL":default:return y.month(_,{width:"wide",context:"standalone"})}},w:function(m,b,y,_){var T=(0,s.default)(m,_);return b==="wo"?y.ordinalNumber(T,{unit:"week"}):(0,l.default)(T,b.length)},I:function(m,b,y){var _=(0,i.default)(m);return b==="Io"?y.ordinalNumber(_,{unit:"week"}):(0,l.default)(_,b.length)},d:function(m,b,y){return b==="do"?y.ordinalNumber(m.getUTCDate(),{unit:"date"}):c.default.d(m,b)},D:function(m,b,y){var _=(0,r.default)(m);return b==="Do"?y.ordinalNumber(_,{unit:"dayOfYear"}):(0,l.default)(_,b.length)},E:function(m,b,y){var _=m.getUTCDay();switch(b){case"E":case"EE":case"EEE":return y.day(_,{width:"abbreviated",context:"formatting"});case"EEEEE":return y.day(_,{width:"narrow",context:"formatting"});case"EEEEEE":return y.day(_,{width:"short",context:"formatting"});case"EEEE":default:return y.day(_,{width:"wide",context:"formatting"})}},e:function(m,b,y,_){var T=m.getUTCDay(),D=(T-_.weekStartsOn+8)%7||7;switch(b){case"e":return String(D);case"ee":return(0,l.default)(D,2);case"eo":return y.ordinalNumber(D,{unit:"day"});case"eee":return y.day(T,{width:"abbreviated",context:"formatting"});case"eeeee":return y.day(T,{width:"narrow",context:"formatting"});case"eeeeee":return y.day(T,{width:"short",context:"formatting"});case"eeee":default:return y.day(T,{width:"wide",context:"formatting"})}},c:function(m,b,y,_){var T=m.getUTCDay(),D=(T-_.weekStartsOn+8)%7||7;switch(b){case"c":return String(D);case"cc":return(0,l.default)(D,b.length);case"co":return y.ordinalNumber(D,{unit:"day"});case"ccc":return y.day(T,{width:"abbreviated",context:"standalone"});case"ccccc":return y.day(T,{width:"narrow",context:"standalone"});case"cccccc":return y.day(T,{width:"short",context:"standalone"});case"cccc":default:return y.day(T,{width:"wide",context:"standalone"})}},i:function(m,b,y){var _=m.getUTCDay(),T=_===0?7:_;switch(b){case"i":return String(T);case"ii":return(0,l.default)(T,b.length);case"io":return y.ordinalNumber(T,{unit:"day"});case"iii":return y.day(_,{width:"abbreviated",context:"formatting"});case"iiiii":return y.day(_,{width:"narrow",context:"formatting"});case"iiiiii":return y.day(_,{width:"short",context:"formatting"});case"iiii":default:return y.day(_,{width:"wide",context:"formatting"})}},a:function(m,b,y){var _=m.getUTCHours(),T=_/12>=1?"pm":"am";switch(b){case"a":case"aa":return y.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"aaa":return y.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return y.dayPeriod(T,{width:"narrow",context:"formatting"});case"aaaa":default:return y.dayPeriod(T,{width:"wide",context:"formatting"})}},b:function(m,b,y){var _=m.getUTCHours(),T;switch(_===12?T=u.noon:_===0?T=u.midnight:T=_/12>=1?"pm":"am",b){case"b":case"bb":return y.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"bbb":return y.dayPeriod(T,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return y.dayPeriod(T,{width:"narrow",context:"formatting"});case"bbbb":default:return y.dayPeriod(T,{width:"wide",context:"formatting"})}},B:function(m,b,y){var _=m.getUTCHours(),T;switch(_>=17?T=u.evening:_>=12?T=u.afternoon:_>=4?T=u.morning:T=u.night,b){case"B":case"BB":case"BBB":return y.dayPeriod(T,{width:"abbreviated",context:"formatting"});case"BBBBB":return y.dayPeriod(T,{width:"narrow",context:"formatting"});case"BBBB":default:return y.dayPeriod(T,{width:"wide",context:"formatting"})}},h:function(m,b,y){if(b==="ho"){var _=m.getUTCHours()%12;return _===0&&(_=12),y.ordinalNumber(_,{unit:"hour"})}return c.default.h(m,b)},H:function(m,b,y){return b==="Ho"?y.ordinalNumber(m.getUTCHours(),{unit:"hour"}):c.default.H(m,b)},K:function(m,b,y){var _=m.getUTCHours()%12;return b==="Ko"?y.ordinalNumber(_,{unit:"hour"}):(0,l.default)(_,b.length)},k:function(m,b,y){var _=m.getUTCHours();return _===0&&(_=24),b==="ko"?y.ordinalNumber(_,{unit:"hour"}):(0,l.default)(_,b.length)},m:function(m,b,y){return b==="mo"?y.ordinalNumber(m.getUTCMinutes(),{unit:"minute"}):c.default.m(m,b)},s:function(m,b,y){return b==="so"?y.ordinalNumber(m.getUTCSeconds(),{unit:"second"}):c.default.s(m,b)},S:function(m,b){return c.default.S(m,b)},X:function(m,b,y,_){var T=_._originalDate||m,D=T.getTimezoneOffset();if(D===0)return"Z";switch(b){case"X":return p(D);case"XXXX":case"XX":return v(D);case"XXXXX":case"XXX":default:return v(D,":")}},x:function(m,b,y,_){var T=_._originalDate||m,D=T.getTimezoneOffset();switch(b){case"x":return p(D);case"xxxx":case"xx":return v(D);case"xxxxx":case"xxx":default:return v(D,":")}},O:function(m,b,y,_){var T=_._originalDate||m,D=T.getTimezoneOffset();switch(b){case"O":case"OO":case"OOO":return"GMT"+f(D,":");case"OOOO":default:return"GMT"+v(D,":")}},z:function(m,b,y,_){var T=_._originalDate||m,D=T.getTimezoneOffset();switch(b){case"z":case"zz":case"zzz":return"GMT"+f(D,":");case"zzzz":default:return"GMT"+v(D,":")}},t:function(m,b,y,_){var T=_._originalDate||m,D=Math.floor(T.getTime()/1e3);return(0,l.default)(D,b.length)},T:function(m,b,y,_){var T=_._originalDate||m,D=T.getTime();return(0,l.default)(D,b.length)}};function f(g,m){var b=g>0?"-":"+",y=Math.abs(g),_=Math.floor(y/60),T=y%60;if(T===0)return b+String(_);var D=m||"";return b+String(_)+D+(0,l.default)(T,2)}function p(g,m){if(g%60===0){var b=g>0?"-":"+";return b+(0,l.default)(Math.abs(g)/60,2)}return v(g,m)}function v(g,m){var b=m||"",y=g>0?"-":"+",_=Math.abs(g),T=(0,l.default)(Math.floor(_/60),2),D=(0,l.default)(_%60,2);return y+T+b+D}var x=d;t.default=x,n.exports=t.default})(Vs,Vs.exports);var $_=Vs.exports,so={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(l,c){switch(l){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},r=function(l,c){switch(l){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},i=function(l,c){var u=l.match(/(P+)(p+)?/)||[],d=u[1],f=u[2];if(!f)return e(l,c);var p;switch(d){case"P":p=c.dateTime({width:"short"});break;case"PP":p=c.dateTime({width:"medium"});break;case"PPP":p=c.dateTime({width:"long"});break;case"PPPP":default:p=c.dateTime({width:"full"});break}return p.replace("{{date}}",e(d,c)).replace("{{time}}",r(f,c))},a={p:r,P:i},s=a;t.default=s,n.exports=t.default})(so,so.exports);var j_=so.exports,oo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){var i=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return i.setUTCFullYear(r.getFullYear()),r.getTime()-i.getTime()}n.exports=t.default})(oo,oo.exports);var of=oo.exports;const lf=Bn(of);var ni={};Object.defineProperty(ni,"__esModule",{value:!0}),ni.isProtectedDayOfYearToken=X_,ni.isProtectedWeekYearToken=G_,ni.throwProtectedError=K_;var V_=["D","DD"],q_=["YY","YYYY"];function X_(n){return V_.indexOf(n)!==-1}function G_(n){return q_.indexOf(n)!==-1}function K_(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var lo={exports:{}},co={exports:{}},uo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},r=function(s,o,l){var c,u=e[s];return typeof u=="string"?c=u:o===1?c=u.one:c=u.other.replace("{{count}}",o.toString()),l!=null&&l.addSuffix?l.comparison&&l.comparison>0?"in "+c:c+" ago":c},i=r;t.default=i,n.exports=t.default})(uo,uo.exports);var Q_=uo.exports,fo={exports:{}},ho={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=i.width?String(i.width):r.defaultWidth,s=r.formats[a]||r.formats[r.defaultWidth];return s}}n.exports=t.default})(ho,ho.exports);var Z_=ho.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(Z_),i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,r.default)({formats:i,defaultWidth:"full"}),time:(0,r.default)({formats:a,defaultWidth:"full"}),dateTime:(0,r.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,n.exports=t.default})(fo,fo.exports);var J_=fo.exports,po={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r=function(s,o,l,c){return e[s]},i=r;t.default=i,n.exports=t.default})(po,po.exports);var tw=po.exports,go={exports:{}},mo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&r.formattingValues){var l=r.defaultFormattingWidth||r.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=r.formattingValues[c]||r.formattingValues[l]}else{var u=r.defaultWidth,d=a!=null&&a.width?String(a.width):r.defaultWidth;o=r.values[d]||r.values[u]}var f=r.argumentCallback?r.argumentCallback(i):i;return o[f]}}n.exports=t.default})(mo,mo.exports);var ew=mo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(ew),i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(v,x){var g=Number(v),m=g%100;if(m>20||m<10)switch(m%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},d={ordinalNumber:u,era:(0,r.default)({values:i,defaultWidth:"wide"}),quarter:(0,r.default)({values:a,defaultWidth:"wide",argumentCallback:function(v){return v-1}}),month:(0,r.default)({values:s,defaultWidth:"wide"}),day:(0,r.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},f=d;t.default=f,n.exports=t.default})(go,go.exports);var nw=go.exports,yo={exports:{}},vo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?i(f,function(g){return g.test(d)}):r(f,function(g){return g.test(d)}),v;v=a.valueCallback?a.valueCallback(p):p,v=o.valueCallback?o.valueCallback(v):v;var x=s.slice(d.length);return{value:v,rest:x}}}function r(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function i(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}n.exports=t.default})(vo,vo.exports);var rw=vo.exports,bo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.match(r.matchPattern);if(!s)return null;var o=s[0],l=i.match(r.parsePattern);if(!l)return null;var c=r.valueCallback?r.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=i.slice(o.length);return{value:c,rest:u}}}n.exports=t.default})(bo,bo.exports);var iw=bo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(rw),i=e(iw),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},v={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},x={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,i.default)({matchPattern:a,parsePattern:s,valueCallback:function(_){return parseInt(_,10)}}),era:(0,r.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(_){return _+1}}),month:(0,r.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:v,defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},b=m;t.default=b,n.exports=t.default})(yo,yo.exports);var aw=yo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(Q_),i=e(J_),a=e(tw),s=e(nw),o=e(aw),l={code:"en-US",formatDistance:r.default,formatLong:i.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,n.exports=t.default})(co,co.exports);var sw=co.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(sw),i=r.default;t.default=i,n.exports=t.default})(lo,lo.exports);var ow=lo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r=e(R_),i=e(I_),a=e(Be),s=e($_),o=e(j_),l=e(of),c=ni,u=e(Wn),d=e(ae),f=zn,p=e(ow),v=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,m=/''/g,b=/[a-zA-Z]/;function y(T,D,O){var S,M,k,P,E,F,q,$,Y,I,it,B,yt,ut,z,L,U,j;(0,d.default)(2,arguments);var Z=String(D),K=(0,f.getDefaultOptions)(),N=(S=(M=O==null?void 0:O.locale)!==null&&M!==void 0?M:K.locale)!==null&&S!==void 0?S:p.default,A=(0,u.default)((k=(P=(E=(F=O==null?void 0:O.firstWeekContainsDate)!==null&&F!==void 0?F:O==null||(q=O.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&E!==void 0?E:K.firstWeekContainsDate)!==null&&P!==void 0?P:(Y=K.locale)===null||Y===void 0||(I=Y.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&k!==void 0?k:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((it=(B=(yt=(ut=O==null?void 0:O.weekStartsOn)!==null&&ut!==void 0?ut:O==null||(z=O.locale)===null||z===void 0||(L=z.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&yt!==void 0?yt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&it!==void 0?it:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,r.default)(X))throw new RangeError("Invalid time value");var vt=(0,l.default)(X),ct=(0,i.default)(X,vt),Ot={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var bt=et[0];if(bt==="p"||bt==="P"){var Nt=o.default[bt];return Nt(et,N.formatLong)}return et}).join("").match(v).map(function(et){if(et==="''")return"'";var bt=et[0];if(bt==="'")return _(et);var Nt=s.default[bt];if(Nt)return!(O!=null&&O.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),!(O!=null&&O.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),Nt(ct,et,N.localize,Ot);if(bt.match(b))throw new RangeError("Format string contains an unescaped latin alphabet character `"+bt+"`");return et}).join("");return _t}function _(T){var D=T.match(g);return D?D[1].replace(m,"'"):T}n.exports=t.default})(Us,Us.exports);var lw=Us.exports;const cw=Bn(lw);function cf(n,t,e){var r=fw(n,e.timeZone,e.locale);return r.formatToParts?uw(r,t):dw(r,t)}function uw(n,t){for(var e=n.formatToParts(t),r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function dw(n,t){var e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function fw(n,t,e){if(e&&!e.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function hw(n,t){var e=yw(t);return e.formatToParts?gw(e,n):mw(e,n)}var pw={year:0,month:1,day:2,hour:3,minute:4,second:5};function gw(n,t){try{for(var e=n.formatToParts(t),r=[],i=0;i<e.length;i++){var a=pw[e[i].type];a>=0&&(r[a]=parseInt(e[i].value,10))}return r}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function mw(n,t){var e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var xo={};function yw(n){if(!xo[n]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),e=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";xo[n]=e?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return xo[n]}function uf(n,t,e,r,i,a,s){var o=new Date(0);return o.setUTCFullYear(n,t,e),o.setUTCHours(r,i,a,s),o}var df=36e5,vw=6e4,_o={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function wo(n,t,e){var r,i;if(!n||(r=_o.timezoneZ.exec(n),r))return 0;var a;if(r=_o.timezoneHH.exec(n),r)return a=parseInt(r[1],10),ff(a)?-(a*df):NaN;if(r=_o.timezoneHHMM.exec(n),r){a=parseInt(r[2],10);var s=parseInt(r[3],10);return ff(a,s)?(i=Math.abs(a)*df+s*vw,r[1]==="+"?-i:i):NaN}if(_w(n)){t=new Date(t||Date.now());var o=e?t:bw(t),l=To(o,n),c=e?l:xw(t,l,n);return-c}return NaN}function bw(n){return uf(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function To(n,t){var e=hw(n,t),r=uf(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime(),i=n.getTime(),a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function xw(n,t,e){var r=n.getTime(),i=r-t,a=To(new Date(i),e);if(t===a)return t;i-=a-t;var s=To(new Date(i),e);return a===s?a:Math.max(a,s)}function ff(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var hf={};function _w(n){if(hf[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),hf[n]=!0,!0}catch{return!1}}var ww=60*1e3,Tw={X:function(n,t,e,r){var i=So(r.timeZone,n);if(i===0)return"Z";switch(t){case"X":return pf(i);case"XXXX":case"XX":return lr(i);case"XXXXX":case"XXX":default:return lr(i,":")}},x:function(n,t,e,r){var i=So(r.timeZone,n);switch(t){case"x":return pf(i);case"xxxx":case"xx":return lr(i);case"xxxxx":case"xxx":default:return lr(i,":")}},O:function(n,t,e,r){var i=So(r.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+Sw(i,":");case"OOOO":default:return"GMT"+lr(i,":")}},z:function(n,t,e,r){switch(t){case"z":case"zz":case"zzz":return cf("short",n,r);case"zzzz":default:return cf("long",n,r)}}};function So(n,t){var e=n?wo(n,t,!0)/ww:t.getTimezoneOffset();if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function na(n,t){for(var e=n<0?"-":"",r=Math.abs(n).toString();r.length<t;)r="0"+r;return e+r}function lr(n,t){var e=t||"",r=n>0?"-":"+",i=Math.abs(n),a=na(Math.floor(i/60),2),s=na(Math.floor(i%60),2);return r+a+e+s}function pf(n,t){if(n%60===0){var e=n>0?"-":"+";return e+na(Math.abs(n)/60,2)}return lr(n,t)}function Sw(n,t){var e=n>0?"-":"+",r=Math.abs(n),i=Math.floor(r/60),a=r%60;if(a===0)return e+String(i);var s=t||"";return e+String(i)+s+na(a,2)}var Mw=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Mo=36e5,gf=6e4,Cw=2,se={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Mw};function mf(n,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);var e=t||{},r=e.additionalDigits==null?Cw:A_(e.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var i=Dw(n),a=kw(i.date,r),s=a.year,o=a.restDateString,l=Ow(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(i.time&&(u=Pw(i.time),isNaN(u)))return new Date(NaN);if(i.timeZone||e.timeZone){if(d=wo(i.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=lf(new Date(c+u)),d=lf(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function Dw(n){var t={},e=se.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=se.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){var i=se.timeZone.exec(r);i?(t.time=r.replace(i[1],""),t.timeZone=i[1].trim()):t.time=r}return t}function kw(n,t){var e=se.YYY[t],r=se.YYYYY[t],i;if(i=se.YYYY.exec(n)||r.exec(n),i){var a=i[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(i=se.YY.exec(n)||e.exec(n),i){var s=i[1];return{year:parseInt(s,10)*100,restDateString:n.slice(s.length)}}return{year:null}}function Ow(n,t){if(t===null)return null;var e,r,i,a;if(n.length===0)return r=new Date(0),r.setUTCFullYear(t),r;if(e=se.MM.exec(n),e)return r=new Date(0),i=parseInt(e[1],10)-1,bf(t,i)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(e=se.DDD.exec(n),e){r=new Date(0);var s=parseInt(e[1],10);return Aw(t,s)?(r.setUTCFullYear(t,0,s),r):new Date(NaN)}if(e=se.MMDD.exec(n),e){r=new Date(0),i=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return bf(t,i,o)?(r.setUTCFullYear(t,i,o),r):new Date(NaN)}if(e=se.Www.exec(n),e)return a=parseInt(e[1],10)-1,xf(t,a)?yf(t,a):new Date(NaN);if(e=se.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return xf(t,a,l)?yf(t,a,l):new Date(NaN)}return null}function Pw(n){var t,e,r;if(t=se.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),Co(e)?e%24*Mo:NaN;if(t=se.HHMM.exec(n),t)return e=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),Co(e,r)?e%24*Mo+r*gf:NaN;if(t=se.HHMMSS.exec(n),t){e=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Co(e,r,i)?e%24*Mo+r*gf+i*1e3:NaN}return null}function yf(n,t,e){t=t||0,e=e||0;var r=new Date(0);r.setUTCFullYear(n,0,4);var i=r.getUTCDay()||7,a=t*7+e+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var Ew=[31,28,31,30,31,30,31,31,30,31,30,31],Rw=[31,29,31,30,31,30,31,31,30,31,30,31];function vf(n){return n%400===0||n%4===0&&n%100!==0}function bf(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var r=vf(n);if(r&&e>Rw[t]||!r&&e>Ew[t])return!1}return!0}function Aw(n,t){if(t<1)return!1;var e=vf(n);return!(e&&t>366||!e&&t>365)}function xf(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Co(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var Lw=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Do(n,t,e){var r=String(t),i=e||{},a=r.match(Lw);if(a){var s=mf(i.originalDate||n,i);r=a.reduce(function(o,l){if(l[0]==="'")return o;var c=o.indexOf(l),u=o[c-1]==="'",d=o.replace(l,"'"+Tw[l[0]](s,l,null,i)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},r)}return cw(n,r,i)}var ko={exports:{}},Oo={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(r==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a]);return r}n.exports=t.default})(Oo,Oo.exports);var Iw=Oo.exports;(function(n,t){var e=zt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=e(Iw);function i(a){return(0,r.default)({},a)}n.exports=t.default})(ko,ko.exports);var Nw=ko.exports;const Fw=Bn(Nw);function Uw(n,t,e){var r=mf(n,e),i=wo(t,r,!0),a=new Date(r.getTime()-i),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function Bw(n,t,e,r){var i=Fw(r);return i.timeZone=t,i.originalDate=n,Do(Uw(n,t),e,i)}const _f=2,wf=10,Tf=12,ra=new Intl.NumberFormat(((op=document==null?void 0:document.documentElement)==null?void 0:op.lang)||"en-US");function ia(n,t={}){if(!n)return n;const e=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let r="MMM dd, YYY hh:mm a";t.short&&(r="MMM dd, YYY"),t.includeTZ&&(r+=" (z)");const i=new Date(n);return Bw(i,e,r)}catch{return console.error("Invalid value passed to formatTime",n),"(invalid date)"}}const aa=10,Sf={"1XXCount|1XX|1[0-9][0-9]":{solid:"#0072E5",light:"#4DA6FF",description:"Informational"},"SuccessfulRequests|2XXCount|2XX|2[0-9][0-9]|SUCCESS":{solid:"#0BB652",light:"#6FCC83",description:"Success"},"3XXCount|3XX|3[0-9][0-9]":{solid:"#FDC53B",light:"#FFD982",description:"Redirection"},"4XXCount|4XX|4[0-9][0-9]":{solid:"#FE9439",light:"#FFBA81",description:"Client Errors"},"5XXCount|5XX|5[0-9][0-9]":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},"errorCount|FailedRequests|FAILURE":{solid:"#FF4545",light:"#FF8484",description:"Server Errors"},nonStandard:{solid:"#6f7787",light:"#e7e7ec"},standard:{solid:"#1155cb",light:"#8ab3fa"},p99:{solid:"#1356cb",light:"#1356cb"},p95:{solid:"#1fbecd",light:"#1fbecd"},p50:{solid:"#1df97d",light:"#1df97d"},LatencyP99:{solid:"#1356cb",light:"#1356cb"},LatencyP95:{solid:"#1fbecd",light:"#1fbecd"},LatencyP50:{solid:"#1df97d",light:"#1df97d"}},Qe=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],cr=(n,t)=>(t||Qe)[n%Qe.length],Mf=(n,t)=>{n[0]==="#"&&(n=n.slice(1));let e=parseInt(n.substring(0,2),16),r=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16);e=e-t,r=r-t,i=i-t,e>255?e=255:e<0&&(e=0),r>255?r=255:r<0&&(r=0),i>255?i=255:i<0&&(i=0);const a=e.toString(16).length===1?"0"+e.toString(16):e.toString(16),s=r.toString(16).length===1?"0"+r.toString(16):r.toString(16),o=i.toString(16).length===1?"0"+i.toString(16):i.toString(16);return`#${a}${s}${o}`},Cf="#6f7787",Df={100:{background:"#f0f5fd",text:"#10599e"},200:{background:"#e5f7f4",text:"#1b6955"},300:{background:"#fff1d5",text:"#a06027"},400:{background:"#fee3b6",text:"#944d19"},500:{background:"#fedada",text:"#852021"}},Ww=n=>{var e;const t=Math.floor(parseInt(n,10)/100)*100;return((e=Df[t])==null?void 0:e.background)||"#fafafa"},zw={SUCCESS:"#6FCC83",FAILURE:"#FF8484"},Yw={"4XX":"#FFBA81","5XX":"#FF8484"},Hw={LatencyP99:"#1356cb",LatencyP95:"#1fbecd",LatencyP50:"#1df97d"},$w="#dad4c7",jw=n=>{const t=Object.entries(Sf).find(([e])=>new RegExp(e).test(n));return t&&t[1]||Sf.standard},Vw={lineTension:0,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},qw=2,Xw=0,Po=new Map,Eo=(n,t)=>t==="bytes"?Ms(n):t==="count/minute"?n.toFixed(2):ra.format(n),kf=n=>{const e=document.createElement("canvas").getContext("2d"),r=Rt({});return e.font=r.string,e.measureText(n).width},Gw=()=>{const n="label_height";if(!Po.has(n)){const t=Rt({});Po.set(n,t.lineHeight)}return Po.get(n)},Kw=n=>n.datasets.reduce((t,e)=>t+e.data.reduce((r,i)=>isNaN(i)?r:r+i,0),0),Of=(n,t)=>t.datasets.reduce((e,r,i)=>n.isDatasetVisible(i)?e+r.data.reduce((a,s)=>isNaN(s)?a:a+s,0):e,0),Pf=(n,t)=>t===0?" (0.0%)":` (${(n/t*100).toFixed(1)}%)`,Ro="#e0e4ea",Qw={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},ri=(n,t)=>{let e=1;const r=Qw[n],i=new Map;for(const a of t)i.set(a,r[e]),e=e%(r.length-1)+1;return i.set(-1,r[0]),i},Ef=new Map([[100,ri("100",[100,101,102,103])],[200,ri("200",[200,201,202,203,204,205,206,207,208,226])],[300,ri("300",[300,301,302,303,304,305,307,308])],[400,ri("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,ri("500",[500,501,502,503,504,505,506,507,508,510,511])]]),Ao=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,r=Ef.get(e);return r===void 0?Ro:r.get(t)??r.get(-1)??Ro},Zw=n=>{const t=Ao(n);return{solid:t,light:t}},sa={...Array.from({length:500},(n,t)=>100+t).reduce((n,t)=>(n[`${t}`]=Ao(`${t}`),n),{}),____OTHER____:"#DAD4C7","1XX":"#4DA6FF","2XX":"#6FCC83","3XX":"#FFD982","4XX":"#FFBA81","5XX":"#FF8484"};function Jw(n){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};$i.positioners.barChartTooltipPosition=function(i,a){if(!i.length)return!1;const s=this.chart.canvas.getBoundingClientRect(),o=n.tooltipState.width||this.width,l=s.width/2,c=Fs(a,o,l),u=a.y,d=a.x<l?"left":"center";return{x:c-n.tooltipState.offsetX,y:u-n.tooltipState.offsetY,xAlign:d}},os.modes.customInteractionMode=function(i,a){const s=pn(a,i),o=[];return os.evaluateInteractionItems(i,i.options.indexAxis||"x",s,(l,c,u)=>{i.options.indexAxis==="y"&&l.inYRange(s.y,!0)&&i.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u}),i.options.indexAxis==="x"&&l.inXRange(s.x,!0)&&i.data.datasets[c].data[u]&&o.push({element:l,datasetIndex:c,index:u})}),o};const e=n.numLabels.value>25?wf:Tf;return h.computed(()=>{var i,a,s,o,l,c,u,d;return{indexAxis:n.indexAxis,skipNull:!0,scales:{x:{border:{display:!1},stacked:n.stacked.value,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,font:e,callback:function(f,p){const v=this;if(v.chart.options.indexAxis===v.axis){f=v.getLabelForValue(p);const x=10;return f&&f.length>x?f.slice(0,x)+"...":f}return v.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="y"?!st((i=n.metricAxesTitle)==null?void 0:i.value):!st((a=n.dimensionAxesTitle)==null?void 0:a.value),text:n.indexAxis==="y"?(s=n.metricAxesTitle)==null?void 0:s.value:(o=n.dimensionAxesTitle)==null?void 0:o.value,padding:{top:10},font:{weight:"bold"}}},y:{border:{display:!1},stacked:n.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{font:e,callback:function(f,p){const v=this;return v.chart.options.indexAxis===v.axis?(f=v.getLabelForValue(p),f&&f.length>aa?f.slice(0,aa)+"...":f):v.getLabelForValue(Number(f))}},title:{display:n.indexAxis==="x"?!st((l=n.metricAxesTitle)==null?void 0:l.value):!st((c=n.dimensionAxesTitle)==null?void 0:c.value),text:n.indexAxis==="x"?(u=n.metricAxesTitle)==null?void 0:u.value:(d=n.dimensionAxesTitle)==null?void 0:d.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:f=>{Ns(n.tooltipState,f)}}},interaction:{mode:"customInteractionMode",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Se.register(...Tv);const t1=(n,t)=>{const e=t.datasets.map(i=>i.label),r=n.datasets.map(i=>i.label);return n.datasets.length===t.datasets.length&&e.every((i,a)=>i===r[a])};function e1(n,t,e,r,i){const a=h.shallowRef(null),s=(o,l)=>{if(t.value)return new Se(t.value,{type:n,data:o,plugins:r,options:l})};return h.onMounted(()=>{a.value=s(e.value,i.value)}),h.onBeforeUnmount(()=>{st(a.value)||a.value.destroy()}),h.watch(e,(o,l)=>{if(t1(l,o)&&!st(a.value)){for(const[c,u]of o.datasets.entries())Object.assign(a.value.data.datasets[c],u);a.value.data.labels=o.labels,a.value.update()}else st(a.value)||a.value.destroy(),a.value=s(o,i.value)}),h.watch(t,()=>{st(a.value)||a.value.destroy(),a.value=s(e.value,i.value)}),h.watch(i,(o,l)=>{(o.indexAxis!==l.indexAxis||JSON.stringify(o.scales.x.title)!==JSON.stringify(l.scales.x.title)||JSON.stringify(o.scales.y.title)!==JSON.stringify(l.scales.y.title))&&(st(a.value)||a.value.destroy(),a.value=s(e.value,o))}),a}var Rf={exports:{}};(function(n){(function(){function t(c,u){if(u.separator===!1||c<1e3)return c.toString();var d=typeof u.separator=="string"?u.separator:",",f=[],p=Math.round(c).toString().split("");return p.reverse().forEach(function(v,x){x&&x%3===0&&f.push(d),f.push(v)}),f.reverse().join("")}function e(c,u,d){var f=c/u,p=d.round?"round":"floor";return d.decimal===!1?(c=Math[p](f),c.toString()):(d.precision?c=f:c=f<10?Math[p](f*10)/10:Math[p](f),c=c.toString(),typeof d.decimal=="string"&&(c=c.replace(".",d.decimal)),c)}var r=1e3,i=1e4,a=1e6,s=1e9,o=1e12;function l(c,u){var d;u=u||{};var f=c<0;f&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var p=u.min10k?i:r;return c<p||u.precision&&u.precision>Math.log10(c)?d=t(e(c,1,u),u):c<a?d=e(c,r,u)+"k":c<s?d=e(c,a,u)+"m":c<o?d=t(e(c,s,u),u)+"b":d=t(e(c,o,u),u)+"t",f&&(d="-"+d),u.capital&&(d=d.toUpperCase()),u.prefix&&(d=u.prefix+d),u.suffix&&(d=d+u.suffix),d}l.addCommas=t,n.exports=l})()})(Rf);var n1=Rf.exports;const ii=Bn(n1);function r1(n,t,e){const{i18n:r}=Ct.useI18n(),{translateUnit:i}=Ct.useTranslatedUnits();return{legendValues:h.computed(()=>n.value.datasets.reduce((s,o)=>{const l=o.total?o.total:o.data.reduce((u,d)=>u+(typeof d=="number"?Number(d)||0:Number(d&&d.y)||0),0);let c;if(e.value==="bytes")c=isNaN(l)?"0":Ms(l);else{const u=i(e.value,l);c=r&&r.t("legend.datapointValueDisplay",{value:ii(l,{capital:!0}),unit:u})||`${ii(l,{capital:!0})} ${e.value}`}return{...s,[o.label]:{raw:l,formatted:c}}},{}))}}function i1(n){return h.computed(()=>{var i;if(!((i=n.value)!=null&&i.meta))return"";const e=n.value.meta.start_ms,r=n.value.meta.end_ms;return e&&r?`${ia(e)} - ${ia(r,{includeTZ:!0})}`:""})}function a1(n){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:r=>({label:r.dataset.label,value:r.label})}};return $i.positioners.doughnutChartTooltipPosition=function(r,i){if(!r.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=n.tooltipState.width||this.width,o=a.width/2,l=Fs(i,s,o),c=i.y,u=i.x<o?"left":"center";return{x:l-n.tooltipState.offsetX,y:c,xAlign:u}},{options:h.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},tooltip:{...t,external:r=>{Ns(n.tooltipState,r)}}}}))}}function s1(n){const t=h.computed(()=>{var l,c;return{type:"timeseries",display:!0,grid:{display:!0,drawOnChartArea:!1,drawTicks:!0,drawBorder:!1},ticks:{padding:10,autoSkipPadding:100,source:"auto",maxRotation:0},title:{display:!st((l=n.dimensionAxesTitle)==null?void 0:l.value),text:(c=n.dimensionAxesTitle)==null?void 0:c.value,padding:{top:2},font:{weight:"bold"}}}}),e=h.computed(()=>{var l,c;return{title:{display:!st((l=n.metricAxesTitle)==null?void 0:l.value),text:(c=n.metricAxesTitle)==null?void 0:c.value,padding:{bottom:10},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),r={enabled:!1,position:"lineChartTooltipPosition"};$i.positioners.lineChartTooltipPosition=function(l,c){if(!l.length||n.tooltipState.locked)return!1;const u=this.chart.canvas.getBoundingClientRect(),d=n.tooltipState.width||this.width,f=n.tooltipState.height||this.height,p=u.width/2,v=u.height/2,x=Fs(c,d,p);let g=P_(c,f,v);const m=c.y<v?"top":"bottom",b=c.x<p?"left":"center";return f>u.height&&(g=0),{x,y:g,xAlign:b,yAlign:m}};const i=h.computed(()=>{switch(n.granularity.value){case"minutely":return"minute";case"hourly":return"hour";case"daily":return"day";default:return"day"}}),a=h.computed(()=>c_(Number(n.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=h.computed(()=>["daily","weekly"].includes(n.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:h.computed(()=>({hover:{mode:"index",intersect:!1},elements:{point:{radius:0,hitRadius:4,hoverRadius:4}},animation:{duration:250,easing:"linear"},scales:{x:{border:{display:!1},...t.value,stacked:n.stacked.value,time:{tooltipFormat:"h:mm:ss a",unit:i.value,displayFormats:{minute:"h:mm:ss a",hour:a.value,day:s.value}}},y:{border:{display:!1},...e.value,stacked:n.stacked.value}},responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:n.legendID},legend:{display:!1},streaming:!1,tooltip:{...r,external:l=>{Ns(n.tooltipState,l)}}},interaction:{mode:"index",intersect:!1}}))}}function o1(n){const{isMultiMetric:t,hasDimensions:e,metricNames:r,barSegmentLabels:i,pivotRecords:a,rowLabels:s,colorPalette:o}=n,{i18n:l}=Ct.useI18n();return t?r.map(c=>({label:l&&l.te(`chartLabels.${c}`)&&l.t(`chartLabels.${c}`)||c,backgroundColor:cr(r.indexOf(c),Qe),data:s.map((u,d)=>e?a[`${u.id},${c}`]||0:a[`${d},${c}`]||null)})):Array.from(i).flatMap((c,u)=>{if(!c)return[];const d={},f=Array.isArray(o)?cr(u,o):o[c.name]||cr(u);return d[c.name]=f,{label:l&&l.te(`chartLabels.${c.name}`)&&l.t(`chartLabels.${c.name}`)||c.name,backgroundColor:f,data:s.map(p=>a[`${p.id},${c.id}`]||null)}})}function l1(n,t){const{i18n:e}=Ct.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const i=t.value.data,{display:a,metric_names:s}=t.value.meta,o=a&&Object.keys(a),l=s&&s.length>1,c=a&&o&&o.length>0;if(!i.length||!s)return{datasets:[],labels:[]};const u=c&&o||s,d=u[0],f=u.length>1?u[1]:u[0],p=Object.fromEntries(l?i.flatMap(y=>s.map((_,T)=>{const D=y.event[d],O=c?`${D},${_}`:`${T},${_}`,S=y.event[_];return[O,S]})):i.map(y=>{const _=c?`${y.event[d]},${y.event[f]}`:`${d},${f}`,T=y.event[s[0]];return[_,T]})),v=a[d],x=a[f],g=c&&v&&Object.entries(v).map(([y,_])=>({id:y,name:_.name}))||s.map(y=>({id:y,name:y})),m=c&&x&&Object.entries(x).map(([y,_])=>({id:y,name:_.name}))||s.map(y=>({id:y,name:y}));return!g||!m?{labels:[],datasets:[]}:{labels:c?Object.entries(a[d]).map(([,y])=>e&&e.te(`chartLabels.${y.name}`)&&e.t(`chartLabels.${y.name}`)||y.name):s.map(y=>e&&e.te(`chartLabels.${y}`)&&e.t(`chartLabels.${y}`)||y),datasets:o1({isMultiMetric:l,hasDimensions:c,metricNames:s,dimensionFieldNames:u,barSegmentLabels:m,pivotRecords:p,rowLabels:g,colorPalette:n.colorPalette||Qe})}}}catch(i){return console.error(i),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const c1=(n,t,e=1)=>Array(Math.ceil((t-n)/e)).fill(n).map((r,i)=>r+i*e),u1=n=>{if(typeof n=="string"){const t=+n;if(t)return t;try{return Kd(n).getTime()}catch(e){if(e instanceof RangeError)return 0;throw e}}return n},d1=(n,t,e,r,i)=>{const s=Math.max(t-6e4,Math.max(...(i||[]).map(c=>new Date(c.timestamp).valueOf()))),o=Math.floor((n-r)/e)*e+r,l=Math.floor((s-r)/e)*e+r+e;return c1(o,l,e)};function f1(n,t){const{i18n:e}=Ct.useI18n();return h.computed(()=>{try{if(t.value&&"meta"in t.value&&"data"in t.value){const i=t.value.data,{display:a,metric_names:s,start_ms:o,end_ms:l}=t.value.meta;if(!s)return console.error("Cannot build chart data from this explore result. Missing metric names."),{datasets:[]};const c=a&&Object.keys(a)||s,u=c&&c[0],d=a[u],f=a&&d&&Object.keys(d).map(T=>({id:T,name:d[T].name}))||s.map(T=>({id:T,name:T})),p=t.value.meta.granularity_ms;if(typeof p!="number"||isNaN(p)||!isFinite(p)||p===0)return console.error("Invalid step value:",p),{datasets:[],labels:[]};if(!i.length)return{datasets:[],labels:[]};const v=u1(o),x=d1(o,l,p,v,i),g=new Set,m=i!=null&&i.length?i.reduce((T,D)=>{const O=new Date(D.timestamp).valueOf(),S=D.event;for(const M of s)g.add(M),O in T||(T[O]={}),M in T[O]||(T[O][M]={});for(const M of s)f.forEach(k=>{S[u]===k.id||M===k.id?(T[O][M]||(T[O][M]={}),T[O][M][k.name]=Math.round(Number(S[M])*1e3)/1e3):c.length||(T[O][M]||(T[O][M]={}),T[O][M][k.name]=Math.round(Number(S[k.id])*1e3)/1e3)});return T},{}):{},b=s.length===1?s.flatMap(T=>f.map(D=>[T,D.name])):f.map(T=>[T.name,T.name]),y={},_=[...b].map(([T,D],O)=>{const S=x.map(E=>E in m&&T in m[E]?{x:E,y:m[E][T][D]||0}:{x:E,y:0});let{colorPalette:M,fill:k}=n;st(M)&&(M=Qe);const P=Array.isArray(M)?cr(O,M):M[D]||cr(O);return y[D]=P,{rawDimension:D,rawMetric:T,label:e&&e.te(`chartLabels.${D}`)&&e.t(`chartLabels.${D}`)||D,borderColor:P,backgroundColor:P,data:S,total:S.reduce((E,{y:F})=>E+Number(F),0),...Vw,fill:k,borderWidth:k?Xw:qw}});return _.sort((T,D)=>Number(T.total)<Number(D.total)?-1:1),{datasets:_,colorMap:y}}}catch(i){return console.error(i),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const h1=(n,t)=>{h.watch([n,t],(e,r,i)=>{const[a,s]=e;!s||!window||(window._AnalyticsChartDataInternal||(window._AnalyticsChartDataInternal=new Map),window._AnalyticsChartDataInternal.set(s,a),i(()=>{var o;(o=window._AnalyticsChartDataInternal)==null||o.delete(s)}))},{immediate:!0})};function p1(){const{i18n:n}=Ct.useI18n();return{translateUnit:(e,r)=>{const i=r===1,a=`chartUnits.${e}`;return n.te(a)?n.t(a,{plural:i?"":"s"}):e}}}const Ct={useBarChartOptions:Jw,useChartJSCommon:e1,useChartLegendValues:r1,useChartSelectedRange:i1,useExploreResultToDatasets:l1,useExploreResultToTimeDataset:f1,useDoughnutChartOptions:a1,useLinechartOptions:s1,useI18n:wp,useReportChartDataForSynthetics:h1,useTranslatedUnits:p1};/*!
|
|
20
20
|
* chartjs-plugin-annotation v3.0.1
|
|
21
21
|
* https://www.chartjs.org/chartjs-plugin-annotation/index
|
|
22
22
|
* (c) 2023 chartjs-plugin-annotation Contributors
|
|
23
23
|
* Released under the MIT License
|
|
24
|
-
*/const Af={modes:{point(n,t){return oa(n,t,{intersect:!0})},nearest(n,t,e){return y1(n,t,e)},x(n,t,e){return oa(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return oa(n,t,{intersect:e.intersect,axis:"y"})}}};function Lo(n,t,e){return(Af.modes[e.mode]||Af.modes.nearest)(n,t,e)}function g1(n,t,e){return e!=="x"&&e!=="y"?n.inRange(t.x,t.y,"x",!0)||n.inRange(t.x,t.y,"y",!0):n.inRange(t.x,t.y,e,!0)}function m1(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function oa(n,t,e){return n.visibleElements.filter(r=>e.intersect?r.inRange(t.x,t.y):g1(r,t,e.axis))}function y1(n,t,e){let r=Number.POSITIVE_INFINITY;return oa(n,t,e).reduce((i,a)=>{const s=a.getCenterPoint(),o=m1(t,s,e.axis),l=Jn(t,o);return l<r?(i=[a],r=l):l===r&&i.push(a),i},[]).sort((i,a)=>i._index-a._index).slice(0,1)}const b1=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,Yn=.001,la=(n,t,e)=>Math.min(e,Math.max(t,n));function v1(n,t,e){for(const r of Object.keys(n))n[r]=la(n[r],t,e);return n}function x1(n,t,e,r){if(!n||!t||e<=0)return!1;const i=r/2;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+i,2)}function Lf(n,{x:t,y:e,x2:r,y2:i},a,s){const o=s/2,l=n.x>=t-o-Yn&&n.x<=r+o+Yn,c=n.y>=e-o-Yn&&n.y<=i+o+Yn;return a==="x"?l:(a==="y"||l)&&c}function ur(n,t){const{centerX:e,centerY:r}=n.getProps(["centerX","centerY"],t);return{x:e,y:r}}function _1(n,t,e,r=!0){const i=e.split(".");let a=0;for(const s of t.split(".")){const o=i[a++];if(parseInt(s,10)<parseInt(o,10))break;if(b1(o,s)){if(r)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const If=n=>typeof n=="string"&&n.endsWith("%"),Nf=n=>parseFloat(n)/100,Ff=n=>la(Nf(n),0,1),ca=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),w1={box:n=>ca(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>ca(n.centerX,n.centerY),line:n=>ca(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>ca(n.centerX,n.centerY)};function Io(n,t){return t==="start"?0:t==="end"?n:If(t)?Ff(t)*n:n/2}function xn(n,t,e=!0){return typeof t=="number"?t:If(t)?(e?Ff(t):Nf(t))*n:n}function T1(n,t){const{x:e,width:r}=n,i=t.textAlign;return i==="center"?e+r/2:i==="end"||i==="right"?e+r:e}function No(n,t="center"){return lt(n)?{x:rt(n.x,t),y:rt(n.y,t)}:(n=rt(n,t),{x:n,y:n})}function Uf(n){return n&&(de(n.xValue)||de(n.yValue))}function ai(n,t,e){const r=e.init;if(r){if(r===!0)return Wf(t,e)}else return;return S1(n,t,e)}function Bf(n,t,e){let r=!1;return t.forEach(i=>{fe(n[i])?(r=!0,e[i]=n[i]):de(e[i])&&delete e[i]}),r}function Wf(n,t){const e=t.type||"line";return w1[e](n)}function S1(n,t,e){const r=Tt(e.init,[{chart:n,properties:t,options:e}]);if(r===!0)return Wf(t,e);if(lt(r))return r}const Fo=new Map,M1=n=>isNaN(n)||n<=0,C1=n=>n.reduce(function(t,e){return t+=e.string,t},"");function ua(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Uo(n,{x:t,y:e},r){r&&(n.translate(t,e),n.rotate(Xt(r)),n.translate(-t,-e))}function _n(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function dr(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function Bo(n,t){const e=t.content;if(ua(e))return{width:xn(e.width,t.width),height:xn(e.height,t.height)};const r=t.font,i=mt(r)?r.map(l=>Rt(l)):[Rt(r)],a=t.textStrokeWidth,s=mt(e)?e:[e],o=s.join()+C1(i)+a+(n._measureText?"-spriting":"");return Fo.has(o)||Fo.set(o,E1(n,s,i,a)),Fo.get(o)}function zf(n,t,e){const{x:r,y:i,width:a,height:s}=t;n.save(),dr(n,e);const o=_n(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),tr(n,{x:r,y:i,w:a,h:s,radius:v1(fn(e.borderRadius),0,Math.min(a,s)/2)}),n.closePath(),n.fill(),o&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function D1(n,t,e){const r=e.content;if(ua(r)){n.save(),n.globalAlpha=L1(e.opacity,r.style.opacity),n.drawImage(r,t.x,t.y,t.width,t.height),n.restore();return}const i=mt(r)?r:[r],a=e.font,s=mt(a)?a.map(d=>Rt(d)):[Rt(a)],o=e.color,l=mt(o)?o:[o],c=T1(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,k1(n,e)&&R1(n,{x:c,y:u},i,s),A1(n,{x:c,y:u},i,{fonts:s,colors:l}),n.restore()}function k1(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function O1(n,t,e,r){const{radius:i,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*Ba;if(ua(s)){n.save(),n.translate(e,r),n.rotate(l),n.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),n.restore();return}M1(i)||P1(n,{x:e,y:r,radius:i,rotation:o,style:s,rad:l})}function P1(n,{x:t,y:e,radius:r,rotation:i,style:a,rad:s}){let o,l,c,u;switch(n.beginPath(),a){default:n.arc(t,e,r,0,kt),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(s)*r,e-Math.cos(s)*r),s+=vi,n.lineTo(t+Math.sin(s)*r,e-Math.cos(s)*r),s+=vi,n.lineTo(t+Math.sin(s)*r,e-Math.cos(s)*r),n.closePath();break;case"rectRounded":u=r*.516,c=r-u,o=Math.cos(s+Te)*c,l=Math.sin(s+Te)*c,n.arc(t-o,e-l,u,s-dt,s-Et),n.arc(t+l,e-o,u,s-Et,s),n.arc(t+o,e+l,u,s,s+Et),n.arc(t-l,e+o,u,s+Et,s+dt),n.closePath();break;case"rect":if(!i){c=Math.SQRT1_2*r,n.rect(t-c,e-c,2*c,2*c);break}s+=Te;case"rectRot":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+l,e-o),n.lineTo(t+o,e+l),n.lineTo(t-l,e+o),n.closePath();break;case"crossRot":s+=Te;case"cross":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"star":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o),s+=Te,o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"line":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l);break;case"dash":n.moveTo(t,e),n.lineTo(t+Math.cos(s)*r,e+Math.sin(s)*r);break}n.fill()}function E1(n,t,e,r){n.save();const i=t.length;let a=0,s=r;for(let o=0;o<i;o++){const l=e[Math.min(o,e.length-1)];n.font=l.string;const c=t[o];a=Math.max(a,n.measureText(c).width+r),s+=l.lineHeight}return n.restore(),{width:a,height:s}}function R1(n,{x:t,y:e},r,i){n.beginPath();let a=0;r.forEach(function(s,o){const l=i[Math.min(o,i.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(s,t,e+c/2+a),a+=c}),n.stroke()}function A1(n,{x:t,y:e},r,{fonts:i,colors:a}){let s=0;r.forEach(function(o,l){const c=a[Math.min(l,a.length-1)],u=i[Math.min(l,i.length-1)],d=u.lineHeight;n.beginPath(),n.font=u.string,n.fillStyle=c,n.fillText(o,t,e+d/2+s),s+=d,n.fill()})}function L1(n,t){const e=dn(n)?n:t;return dn(e)?la(e,0,1):1}const Yf={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function fr(n,t,e){return t=typeof t=="number"?t:n.parse(t),It(t)?n.getPixelForValue(t):e}function Hn(n,t,e){const r=t[e];if(r||e==="scaleID")return r;const i=e.charAt(0),a=Object.values(n).filter(s=>s.axis&&s.axis===i);return a.length?a[0].id:i}function Hf(n,t){if(n){const e=n.options.reverse,r=fr(n,t.min,e?t.end:t.start),i=fr(n,t.max,e?t.start:t.end);return{start:r,end:i}}}function $f(n,t){const{chartArea:e,scales:r}=n,i=r[Hn(r,t,"xScaleID")],a=r[Hn(r,t,"yScaleID")];let s=e.width/2,o=e.height/2;return i&&(s=fr(i,t.xValue,i.left+i.width/2)),a&&(o=fr(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function Wo(n,t){const e=n.scales,r=e[Hn(e,t,"xScaleID")],i=e[Hn(e,t,"yScaleID")];if(!r&&!i)return{};let{left:a,right:s}=r||n.chartArea,{top:o,bottom:l}=i||n.chartArea;const c=qf(r,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=qf(i,{min:t.yMin,max:t.yMax,start:l,end:o});return o=u.start,l=u.end,{x:a,y:o,x2:s,y2:l,width:s-a,height:l-o,centerX:a+(s-a)/2,centerY:o+(l-o)/2}}function jf(n,t){if(!Uf(t)){const e=Wo(n,t);let r=t.radius;(!r||isNaN(r))&&(r=Math.min(e.width,e.height)/2,t.radius=r);const i=r*2,a=e.centerX+t.xAdjust,s=e.centerY+t.yAdjust;return{x:a-r,y:s-r,x2:a+r,y2:s+r,centerX:a,centerY:s,width:i,height:i,radius:r}}return N1(n,t)}function I1(n,t){const{scales:e,chartArea:r}=n,i=e[t.scaleID],a={x:r.left,y:r.top,x2:r.right,y2:r.bottom};return i?F1(i,a,t):U1(e,a,t),a}function Vf(n,t){const e=Wo(n,t);return e.initProperties=ai(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:z1(n,e,t),initProperties:e.initProperties}],e}function N1(n,t){const e=$f(n,t),r=t.radius*2;return{x:e.x-t.radius+t.xAdjust,y:e.y-t.radius+t.yAdjust,x2:e.x+t.radius+t.xAdjust,y2:e.y+t.radius+t.yAdjust,centerX:e.x+t.xAdjust,centerY:e.y+t.yAdjust,radius:t.radius,width:r,height:r}}function qf(n,t){const e=Hf(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function F1(n,t,e){const r=fr(n,e.value,NaN),i=fr(n,e.endValue,r);n.isHorizontal()?(t.x=r,t.x2=i):(t.y=r,t.y2=i)}function U1(n,t,e){for(const r of Object.keys(Yf)){const i=n[Hn(n,e,r)];if(i){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=Yf[r],d=Hf(i,{min:e[a],max:e[s],start:i[o],end:i[l]});t[c]=d.start,t[u]=d.end}}}function B1({properties:n,options:t},e,r,i){const{x:a,x2:s,width:o}=n;return Xf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:r.x,padding:{start:i.left,end:i.right},adjust:t.label.xAdjust,size:e.width})}function W1({properties:n,options:t},e,r,i){const{y:a,y2:s,height:o}=n;return Xf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:r.y,padding:{start:i.top,end:i.bottom},adjust:t.label.yAdjust,size:e.height})}function Xf(n,t){const{start:e,end:r,borderWidth:i}=n,{position:a,padding:{start:s,end:o},adjust:l}=t,c=r-i-e-s-o-t.size;return e+i/2+l+Io(c,a)}function z1(n,t,e){const r=e.label;r.backgroundColor="transparent",r.callout.display=!1;const i=No(r.position),a=Gt(r.padding),s=Bo(n.ctx,r),o=B1({properties:t,options:e},s,i,a),l=W1({properties:t,options:e},s,i,a),c=s.width+a.width,u=s.height+a.height;return{x:o,y:l,x2:o+c,y2:l+u,width:c,height:u,centerX:o+c/2,centerY:l+u/2,rotation:r.rotation}}function $n(n,t,e){const r=Math.cos(e),i=Math.sin(e),a=t.x,s=t.y;return{x:a+r*(n.x-a)-i*(n.y-s),y:s+i*(n.x-a)+r*(n.y-s)}}const zo=["enter","leave"],Yo=zo.concat("click");function Y1(n,t,e){t.listened=Bf(e,Yo,t.listeners),t.moveListened=!1,t._getElements=Lo,zo.forEach(r=>{fe(e[r])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(r=>{!t.listened&&fe(r.click)&&(t.listened=!0),t.moveListened||zo.forEach(i=>{fe(r[i])&&(t.listened=!0,t.moveListened=!0)})})}function H1(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return $1(n,t,e);case"click":return j1(n,t,e)}}function $1(n,t,e){if(!n.moveListened)return;let r;t.type==="mousemove"?r=Lo(n,t,e.interaction):r=[];const i=n.hovered;n.hovered=r;const a={state:n,event:t};let s=Gf(a,"leave",i,r);return Gf(a,"enter",r,i)||s}function Gf({state:n,event:t},e,r,i){let a;for(const s of r)i.indexOf(s)<0&&(a=Kf(s.options[e]||n.listeners[e],s,t)||a);return a}function j1(n,t,e){const r=n.listeners,i=Lo(n,t,e.interaction);let a;for(const s of i)a=Kf(s.options.click||r.click,s,t)||a;return a}function Kf(n,t,e){return Tt(n,[t.$context,e])===!0}const da=["afterDraw","beforeDraw"];function V1(n,t,e){const r=t.visibleElements;t.hooked=Bf(e,da,t.hooks),t.hooked||r.forEach(i=>{t.hooked||da.forEach(a=>{fe(i.options[a])&&(t.hooked=!0)})})}function Qf(n,t,e){if(n.hooked){const r=t.options[e]||n.hooks[e];return Tt(r,[t.$context])}}function q1(n,t,e){const r=Z1(n.scales,t,e);let i=Zf(t,r,"min","suggestedMin");i=Zf(t,r,"max","suggestedMax")||i,i&&fe(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function X1(n,t){for(const e of n)K1(e,t)}function Zf(n,t,e,r){if(It(t[e])&&!G1(n.options,e,r)){const i=n[e]!==t[e];return n[e]=t[e],i}}function G1(n,t,e){return de(n[t])||de(n[e])}function K1(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const r=Hn(t,n,e);r&&!t[r]&&Q1(n,e)&&console.warn(`No scale found with id '${r}' for annotation '${n.id}'`)}}function Q1(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const r of["Min","Max","Value"])if(de(n[e+r]))return!0;return!1}function Z1(n,t,e){const r=t.axis,i=t.id,a=r+"ScaleID",s={min:rt(t.min,Number.NEGATIVE_INFINITY),max:rt(t.max,Number.POSITIVE_INFINITY)};for(const o of e)o.scaleID===i?Jf(o,t,["value","endValue"],s):Hn(n,o,a)===i&&Jf(o,t,[r+"Min",r+"Max",r+"Value"],s);return s}function Jf(n,t,e,r){for(const i of e){const a=n[i];if(de(a)){const s=t.parse(a);r.min=Math.min(r.min,s),r.max=Math.max(r.max,s)}}}class hr extends te{inRange(t,e,r,i){const{x:a,y:s}=$n({x:t,y:e},this.getCenterPoint(i),Xt(-this.options.rotation));return Lf({x:a,y:s},this.getProps(["x","y","x2","y2"],i),r,this.options.borderWidth)}getCenterPoint(t){return ur(this,t)}draw(t){t.save(),Uo(t,this.getCenterPoint(),this.options.rotation),zf(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return Vf(t,e)}}hr.id="boxAnnotation",hr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},hr.defaultRoutes={borderColor:"color",backgroundColor:"color"},hr.descriptors={label:{_fallback:!0}};const th=["left","bottom","top","right"];class si extends te{inRange(t,e,r,i){const{x:a,y:s}=$n({x:t,y:e},this.getCenterPoint(i),Xt(-this.rotation));return Lf({x:a,y:s},this.getProps(["x","y","x2","y2"],i),r,this.options.borderWidth)}getCenterPoint(t){return ur(this,t)}draw(t){const e=this.options,r=!de(this._visible)||this._visible;!e.display||!e.content||!r||(t.save(),Uo(t,this.getCenterPoint(),this.rotation),tT(t,this),zf(t,this,e),D1(t,oT(this),e),t.restore())}resolveElementProperties(t,e){let r;if(Uf(e))r=$f(t,e);else{const{centerX:o,centerY:l}=Wo(t,e);r={x:o,y:l}}const i=Gt(e.padding),a=Bo(t.ctx,e),s=J1(r,a,e,i);return{initProperties:ai(t,s,e),pointX:r.x,pointY:r.y,...s,rotation:e.rotation}}}si.id="labelAnnotation",si.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},si.defaultRoutes={borderColor:"color"};function J1(n,t,e,r){const i=t.width+r.width+e.borderWidth,a=t.height+r.height+e.borderWidth,s=No(e.position,"center"),o=eh(n.x,i,e.xAdjust,s.x),l=eh(n.y,a,e.yAdjust,s.y);return{x:o,y:l,x2:o+i,y2:l+a,width:i,height:a,centerX:o+i/2,centerY:l+a/2}}function eh(n,t,e=0,r){return n-Io(t,r)+e}function tT(n,t){const{pointX:e,pointY:r,options:i}=t,a=i.callout,s=a&&a.display&&aT(t,a);if(!s||lT(t,a,s))return;if(n.save(),n.beginPath(),!_n(n,a))return n.restore();const{separatorStart:l,separatorEnd:c}=eT(t,s),{sideStart:u,sideEnd:d}=rT(t,s,l);(a.margin>0||i.borderWidth===0)&&(n.moveTo(l.x,l.y),n.lineTo(c.x,c.y)),n.moveTo(u.x,u.y),n.lineTo(d.x,d.y);const f=$n({x:e,y:r},t.getCenterPoint(),Xt(-t.rotation));n.lineTo(f.x,f.y),n.stroke(),n.restore()}function eT(n,t){const{x:e,y:r,x2:i,y2:a}=n,s=nT(n,t);let o,l;return t==="left"||t==="right"?(o={x:e+s,y:r},l={x:o.x,y:a}):(o={x:e,y:r+s},l={x:i,y:o.y}),{separatorStart:o,separatorEnd:l}}function nT(n,t){const{width:e,height:r,options:i}=n,a=i.callout.margin+i.borderWidth/2;return t==="right"?e+a:t==="bottom"?r+a:-a}function rT(n,t,e){const{y:r,width:i,height:a,options:s}=n,o=s.callout.start,l=iT(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:r+xn(a,o)},u={x:c.x+l,y:c.y}):(c={x:e.x+xn(i,o),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function iT(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function aT(n,t){const e=t.position;return th.includes(e)?e:sT(n,t)}function sT(n,t){const{x:e,y:r,x2:i,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:f}=n,p={x:u,y:d},b=t.start,x=xn(s,b),g=xn(o,b),m=[e,e+x,e+x,i],v=[r+g,a,r,a],y=[];for(let _=0;_<4;_++){const T=$n({x:m[_],y:v[_]},p,Xt(f));y.push({position:th[_],distance:Jn(T,{x:l,y:c})})}return y.sort((_,T)=>_.distance-T.distance)[0].position}function oT({x:n,y:t,width:e,height:r,options:i}){const a=i.borderWidth/2,s=Gt(i.padding);return{x:n+s.left+a,y:t+s.top+a,width:e-s.left-s.right-i.borderWidth,height:r-s.top-s.bottom-i.borderWidth}}function lT(n,t,e){const{pointX:r,pointY:i}=n,a=t.margin;let s=r,o=i;return e==="left"?s+=a:e==="right"?s-=a:e==="top"?o+=a:e==="bottom"&&(o-=a),n.inRange(s,o)}const Ho=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),$o=(n,t,e)=>Ho(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,nh=(n,t,e)=>Ho(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,oi=n=>n*n,cT=(n,t,{x:e,y:r,x2:i,y2:a},s)=>s==="y"?{start:Math.min(r,a),end:Math.max(r,a),value:t}:{start:Math.min(e,i),end:Math.max(e,i),value:n},rh=(n,t,e,r)=>(1-r)*(1-r)*n+2*(1-r)*r*t+r*r*e,jo=(n,t,e,r)=>({x:rh(n.x,t.x,e.x,r),y:rh(n.y,t.y,e.y,r)}),ih=(n,t,e,r)=>2*(1-r)*(t-n)+2*r*(e-t),ah=(n,t,e,r)=>-Math.atan2(ih(n.x,t.x,e.x,r),ih(n.y,t.y,e.y,r))+.5*dt;class li extends te{inRange(t,e,r,i){const a=this.options.borderWidth/2;if(r!=="x"&&r!=="y"){const s={mouseX:t,mouseY:e},{path:o,ctx:l}=this;if(o){_n(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,f=e*u.currentDevicePixelRatio,p=l.isPointInStroke(o,d,f)||Vo(this,s,i);return l.restore(),p}const c=oi(a);return hT(this,s,c,i)||Vo(this,s,i)}return uT(this,{mouseX:t,mouseY:e},r,{hBorderWidth:a,useFinalPosition:i})}getCenterPoint(t){return ur(this,t)}draw(t){const{x:e,y:r,x2:i,y2:a,cp:s,options:o}=this;if(t.save(),!_n(t,o))return t.restore();dr(t,o);const l=Math.sqrt(Math.pow(i-e,2)+Math.pow(a-r,2));if(o.curve&&s)return _T(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=uh(this),p=Math.atan2(a-r,i-e);t.translate(e,r),t.rotate(p),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-f,0),t.shadowColor=o.borderShadowColor,t.stroke(),qo(t,0,d,c),qo(t,l,-f,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const r=I1(t,e),{x:i,y:a,x2:s,y2:o}=r,l=dT(r,t.chartArea),c=l?fT({x:i,y:a},{x:s,y:o},t.chartArea):{x:i,y:a,x2:s,y2:o,width:Math.abs(s-i),height:Math.abs(o-a)};if(c.centerX=(s+i)/2,c.centerY=(o+a)/2,c.initProperties=ai(t,c,e),e.curve){const d={x:c.x,y:c.y},f={x:c.x2,y:c.y2};c.cp=xT(c,e,Jn(d,f))}const u=pT(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}li.id="lineAnnotation";const sh={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};li.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},sh),fill:!1,length:12,start:Object.assign({},sh),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},si.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},li.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},li.defaultRoutes={borderColor:"color"};function uT(n,{mouseX:t,mouseY:e},r,{hBorderWidth:i,useFinalPosition:a}){const s=cT(t,e,n.getProps(["x","y","x2","y2"],a),r);return s.value>=s.start-i&&s.value<=s.end+i||Vo(n,{mouseX:t,mouseY:e},a,r)}function dT({x:n,y:t,x2:e,y2:r},{top:i,right:a,bottom:s,left:o}){return!(n<o&&e<o||n>a&&e>a||t<i&&r<i||t>s&&r>s)}function oh({x:n,y:t},e,{top:r,right:i,bottom:a,left:s}){return n<s&&(t=nh(s,{x:n,y:t},e),n=s),n>i&&(t=nh(i,{x:n,y:t},e),n=i),t<r&&(n=$o(r,{x:n,y:t},e),t=r),t>a&&(n=$o(a,{x:n,y:t},e),t=a),{x:n,y:t}}function fT(n,t,e){const{x:r,y:i}=oh(n,t,e),{x:a,y:s}=oh(t,n,e);return{x:r,y:i,x2:a,y2:s,width:Math.abs(a-r),height:Math.abs(s-i)}}function hT(n,{mouseX:t,mouseY:e},r=Yn,i){const{x:a,y:s,x2:o,y2:l}=n.getProps(["x","y","x2","y2"],i),c=o-a,u=l-s,d=oi(c)+oi(u),f=d===0?-1:((t-a)*c+(e-s)*u)/d;let p,b;return f<0?(p=a,b=s):f>1?(p=o,b=l):(p=a+f*c,b=s+f*u),oi(t-p)+oi(e-b)<=r}function Vo(n,{mouseX:t,mouseY:e},r,i){const a=n.label;return a.options.display&&a.inRange(t,e,i,r)}function pT(n,t,e){const r=e.borderWidth,i=Gt(e.padding),a=Bo(n.ctx,e),s=a.width+i.width+r,o=a.height+i.height+r;return mT(t,e,{width:s,height:o,padding:i},n.chartArea)}function gT(n){const{x:t,y:e,x2:r,y2:i}=n,a=Math.atan2(i-e,r-t);return a>dt/2?a-dt:a<dt/-2?a+dt:a}function mT(n,t,e,r){const{width:i,height:a,padding:s}=e,{xAdjust:o,yAdjust:l}=t,c={x:n.x,y:n.y},u={x:n.x2,y:n.y2},d=t.rotation==="auto"?gT(n):Xt(t.rotation),f=yT(i,a,d),p=bT(n,t,{labelSize:f,padding:s},r),b=n.cp?jo(c,n.cp,u,p):Ho(c,u,p),x={size:f.w,min:r.left,max:r.right,padding:s.left},g={size:f.h,min:r.top,max:r.bottom,padding:s.top},m=ch(b.x,x)+o,v=ch(b.y,g)+l;return{x:m-i/2,y:v-a/2,x2:m+i/2,y2:v+a/2,centerX:m,centerY:v,pointX:b.x,pointY:b.y,width:i,height:a,rotation:xi(d)}}function yT(n,t,e){const r=Math.cos(e),i=Math.sin(e);return{w:Math.abs(n*r)+Math.abs(t*i),h:Math.abs(n*i)+Math.abs(t*r)}}function bT(n,t,e,r){let i;const a=vT(n,r);return t.position==="start"?i=lh({w:n.x2-n.x,h:n.y2-n.y},e,t,a):t.position==="end"?i=1-lh({w:n.x-n.x2,h:n.y-n.y2},e,t,a):i=Io(1,t.position),i}function lh(n,t,e,r){const{labelSize:i,padding:a}=t,s=n.w*r.dx,o=n.h*r.dy,l=s>0&&(i.w/2+a.left-r.x)/s,c=o>0&&(i.h/2+a.top-r.y)/o;return la(Math.max(l,c),0,.25)}function vT(n,t){const{x:e,x2:r,y:i,y2:a}=n,s=Math.min(i,a)-t.top,o=Math.min(e,r)-t.left,l=t.bottom-Math.max(i,a),c=t.right-Math.max(e,r);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function ch(n,t){const{size:e,min:r,max:i,padding:a}=t,s=e/2;return e>i-r?(i+r)/2:(r>=n-a-s&&(n=r+a+s),i<=n+a+s&&(n=i-a-s),n)}function uh(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,r=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:r,startAdjust:dh(n,e),endAdjust:dh(n,r)}}function dh(n,t){if(!t||!t.display)return 0;const{length:e,width:r}=t,i=n.options.borderWidth/2,a={x:e,y:r+i};return Math.abs($o(0,a,{x:0,y:i}))}function qo(n,t,e,r){if(!r||!r.display)return;const{length:i,width:a,fill:s,backgroundColor:o,borderColor:l}=r,c=Math.abs(t-i)+e;n.beginPath(),dr(n,r),_n(n,r),n.moveTo(c,-a),n.lineTo(t+e,0),n.lineTo(c,a),s===!0?(n.fillStyle=o||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=r.borderShadowColor,n.stroke()}function xT(n,t,e){const{x:r,y:i,x2:a,y2:s,centerX:o,centerY:l}=n,c=Math.atan2(s-i,a-r),u=No(t.controlPoint,0),d={x:o+xn(e,u.x,!1),y:l+xn(e,u.y,!1)};return $n(d,{x:o,y:l},c)}function fh(n,{x:t,y:e},{angle:r,adjust:i},a){!a||!a.display||(n.save(),n.translate(t,e),n.rotate(r),qo(n,0,-i,a),n.restore())}function _T(n,t,e,r){const{x:i,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=uh(t),p={x:i,y:a},b={x:s,y:o},x=ah(p,e,b,0),g=ah(p,e,b,1)-dt,m=jo(p,e,b,d/r),v=jo(p,e,b,1-f/r),y=new Path2D;n.beginPath(),y.moveTo(m.x,m.y),y.quadraticCurveTo(e.x,e.y,v.x,v.y),n.shadowColor=l.borderShadowColor,n.stroke(y),t.path=y,t.ctx=n,fh(n,m,{angle:x,adjust:d},c),fh(n,v,{angle:g,adjust:f},u)}class ci extends te{inRange(t,e,r,i){const a=this.options.rotation,s=this.options.borderWidth;if(r!=="x"&&r!=="y")return wT({x:t,y:e},this.getProps(["width","height","centerX","centerY"],i),a,s);const{x:o,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],i),d=s/2,f=r==="y"?{start:l,end:u}:{start:o,end:c},p=$n({x:t,y:e},this.getCenterPoint(i),Xt(-a));return p[r]>=f.start-d-Yn&&p[r]<=f.end+d+Yn}getCenterPoint(t){return ur(this,t)}draw(t){const{width:e,height:r,centerX:i,centerY:a,options:s}=this;t.save(),Uo(t,this.getCenterPoint(),s.rotation),dr(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=_n(t,s);t.ellipse(i,a,r/2,e/2,dt/2,0,2*dt),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return Vf(t,e)}}ci.id="ellipseAnnotation",ci.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},hr.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},ci.defaultRoutes={borderColor:"color",backgroundColor:"color"},ci.descriptors={label:{_fallback:!0}};function wT(n,t,e,r){const{width:i,height:a,centerX:s,centerY:o}=t,l=i/2,c=a/2;if(l<=0||c<=0)return!1;const u=Xt(e||0),d=r/2||0,f=Math.cos(u),p=Math.sin(u),b=Math.pow(f*(n.x-s)+p*(n.y-o),2),x=Math.pow(p*(n.x-s)-f*(n.y-o),2);return b/Math.pow(l+d,2)+x/Math.pow(c+d,2)<=1.0001}class fa extends te{inRange(t,e,r,i){const{x:a,y:s,x2:o,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],i),u=this.options.borderWidth;if(r!=="x"&&r!=="y")return x1({x:t,y:e},this.getCenterPoint(i),c/2,u);const d=u/2,f=r==="y"?{start:s,end:l,value:e}:{start:a,end:o,value:t};return f.value>=f.start-d&&f.value<=f.end+d}getCenterPoint(t){return ur(this,t)}draw(t){const e=this.options,r=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,dr(t,e);const i=_n(t,e);O1(t,this,this.centerX,this.centerY),i&&!ua(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=r}resolveElementProperties(t,e){const r=jf(t,e);return r.initProperties=ai(t,r,e),r}}fa.id="pointAnnotation",fa.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},fa.defaultRoutes={borderColor:"color",backgroundColor:"color"};class ha extends te{inRange(t,e,r,i){if(r!=="x"&&r!=="y")return this.options.radius>=.1&&this.elements.length>1&&ST(this.elements,t,e,i);const a=$n({x:t,y:e},this.getCenterPoint(i),Xt(-this.options.rotation)),s=this.elements.map(c=>r==="y"?c.bY:c.bX),o=Math.min(...s),l=Math.max(...s);return a[r]>=o&&a[r]<=l}getCenterPoint(t){return ur(this,t)}draw(t){const{elements:e,options:r}=this;t.save(),t.beginPath(),t.fillStyle=r.backgroundColor,dr(t,r);const i=_n(t,r);let a=!0;for(const s of e)a?(t.moveTo(s.x,s.y),a=!1):t.lineTo(s.x,s.y);t.closePath(),t.fill(),i&&(t.shadowColor=r.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const r=jf(t,e),{sides:i,rotation:a}=e,s=[],o=2*dt/i;let l=a*Ba;for(let c=0;c<i;c++,l+=o){const u=TT(r,e,l);u.initProperties=ai(t,r,e),s.push(u)}return r.elements=s,r}}ha.id="polygonAnnotation",ha.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},ha.defaultRoutes={borderColor:"color",backgroundColor:"color"};function TT({centerX:n,centerY:t},{radius:e,borderWidth:r},i){const a=r/2,s=Math.sin(i),o=Math.cos(i),l={x:n+s*e,y:t-o*e};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:n+s*(e+a),bY:t-o*(e+a)}}}function ST(n,t,e,r){let i=!1,a=n[n.length-1].getProps(["bX","bY"],r);for(const s of n){const o=s.getProps(["bX","bY"],r);o.bY>e!=a.bY>e&&t<(a.bX-o.bX)*(e-o.bY)/(a.bY-o.bY)+o.bX&&(i=!i),a=o}return i}const wn={box:hr,ellipse:ci,label:si,line:li,point:fa,polygon:ha};Object.keys(wn).forEach(n=>{Ut.describe(`elements.${wn[n].id}`,{_fallback:"plugins.annotation.common"})});const MT={update:Object.assign},CT=Yo.concat(da),hh=(n,t)=>lt(t)?Ko(n,t):n,Xo=n=>n==="color"||n==="font";function Go(n="line"){return wn[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function DT(n,t,e,r){const i=OT(n,e.animations,r),a=t.annotations,s=RT(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=ph(s,o,l.type),u=l.setContext(ET(n,c,l)),d=c.resolveElementProperties(n,u);d.skip=kT(d),"elements"in d&&(PT(c,d.elements,u,i),delete d.elements),de(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=gh(u),i.update(c,d)}}function kT(n){return isNaN(n.x)||isNaN(n.y)}function OT(n,t,e){return e==="reset"||e==="none"||e==="resize"?MT:new Ja(n,t)}function PT(n,t,e,r){const i=n.elements||(n.elements=[]);i.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=ph(i,a,s.type,s.initProperties),c=e[s.optionScope].override(s);o.options=gh(c),r.update(l,o)}}function ph(n,t,e,r){const i=wn[Go(e)];let a=n[t];return(!a||!(a instanceof i))&&(a=n[t]=new i,Object.assign(a,r)),a}function gh(n){const t=wn[Go(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,Ko(n,t.defaults),Ko(n,t.defaultRoutes));for(const r of CT)e[r]=n[r];return e}function Ko(n,t){const e={};for(const r of Object.keys(t)){const i=t[r],a=n[r];Xo(r)&&mt(a)?e[r]=a.map(s=>hh(s,i)):e[r]=hh(a,i)}return e}function ET(n,t,e){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,id:e.id,type:"annotation"}))}function RT(n,t){const e=t.length,r=n.length;if(r<e){const i=e-r;n.splice(r,0,...new Array(i))}else r>e&&n.splice(e,r-e);return n}var AT="3.0.1";const Tn=new Map,LT=Yo.concat(da);var mh={id:"annotation",version:AT,beforeRegister(){_1("chart.js","4.0",Se.version)},afterRegister(){Se.register(wn)},afterUnregister(){Se.unregister(wn)},beforeInit(n){Tn.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const r=Tn.get(n),i=r.annotations=[];let a=e.annotations;lt(a)?Object.keys(a).forEach(s=>{const o=a[s];lt(o)&&(o.id=s,i.push(o))}):mt(a)&&i.push(...a),X1(i,n.scales)},afterDataLimits(n,t){const e=Tn.get(n);q1(n,t.scale,e.annotations.filter(r=>r.display&&r.adjustScaleRange))},afterUpdate(n,t,e){const r=Tn.get(n);Y1(n,r,e),DT(n,r,e,t.mode),r.visibleElements=r.elements.filter(i=>!i.skip&&i.options.display),V1(n,r,e)},beforeDatasetsDraw(n,t,e){pa(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){pa(n,"afterDatasetsDraw",e.clip)},beforeDraw(n,t,e){pa(n,"beforeDraw",e.clip)},afterDraw(n,t,e){pa(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const r=Tn.get(n);H1(r,t.event,e)&&(t.changed=!0)},afterDestroy(n){Tn.delete(n)},_getState(n){return Tn.get(n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!LT.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${wn[Go(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Xo,_fallback:!0},_indexable:Xo}},additionalOptionScopes:[""]};function pa(n,t,e){const{ctx:r,chartArea:i}=n,a=Tn.get(n);e&&Pr(r,i);const s=IT(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)NT(r,i,a,o);e&&Er(r)}function IT(n,t){const e=[];for(const r of n)if(r.options.drawTime===t&&e.push({element:r,main:!0}),r.elements&&r.elements.length)for(const i of r.elements)i.options.display&&i.options.drawTime===t&&e.push({element:i});return e}function NT(n,t,e,r){const i=r.element;r.main?(Qf(e,i,"beforeDraw"),i.draw(n,t),Qf(e,i,"afterDraw")):i.draw(n,t)}const ga="24px",yh=(n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e},FT=n=>(h.pushScopeId("data-v-cc9efb94"),n=n(),h.popScopeId(),n),UT=["aria-hidden"],BT={key:0,"data-testid":"kui-icon-svg-title"},WT=FT(()=>h.createElementVNode("path",{d:"M9 20C8.45 20 7.97917 19.8042 7.5875 19.4125C7.19583 19.0208 7 18.55 7 18C7 17.45 7.19583 16.9792 7.5875 16.5875C7.97917 16.1958 8.45 16 9 16C9.55 16 10.0208 16.1958 10.4125 16.5875C10.8042 16.9792 11 17.45 11 18C11 18.55 10.8042 19.0208 10.4125 19.4125C10.0208 19.8042 9.55 20 9 20ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1958 19.0208 13 18.55 13 18C13 17.45 13.1958 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0208 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20ZM9 14C8.45 14 7.97917 13.8042 7.5875 13.4125C7.19583 13.0208 7 12.55 7 12C7 11.45 7.19583 10.9792 7.5875 10.5875C7.97917 10.1958 8.45 10 9 10C9.55 10 10.0208 10.1958 10.4125 10.5875C10.8042 10.9792 11 11.45 11 12C11 12.55 10.8042 13.0208 10.4125 13.4125C10.0208 13.8042 9.55 14 9 14ZM15 14C14.45 14 13.9792 13.8042 13.5875 13.4125C13.1958 13.0208 13 12.55 13 12C13 11.45 13.1958 10.9792 13.5875 10.5875C13.9792 10.1958 14.45 10 15 10C15.55 10 16.0208 10.1958 16.4125 10.5875C16.8042 10.9792 17 11.45 17 12C17 12.55 16.8042 13.0208 16.4125 13.4125C16.0208 13.8042 15.55 14 15 14ZM9 8C8.45 8 7.97917 7.80417 7.5875 7.4125C7.19583 7.02083 7 6.55 7 6C7 5.45 7.19583 4.97917 7.5875 4.5875C7.97917 4.19583 8.45 4 9 4C9.55 4 10.0208 4.19583 10.4125 4.5875C10.8042 4.97917 11 5.45 11 6C11 6.55 10.8042 7.02083 10.4125 7.4125C10.0208 7.80417 9.55 8 9 8ZM15 8C14.45 8 13.9792 7.80417 13.5875 7.4125C13.1958 7.02083 13 6.55 13 6C13 5.45 13.1958 4.97917 13.5875 4.5875C13.9792 4.19583 14.45 4 15 4C15.55 4 16.0208 4.19583 16.4125 4.5875C16.8042 4.97917 17 5.45 17 6C17 6.55 16.8042 7.02083 16.4125 7.4125C16.0208 7.80417 15.55 8 15 8Z",fill:"currentColor"},null,-1)),zT=h.defineComponent({__name:"DragIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const i=String(t.size).replace(/px/gi,""),a=Number(i);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),r=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(i,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon drag-icon","data-testid":"kui-icon-wrapper-drag-icon",style:h.normalizeStyle(r.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-drag-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",BT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),WT],8,UT))]),_:1},8,["aria-hidden","style"]))}}),YT=yh(zT,[["__scopeId","data-v-cc9efb94"]]),HT=n=>(h.pushScopeId("data-v-976cebe6"),n=n(),h.popScopeId(),n),$T=["aria-hidden"],jT={key:0,"data-testid":"kui-icon-svg-title"},VT=HT(()=>h.createElementVNode("path",{d:"M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",fill:"currentColor"},null,-1)),qT=h.defineComponent({__name:"WarningIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const i=String(t.size).replace(/px/gi,""),a=Number(i);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),r=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(i,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon warning-icon","data-testid":"kui-icon-wrapper-warning-icon",style:h.normalizeStyle(r.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-warning-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",jT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),VT],8,$T))]),_:1},8,["aria-hidden","style"]))}}),XT=yh(qT,[["__scopeId","data-v-976cebe6"]]),GT="#6c7489",KT="#995c00",QT="20px",bh="24px",ZT="40px",JT="48px",tS={class:"tooltip-title"},eS={class:"title font-bold"},nS={key:1,class:"subtitle"},rS={class:"tooltip"},iS={key:0},aS={class:"display-label"},sS={class:"display-value"},oS=h.defineComponent({__name:"ChartTooltip",props:{showTooltip:{type:Boolean,required:!0,default:!1},left:{type:String,required:!1,default:null},top:{type:String,required:!1,default:null},tooltipTitle:{type:String,required:!1,default:""},context:{type:[String,Number],required:!1,default:""},series:{type:Array,required:!0,default:()=>[]},locked:{type:Boolean,required:!1,default:!1}},emits:["dimensions","top","left"],setup(n,{emit:t}){const e=t,r=n,i=h.ref(null),a=h.ref(!1),s=h.ref({x:0,y:0}),o=h.ref({x:0,y:0}),l=h.ref({left:r.left,top:r.top});h.watch(i,p=>{if(p){const{width:b,height:x}=p.getBoundingClientRect();e("dimensions",{width:b,height:x})}}),h.watch(()=>r.locked,p=>{p?(l.value.left=r.left,l.value.top=r.top):p===!1&&(e("top",l.value.top),e("left",l.value.left))});function c(p){if(i.value){a.value=!0;const b=window.getComputedStyle(i.value),x=b.transform||b.webkitTransform||b.mozTransform,g=new DOMMatrix(x),m=g.m41,v=g.m42;s.value={x:m,y:v},o.value={x:p.clientX,y:p.clientY},window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)}}let u=null;function d(p){p.preventDefault(),p.stopPropagation(),a.value&&(u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{const b=p.clientX-o.value.x,x=p.clientY-o.value.y;l.value.left=`${s.value.x+b}px`,l.value.top=`${s.value.y+x}px`}))}function f(){a.value=!1,u!==null&&window.cancelAnimationFrame(u),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)}return(p,b)=>n.showTooltip?(h.openBlock(),h.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:i,class:h.normalizeClass(["tooltip-container",{locked:n.locked}]),style:h.normalizeStyle({transform:n.locked?`translate(${l.value.left}, ${l.value.top})`:`translate(${n.left}, ${n.top})`,left:"0",top:"0",pointerEvents:n.locked?"all":"none"}),onMousedown:c},[h.createElementVNode("div",tS,[h.createElementVNode("span",eS,h.toDisplayString(n.tooltipTitle),1),n.locked?(h.openBlock(),h.createBlock(h.unref(YT),{key:0,class:"drag-icon",color:h.unref(GT)},null,8,["color"])):h.createCommentVNode("",!0),n.context?(h.openBlock(),h.createElementBlock("span",nS,h.toDisplayString(n.context),1)):h.createCommentVNode("",!0)]),h.createElementVNode("ul",rS,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.series,({backgroundColor:x,borderColor:g,label:m,value:v})=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:m},[n.series.length?(h.openBlock(),h.createElementBlock("li",iS,[h.createElementVNode("div",{class:"tooltip-legend",style:h.normalizeStyle({background:x,"border-color":g})},null,4),h.createElementVNode("span",aS,h.toDisplayString(m),1),h.createElementVNode("span",sS,h.toDisplayString(v),1)])):h.createCommentVNode("",!0)],64))),128))])],38)):h.createCommentVNode("",!0)}}),Ze=(n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e},Qo=Ze(oS,[["__scopeId","data-v-d8d2d0cd"]]),lS=["onClick"],cS=["title"],uS={key:0,class:"sub-label"},Zo=Ze(h.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Object,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(n){h.useCssVars(y=>({"1c6c065c":o.value}));const t=n,e=h.ref(),r=h.ref([]),i=h.inject("showLegendValues",!0),a=h.inject("legendPosition",h.ref(Wt.Right)),s=h.ref([]),o=h.ref(bh),l=()=>{const y=e.value;if(!y||!r.value||y.children.length===0)return 0;const _=y.children[0].getBoundingClientRect().top;for(const T of r.value)if(T.getBoundingClientRect().top>_)return!0;return!1},c=h.computed(()=>t.items.length>2||a.value===Wt.Right),u=()=>{e.value&&a.value===Wt.Bottom&&(l()?o.value=JT:o.value=bh)},d=()=>{if(e.value&&a.value===Wt.Bottom){let y=0;r.value.forEach(T=>{const D=Array.from(T.children).reduce((O,S)=>O+S.offsetWidth,0);D>y&&(y=D)});const _=parseInt(ZT,10);e.value.style.gridTemplateColumns=`repeat(auto-fit, ${y+_}px)`}u()},f=()=>{if(t.items.length!==s.value.length)return s.value=t.items,!0;for(let y=0;y<t.items.length;y++)if(t.items[y].text!==s.value[y].text)return s.value=t.items,!0;return!1};h.watch(()=>t.items,()=>{f()&&d()},{immediate:!0,flush:"post"});const p=h.ref(0),b=h.ref(0),x=new ResizeObserver(Zd(y=>{const _=y[0],T=_.contentRect.width,D=_.contentRect.height;T!==p.value&&D===b.value&&d(),p.value=T,b.value=D},100));h.watch(()=>a.value,()=>{d()}),h.onMounted(()=>{s.value=t.items,e.value&&x.observe(e.value),window.requestAnimationFrame(()=>{d()})}),h.onBeforeUnmount(()=>{e.value&&x.unobserve(e.value)});const g=(y=0,_)=>{if(t.chartInstance===null)return;const T=t.chartInstance instanceof Se?t.chartInstance:t.chartInstance.chart;m(y,_)?T.hide(y,_):T.show(y,_),T.update()},m=(y=0,_)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const T=t.chartInstance instanceof Se?t.chartInstance:t.chartInstance.chart,D=T.getDatasetMeta(y);return D.dataset||_===void 0?T.isDatasetVisible(y):!(D.data.length&&D.data[_].hidden)},v=y=>({[Wt.Right]:"vertical",[Wt.Bottom]:"horizontal",[Wt.Hidden]:"hidden"})[y];return(y,_)=>h.unref(a)!==h.unref(Wt).Hidden?(h.openBlock(),h.createElementBlock("ul",{key:0,ref_key:"legendContainerRef",ref:e,class:h.normalizeClass(["legend-container",v(h.unref(a))]),"data-testid":"legend"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.items,({fillStyle:T,strokeStyle:D,text:O,datasetIndex:S,index:M,value:k})=>(h.openBlock(),h.createElementBlock("li",{key:O,ref_for:!0,ref_key:"legendItemsRef",ref:r,onClick:P=>g(S,M)},[h.createElementVNode("div",{class:"legend",style:h.normalizeStyle({background:T,"border-color":D})},null,4),h.createElementVNode("div",{class:h.normalizeClass(["label-container",{"strike-through":!m(S,M)}])},[h.createElementVNode("div",{class:h.normalizeClass(["label",{"truncate-label":c.value}]),title:O},h.toDisplayString(O),11,cS),k&&h.unref(i)?(h.openBlock(),h.createElementBlock("div",uS,h.toDisplayString(k.formatted),1)):h.createCommentVNode("",!0)],2)],8,lS))),128))],2)):h.createCommentVNode("",!0)}}),[["__scopeId","data-v-554b4d9c"]]);let ma;const dS=new Uint8Array(16);function fS(){if(!ma&&(ma=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ma))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ma(dS)}const ne=[];for(let n=0;n<256;++n)ne.push((n+256).toString(16).slice(1));function hS(n,t=0){return ne[n[t+0]]+ne[n[t+1]]+ne[n[t+2]]+ne[n[t+3]]+"-"+ne[n[t+4]]+ne[n[t+5]]+"-"+ne[n[t+6]]+ne[n[t+7]]+"-"+ne[n[t+8]]+ne[n[t+9]]+"-"+ne[n[t+10]]+ne[n[t+11]]+ne[n[t+12]]+ne[n[t+13]]+ne[n[t+14]]+ne[n[t+15]]}const vh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Sn(n,t,e){if(vh.randomUUID&&!t&&!n)return vh.randomUUID();n=n||{};const r=n.random||(n.rng||fS)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){e=e||0;for(let i=0;i<16;++i)t[e+i]=r[i];return t}return hS(r)}const xh=(n,t)=>{const e=n.ctx,r=n.scales.y,i=n.scales.x,a=t[t.length-1].element;e.save(),e.strokeStyle="rgba(100, 100, 100, 1)",e.lineWidth=3,n.options.indexAxis==="x"?e.strokeRect(a.x-a.width/2,a.y,a.width,r.bottom-a.y):e.strokeRect(i.left,a.y-a.height/2,a.x-i.left,a.height),e.restore()},_h={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(n){this.clickedElements&&this.clickedElements.length&&xh(n,this.clickedElements)},afterEvent:function(n,{event:t}){var i;if(t.type!=="click"||!t.native)return;this.clicked=!this.clicked;const e=((i=n.options.interaction)==null?void 0:i.mode)||"index",r=n.getElementsAtEventForMode(t.native,e,{intersect:!1},!0);r.length&&this.clicked?(this.clickedElements=r,xh(n,this.clickedElements),this.previousHoverOption=n.options.hover,n.options.hover={mode:null}):(delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1)},beforeDestroy(n){delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1}},wh=6,pS="100%",gS="100%",mS=20,yS=20,Th=6,bS=0,vS=10,xS=10,_S=1,wS=Ze(h.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},tooltipTitle:{type:String,required:!1,default:""},legendValues:{type:Object,required:!1,default:null},metricUnit:{type:String,required:!1,default:""},orientation:{type:String,required:!1,default:"horizontal",validator:n=>["horizontal","vertical"].includes(n)},annotations:{type:Boolean,required:!1,default:!0},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},stacked:{type:Boolean,required:!1,default:!0},syntheticsDataKey:{type:String,required:!1,default:""},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),{translateUnit:r}=Ct.useTranslatedUnits(),i=h.ref(null),a=({chart:L},U)=>{var K;const j=L.data,Z=(K=j.labels)==null?void 0:K.indexOf(U);return j.datasets.reduce((N,A,Q)=>{if(L.isDatasetVisible(Q)){const X=A.data[Z];return isNaN(X)?N:N+X}else return N},0)},s=(L,U,j,Z)=>{const K=Z==="horizontal";U===null&&(U=e.t("entityNoName"));const N={type:"label",yValue:X=>K?U:a(X,U),xValue:X=>K?a(X,U):U},A={...N,position:K?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>K?0:-Math.abs(Gw()),content:X=>Eo(a(X,U),j)},Q={...N,content:X=>Pf(a(X,U),Of(X.chart,L)),position:K?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:X=>K?kf(Eo(a(X,U),j)):0,color:Cf};return{[`${U}-value`]:A,[`${U}-percent`]:Q}},o=h.ref(null),l=h.ref(),c=h.ref(Sn()),u=Sn(),d=Sn(),f=h.ref([]),p=h.ref(h.inject("legendPosition",Wt.Right)),b=h.ref({show:!1,top:"0px",left:"0px",text:"",offset:-50}),x=h.toRef(t,"metricUnit"),g=h.computed(()=>h.toRef(t,"orientation").value==="horizontal"),m=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:x,translateUnit:r,offsetX:0,offsetY:0,width:0,height:0,locked:!1,chartType:g.value?ee.HORIZONTAL_BAR:ee.VERTICAL_BAR,chartTooltipSortFn:t.chartTooltipSortFn}),v=h.ref(0),y=()=>{var L;return t.annotations&&((L=t.chartData.labels)==null?void 0:L.reduce((U,j)=>Object.assign(U,s(t.chartData,j,x.value,t.orientation)),{}))},_={id:c.value,afterUpdate(L){v.value+=1,f.value=L.options.plugins.legend.labels.generateLabels(L).map(U=>({...U,value:t.legendValues&&t.legendValues[U.text]})).sort(t.chartLegendSortFn)}},T={id:u,afterUpdate(L){L.options.plugins.annotation.annotations=t.annotations?y():{}}},S=[_,{id:"axisHover",afterEvent(L,U){if(b.value.show=!1,U.event.type==="mousemove"){const j=U.event,Z=L.options.indexAxis,K=L.scales,N=L.scales[Z].getLabelForValue(Number(L.scales[Z].getValueForPixel(j[Z])));if((Q=>Q==="x"?j.y>K.x.top:j.x<K.y.right)(Z))if(m.locked||(m.showTooltip=!1),N.length>aa){const X=L.canvas.getContext("2d").measureText(N).width,bt=Math.abs(Math.round(j.x-X*.5)),ct=Math.round(j.x+X*.5);b.value.left=Z==="x"?`${(bt>0?bt:ct)-b.value.offset}px`:`${j.x-X*.5-b.value.offset}px`,b.value.top=`${j.y-50}px`,b.value.show=!0,b.value.text=N}else b.value.show=!1;else b.value.show=!1}}},{id:d,afterUpdate(L){L.options.layout.padding.right=g.value?I.value:0}},_h,...t.annotations?[T]:[]],M=h.computed(()=>t.chartData.labels&&t.chartData.labels.length||0),k=h.ref(0),P=h.ref(0),E=new ResizeObserver(Zd(L=>{k.value=L[0].contentRect.width,P.value=L[0].contentRect.height},100)),F=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&!g.value?`${Math.max(L*(mS+Th),k.value)}px`:pS}),q=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&g.value?`${Math.max(L*(yS+Th),P.value)}px`:gS});Ct.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey")),h.onMounted(()=>{t.annotations&&Se.register(mh),i.value&&(k.value=i.value.offsetWidth,P.value=i.value.offsetHeight,E.observe(i.value))}),h.onUnmounted(()=>{i.value&&E.unobserve(i.value)});const $=h.computed(()=>{const L=Ct.useBarChartOptions({tooltipState:m,legendID:c.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle"),indexAxis:g.value?"y":"x",numLabels:M});return{...L.value,plugins:{...L.value.plugins,annotation:{annotations:y(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*wh}}}}),Y=Ct.useChartJSCommon("bar",o,h.toRef(t,"chartData"),S,$),I=h.computed(()=>{v.value;const L=t.chartData.labels,U=t.chartData.datasets,j=L.map((N,A)=>U.reduce((Q,X)=>isNaN(Number(X.data[A]))?Q:Q+Number(X.data[A]),0)),Z=Y.value?Of(Y.value,t.chartData):Kw(t.chartData);return j.map(N=>kf(Eo(N,x.value)+Pf(N,Z))).reduce((N,A)=>Math.max(N,A),0)+wh});h.onBeforeUnmount(()=>{Se.unregister(mh)});const it={[Wt.Right]:"legend-row",[Wt.Bottom]:"column"},B=h.computed(()=>{if(l.value&&Y.value){const L=window.devicePixelRatio,U=Y.value,j=U.scales.y.width*L+_S,Z=(U.scales.y.height+U.scales.y.top+U.scales.x.height)*L,K=l.value.getContext("2d");return K.scale(L,L),K.canvas.width=j,K.canvas.height=Z,K.canvas.style.width=`${j/L}px`,K.canvas.style.height=`${Z/L}px`,{scale:L,width:j*L,height:Z*L,targetCtx:K}}return null}),yt=L=>{const U=L.target;if(B.value&&Y.value&&!g.value){const j=B.value.scale,Z=B.value.targetCtx,K=B.value.width,N=B.value.height,A=Y.value,Q=A.canvas;Z.fillStyle="white",U.scrollLeft>=bS&&U.scrollLeft<=vS?(Z.globalCompositeOperation="source-over",Z.clearRect(0,0,K,N),Z.drawImage(Q,0,0,K,N,0,0,K,N),Z.globalCompositeOperation="destination-over",Z.fillRect(0,0,K,N)):(Z.globalCompositeOperation="source-over",Z.fillRect(0,(A.scales.y.height+A.scales.y.top+xS)*j,K,A.scales.x.height*j))}m.offsetY=U.scrollTop,m.offsetX=U.scrollLeft,b.value.offset=U.scrollLeft},ut=({width:L,height:U})=>{m.width=L,m.height=U};h.watch(()=>t.orientation,()=>{var L;if(l.value&&B.value){const U=B.value.width,j=B.value.height;((L=l.value)==null?void 0:L.getContext("2d")).clearRect(0,0,U,j)}m.showTooltip=!1,m.locked=!1}),h.watch(()=>t.annotations,L=>{Y.value&&(L?Y.value.options.plugins.annotation.annotations=y(t.chartData):delete Y.value.options.plugins.annotation.annotations)});const z=()=>{m.showTooltip&&(m.locked=!m.locked)};return(L,U)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",it[p.value]])},[h.createElementVNode("canvas",{ref_key:"axis",ref:l,class:"axis"},null,512),h.createElementVNode("div",{ref_key:"chartContainerRef",ref:i,class:"chart-container","on:scroll":yt,onClick:U[0]||(U[0]=j=>z())},[h.createElementVNode("div",{class:"chart-body",style:h.normalizeStyle({width:F.value,height:q.value})},[h.createElementVNode("canvas",{ref_key:"canvas",ref:o},null,512)],4)],544),b.value.show?(h.openBlock(),h.createElementBlock("div",{key:0,class:"axis-tooltip",style:h.normalizeStyle({top:b.value.top,left:b.value.left})},h.toDisplayString(b.value.text),5)):h.createCommentVNode("",!0),h.createVNode(Qo,{context:m.tooltipContext,left:m.left,locked:m.locked,series:m.tooltipSeries,"show-tooltip":m.showTooltip,"tooltip-title":n.tooltipTitle,top:m.top,onDimensions:ut},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top"]),h.createVNode(Zo,{id:c.value,"chart-instance":h.unref(Y),items:f.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-fdeee739"]]);/*!
|
|
24
|
+
*/const Af={modes:{point(n,t){return oa(n,t,{intersect:!0})},nearest(n,t,e){return y1(n,t,e)},x(n,t,e){return oa(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return oa(n,t,{intersect:e.intersect,axis:"y"})}}};function Lo(n,t,e){return(Af.modes[e.mode]||Af.modes.nearest)(n,t,e)}function g1(n,t,e){return e!=="x"&&e!=="y"?n.inRange(t.x,t.y,"x",!0)||n.inRange(t.x,t.y,"y",!0):n.inRange(t.x,t.y,e,!0)}function m1(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function oa(n,t,e){return n.visibleElements.filter(r=>e.intersect?r.inRange(t.x,t.y):g1(r,t,e.axis))}function y1(n,t,e){let r=Number.POSITIVE_INFINITY;return oa(n,t,e).reduce((i,a)=>{const s=a.getCenterPoint(),o=m1(t,s,e.axis),l=Jn(t,o);return l<r?(i=[a],r=l):l===r&&i.push(a),i},[]).sort((i,a)=>i._index-a._index).slice(0,1)}const v1=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,Yn=.001,la=(n,t,e)=>Math.min(e,Math.max(t,n));function b1(n,t,e){for(const r of Object.keys(n))n[r]=la(n[r],t,e);return n}function x1(n,t,e,r){if(!n||!t||e<=0)return!1;const i=r/2;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+i,2)}function Lf(n,{x:t,y:e,x2:r,y2:i},a,s){const o=s/2,l=n.x>=t-o-Yn&&n.x<=r+o+Yn,c=n.y>=e-o-Yn&&n.y<=i+o+Yn;return a==="x"?l:(a==="y"||l)&&c}function ur(n,t){const{centerX:e,centerY:r}=n.getProps(["centerX","centerY"],t);return{x:e,y:r}}function _1(n,t,e,r=!0){const i=e.split(".");let a=0;for(const s of t.split(".")){const o=i[a++];if(parseInt(s,10)<parseInt(o,10))break;if(v1(o,s)){if(r)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const If=n=>typeof n=="string"&&n.endsWith("%"),Nf=n=>parseFloat(n)/100,Ff=n=>la(Nf(n),0,1),ca=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),w1={box:n=>ca(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>ca(n.centerX,n.centerY),line:n=>ca(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>ca(n.centerX,n.centerY)};function Io(n,t){return t==="start"?0:t==="end"?n:If(t)?Ff(t)*n:n/2}function xn(n,t,e=!0){return typeof t=="number"?t:If(t)?(e?Ff(t):Nf(t))*n:n}function T1(n,t){const{x:e,width:r}=n,i=t.textAlign;return i==="center"?e+r/2:i==="end"||i==="right"?e+r:e}function No(n,t="center"){return lt(n)?{x:rt(n.x,t),y:rt(n.y,t)}:(n=rt(n,t),{x:n,y:n})}function Uf(n){return n&&(de(n.xValue)||de(n.yValue))}function ai(n,t,e){const r=e.init;if(r){if(r===!0)return Wf(t,e)}else return;return S1(n,t,e)}function Bf(n,t,e){let r=!1;return t.forEach(i=>{fe(n[i])?(r=!0,e[i]=n[i]):de(e[i])&&delete e[i]}),r}function Wf(n,t){const e=t.type||"line";return w1[e](n)}function S1(n,t,e){const r=Tt(e.init,[{chart:n,properties:t,options:e}]);if(r===!0)return Wf(t,e);if(lt(r))return r}const Fo=new Map,M1=n=>isNaN(n)||n<=0,C1=n=>n.reduce(function(t,e){return t+=e.string,t},"");function ua(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Uo(n,{x:t,y:e},r){r&&(n.translate(t,e),n.rotate(Xt(r)),n.translate(-t,-e))}function _n(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function dr(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function Bo(n,t){const e=t.content;if(ua(e))return{width:xn(e.width,t.width),height:xn(e.height,t.height)};const r=t.font,i=mt(r)?r.map(l=>Rt(l)):[Rt(r)],a=t.textStrokeWidth,s=mt(e)?e:[e],o=s.join()+C1(i)+a+(n._measureText?"-spriting":"");return Fo.has(o)||Fo.set(o,E1(n,s,i,a)),Fo.get(o)}function zf(n,t,e){const{x:r,y:i,width:a,height:s}=t;n.save(),dr(n,e);const o=_n(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),tr(n,{x:r,y:i,w:a,h:s,radius:b1(fn(e.borderRadius),0,Math.min(a,s)/2)}),n.closePath(),n.fill(),o&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function D1(n,t,e){const r=e.content;if(ua(r)){n.save(),n.globalAlpha=L1(e.opacity,r.style.opacity),n.drawImage(r,t.x,t.y,t.width,t.height),n.restore();return}const i=mt(r)?r:[r],a=e.font,s=mt(a)?a.map(d=>Rt(d)):[Rt(a)],o=e.color,l=mt(o)?o:[o],c=T1(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,k1(n,e)&&R1(n,{x:c,y:u},i,s),A1(n,{x:c,y:u},i,{fonts:s,colors:l}),n.restore()}function k1(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function O1(n,t,e,r){const{radius:i,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*Ba;if(ua(s)){n.save(),n.translate(e,r),n.rotate(l),n.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),n.restore();return}M1(i)||P1(n,{x:e,y:r,radius:i,rotation:o,style:s,rad:l})}function P1(n,{x:t,y:e,radius:r,rotation:i,style:a,rad:s}){let o,l,c,u;switch(n.beginPath(),a){default:n.arc(t,e,r,0,kt),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(s)*r,e-Math.cos(s)*r),s+=bi,n.lineTo(t+Math.sin(s)*r,e-Math.cos(s)*r),s+=bi,n.lineTo(t+Math.sin(s)*r,e-Math.cos(s)*r),n.closePath();break;case"rectRounded":u=r*.516,c=r-u,o=Math.cos(s+Te)*c,l=Math.sin(s+Te)*c,n.arc(t-o,e-l,u,s-dt,s-Et),n.arc(t+l,e-o,u,s-Et,s),n.arc(t+o,e+l,u,s,s+Et),n.arc(t-l,e+o,u,s+Et,s+dt),n.closePath();break;case"rect":if(!i){c=Math.SQRT1_2*r,n.rect(t-c,e-c,2*c,2*c);break}s+=Te;case"rectRot":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+l,e-o),n.lineTo(t+o,e+l),n.lineTo(t-l,e+o),n.closePath();break;case"crossRot":s+=Te;case"cross":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"star":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o),s+=Te,o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"line":o=Math.cos(s)*r,l=Math.sin(s)*r,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l);break;case"dash":n.moveTo(t,e),n.lineTo(t+Math.cos(s)*r,e+Math.sin(s)*r);break}n.fill()}function E1(n,t,e,r){n.save();const i=t.length;let a=0,s=r;for(let o=0;o<i;o++){const l=e[Math.min(o,e.length-1)];n.font=l.string;const c=t[o];a=Math.max(a,n.measureText(c).width+r),s+=l.lineHeight}return n.restore(),{width:a,height:s}}function R1(n,{x:t,y:e},r,i){n.beginPath();let a=0;r.forEach(function(s,o){const l=i[Math.min(o,i.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(s,t,e+c/2+a),a+=c}),n.stroke()}function A1(n,{x:t,y:e},r,{fonts:i,colors:a}){let s=0;r.forEach(function(o,l){const c=a[Math.min(l,a.length-1)],u=i[Math.min(l,i.length-1)],d=u.lineHeight;n.beginPath(),n.font=u.string,n.fillStyle=c,n.fillText(o,t,e+d/2+s),s+=d,n.fill()})}function L1(n,t){const e=dn(n)?n:t;return dn(e)?la(e,0,1):1}const Yf={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function fr(n,t,e){return t=typeof t=="number"?t:n.parse(t),It(t)?n.getPixelForValue(t):e}function Hn(n,t,e){const r=t[e];if(r||e==="scaleID")return r;const i=e.charAt(0),a=Object.values(n).filter(s=>s.axis&&s.axis===i);return a.length?a[0].id:i}function Hf(n,t){if(n){const e=n.options.reverse,r=fr(n,t.min,e?t.end:t.start),i=fr(n,t.max,e?t.start:t.end);return{start:r,end:i}}}function $f(n,t){const{chartArea:e,scales:r}=n,i=r[Hn(r,t,"xScaleID")],a=r[Hn(r,t,"yScaleID")];let s=e.width/2,o=e.height/2;return i&&(s=fr(i,t.xValue,i.left+i.width/2)),a&&(o=fr(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function Wo(n,t){const e=n.scales,r=e[Hn(e,t,"xScaleID")],i=e[Hn(e,t,"yScaleID")];if(!r&&!i)return{};let{left:a,right:s}=r||n.chartArea,{top:o,bottom:l}=i||n.chartArea;const c=qf(r,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=qf(i,{min:t.yMin,max:t.yMax,start:l,end:o});return o=u.start,l=u.end,{x:a,y:o,x2:s,y2:l,width:s-a,height:l-o,centerX:a+(s-a)/2,centerY:o+(l-o)/2}}function jf(n,t){if(!Uf(t)){const e=Wo(n,t);let r=t.radius;(!r||isNaN(r))&&(r=Math.min(e.width,e.height)/2,t.radius=r);const i=r*2,a=e.centerX+t.xAdjust,s=e.centerY+t.yAdjust;return{x:a-r,y:s-r,x2:a+r,y2:s+r,centerX:a,centerY:s,width:i,height:i,radius:r}}return N1(n,t)}function I1(n,t){const{scales:e,chartArea:r}=n,i=e[t.scaleID],a={x:r.left,y:r.top,x2:r.right,y2:r.bottom};return i?F1(i,a,t):U1(e,a,t),a}function Vf(n,t){const e=Wo(n,t);return e.initProperties=ai(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:z1(n,e,t),initProperties:e.initProperties}],e}function N1(n,t){const e=$f(n,t),r=t.radius*2;return{x:e.x-t.radius+t.xAdjust,y:e.y-t.radius+t.yAdjust,x2:e.x+t.radius+t.xAdjust,y2:e.y+t.radius+t.yAdjust,centerX:e.x+t.xAdjust,centerY:e.y+t.yAdjust,radius:t.radius,width:r,height:r}}function qf(n,t){const e=Hf(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function F1(n,t,e){const r=fr(n,e.value,NaN),i=fr(n,e.endValue,r);n.isHorizontal()?(t.x=r,t.x2=i):(t.y=r,t.y2=i)}function U1(n,t,e){for(const r of Object.keys(Yf)){const i=n[Hn(n,e,r)];if(i){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=Yf[r],d=Hf(i,{min:e[a],max:e[s],start:i[o],end:i[l]});t[c]=d.start,t[u]=d.end}}}function B1({properties:n,options:t},e,r,i){const{x:a,x2:s,width:o}=n;return Xf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:r.x,padding:{start:i.left,end:i.right},adjust:t.label.xAdjust,size:e.width})}function W1({properties:n,options:t},e,r,i){const{y:a,y2:s,height:o}=n;return Xf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:r.y,padding:{start:i.top,end:i.bottom},adjust:t.label.yAdjust,size:e.height})}function Xf(n,t){const{start:e,end:r,borderWidth:i}=n,{position:a,padding:{start:s,end:o},adjust:l}=t,c=r-i-e-s-o-t.size;return e+i/2+l+Io(c,a)}function z1(n,t,e){const r=e.label;r.backgroundColor="transparent",r.callout.display=!1;const i=No(r.position),a=Gt(r.padding),s=Bo(n.ctx,r),o=B1({properties:t,options:e},s,i,a),l=W1({properties:t,options:e},s,i,a),c=s.width+a.width,u=s.height+a.height;return{x:o,y:l,x2:o+c,y2:l+u,width:c,height:u,centerX:o+c/2,centerY:l+u/2,rotation:r.rotation}}function $n(n,t,e){const r=Math.cos(e),i=Math.sin(e),a=t.x,s=t.y;return{x:a+r*(n.x-a)-i*(n.y-s),y:s+i*(n.x-a)+r*(n.y-s)}}const zo=["enter","leave"],Yo=zo.concat("click");function Y1(n,t,e){t.listened=Bf(e,Yo,t.listeners),t.moveListened=!1,t._getElements=Lo,zo.forEach(r=>{fe(e[r])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(r=>{!t.listened&&fe(r.click)&&(t.listened=!0),t.moveListened||zo.forEach(i=>{fe(r[i])&&(t.listened=!0,t.moveListened=!0)})})}function H1(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return $1(n,t,e);case"click":return j1(n,t,e)}}function $1(n,t,e){if(!n.moveListened)return;let r;t.type==="mousemove"?r=Lo(n,t,e.interaction):r=[];const i=n.hovered;n.hovered=r;const a={state:n,event:t};let s=Gf(a,"leave",i,r);return Gf(a,"enter",r,i)||s}function Gf({state:n,event:t},e,r,i){let a;for(const s of r)i.indexOf(s)<0&&(a=Kf(s.options[e]||n.listeners[e],s,t)||a);return a}function j1(n,t,e){const r=n.listeners,i=Lo(n,t,e.interaction);let a;for(const s of i)a=Kf(s.options.click||r.click,s,t)||a;return a}function Kf(n,t,e){return Tt(n,[t.$context,e])===!0}const da=["afterDraw","beforeDraw"];function V1(n,t,e){const r=t.visibleElements;t.hooked=Bf(e,da,t.hooks),t.hooked||r.forEach(i=>{t.hooked||da.forEach(a=>{fe(i.options[a])&&(t.hooked=!0)})})}function Qf(n,t,e){if(n.hooked){const r=t.options[e]||n.hooks[e];return Tt(r,[t.$context])}}function q1(n,t,e){const r=Z1(n.scales,t,e);let i=Zf(t,r,"min","suggestedMin");i=Zf(t,r,"max","suggestedMax")||i,i&&fe(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function X1(n,t){for(const e of n)K1(e,t)}function Zf(n,t,e,r){if(It(t[e])&&!G1(n.options,e,r)){const i=n[e]!==t[e];return n[e]=t[e],i}}function G1(n,t,e){return de(n[t])||de(n[e])}function K1(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const r=Hn(t,n,e);r&&!t[r]&&Q1(n,e)&&console.warn(`No scale found with id '${r}' for annotation '${n.id}'`)}}function Q1(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const r of["Min","Max","Value"])if(de(n[e+r]))return!0;return!1}function Z1(n,t,e){const r=t.axis,i=t.id,a=r+"ScaleID",s={min:rt(t.min,Number.NEGATIVE_INFINITY),max:rt(t.max,Number.POSITIVE_INFINITY)};for(const o of e)o.scaleID===i?Jf(o,t,["value","endValue"],s):Hn(n,o,a)===i&&Jf(o,t,[r+"Min",r+"Max",r+"Value"],s);return s}function Jf(n,t,e,r){for(const i of e){const a=n[i];if(de(a)){const s=t.parse(a);r.min=Math.min(r.min,s),r.max=Math.max(r.max,s)}}}class hr extends te{inRange(t,e,r,i){const{x:a,y:s}=$n({x:t,y:e},this.getCenterPoint(i),Xt(-this.options.rotation));return Lf({x:a,y:s},this.getProps(["x","y","x2","y2"],i),r,this.options.borderWidth)}getCenterPoint(t){return ur(this,t)}draw(t){t.save(),Uo(t,this.getCenterPoint(),this.options.rotation),zf(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return Vf(t,e)}}hr.id="boxAnnotation",hr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},hr.defaultRoutes={borderColor:"color",backgroundColor:"color"},hr.descriptors={label:{_fallback:!0}};const th=["left","bottom","top","right"];class si extends te{inRange(t,e,r,i){const{x:a,y:s}=$n({x:t,y:e},this.getCenterPoint(i),Xt(-this.rotation));return Lf({x:a,y:s},this.getProps(["x","y","x2","y2"],i),r,this.options.borderWidth)}getCenterPoint(t){return ur(this,t)}draw(t){const e=this.options,r=!de(this._visible)||this._visible;!e.display||!e.content||!r||(t.save(),Uo(t,this.getCenterPoint(),this.rotation),tT(t,this),zf(t,this,e),D1(t,oT(this),e),t.restore())}resolveElementProperties(t,e){let r;if(Uf(e))r=$f(t,e);else{const{centerX:o,centerY:l}=Wo(t,e);r={x:o,y:l}}const i=Gt(e.padding),a=Bo(t.ctx,e),s=J1(r,a,e,i);return{initProperties:ai(t,s,e),pointX:r.x,pointY:r.y,...s,rotation:e.rotation}}}si.id="labelAnnotation",si.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},si.defaultRoutes={borderColor:"color"};function J1(n,t,e,r){const i=t.width+r.width+e.borderWidth,a=t.height+r.height+e.borderWidth,s=No(e.position,"center"),o=eh(n.x,i,e.xAdjust,s.x),l=eh(n.y,a,e.yAdjust,s.y);return{x:o,y:l,x2:o+i,y2:l+a,width:i,height:a,centerX:o+i/2,centerY:l+a/2}}function eh(n,t,e=0,r){return n-Io(t,r)+e}function tT(n,t){const{pointX:e,pointY:r,options:i}=t,a=i.callout,s=a&&a.display&&aT(t,a);if(!s||lT(t,a,s))return;if(n.save(),n.beginPath(),!_n(n,a))return n.restore();const{separatorStart:l,separatorEnd:c}=eT(t,s),{sideStart:u,sideEnd:d}=rT(t,s,l);(a.margin>0||i.borderWidth===0)&&(n.moveTo(l.x,l.y),n.lineTo(c.x,c.y)),n.moveTo(u.x,u.y),n.lineTo(d.x,d.y);const f=$n({x:e,y:r},t.getCenterPoint(),Xt(-t.rotation));n.lineTo(f.x,f.y),n.stroke(),n.restore()}function eT(n,t){const{x:e,y:r,x2:i,y2:a}=n,s=nT(n,t);let o,l;return t==="left"||t==="right"?(o={x:e+s,y:r},l={x:o.x,y:a}):(o={x:e,y:r+s},l={x:i,y:o.y}),{separatorStart:o,separatorEnd:l}}function nT(n,t){const{width:e,height:r,options:i}=n,a=i.callout.margin+i.borderWidth/2;return t==="right"?e+a:t==="bottom"?r+a:-a}function rT(n,t,e){const{y:r,width:i,height:a,options:s}=n,o=s.callout.start,l=iT(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:r+xn(a,o)},u={x:c.x+l,y:c.y}):(c={x:e.x+xn(i,o),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function iT(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function aT(n,t){const e=t.position;return th.includes(e)?e:sT(n,t)}function sT(n,t){const{x:e,y:r,x2:i,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:f}=n,p={x:u,y:d},v=t.start,x=xn(s,v),g=xn(o,v),m=[e,e+x,e+x,i],b=[r+g,a,r,a],y=[];for(let _=0;_<4;_++){const T=$n({x:m[_],y:b[_]},p,Xt(f));y.push({position:th[_],distance:Jn(T,{x:l,y:c})})}return y.sort((_,T)=>_.distance-T.distance)[0].position}function oT({x:n,y:t,width:e,height:r,options:i}){const a=i.borderWidth/2,s=Gt(i.padding);return{x:n+s.left+a,y:t+s.top+a,width:e-s.left-s.right-i.borderWidth,height:r-s.top-s.bottom-i.borderWidth}}function lT(n,t,e){const{pointX:r,pointY:i}=n,a=t.margin;let s=r,o=i;return e==="left"?s+=a:e==="right"?s-=a:e==="top"?o+=a:e==="bottom"&&(o-=a),n.inRange(s,o)}const Ho=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),$o=(n,t,e)=>Ho(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,nh=(n,t,e)=>Ho(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,oi=n=>n*n,cT=(n,t,{x:e,y:r,x2:i,y2:a},s)=>s==="y"?{start:Math.min(r,a),end:Math.max(r,a),value:t}:{start:Math.min(e,i),end:Math.max(e,i),value:n},rh=(n,t,e,r)=>(1-r)*(1-r)*n+2*(1-r)*r*t+r*r*e,jo=(n,t,e,r)=>({x:rh(n.x,t.x,e.x,r),y:rh(n.y,t.y,e.y,r)}),ih=(n,t,e,r)=>2*(1-r)*(t-n)+2*r*(e-t),ah=(n,t,e,r)=>-Math.atan2(ih(n.x,t.x,e.x,r),ih(n.y,t.y,e.y,r))+.5*dt;class li extends te{inRange(t,e,r,i){const a=this.options.borderWidth/2;if(r!=="x"&&r!=="y"){const s={mouseX:t,mouseY:e},{path:o,ctx:l}=this;if(o){_n(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,f=e*u.currentDevicePixelRatio,p=l.isPointInStroke(o,d,f)||Vo(this,s,i);return l.restore(),p}const c=oi(a);return hT(this,s,c,i)||Vo(this,s,i)}return uT(this,{mouseX:t,mouseY:e},r,{hBorderWidth:a,useFinalPosition:i})}getCenterPoint(t){return ur(this,t)}draw(t){const{x:e,y:r,x2:i,y2:a,cp:s,options:o}=this;if(t.save(),!_n(t,o))return t.restore();dr(t,o);const l=Math.sqrt(Math.pow(i-e,2)+Math.pow(a-r,2));if(o.curve&&s)return _T(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=uh(this),p=Math.atan2(a-r,i-e);t.translate(e,r),t.rotate(p),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-f,0),t.shadowColor=o.borderShadowColor,t.stroke(),qo(t,0,d,c),qo(t,l,-f,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const r=I1(t,e),{x:i,y:a,x2:s,y2:o}=r,l=dT(r,t.chartArea),c=l?fT({x:i,y:a},{x:s,y:o},t.chartArea):{x:i,y:a,x2:s,y2:o,width:Math.abs(s-i),height:Math.abs(o-a)};if(c.centerX=(s+i)/2,c.centerY=(o+a)/2,c.initProperties=ai(t,c,e),e.curve){const d={x:c.x,y:c.y},f={x:c.x2,y:c.y2};c.cp=xT(c,e,Jn(d,f))}const u=pT(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}li.id="lineAnnotation";const sh={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};li.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},sh),fill:!1,length:12,start:Object.assign({},sh),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},si.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},li.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},li.defaultRoutes={borderColor:"color"};function uT(n,{mouseX:t,mouseY:e},r,{hBorderWidth:i,useFinalPosition:a}){const s=cT(t,e,n.getProps(["x","y","x2","y2"],a),r);return s.value>=s.start-i&&s.value<=s.end+i||Vo(n,{mouseX:t,mouseY:e},a,r)}function dT({x:n,y:t,x2:e,y2:r},{top:i,right:a,bottom:s,left:o}){return!(n<o&&e<o||n>a&&e>a||t<i&&r<i||t>s&&r>s)}function oh({x:n,y:t},e,{top:r,right:i,bottom:a,left:s}){return n<s&&(t=nh(s,{x:n,y:t},e),n=s),n>i&&(t=nh(i,{x:n,y:t},e),n=i),t<r&&(n=$o(r,{x:n,y:t},e),t=r),t>a&&(n=$o(a,{x:n,y:t},e),t=a),{x:n,y:t}}function fT(n,t,e){const{x:r,y:i}=oh(n,t,e),{x:a,y:s}=oh(t,n,e);return{x:r,y:i,x2:a,y2:s,width:Math.abs(a-r),height:Math.abs(s-i)}}function hT(n,{mouseX:t,mouseY:e},r=Yn,i){const{x:a,y:s,x2:o,y2:l}=n.getProps(["x","y","x2","y2"],i),c=o-a,u=l-s,d=oi(c)+oi(u),f=d===0?-1:((t-a)*c+(e-s)*u)/d;let p,v;return f<0?(p=a,v=s):f>1?(p=o,v=l):(p=a+f*c,v=s+f*u),oi(t-p)+oi(e-v)<=r}function Vo(n,{mouseX:t,mouseY:e},r,i){const a=n.label;return a.options.display&&a.inRange(t,e,i,r)}function pT(n,t,e){const r=e.borderWidth,i=Gt(e.padding),a=Bo(n.ctx,e),s=a.width+i.width+r,o=a.height+i.height+r;return mT(t,e,{width:s,height:o,padding:i},n.chartArea)}function gT(n){const{x:t,y:e,x2:r,y2:i}=n,a=Math.atan2(i-e,r-t);return a>dt/2?a-dt:a<dt/-2?a+dt:a}function mT(n,t,e,r){const{width:i,height:a,padding:s}=e,{xAdjust:o,yAdjust:l}=t,c={x:n.x,y:n.y},u={x:n.x2,y:n.y2},d=t.rotation==="auto"?gT(n):Xt(t.rotation),f=yT(i,a,d),p=vT(n,t,{labelSize:f,padding:s},r),v=n.cp?jo(c,n.cp,u,p):Ho(c,u,p),x={size:f.w,min:r.left,max:r.right,padding:s.left},g={size:f.h,min:r.top,max:r.bottom,padding:s.top},m=ch(v.x,x)+o,b=ch(v.y,g)+l;return{x:m-i/2,y:b-a/2,x2:m+i/2,y2:b+a/2,centerX:m,centerY:b,pointX:v.x,pointY:v.y,width:i,height:a,rotation:xi(d)}}function yT(n,t,e){const r=Math.cos(e),i=Math.sin(e);return{w:Math.abs(n*r)+Math.abs(t*i),h:Math.abs(n*i)+Math.abs(t*r)}}function vT(n,t,e,r){let i;const a=bT(n,r);return t.position==="start"?i=lh({w:n.x2-n.x,h:n.y2-n.y},e,t,a):t.position==="end"?i=1-lh({w:n.x-n.x2,h:n.y-n.y2},e,t,a):i=Io(1,t.position),i}function lh(n,t,e,r){const{labelSize:i,padding:a}=t,s=n.w*r.dx,o=n.h*r.dy,l=s>0&&(i.w/2+a.left-r.x)/s,c=o>0&&(i.h/2+a.top-r.y)/o;return la(Math.max(l,c),0,.25)}function bT(n,t){const{x:e,x2:r,y:i,y2:a}=n,s=Math.min(i,a)-t.top,o=Math.min(e,r)-t.left,l=t.bottom-Math.max(i,a),c=t.right-Math.max(e,r);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function ch(n,t){const{size:e,min:r,max:i,padding:a}=t,s=e/2;return e>i-r?(i+r)/2:(r>=n-a-s&&(n=r+a+s),i<=n+a+s&&(n=i-a-s),n)}function uh(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,r=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:r,startAdjust:dh(n,e),endAdjust:dh(n,r)}}function dh(n,t){if(!t||!t.display)return 0;const{length:e,width:r}=t,i=n.options.borderWidth/2,a={x:e,y:r+i};return Math.abs($o(0,a,{x:0,y:i}))}function qo(n,t,e,r){if(!r||!r.display)return;const{length:i,width:a,fill:s,backgroundColor:o,borderColor:l}=r,c=Math.abs(t-i)+e;n.beginPath(),dr(n,r),_n(n,r),n.moveTo(c,-a),n.lineTo(t+e,0),n.lineTo(c,a),s===!0?(n.fillStyle=o||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=r.borderShadowColor,n.stroke()}function xT(n,t,e){const{x:r,y:i,x2:a,y2:s,centerX:o,centerY:l}=n,c=Math.atan2(s-i,a-r),u=No(t.controlPoint,0),d={x:o+xn(e,u.x,!1),y:l+xn(e,u.y,!1)};return $n(d,{x:o,y:l},c)}function fh(n,{x:t,y:e},{angle:r,adjust:i},a){!a||!a.display||(n.save(),n.translate(t,e),n.rotate(r),qo(n,0,-i,a),n.restore())}function _T(n,t,e,r){const{x:i,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=uh(t),p={x:i,y:a},v={x:s,y:o},x=ah(p,e,v,0),g=ah(p,e,v,1)-dt,m=jo(p,e,v,d/r),b=jo(p,e,v,1-f/r),y=new Path2D;n.beginPath(),y.moveTo(m.x,m.y),y.quadraticCurveTo(e.x,e.y,b.x,b.y),n.shadowColor=l.borderShadowColor,n.stroke(y),t.path=y,t.ctx=n,fh(n,m,{angle:x,adjust:d},c),fh(n,b,{angle:g,adjust:f},u)}class ci extends te{inRange(t,e,r,i){const a=this.options.rotation,s=this.options.borderWidth;if(r!=="x"&&r!=="y")return wT({x:t,y:e},this.getProps(["width","height","centerX","centerY"],i),a,s);const{x:o,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],i),d=s/2,f=r==="y"?{start:l,end:u}:{start:o,end:c},p=$n({x:t,y:e},this.getCenterPoint(i),Xt(-a));return p[r]>=f.start-d-Yn&&p[r]<=f.end+d+Yn}getCenterPoint(t){return ur(this,t)}draw(t){const{width:e,height:r,centerX:i,centerY:a,options:s}=this;t.save(),Uo(t,this.getCenterPoint(),s.rotation),dr(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=_n(t,s);t.ellipse(i,a,r/2,e/2,dt/2,0,2*dt),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return Vf(t,e)}}ci.id="ellipseAnnotation",ci.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},hr.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},ci.defaultRoutes={borderColor:"color",backgroundColor:"color"},ci.descriptors={label:{_fallback:!0}};function wT(n,t,e,r){const{width:i,height:a,centerX:s,centerY:o}=t,l=i/2,c=a/2;if(l<=0||c<=0)return!1;const u=Xt(e||0),d=r/2||0,f=Math.cos(u),p=Math.sin(u),v=Math.pow(f*(n.x-s)+p*(n.y-o),2),x=Math.pow(p*(n.x-s)-f*(n.y-o),2);return v/Math.pow(l+d,2)+x/Math.pow(c+d,2)<=1.0001}class fa extends te{inRange(t,e,r,i){const{x:a,y:s,x2:o,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],i),u=this.options.borderWidth;if(r!=="x"&&r!=="y")return x1({x:t,y:e},this.getCenterPoint(i),c/2,u);const d=u/2,f=r==="y"?{start:s,end:l,value:e}:{start:a,end:o,value:t};return f.value>=f.start-d&&f.value<=f.end+d}getCenterPoint(t){return ur(this,t)}draw(t){const e=this.options,r=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,dr(t,e);const i=_n(t,e);O1(t,this,this.centerX,this.centerY),i&&!ua(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=r}resolveElementProperties(t,e){const r=jf(t,e);return r.initProperties=ai(t,r,e),r}}fa.id="pointAnnotation",fa.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},fa.defaultRoutes={borderColor:"color",backgroundColor:"color"};class ha extends te{inRange(t,e,r,i){if(r!=="x"&&r!=="y")return this.options.radius>=.1&&this.elements.length>1&&ST(this.elements,t,e,i);const a=$n({x:t,y:e},this.getCenterPoint(i),Xt(-this.options.rotation)),s=this.elements.map(c=>r==="y"?c.bY:c.bX),o=Math.min(...s),l=Math.max(...s);return a[r]>=o&&a[r]<=l}getCenterPoint(t){return ur(this,t)}draw(t){const{elements:e,options:r}=this;t.save(),t.beginPath(),t.fillStyle=r.backgroundColor,dr(t,r);const i=_n(t,r);let a=!0;for(const s of e)a?(t.moveTo(s.x,s.y),a=!1):t.lineTo(s.x,s.y);t.closePath(),t.fill(),i&&(t.shadowColor=r.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const r=jf(t,e),{sides:i,rotation:a}=e,s=[],o=2*dt/i;let l=a*Ba;for(let c=0;c<i;c++,l+=o){const u=TT(r,e,l);u.initProperties=ai(t,r,e),s.push(u)}return r.elements=s,r}}ha.id="polygonAnnotation",ha.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},ha.defaultRoutes={borderColor:"color",backgroundColor:"color"};function TT({centerX:n,centerY:t},{radius:e,borderWidth:r},i){const a=r/2,s=Math.sin(i),o=Math.cos(i),l={x:n+s*e,y:t-o*e};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:n+s*(e+a),bY:t-o*(e+a)}}}function ST(n,t,e,r){let i=!1,a=n[n.length-1].getProps(["bX","bY"],r);for(const s of n){const o=s.getProps(["bX","bY"],r);o.bY>e!=a.bY>e&&t<(a.bX-o.bX)*(e-o.bY)/(a.bY-o.bY)+o.bX&&(i=!i),a=o}return i}const wn={box:hr,ellipse:ci,label:si,line:li,point:fa,polygon:ha};Object.keys(wn).forEach(n=>{Ut.describe(`elements.${wn[n].id}`,{_fallback:"plugins.annotation.common"})});const MT={update:Object.assign},CT=Yo.concat(da),hh=(n,t)=>lt(t)?Ko(n,t):n,Xo=n=>n==="color"||n==="font";function Go(n="line"){return wn[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function DT(n,t,e,r){const i=OT(n,e.animations,r),a=t.annotations,s=RT(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=ph(s,o,l.type),u=l.setContext(ET(n,c,l)),d=c.resolveElementProperties(n,u);d.skip=kT(d),"elements"in d&&(PT(c,d.elements,u,i),delete d.elements),de(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=gh(u),i.update(c,d)}}function kT(n){return isNaN(n.x)||isNaN(n.y)}function OT(n,t,e){return e==="reset"||e==="none"||e==="resize"?MT:new Ja(n,t)}function PT(n,t,e,r){const i=n.elements||(n.elements=[]);i.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=ph(i,a,s.type,s.initProperties),c=e[s.optionScope].override(s);o.options=gh(c),r.update(l,o)}}function ph(n,t,e,r){const i=wn[Go(e)];let a=n[t];return(!a||!(a instanceof i))&&(a=n[t]=new i,Object.assign(a,r)),a}function gh(n){const t=wn[Go(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,Ko(n,t.defaults),Ko(n,t.defaultRoutes));for(const r of CT)e[r]=n[r];return e}function Ko(n,t){const e={};for(const r of Object.keys(t)){const i=t[r],a=n[r];Xo(r)&&mt(a)?e[r]=a.map(s=>hh(s,i)):e[r]=hh(a,i)}return e}function ET(n,t,e){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,id:e.id,type:"annotation"}))}function RT(n,t){const e=t.length,r=n.length;if(r<e){const i=e-r;n.splice(r,0,...new Array(i))}else r>e&&n.splice(e,r-e);return n}var AT="3.0.1";const Tn=new Map,LT=Yo.concat(da);var mh={id:"annotation",version:AT,beforeRegister(){_1("chart.js","4.0",Se.version)},afterRegister(){Se.register(wn)},afterUnregister(){Se.unregister(wn)},beforeInit(n){Tn.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const r=Tn.get(n),i=r.annotations=[];let a=e.annotations;lt(a)?Object.keys(a).forEach(s=>{const o=a[s];lt(o)&&(o.id=s,i.push(o))}):mt(a)&&i.push(...a),X1(i,n.scales)},afterDataLimits(n,t){const e=Tn.get(n);q1(n,t.scale,e.annotations.filter(r=>r.display&&r.adjustScaleRange))},afterUpdate(n,t,e){const r=Tn.get(n);Y1(n,r,e),DT(n,r,e,t.mode),r.visibleElements=r.elements.filter(i=>!i.skip&&i.options.display),V1(n,r,e)},beforeDatasetsDraw(n,t,e){pa(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){pa(n,"afterDatasetsDraw",e.clip)},beforeDraw(n,t,e){pa(n,"beforeDraw",e.clip)},afterDraw(n,t,e){pa(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const r=Tn.get(n);H1(r,t.event,e)&&(t.changed=!0)},afterDestroy(n){Tn.delete(n)},_getState(n){return Tn.get(n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!LT.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${wn[Go(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Xo,_fallback:!0},_indexable:Xo}},additionalOptionScopes:[""]};function pa(n,t,e){const{ctx:r,chartArea:i}=n,a=Tn.get(n);e&&Pr(r,i);const s=IT(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)NT(r,i,a,o);e&&Er(r)}function IT(n,t){const e=[];for(const r of n)if(r.options.drawTime===t&&e.push({element:r,main:!0}),r.elements&&r.elements.length)for(const i of r.elements)i.options.display&&i.options.drawTime===t&&e.push({element:i});return e}function NT(n,t,e,r){const i=r.element;r.main?(Qf(e,i,"beforeDraw"),i.draw(n,t),Qf(e,i,"afterDraw")):i.draw(n,t)}const ga="24px",yh=(n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e},FT=n=>(h.pushScopeId("data-v-6ced9cd2"),n=n(),h.popScopeId(),n),UT=["aria-hidden"],BT={key:0,"data-testid":"kui-icon-svg-title"},WT=FT(()=>h.createElementVNode("path",{d:"M9 20C8.45 20 7.97917 19.8042 7.5875 19.4125C7.19583 19.0208 7 18.55 7 18C7 17.45 7.19583 16.9792 7.5875 16.5875C7.97917 16.1958 8.45 16 9 16C9.55 16 10.0208 16.1958 10.4125 16.5875C10.8042 16.9792 11 17.45 11 18C11 18.55 10.8042 19.0208 10.4125 19.4125C10.0208 19.8042 9.55 20 9 20ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1958 19.0208 13 18.55 13 18C13 17.45 13.1958 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0208 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20ZM9 14C8.45 14 7.97917 13.8042 7.5875 13.4125C7.19583 13.0208 7 12.55 7 12C7 11.45 7.19583 10.9792 7.5875 10.5875C7.97917 10.1958 8.45 10 9 10C9.55 10 10.0208 10.1958 10.4125 10.5875C10.8042 10.9792 11 11.45 11 12C11 12.55 10.8042 13.0208 10.4125 13.4125C10.0208 13.8042 9.55 14 9 14ZM15 14C14.45 14 13.9792 13.8042 13.5875 13.4125C13.1958 13.0208 13 12.55 13 12C13 11.45 13.1958 10.9792 13.5875 10.5875C13.9792 10.1958 14.45 10 15 10C15.55 10 16.0208 10.1958 16.4125 10.5875C16.8042 10.9792 17 11.45 17 12C17 12.55 16.8042 13.0208 16.4125 13.4125C16.0208 13.8042 15.55 14 15 14ZM9 8C8.45 8 7.97917 7.80417 7.5875 7.4125C7.19583 7.02083 7 6.55 7 6C7 5.45 7.19583 4.97917 7.5875 4.5875C7.97917 4.19583 8.45 4 9 4C9.55 4 10.0208 4.19583 10.4125 4.5875C10.8042 4.97917 11 5.45 11 6C11 6.55 10.8042 7.02083 10.4125 7.4125C10.0208 7.80417 9.55 8 9 8ZM15 8C14.45 8 13.9792 7.80417 13.5875 7.4125C13.1958 7.02083 13 6.55 13 6C13 5.45 13.1958 4.97917 13.5875 4.5875C13.9792 4.19583 14.45 4 15 4C15.55 4 16.0208 4.19583 16.4125 4.5875C16.8042 4.97917 17 5.45 17 6C17 6.55 16.8042 7.02083 16.4125 7.4125C16.0208 7.80417 15.55 8 15 8Z",fill:"currentColor"},null,-1)),zT=h.defineComponent({__name:"DragIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const i=String(t.size).replace(/px/gi,""),a=Number(i);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),r=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(i,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon drag-icon","data-testid":"kui-icon-wrapper-drag-icon",style:h.normalizeStyle(r.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-drag-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",BT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),WT],8,UT))]),_:1},8,["aria-hidden","style"]))}}),YT=yh(zT,[["__scopeId","data-v-6ced9cd2"]]),HT=n=>(h.pushScopeId("data-v-9f0a015f"),n=n(),h.popScopeId(),n),$T=["aria-hidden"],jT={key:0,"data-testid":"kui-icon-svg-title"},VT=HT(()=>h.createElementVNode("path",{d:"M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",fill:"currentColor"},null,-1)),qT=h.defineComponent({__name:"WarningIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const i=String(t.size).replace(/px/gi,""),a=Number(i);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),r=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(i,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon warning-icon","data-testid":"kui-icon-wrapper-warning-icon",style:h.normalizeStyle(r.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-warning-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",jT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),VT],8,$T))]),_:1},8,["aria-hidden","style"]))}}),XT=yh(qT,[["__scopeId","data-v-9f0a015f"]]),GT="#6c7489",KT="#995c00",QT="20px",vh="24px",ZT="40px",JT="48px",tS={class:"tooltip-title"},eS={class:"title font-bold"},nS={key:1,class:"subtitle"},rS={class:"tooltip"},iS={key:0},aS={class:"display-label"},sS={class:"display-value"},oS=h.defineComponent({__name:"ChartTooltip",props:{showTooltip:{type:Boolean,required:!0,default:!1},left:{type:String,required:!1,default:null},top:{type:String,required:!1,default:null},tooltipTitle:{type:String,required:!1,default:""},context:{type:[String,Number],required:!1,default:""},series:{type:Array,required:!0,default:()=>[]},locked:{type:Boolean,required:!1,default:!1}},emits:["dimensions","top","left"],setup(n,{emit:t}){const e=t,r=n,i=h.ref(null),a=h.ref(!1),s=h.ref({x:0,y:0}),o=h.ref({x:0,y:0}),l=h.ref({left:r.left,top:r.top});h.watch(i,p=>{if(p){const{width:v,height:x}=p.getBoundingClientRect();e("dimensions",{width:v,height:x})}}),h.watch(()=>r.locked,p=>{p?(l.value.left=r.left,l.value.top=r.top):p===!1&&(e("top",l.value.top),e("left",l.value.left))});function c(p){if(i.value){a.value=!0;const v=window.getComputedStyle(i.value),x=v.transform||v.webkitTransform||v.mozTransform,g=new DOMMatrix(x),m=g.m41,b=g.m42;s.value={x:m,y:b},o.value={x:p.clientX,y:p.clientY},window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)}}let u=null;function d(p){p.preventDefault(),p.stopPropagation(),a.value&&(u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{const v=p.clientX-o.value.x,x=p.clientY-o.value.y;l.value.left=`${s.value.x+v}px`,l.value.top=`${s.value.y+x}px`}))}function f(){a.value=!1,u!==null&&window.cancelAnimationFrame(u),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)}return(p,v)=>n.showTooltip?(h.openBlock(),h.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:i,class:h.normalizeClass(["tooltip-container",{locked:n.locked}]),style:h.normalizeStyle({transform:n.locked?`translate(${l.value.left}, ${l.value.top})`:`translate(${n.left}, ${n.top})`,left:"0",top:"0",pointerEvents:n.locked?"all":"none"}),onMousedown:c},[h.createElementVNode("div",tS,[h.createElementVNode("span",eS,h.toDisplayString(n.tooltipTitle),1),n.locked?(h.openBlock(),h.createBlock(h.unref(YT),{key:0,class:"drag-icon",color:h.unref(GT)},null,8,["color"])):h.createCommentVNode("",!0),n.context?(h.openBlock(),h.createElementBlock("span",nS,h.toDisplayString(n.context),1)):h.createCommentVNode("",!0)]),h.createElementVNode("ul",rS,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.series,({backgroundColor:x,borderColor:g,label:m,value:b})=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:m},[n.series.length?(h.openBlock(),h.createElementBlock("li",iS,[h.createElementVNode("div",{class:"tooltip-legend",style:h.normalizeStyle({background:x,"border-color":g})},null,4),h.createElementVNode("span",aS,h.toDisplayString(m),1),h.createElementVNode("span",sS,h.toDisplayString(b),1)])):h.createCommentVNode("",!0)],64))),128))])],38)):h.createCommentVNode("",!0)}}),Ze=(n,t)=>{const e=n.__vccOpts||n;for(const[r,i]of t)e[r]=i;return e},Qo=Ze(oS,[["__scopeId","data-v-d8d2d0cd"]]),lS=["onClick"],cS=["title"],uS={key:0,class:"sub-label"},Zo=Ze(h.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Object,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(n){h.useCssVars(y=>({"1c6c065c":o.value}));const t=n,e=h.ref(),r=h.ref([]),i=h.inject("showLegendValues",!0),a=h.inject("legendPosition",h.ref(Wt.Right)),s=h.ref([]),o=h.ref(vh),l=()=>{const y=e.value;if(!y||!r.value||y.children.length===0)return 0;const _=y.children[0].getBoundingClientRect().top;for(const T of r.value)if(T.getBoundingClientRect().top>_)return!0;return!1},c=h.computed(()=>t.items.length>2||a.value===Wt.Right),u=()=>{e.value&&a.value===Wt.Bottom&&(l()?o.value=JT:o.value=vh)},d=()=>{if(e.value&&a.value===Wt.Bottom){let y=0;r.value.forEach(T=>{const D=Array.from(T.children).reduce((O,S)=>O+S.offsetWidth,0);D>y&&(y=D)});const _=parseInt(ZT,10);e.value.style.gridTemplateColumns=`repeat(auto-fit, ${y+_}px)`}u()},f=()=>{if(t.items.length!==s.value.length)return s.value=t.items,!0;for(let y=0;y<t.items.length;y++)if(t.items[y].text!==s.value[y].text)return s.value=t.items,!0;return!1};h.watch(()=>t.items,()=>{f()&&d()},{immediate:!0,flush:"post"});const p=h.ref(0),v=h.ref(0),x=new ResizeObserver(Zd(y=>{const _=y[0],T=_.contentRect.width,D=_.contentRect.height;T!==p.value&&D===v.value&&d(),p.value=T,v.value=D},100));h.watch(()=>a.value,()=>{d()}),h.onMounted(()=>{s.value=t.items,e.value&&x.observe(e.value),window.requestAnimationFrame(()=>{d()})}),h.onBeforeUnmount(()=>{e.value&&x.unobserve(e.value)});const g=(y=0,_)=>{if(t.chartInstance===null)return;const T=t.chartInstance instanceof Se?t.chartInstance:t.chartInstance.chart;m(y,_)?T.hide(y,_):T.show(y,_),T.update()},m=(y=0,_)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const T=t.chartInstance instanceof Se?t.chartInstance:t.chartInstance.chart,D=T.getDatasetMeta(y);return D.dataset||_===void 0?T.isDatasetVisible(y):!(D.data.length&&D.data[_].hidden)},b=y=>({[Wt.Right]:"vertical",[Wt.Bottom]:"horizontal",[Wt.Hidden]:"hidden"})[y];return(y,_)=>h.unref(a)!==h.unref(Wt).Hidden?(h.openBlock(),h.createElementBlock("ul",{key:0,ref_key:"legendContainerRef",ref:e,class:h.normalizeClass(["legend-container",b(h.unref(a))]),"data-testid":"legend"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.items,({fillStyle:T,strokeStyle:D,text:O,datasetIndex:S,index:M,value:k})=>(h.openBlock(),h.createElementBlock("li",{key:O,ref_for:!0,ref_key:"legendItemsRef",ref:r,onClick:P=>g(S,M)},[h.createElementVNode("div",{class:"legend",style:h.normalizeStyle({background:T,"border-color":D})},null,4),h.createElementVNode("div",{class:h.normalizeClass(["label-container",{"strike-through":!m(S,M)}])},[h.createElementVNode("div",{class:h.normalizeClass(["label",{"truncate-label":c.value}]),title:O},h.toDisplayString(O),11,cS),k&&h.unref(i)?(h.openBlock(),h.createElementBlock("div",uS,h.toDisplayString(k.formatted),1)):h.createCommentVNode("",!0)],2)],8,lS))),128))],2)):h.createCommentVNode("",!0)}}),[["__scopeId","data-v-554b4d9c"]]);let ma;const dS=new Uint8Array(16);function fS(){if(!ma&&(ma=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ma))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ma(dS)}const ne=[];for(let n=0;n<256;++n)ne.push((n+256).toString(16).slice(1));function hS(n,t=0){return ne[n[t+0]]+ne[n[t+1]]+ne[n[t+2]]+ne[n[t+3]]+"-"+ne[n[t+4]]+ne[n[t+5]]+"-"+ne[n[t+6]]+ne[n[t+7]]+"-"+ne[n[t+8]]+ne[n[t+9]]+"-"+ne[n[t+10]]+ne[n[t+11]]+ne[n[t+12]]+ne[n[t+13]]+ne[n[t+14]]+ne[n[t+15]]}const bh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Sn(n,t,e){if(bh.randomUUID&&!t&&!n)return bh.randomUUID();n=n||{};const r=n.random||(n.rng||fS)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){e=e||0;for(let i=0;i<16;++i)t[e+i]=r[i];return t}return hS(r)}const xh=(n,t)=>{const e=n.ctx,r=n.scales.y,i=n.scales.x,a=t[t.length-1].element;e.save(),e.strokeStyle="rgba(100, 100, 100, 1)",e.lineWidth=3,n.options.indexAxis==="x"?e.strokeRect(a.x-a.width/2,a.y,a.width,r.bottom-a.y):e.strokeRect(i.left,a.y-a.height/2,a.x-i.left,a.height),e.restore()},_h={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(n){this.clickedElements&&this.clickedElements.length&&xh(n,this.clickedElements)},afterEvent:function(n,{event:t}){var i;if(t.type!=="click"||!t.native)return;this.clicked=!this.clicked;const e=((i=n.options.interaction)==null?void 0:i.mode)||"index",r=n.getElementsAtEventForMode(t.native,e,{intersect:!1},!0);r.length&&this.clicked?(this.clickedElements=r,xh(n,this.clickedElements),this.previousHoverOption=n.options.hover,n.options.hover={mode:null}):(delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1)},beforeDestroy(n){delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1}},wh=6,pS="100%",gS="100%",mS=20,yS=20,Th=6,vS=0,bS=10,xS=10,_S=1,wS=Ze(h.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},tooltipTitle:{type:String,required:!1,default:""},legendValues:{type:Object,required:!1,default:null},metricUnit:{type:String,required:!1,default:""},orientation:{type:String,required:!1,default:"horizontal",validator:n=>["horizontal","vertical"].includes(n)},annotations:{type:Boolean,required:!1,default:!0},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},stacked:{type:Boolean,required:!1,default:!0},syntheticsDataKey:{type:String,required:!1,default:""},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),{translateUnit:r}=Ct.useTranslatedUnits(),i=h.ref(null),a=({chart:L},U)=>{var K;const j=L.data,Z=(K=j.labels)==null?void 0:K.indexOf(U);return j.datasets.reduce((N,A,Q)=>{if(L.isDatasetVisible(Q)){const X=A.data[Z];return isNaN(X)?N:N+X}else return N},0)},s=(L,U,j,Z)=>{const K=Z==="horizontal";U===null&&(U=e.t("entityNoName"));const N={type:"label",yValue:X=>K?U:a(X,U),xValue:X=>K?a(X,U):U},A={...N,position:K?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>K?0:-Math.abs(Gw()),content:X=>Eo(a(X,U),j)},Q={...N,content:X=>Pf(a(X,U),Of(X.chart,L)),position:K?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:X=>K?kf(Eo(a(X,U),j)):0,color:Cf};return{[`${U}-value`]:A,[`${U}-percent`]:Q}},o=h.ref(null),l=h.ref(),c=h.ref(Sn()),u=Sn(),d=Sn(),f=h.ref([]),p=h.ref(h.inject("legendPosition",Wt.Right)),v=h.ref({show:!1,top:"0px",left:"0px",text:"",offset:-50}),x=h.toRef(t,"metricUnit"),g=h.computed(()=>h.toRef(t,"orientation").value==="horizontal"),m=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:x,translateUnit:r,offsetX:0,offsetY:0,width:0,height:0,locked:!1,chartType:g.value?ee.HORIZONTAL_BAR:ee.VERTICAL_BAR,chartTooltipSortFn:t.chartTooltipSortFn}),b=h.ref(0),y=()=>{var L;return t.annotations&&((L=t.chartData.labels)==null?void 0:L.reduce((U,j)=>Object.assign(U,s(t.chartData,j,x.value,t.orientation)),{}))},_={id:c.value,afterUpdate(L){b.value+=1,f.value=L.options.plugins.legend.labels.generateLabels(L).map(U=>({...U,value:t.legendValues&&t.legendValues[U.text]})).sort(t.chartLegendSortFn)}},T={id:u,afterUpdate(L){L.options.plugins.annotation.annotations=t.annotations?y():{}}},S=[_,{id:"axisHover",afterEvent(L,U){if(v.value.show=!1,U.event.type==="mousemove"){const j=U.event,Z=L.options.indexAxis,K=L.scales,N=L.scales[Z].getLabelForValue(Number(L.scales[Z].getValueForPixel(j[Z])));if((Q=>Q==="x"?j.y>K.x.top:j.x<K.y.right)(Z))if(m.locked||(m.showTooltip=!1),N.length>aa){const X=L.canvas.getContext("2d").measureText(N).width,vt=Math.abs(Math.round(j.x-X*.5)),ct=Math.round(j.x+X*.5);v.value.left=Z==="x"?`${(vt>0?vt:ct)-v.value.offset}px`:`${j.x-X*.5-v.value.offset}px`,v.value.top=`${j.y-50}px`,v.value.show=!0,v.value.text=N}else v.value.show=!1;else v.value.show=!1}}},{id:d,afterUpdate(L){L.options.layout.padding.right=g.value?I.value:0}},_h,...t.annotations?[T]:[]],M=h.computed(()=>t.chartData.labels&&t.chartData.labels.length||0),k=h.ref(0),P=h.ref(0),E=new ResizeObserver(Zd(L=>{k.value=L[0].contentRect.width,P.value=L[0].contentRect.height},100)),F=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&!g.value?`${Math.max(L*(mS+Th),k.value)}px`:pS}),q=h.computed(()=>{var U,j;const L=(j=(U=t.chartData)==null?void 0:U.labels)==null?void 0:j.length;return o.value&&L&&g.value?`${Math.max(L*(yS+Th),P.value)}px`:gS});Ct.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey")),h.onMounted(()=>{t.annotations&&Se.register(mh),i.value&&(k.value=i.value.offsetWidth,P.value=i.value.offsetHeight,E.observe(i.value))}),h.onUnmounted(()=>{i.value&&E.unobserve(i.value)});const $=h.computed(()=>{const L=Ct.useBarChartOptions({tooltipState:m,legendID:c.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle"),indexAxis:g.value?"y":"x",numLabels:M});return{...L.value,plugins:{...L.value.plugins,annotation:{annotations:y(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*wh}}}}),Y=Ct.useChartJSCommon("bar",o,h.toRef(t,"chartData"),S,$),I=h.computed(()=>{b.value;const L=t.chartData.labels,U=t.chartData.datasets,j=L.map((N,A)=>U.reduce((Q,X)=>isNaN(Number(X.data[A]))?Q:Q+Number(X.data[A]),0)),Z=Y.value?Of(Y.value,t.chartData):Kw(t.chartData);return j.map(N=>kf(Eo(N,x.value)+Pf(N,Z))).reduce((N,A)=>Math.max(N,A),0)+wh});h.onBeforeUnmount(()=>{Se.unregister(mh)});const it={[Wt.Right]:"legend-row",[Wt.Bottom]:"column"},B=h.computed(()=>{if(l.value&&Y.value){const L=window.devicePixelRatio,U=Y.value,j=U.scales.y.width*L+_S,Z=(U.scales.y.height+U.scales.y.top+U.scales.x.height)*L,K=l.value.getContext("2d");return K.scale(L,L),K.canvas.width=j,K.canvas.height=Z,K.canvas.style.width=`${j/L}px`,K.canvas.style.height=`${Z/L}px`,{scale:L,width:j*L,height:Z*L,targetCtx:K}}return null}),yt=L=>{const U=L.target;if(B.value&&Y.value&&!g.value){const j=B.value.scale,Z=B.value.targetCtx,K=B.value.width,N=B.value.height,A=Y.value,Q=A.canvas;Z.fillStyle="white",U.scrollLeft>=vS&&U.scrollLeft<=bS?(Z.globalCompositeOperation="source-over",Z.clearRect(0,0,K,N),Z.drawImage(Q,0,0,K,N,0,0,K,N),Z.globalCompositeOperation="destination-over",Z.fillRect(0,0,K,N)):(Z.globalCompositeOperation="source-over",Z.fillRect(0,(A.scales.y.height+A.scales.y.top+xS)*j,K,A.scales.x.height*j))}m.offsetY=U.scrollTop,m.offsetX=U.scrollLeft,v.value.offset=U.scrollLeft},ut=({width:L,height:U})=>{m.width=L,m.height=U};h.watch(()=>t.orientation,()=>{var L;if(l.value&&B.value){const U=B.value.width,j=B.value.height;((L=l.value)==null?void 0:L.getContext("2d")).clearRect(0,0,U,j)}m.showTooltip=!1,m.locked=!1}),h.watch(()=>t.annotations,L=>{Y.value&&(L?Y.value.options.plugins.annotation.annotations=y(t.chartData):delete Y.value.options.plugins.annotation.annotations)});const z=()=>{m.showTooltip&&(m.locked=!m.locked)};return(L,U)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",it[p.value]])},[h.createElementVNode("canvas",{ref_key:"axis",ref:l,class:"axis"},null,512),h.createElementVNode("div",{ref_key:"chartContainerRef",ref:i,class:"chart-container","on:scroll":yt,onClick:U[0]||(U[0]=j=>z())},[h.createElementVNode("div",{class:"chart-body",style:h.normalizeStyle({width:F.value,height:q.value})},[h.createElementVNode("canvas",{ref_key:"canvas",ref:o},null,512)],4)],544),v.value.show?(h.openBlock(),h.createElementBlock("div",{key:0,class:"axis-tooltip",style:h.normalizeStyle({top:v.value.top,left:v.value.left})},h.toDisplayString(v.value.text),5)):h.createCommentVNode("",!0),h.createVNode(Qo,{context:m.tooltipContext,left:m.left,locked:m.locked,series:m.tooltipSeries,"show-tooltip":m.showTooltip,"tooltip-title":n.tooltipTitle,top:m.top,onDimensions:ut},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top"]),h.createVNode(Zo,{id:c.value,"chart-instance":h.unref(Y),items:f.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-fdeee739"]]);/*!
|
|
25
25
|
* chartjs-adapter-date-fns v3.0.0
|
|
26
26
|
* https://www.chartjs.org
|
|
27
27
|
* (c) 2022 chartjs-adapter-date-fns Contributors
|
|
28
28
|
* Released under the MIT license
|
|
29
|
-
*/const TS={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};uu._date.override({_id:"date-fns",formats:function(){return TS},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=nt(n):e==="string"&&(typeof t=="string"?n=a_(n,t,new Date,this.options):n=Kd(n,this.options)),ks(n)?n.getTime():null},format:function(n,t){return sx(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return Gr(n,t);case"second":return Nb(n,t);case"minute":return Lb(n,t);case"hour":return Ob(n,t);case"day":return Td(n,t);case"week":return Fb(n,t);case"month":return Cs(n,t);case"quarter":return Ib(n,t);case"year":return Ub(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return Ki(n,t);case"second":return Xb(n,t);case"minute":return jb(n,t);case"hour":return $b(n,t);case"day":return Cd(n,t);case"week":return Gb(n,t);case"month":return Pd(n,t);case"quarter":return qb(n,t);case"year":return Kb(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return l_(n);case"minute":return Qb(n);case"hour":return o_(n);case"day":return Ds(n);case"week":return Sd(n);case"isoWeek":return Sd(n,{weekStartsOn:+e});case"month":return Jb(n);case"quarter":return Zb(n);case"year":return ev(n);default:return n}},endOf:function(n,t){switch(t){case"second":return sv(n);case"minute":return iv(n);case"hour":return nv(n);case"day":return kd(n);case"week":return rv(n);case"month":return Od(n);case"quarter":return av(n);case"year":return tv(n);default:return n}}});const Sh={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},SS={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Sh,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},MS=h.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function pr(n){return h.isProxy(n)?h.toRaw(n):n}function CS(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return h.isProxy(t)?new Proxy(n,{}):n}function DS(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function Mh(n,t){n.labels=t}function Ch(n,t,e){const r=[];n.datasets=t.map(i=>{const a=n.datasets.find(s=>s[e]===i[e]);return!a||!i.data||r.includes(a)?{...i}:(r.push(a),Object.assign(a,i),a)})}function kS(n,t){const e={labels:[],datasets:[]};return Mh(e,n.labels),Ch(e,n.datasets,t),e}const OS=h.defineComponent({props:SS,setup(n,t){let{expose:e,slots:r}=t;const i=h.ref(null),a=h.shallowRef(null);e({chart:a});const s=()=>{if(!i.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:p}=n,b=kS(u,p),x=CS(b,u);a.value=new Se(i.value,{type:c,data:x,options:{...d},plugins:f})},o=()=>{const c=h.toRaw(a.value);c&&(n.destroyDelay>0?setTimeout(()=>{c.destroy(),a.value=null},n.destroyDelay):(c.destroy(),a.value=null))},l=c=>{c.update(n.updateMode)};return h.onMounted(s),h.onUnmounted(o),h.watch([()=>n.options,()=>n.data],(c,u)=>{let[d,f]=c,[p,b]=u;const x=h.toRaw(a.value);if(!x)return;let g=!1;if(d){const m=pr(d),v=pr(p);m&&m!==v&&(DS(x,m),g=!0)}if(f){const m=pr(f.labels),v=pr(b.labels),y=pr(f.datasets),_=pr(b.datasets);m!==v&&(Mh(x.config.data,m),g=!0),y&&y!==_&&(Ch(x.config.data,y,n.datasetIdKey),g=!0)}g&&h.nextTick(()=>{l(x)})},{deep:!0}),()=>h.h("canvas",{role:"img",ariaLabel:n.ariaLabel,ariaDescribedby:n.ariaDescribedby,ref:i},[h.h("p",{},[r.default?r.default():""])])}});function Jo(n,t){return Se.register(t),h.defineComponent({props:Sh,setup(e,r){let{expose:i}=r;const a=h.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return i({chart:a}),()=>h.h(OS,MS({ref:s},{type:n,...e}))}})}const PS=Jo("bar",Lr),Dh=Jo("doughnut",gn),ES=Jo("line",Ir),RS={class:"chart-container"},AS=h.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Qe}},setup(n){const t=n,{translateUnit:e}=Ct.useTranslatedUnits(),r=h.ref(Sn()),i=h.ref(Sn()),a=h.ref([]),s=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:t.metricUnit,translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:ee.DOUGHNUT}),o={id:r.value,afterUpdate(x){a.value=x.options.plugins.legend.labels.generateLabels(x).map(g=>({...g,value:t.legendValues&&t.legendValues[g.text],hidden:!1}))}},l=h.computed(()=>[o]),c=h.computed(()=>[t.chartData.datasets.reduce((g,m)=>(g.labels.push(m.label),g.backgroundColor.push(m.backgroundColor),g.borderColor.push(Mf(m.backgroundColor,50)),g.data.push(m.data.reduce((v,y)=>v+y,0)),g),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),u=h.computed(()=>({...t.chartData,datasets:c.value}));Ct.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const{options:d}=Ct.useDoughnutChartOptions({tooltipState:s,legendID:r.value}),f=h.ref(),p=x=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[x],b=({width:x,height:g})=>{s.width=x,s.height=g};return(x,g)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",p(n.legendPosition)]),"data-testid":"doughnut-chart-parent"},[h.createElementVNode("div",RS,[h.createVNode(h.unref(Dh),{ref_key:"chartInstance",ref:f,"chart-id":i.value,data:u.value,options:h.unref(d),plugins:l.value},null,8,["chart-id","data","options","plugins"]),h.createVNode(Qo,{left:s.left,series:s.tooltipSeries,"show-tooltip":s.showTooltip,"tooltip-title":n.tooltipTitle,top:s.top,unit:n.metricUnit,onDimensions:b},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])]),h.createVNode(Zo,{id:r.value,"chart-instance":f.value,items:a.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),LS=Ze(AS,[["__scopeId","data-v-07ea8b82"]]);var IS=Object.defineProperty,NS=(n,t,e)=>t in n?IS(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,We=(n,t,e)=>(NS(n,typeof t!="symbol"?t+"":t,e),e),Yt=(n=>(n.FIFTEEN_MIN="15m",n.ONE_HOUR="1h",n.SIX_HOUR="6h",n.TWELVE_HOUR="12h",n.ONE_DAY="24h",n.SEVEN_DAY="7d",n.THIRTY_DAY="30d",n.CURRENT_WEEK="current_week",n.CURRENT_MONTH="current_month",n.CURRENT_QUARTER="current_quarter",n.PREVIOUS_WEEK="previous_week",n.PREVIOUS_MONTH="previous_month",n.PREVIOUS_QUARTER="previous_quarter",n))(Yt||{});const FS=["minutely","hourly","daily","weekly","trend"];function tl(n){"@babel/helpers - typeof";return tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tl(n)}function ya(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ze(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function gr(n){ze(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||tl(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function kh(n,t){ze(2,arguments);var e=gr(n),r=ya(t);return isNaN(r)?new Date(NaN):(r&&e.setDate(e.getDate()+r),e)}function US(n,t){ze(2,arguments);var e=gr(n),r=ya(t);if(isNaN(r))return new Date(NaN);if(!r)return e;var i=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+r+1,0);var s=a.getDate();return i>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),i),e)}var BS={};function WS(){return BS}function ba(n,t){var e,r,i,a,s,o,l,c;ze(1,arguments);var u=WS(),d=ya((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=gr(n),p=f.getDay(),b=(p<d?7:0)+p-d;return f.setDate(f.getDate()-b),f.setHours(0,0,0,0),f}function Oh(n){ze(1,arguments);var t=gr(n);return t.setHours(0,0,0,0),t}var zS=60,YS=3600;function mr(n){ze(1,arguments);var t=gr(n);return t.setDate(1),t.setHours(0,0,0,0),t}function HS(n){ze(1,arguments);var t=gr(n),e=t.getFullYear(),r=t.getMonth(),i=new Date(0);return i.setFullYear(e,r+1,0),i.setHours(0,0,0,0),i.getDate()}function $S(n){return ze(1,arguments),Math.floor(n*YS)}function jS(n){ze(1,arguments);var t=n/zS;return Math.floor(t)}function Ph(n,t){ze(2,arguments);var e=ya(t);return US(n,-e)}function el(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Eh={exports:{}},Rh={exports:{}};(function(n){function t(e){return e&&e.__esModule?e:{default:e}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Rh);var Ht=Rh.exports,nl={exports:{}},rl={exports:{}},Ah={exports:{}};(function(n){function t(e){"@babel/helpers - typeof";return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},n.exports.__esModule=!0,n.exports.default=n.exports,t(e)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Ah);var Lh=Ah.exports,il={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(i.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+i.length+" present")}n.exports=t.default})(il,il.exports);var oe=il.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Lh),i=e(oe);function a(s){return(0,i.default)(1,arguments),s instanceof Date||(0,r.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}n.exports=t.default})(rl,rl.exports);var VS=rl.exports,al={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Lh),i=e(oe);function a(s){(0,i.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,r.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=t.default})(al,al.exports);var Ye=al.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(VS),i=e(Ye),a=e(oe);function s(o){if((0,a.default)(1,arguments),!(0,r.default)(o)&&typeof o!="number")return!1;var l=(0,i.default)(o);return!isNaN(Number(l))}n.exports=t.default})(nl,nl.exports);var qS=nl.exports,sl={exports:{}},ol={exports:{}},ll={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){if(r===null||r===!0||r===!1)return NaN;var i=Number(r);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}n.exports=t.default})(ll,ll.exports);var jn=ll.exports;const XS=el(jn);(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(jn),i=e(Ye),a=e(oe);function s(o,l){(0,a.default)(2,arguments);var c=(0,i.default)(o).getTime(),u=(0,r.default)(l);return new Date(c+u)}n.exports=t.default})(ol,ol.exports);var GS=ol.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(GS),i=e(oe),a=e(jn);function s(o,l){(0,i.default)(2,arguments);var c=(0,a.default)(l);return(0,r.default)(o,-c)}n.exports=t.default})(sl,sl.exports);var KS=sl.exports,cl={exports:{}},ul={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Ye),i=e(oe),a=864e5;function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}n.exports=t.default})(ul,ul.exports);var QS=ul.exports,dl={exports:{}},fl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Ye),i=e(oe);function a(s){(0,i.default)(1,arguments);var o=1,l=(0,r.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}n.exports=t.default})(fl,fl.exports);var hl=fl.exports,pl={exports:{}},gl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Ye),i=e(oe),a=e(hl);function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(gl,gl.exports);var Ih=gl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Ih),i=e(hl),a=e(oe);function s(o){(0,a.default)(1,arguments);var l=(0,r.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,i.default)(c);return u}n.exports=t.default})(pl,pl.exports);var ZS=pl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Ye),i=e(hl),a=e(ZS),s=e(oe),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,r.default)(c),d=(0,i.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}n.exports=t.default})(dl,dl.exports);var JS=dl.exports,ml={exports:{}},yl={exports:{}},Vn={};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.getDefaultOptions=tM,Vn.setDefaultOptions=eM;var Nh={};function tM(){return Nh}function eM(n){Nh=n}(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=e(Ye),i=e(oe),a=e(jn),s=Vn;function o(l,c){var u,d,f,p,b,x,g,m;(0,i.default)(1,arguments);var v=(0,s.getDefaultOptions)(),y=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(b=c.locale)===null||b===void 0||(x=b.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:v.weekStartsOn)!==null&&d!==void 0?d:(g=v.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var _=(0,r.default)(l),T=_.getUTCDay(),D=(T<y?7:0)+T-y;return _.setUTCDate(_.getUTCDate()-D),_.setUTCHours(0,0,0,0),_}n.exports=t.default})(yl,yl.exports);var bl=yl.exports,vl={exports:{}},xl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Ye),i=e(oe),a=e(bl),s=e(jn),o=Vn;function l(c,u){var d,f,p,b,x,g,m,v;(0,i.default)(1,arguments);var y=(0,r.default)(c),_=y.getUTCFullYear(),T=(0,o.getDefaultOptions)(),D=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(m=T.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=new Date(0);O.setUTCFullYear(_+1,0,D),O.setUTCHours(0,0,0,0);var S=(0,a.default)(O,u),M=new Date(0);M.setUTCFullYear(_,0,D),M.setUTCHours(0,0,0,0);var k=(0,a.default)(M,u);return y.getTime()>=S.getTime()?_+1:y.getTime()>=k.getTime()?_:_-1}n.exports=t.default})(xl,xl.exports);var Fh=xl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Fh),i=e(oe),a=e(bl),s=e(jn),o=Vn;function l(c,u){var d,f,p,b,x,g,m,v;(0,i.default)(1,arguments);var y=(0,o.getDefaultOptions)(),_=(0,s.default)((d=(f=(p=(b=u==null?void 0:u.firstWeekContainsDate)!==null&&b!==void 0?b:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:y.firstWeekContainsDate)!==null&&f!==void 0?f:(m=y.locale)===null||m===void 0||(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,r.default)(c,u),D=new Date(0);D.setUTCFullYear(T,0,_),D.setUTCHours(0,0,0,0);var O=(0,a.default)(D,u);return O}n.exports=t.default})(vl,vl.exports);var nM=vl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Ye),i=e(bl),a=e(nM),s=e(oe),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,r.default)(c),f=(0,i.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(ml,ml.exports);var rM=ml.exports,_l={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){for(var a=r<0?"-":"",s=Math.abs(r).toString();s.length<i;)s="0"+s;return a+s}n.exports=t.default})(_l,_l.exports);var Uh=_l.exports,wl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(Uh),i={y:function(s,o){var l=s.getUTCFullYear(),c=l>0?l:1-l;return(0,r.default)(o==="yy"?c%100:c,o.length)},M:function(s,o){var l=s.getUTCMonth();return o==="M"?String(l+1):(0,r.default)(l+1,2)},d:function(s,o){return(0,r.default)(s.getUTCDate(),o.length)},a:function(s,o){var l=s.getUTCHours()/12>=1?"pm":"am";switch(o){case"a":case"aa":return l.toUpperCase();case"aaa":return l;case"aaaaa":return l[0];case"aaaa":default:return l==="am"?"a.m.":"p.m."}},h:function(s,o){return(0,r.default)(s.getUTCHours()%12||12,o.length)},H:function(s,o){return(0,r.default)(s.getUTCHours(),o.length)},m:function(s,o){return(0,r.default)(s.getUTCMinutes(),o.length)},s:function(s,o){return(0,r.default)(s.getUTCSeconds(),o.length)},S:function(s,o){var l=o.length,c=s.getUTCMilliseconds(),u=Math.floor(c*Math.pow(10,l-3));return(0,r.default)(u,o.length)}},a=i;t.default=a,n.exports=t.default})(wl,wl.exports);var iM=wl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(QS),i=e(JS),a=e(Ih),s=e(rM),o=e(Fh),l=e(Uh),c=e(iM),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(g,m,v){var y=g.getUTCFullYear()>0?1:0;switch(m){case"G":case"GG":case"GGG":return v.era(y,{width:"abbreviated"});case"GGGGG":return v.era(y,{width:"narrow"});case"GGGG":default:return v.era(y,{width:"wide"})}},y:function(g,m,v){if(m==="yo"){var y=g.getUTCFullYear(),_=y>0?y:1-y;return v.ordinalNumber(_,{unit:"year"})}return c.default.y(g,m)},Y:function(g,m,v,y){var _=(0,o.default)(g,y),T=_>0?_:1-_;if(m==="YY"){var D=T%100;return(0,l.default)(D,2)}return m==="Yo"?v.ordinalNumber(T,{unit:"year"}):(0,l.default)(T,m.length)},R:function(g,m){var v=(0,a.default)(g);return(0,l.default)(v,m.length)},u:function(g,m){var v=g.getUTCFullYear();return(0,l.default)(v,m.length)},Q:function(g,m,v){var y=Math.ceil((g.getUTCMonth()+1)/3);switch(m){case"Q":return String(y);case"QQ":return(0,l.default)(y,2);case"Qo":return v.ordinalNumber(y,{unit:"quarter"});case"QQQ":return v.quarter(y,{width:"abbreviated",context:"formatting"});case"QQQQQ":return v.quarter(y,{width:"narrow",context:"formatting"});case"QQQQ":default:return v.quarter(y,{width:"wide",context:"formatting"})}},q:function(g,m,v){var y=Math.ceil((g.getUTCMonth()+1)/3);switch(m){case"q":return String(y);case"qq":return(0,l.default)(y,2);case"qo":return v.ordinalNumber(y,{unit:"quarter"});case"qqq":return v.quarter(y,{width:"abbreviated",context:"standalone"});case"qqqqq":return v.quarter(y,{width:"narrow",context:"standalone"});case"qqqq":default:return v.quarter(y,{width:"wide",context:"standalone"})}},M:function(g,m,v){var y=g.getUTCMonth();switch(m){case"M":case"MM":return c.default.M(g,m);case"Mo":return v.ordinalNumber(y+1,{unit:"month"});case"MMM":return v.month(y,{width:"abbreviated",context:"formatting"});case"MMMMM":return v.month(y,{width:"narrow",context:"formatting"});case"MMMM":default:return v.month(y,{width:"wide",context:"formatting"})}},L:function(g,m,v){var y=g.getUTCMonth();switch(m){case"L":return String(y+1);case"LL":return(0,l.default)(y+1,2);case"Lo":return v.ordinalNumber(y+1,{unit:"month"});case"LLL":return v.month(y,{width:"abbreviated",context:"standalone"});case"LLLLL":return v.month(y,{width:"narrow",context:"standalone"});case"LLLL":default:return v.month(y,{width:"wide",context:"standalone"})}},w:function(g,m,v,y){var _=(0,s.default)(g,y);return m==="wo"?v.ordinalNumber(_,{unit:"week"}):(0,l.default)(_,m.length)},I:function(g,m,v){var y=(0,i.default)(g);return m==="Io"?v.ordinalNumber(y,{unit:"week"}):(0,l.default)(y,m.length)},d:function(g,m,v){return m==="do"?v.ordinalNumber(g.getUTCDate(),{unit:"date"}):c.default.d(g,m)},D:function(g,m,v){var y=(0,r.default)(g);return m==="Do"?v.ordinalNumber(y,{unit:"dayOfYear"}):(0,l.default)(y,m.length)},E:function(g,m,v){var y=g.getUTCDay();switch(m){case"E":case"EE":case"EEE":return v.day(y,{width:"abbreviated",context:"formatting"});case"EEEEE":return v.day(y,{width:"narrow",context:"formatting"});case"EEEEEE":return v.day(y,{width:"short",context:"formatting"});case"EEEE":default:return v.day(y,{width:"wide",context:"formatting"})}},e:function(g,m,v,y){var _=g.getUTCDay(),T=(_-y.weekStartsOn+8)%7||7;switch(m){case"e":return String(T);case"ee":return(0,l.default)(T,2);case"eo":return v.ordinalNumber(T,{unit:"day"});case"eee":return v.day(_,{width:"abbreviated",context:"formatting"});case"eeeee":return v.day(_,{width:"narrow",context:"formatting"});case"eeeeee":return v.day(_,{width:"short",context:"formatting"});case"eeee":default:return v.day(_,{width:"wide",context:"formatting"})}},c:function(g,m,v,y){var _=g.getUTCDay(),T=(_-y.weekStartsOn+8)%7||7;switch(m){case"c":return String(T);case"cc":return(0,l.default)(T,m.length);case"co":return v.ordinalNumber(T,{unit:"day"});case"ccc":return v.day(_,{width:"abbreviated",context:"standalone"});case"ccccc":return v.day(_,{width:"narrow",context:"standalone"});case"cccccc":return v.day(_,{width:"short",context:"standalone"});case"cccc":default:return v.day(_,{width:"wide",context:"standalone"})}},i:function(g,m,v){var y=g.getUTCDay(),_=y===0?7:y;switch(m){case"i":return String(_);case"ii":return(0,l.default)(_,m.length);case"io":return v.ordinalNumber(_,{unit:"day"});case"iii":return v.day(y,{width:"abbreviated",context:"formatting"});case"iiiii":return v.day(y,{width:"narrow",context:"formatting"});case"iiiiii":return v.day(y,{width:"short",context:"formatting"});case"iiii":default:return v.day(y,{width:"wide",context:"formatting"})}},a:function(g,m,v){var y=g.getUTCHours(),_=y/12>=1?"pm":"am";switch(m){case"a":case"aa":return v.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"aaa":return v.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return v.dayPeriod(_,{width:"narrow",context:"formatting"});case"aaaa":default:return v.dayPeriod(_,{width:"wide",context:"formatting"})}},b:function(g,m,v){var y=g.getUTCHours(),_;switch(y===12?_=u.noon:y===0?_=u.midnight:_=y/12>=1?"pm":"am",m){case"b":case"bb":return v.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"bbb":return v.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return v.dayPeriod(_,{width:"narrow",context:"formatting"});case"bbbb":default:return v.dayPeriod(_,{width:"wide",context:"formatting"})}},B:function(g,m,v){var y=g.getUTCHours(),_;switch(y>=17?_=u.evening:y>=12?_=u.afternoon:y>=4?_=u.morning:_=u.night,m){case"B":case"BB":case"BBB":return v.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"BBBBB":return v.dayPeriod(_,{width:"narrow",context:"formatting"});case"BBBB":default:return v.dayPeriod(_,{width:"wide",context:"formatting"})}},h:function(g,m,v){if(m==="ho"){var y=g.getUTCHours()%12;return y===0&&(y=12),v.ordinalNumber(y,{unit:"hour"})}return c.default.h(g,m)},H:function(g,m,v){return m==="Ho"?v.ordinalNumber(g.getUTCHours(),{unit:"hour"}):c.default.H(g,m)},K:function(g,m,v){var y=g.getUTCHours()%12;return m==="Ko"?v.ordinalNumber(y,{unit:"hour"}):(0,l.default)(y,m.length)},k:function(g,m,v){var y=g.getUTCHours();return y===0&&(y=24),m==="ko"?v.ordinalNumber(y,{unit:"hour"}):(0,l.default)(y,m.length)},m:function(g,m,v){return m==="mo"?v.ordinalNumber(g.getUTCMinutes(),{unit:"minute"}):c.default.m(g,m)},s:function(g,m,v){return m==="so"?v.ordinalNumber(g.getUTCSeconds(),{unit:"second"}):c.default.s(g,m)},S:function(g,m){return c.default.S(g,m)},X:function(g,m,v,y){var _=y._originalDate||g,T=_.getTimezoneOffset();if(T===0)return"Z";switch(m){case"X":return p(T);case"XXXX":case"XX":return b(T);case"XXXXX":case"XXX":default:return b(T,":")}},x:function(g,m,v,y){var _=y._originalDate||g,T=_.getTimezoneOffset();switch(m){case"x":return p(T);case"xxxx":case"xx":return b(T);case"xxxxx":case"xxx":default:return b(T,":")}},O:function(g,m,v,y){var _=y._originalDate||g,T=_.getTimezoneOffset();switch(m){case"O":case"OO":case"OOO":return"GMT"+f(T,":");case"OOOO":default:return"GMT"+b(T,":")}},z:function(g,m,v,y){var _=y._originalDate||g,T=_.getTimezoneOffset();switch(m){case"z":case"zz":case"zzz":return"GMT"+f(T,":");case"zzzz":default:return"GMT"+b(T,":")}},t:function(g,m,v,y){var _=y._originalDate||g,T=Math.floor(_.getTime()/1e3);return(0,l.default)(T,m.length)},T:function(g,m,v,y){var _=y._originalDate||g,T=_.getTime();return(0,l.default)(T,m.length)}};function f(g,m){var v=g>0?"-":"+",y=Math.abs(g),_=Math.floor(y/60),T=y%60;if(T===0)return v+String(_);var D=m||"";return v+String(_)+D+(0,l.default)(T,2)}function p(g,m){if(g%60===0){var v=g>0?"-":"+";return v+(0,l.default)(Math.abs(g)/60,2)}return b(g,m)}function b(g,m){var v=m||"",y=g>0?"-":"+",_=Math.abs(g),T=(0,l.default)(Math.floor(_/60),2),D=(0,l.default)(_%60,2);return y+T+v+D}var x=d;t.default=x,n.exports=t.default})(cl,cl.exports);var aM=cl.exports,Tl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(o,l){switch(o){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});case"PPPP":default:return l.date({width:"full"})}},r=function(o,l){switch(o){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});case"pppp":default:return l.time({width:"full"})}},i=function(o,l){var c=o.match(/(P+)(p+)?/)||[],u=c[1],d=c[2];if(!d)return e(o,l);var f;switch(u){case"P":f=l.dateTime({width:"short"});break;case"PP":f=l.dateTime({width:"medium"});break;case"PPP":f=l.dateTime({width:"long"});break;case"PPPP":default:f=l.dateTime({width:"full"});break}return f.replace("{{date}}",e(u,l)).replace("{{time}}",r(d,l))},a={p:r,P:i},s=a;t.default=s,n.exports=t.default})(Tl,Tl.exports);var sM=Tl.exports,Sl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){var i=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return i.setUTCFullYear(r.getFullYear()),r.getTime()-i.getTime()}n.exports=t.default})(Sl,Sl.exports);var Bh=Sl.exports;const Wh=el(Bh);var ui={};Object.defineProperty(ui,"__esModule",{value:!0}),ui.isProtectedDayOfYearToken=cM,ui.isProtectedWeekYearToken=uM,ui.throwProtectedError=dM;var oM=["D","DD"],lM=["YY","YYYY"];function cM(n){return oM.indexOf(n)!==-1}function uM(n){return lM.indexOf(n)!==-1}function dM(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ml={exports:{}},Cl={exports:{}},Dl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},r=function(a,s,o){var l,c=e[a];return typeof c=="string"?l=c:s===1?l=c.one:l=c.other.replace("{{count}}",s.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+l:l+" ago":l},i=r;t.default=i,n.exports=t.default})(Dl,Dl.exports);var fM=Dl.exports,kl={exports:{}},Ol={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=i.width?String(i.width):r.defaultWidth,s=r.formats[a]||r.formats[r.defaultWidth];return s}}n.exports=t.default})(Ol,Ol.exports);var hM=Ol.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(hM),i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,r.default)({formats:i,defaultWidth:"full"}),time:(0,r.default)({formats:a,defaultWidth:"full"}),dateTime:(0,r.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,n.exports=t.default})(kl,kl.exports);var pM=kl.exports,Pl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r=function(a,s,o,l){return e[a]},i=r;t.default=i,n.exports=t.default})(Pl,Pl.exports);var gM=Pl.exports,El={exports:{}},Rl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&r.formattingValues){var l=r.defaultFormattingWidth||r.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=r.formattingValues[c]||r.formattingValues[l]}else{var u=r.defaultWidth,d=a!=null&&a.width?String(a.width):r.defaultWidth;o=r.values[d]||r.values[u]}var f=r.argumentCallback?r.argumentCallback(i):i;return o[f]}}n.exports=t.default})(Rl,Rl.exports);var mM=Rl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(mM),i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(p,b){var x=Number(p),g=x%100;if(g>20||g<10)switch(g%10){case 1:return x+"st";case 2:return x+"nd";case 3:return x+"rd"}return x+"th"},d={ordinalNumber:u,era:(0,r.default)({values:i,defaultWidth:"wide"}),quarter:(0,r.default)({values:a,defaultWidth:"wide",argumentCallback:function(p){return p-1}}),month:(0,r.default)({values:s,defaultWidth:"wide"}),day:(0,r.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},f=d;t.default=f,n.exports=t.default})(El,El.exports);var yM=El.exports,Al={exports:{}},Ll={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?i(f,function(g){return g.test(d)}):r(f,function(g){return g.test(d)}),b;b=a.valueCallback?a.valueCallback(p):p,b=o.valueCallback?o.valueCallback(b):b;var x=s.slice(d.length);return{value:b,rest:x}}}function r(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function i(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}n.exports=t.default})(Ll,Ll.exports);var bM=Ll.exports,Il={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.match(r.matchPattern);if(!s)return null;var o=s[0],l=i.match(r.parsePattern);if(!l)return null;var c=r.valueCallback?r.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=i.slice(o.length);return{value:c,rest:u}}}n.exports=t.default})(Il,Il.exports);var vM=Il.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(bM),i=e(vM),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},b={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},x={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,i.default)({matchPattern:a,parsePattern:s,valueCallback:function(y){return parseInt(y,10)}}),era:(0,r.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(y){return y+1}}),month:(0,r.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:b,defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},v=m;t.default=v,n.exports=t.default})(Al,Al.exports);var xM=Al.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(fM),i=e(pM),a=e(gM),s=e(yM),o=e(xM),l={code:"en-US",formatDistance:r.default,formatLong:i.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,n.exports=t.default})(Cl,Cl.exports);var _M=Cl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(_M),i=r.default;t.default=i,n.exports=t.default})(Ml,Ml.exports);var wM=Ml.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r=e(qS),i=e(KS),a=e(Ye),s=e(aM),o=e(sM),l=e(Bh),c=ui,u=e(jn),d=e(oe),f=Vn,p=e(wM),b=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,m=/''/g,v=/[a-zA-Z]/;function y(T,D,O){var S,M,k,P,E,F,q,$,Y,I,it,B,yt,ut,z,L,U,j;(0,d.default)(2,arguments);var Z=String(D),K=(0,f.getDefaultOptions)(),N=(S=(M=O==null?void 0:O.locale)!==null&&M!==void 0?M:K.locale)!==null&&S!==void 0?S:p.default,A=(0,u.default)((k=(P=(E=(F=O==null?void 0:O.firstWeekContainsDate)!==null&&F!==void 0?F:O==null||(q=O.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&E!==void 0?E:K.firstWeekContainsDate)!==null&&P!==void 0?P:(Y=K.locale)===null||Y===void 0||(I=Y.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&k!==void 0?k:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((it=(B=(yt=(ut=O==null?void 0:O.weekStartsOn)!==null&&ut!==void 0?ut:O==null||(z=O.locale)===null||z===void 0||(L=z.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&yt!==void 0?yt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&it!==void 0?it:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,r.default)(X))throw new RangeError("Invalid time value");var bt=(0,l.default)(X),ct=(0,i.default)(X,bt),Ot={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var vt=et[0];if(vt==="p"||vt==="P"){var Nt=o.default[vt];return Nt(et,N.formatLong)}return et}).join("").match(b).map(function(et){if(et==="''")return"'";var vt=et[0];if(vt==="'")return _(et);var Nt=s.default[vt];if(Nt)return!(O!=null&&O.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),!(O!=null&&O.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),Nt(ct,et,N.localize,Ot);if(vt.match(v))throw new RangeError("Format string contains an unescaped latin alphabet character `"+vt+"`");return et}).join("");return _t}function _(T){var D=T.match(g);return D?D[1].replace(m,"'"):T}n.exports=t.default})(Eh,Eh.exports);function TM(n,t){var e=DM(t);return e.formatToParts?MM(e,n):CM(e,n)}var SM={year:0,month:1,day:2,hour:3,minute:4,second:5};function MM(n,t){try{for(var e=n.formatToParts(t),r=[],i=0;i<e.length;i++){var a=SM[e[i].type];a>=0&&(r[a]=parseInt(e[i].value,10))}return r}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function CM(n,t){var e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var Nl={};function DM(n){if(!Nl[n]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),e=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";Nl[n]=e?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Nl[n]}function Fl(n,t,e,r,i,a,s){var o=new Date(0);return o.setUTCFullYear(n,t,e),o.setUTCHours(r,i,a,s),o}var zh=36e5,kM=6e4,Ul={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function va(n,t,e){var r,i;if(!n||(r=Ul.timezoneZ.exec(n),r))return 0;var a;if(r=Ul.timezoneHH.exec(n),r)return a=parseInt(r[1],10),Yh(a)?-(a*zh):NaN;if(r=Ul.timezoneHHMM.exec(n),r){a=parseInt(r[2],10);var s=parseInt(r[3],10);return Yh(a,s)?(i=Math.abs(a)*zh+s*kM,r[1]==="+"?-i:i):NaN}if(EM(n)){t=new Date(t||Date.now());var o=e?t:OM(t),l=Bl(o,n),c=e?l:PM(t,l,n);return-c}return NaN}function OM(n){return Fl(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Bl(n,t){var e=TM(n,t),r=Fl(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime(),i=n.getTime(),a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function PM(n,t,e){var r=n.getTime(),i=r-t,a=Bl(new Date(i),e);if(t===a)return t;i-=a-t;var s=Bl(new Date(i),e);return a===s?a:Math.max(a,s)}function Yh(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var Hh={};function EM(n){if(Hh[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Hh[n]=!0,!0}catch{return!1}}var RM=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;const $h=RM;var Wl=36e5,jh=6e4,AM=2,le={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:$h};function zl(n,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);var e=t||{},r=e.additionalDigits==null?AM:XS(e.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var i=LM(n),a=IM(i.date,r),s=a.year,o=a.restDateString,l=NM(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(i.time&&(u=FM(i.time),isNaN(u)))return new Date(NaN);if(i.timeZone||e.timeZone){if(d=va(i.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=Wh(new Date(c+u)),d=Wh(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function LM(n){var t={},e=le.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=le.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){var i=le.timeZone.exec(r);i?(t.time=r.replace(i[1],""),t.timeZone=i[1].trim()):t.time=r}return t}function IM(n,t){var e=le.YYY[t],r=le.YYYYY[t],i;if(i=le.YYYY.exec(n)||r.exec(n),i){var a=i[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(i=le.YY.exec(n)||e.exec(n),i){var s=i[1];return{year:parseInt(s,10)*100,restDateString:n.slice(s.length)}}return{year:null}}function NM(n,t){if(t===null)return null;var e,r,i,a;if(n.length===0)return r=new Date(0),r.setUTCFullYear(t),r;if(e=le.MM.exec(n),e)return r=new Date(0),i=parseInt(e[1],10)-1,Xh(t,i)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(e=le.DDD.exec(n),e){r=new Date(0);var s=parseInt(e[1],10);return WM(t,s)?(r.setUTCFullYear(t,0,s),r):new Date(NaN)}if(e=le.MMDD.exec(n),e){r=new Date(0),i=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return Xh(t,i,o)?(r.setUTCFullYear(t,i,o),r):new Date(NaN)}if(e=le.Www.exec(n),e)return a=parseInt(e[1],10)-1,Gh(t,a)?Vh(t,a):new Date(NaN);if(e=le.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return Gh(t,a,l)?Vh(t,a,l):new Date(NaN)}return null}function FM(n){var t,e,r;if(t=le.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),Yl(e)?e%24*Wl:NaN;if(t=le.HHMM.exec(n),t)return e=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),Yl(e,r)?e%24*Wl+r*jh:NaN;if(t=le.HHMMSS.exec(n),t){e=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Yl(e,r,i)?e%24*Wl+r*jh+i*1e3:NaN}return null}function Vh(n,t,e){t=t||0,e=e||0;var r=new Date(0);r.setUTCFullYear(n,0,4);var i=r.getUTCDay()||7,a=t*7+e+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var UM=[31,28,31,30,31,30,31,31,30,31,30,31],BM=[31,29,31,30,31,30,31,31,30,31,30,31];function qh(n){return n%400===0||n%4===0&&n%100!==0}function Xh(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var r=qh(n);if(r&&e>BM[t]||!r&&e>UM[t])return!1}return!0}function WM(n,t){if(t<1)return!1;var e=qh(n);return!(e&&t>366||!e&&t>365)}function Gh(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Yl(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var Hl={exports:{}},$l={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(r==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a]);return r}n.exports=t.default})($l,$l.exports);var zM=$l.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=e(zM);function i(a){return(0,r.default)({},a)}n.exports=t.default})(Hl,Hl.exports);var YM=Hl.exports;const HM=el(YM);function $M(n,t,e){var r=zl(n,e),i=va(t,r,!0),a=new Date(r.getTime()-i),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function jM(n,t){return-va(n,t)}function VM(n,t,e){if(typeof n=="string"&&!n.match($h)){var r=HM(e);return r.timeZone=t,zl(n,r)}var i=zl(n,e),a=Fl(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()).getTime(),s=va(t,new Date(a));return new Date(a+s)}const qM={minutely:60*1e3,hourly:60*60*1e3,daily:60*60*24*1e3,weekly:60*60*24*7*1e3,trend:0};function jl(n){return n&&FS.find(t=>n<=qM[t])||null}const yr=(n,t)=>new Date(n.getTime()-jM(t,n));class Pe{constructor(t){We(this,"timeframeText"),We(this,"key"),We(this,"display"),We(this,"timeframeLength"),We(this,"allowedTiers"),We(this,"defaultResponseGranularity"),We(this,"dataGranularity"),We(this,"isRelative"),We(this,"_startCustom"),We(this,"_endCustom"),this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom}rawEnd(t){return this._endCustom||new Date}rawStart(t){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(){const t=new Set,e=this.maximumTimeframeLength()/3600;return e<=6&&t.add("minutely"),e>=2&&e<=7*24&&t.add("hourly"),e>=2*24&&t.add("daily"),e>=2*24*14&&t.add("weekly"),t}cacheKey(){return this.key!=="custom"?this.key:`${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`}v4Query(t){return this.key==="custom"?{type:"absolute",start:this.rawStart(),end:this.rawEnd(),tz:t}:{type:"relative",time_range:this.key,tz:t}}tzAdjustedDate(t){if(!t)return new Date;const e=VM(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return $M(e,t)}}class XM extends Pe{rawStart(t){let e=ba(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=yr(e,t)),e}maximumTimeframeLength(){return 60*60*24*7}}class GM extends Pe{rawStart(t){let e=mr(this.tzAdjustedDate(t));return t&&(e=yr(e,t)),e}maximumTimeframeLength(){return 60*60*24*31}}class KM extends Pe{rawEnd(t){let e=ba(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=yr(e,t)),e}rawStart(t){const e=this.tzAdjustedDate(t);let r=ba(e.setDate(e.getDate()-7),{weekStartsOn:1});return t&&(r=yr(r,t)),r}}class QM extends Pe{rawEnd(t){let e=mr(this.tzAdjustedDate(t));return t&&(e=yr(e,t)),e}rawStart(t){let e=mr(Ph(this.tzAdjustedDate(t),1));return t&&(e=yr(e,t)),e}}Yt.FIFTEEN_MIN,new Pe({key:Yt.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.ONE_HOUR,new Pe({key:Yt.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.SIX_HOUR,new Pe({key:Yt.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.TWELVE_HOUR,new Pe({key:Yt.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.ONE_DAY,new Pe({key:Yt.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.SEVEN_DAY,new Pe({key:Yt.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Yt.THIRTY_DAY,new Pe({key:Yt.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Yt.CURRENT_WEEK,new XM({key:Yt.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const n=ba(new Date,{weekStartsOn:1});return(Oh(kh(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.CURRENT_MONTH,new GM({key:Yt.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const n=mr(new Date);return(Oh(kh(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.PREVIOUS_WEEK,new KM({key:Yt.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.PREVIOUS_MONTH,new QM({key:Yt.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let n=0;const t=mr(new Date),e=mr(Ph(new Date,1));return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(n=ZM(t,e)),60*60*24*HS(new Date().setMonth(new Date().getMonth()-1))+$S(n)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]});function ZM(n,t){return jS(n.getTimezoneOffset()-t.getTimezoneOffset())}const Kh=(n,t,e,r)=>{n.save(),n.beginPath(),n.moveTo(t,e),n.lineTo(t,r),n.lineWidth=1,n.strokeStyle="#0275d8",n.stroke(),n.restore()},Vl={id:"linePlugin",afterDatasetsDraw:function(n){if(n.tooltip&&n.tooltip.getActiveElements()&&n.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:t}=n.tooltip.dataPoints[0].element,e=n.ctx;Kh(e,t,n.scales.y.top,n.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,e=n.ctx;Kh(e,t,n.scales.y.top,n.scales.y.bottom)}},beforeDestroy(){delete this.clickedSegment}},JM=h.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:ee.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRangeMs:{type:Number,required:!1,default:void 0},granularity:{type:String,required:!0},stacked:{type:Boolean,required:!1,default:!0},legendValues:{type:Object,required:!1,default:null},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{translateUnit:e}=Ct.useTranslatedUnits(),r=h.ref(),i=h.ref(Sn()),a=h.ref(Sn()),s=h.ref([]),o=h.ref(),l=h.ref(h.inject("legendPosition",Wt.Right)),c=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:h.toRef(t,"metricUnit"),translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:t.type,locked:!1,chartTooltipSortFn:t.chartTooltipSortFn}),u={id:i.value,afterUpdate(m){s.value=m.options.plugins.legend.labels.generateLabels(m).map(v=>({...v,value:t.legendValues&&t.legendValues[v.text]})).sort(t.chartLegendSortFn)}},d=h.computed(()=>[u,_h,...t.type===ee.TIMESERIES_LINE?[Vl]:[]]),{options:f}=Ct.useLinechartOptions({tooltipState:c,timeRangeMs:h.toRef(t,"timeRangeMs"),granularity:h.toRef(t,"granularity"),legendID:i.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle")});Ct.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const p=m=>ia(m,{short:["daily","weekly"].includes(t.granularity)}),b=m=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[m],x=({width:m,height:v})=>{c.width=m,c.height=v},g=()=>{var m,v,y;c.locked=!c.locked,r.value&&((v=(m=r.value.chart.tooltip)==null?void 0:m.dataPoints)!=null&&v.length)&&(Vl.clickedSegment=c.locked?(y=r.value.chart.tooltip)==null?void 0:y.dataPoints[0]:void 0)};return h.watch(()=>t.type,()=>{c.locked=!1,c.showTooltip=!1,delete Vl.clickedSegment}),(m,v)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",b(l.value)]),"data-testid":"line-chart-parent"},[h.createElementVNode("div",{class:"chart-container",onClick:v[0]||(v[0]=y=>g())},[n.type===h.unref(ee).TIMESERIES_LINE?(h.openBlock(),h.createBlock(h.unref(ES),{key:0,ref_key:"chartInstance",ref:r,"chart-id":a.value,data:n.chartData,"data-testid":"time-series-line-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):n.type===h.unref(ee).TIMESERIES_BAR?(h.openBlock(),h.createBlock(h.unref(PS),{key:1,ref_key:"chartInstance",ref:r,"chart-id":a.value,data:n.chartData,"data-testid":"time-series-bar-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):h.createCommentVNode("",!0)]),h.createVNode(Qo,{ref_key:"tooltipElement",ref:o,context:p(c.tooltipContext),"data-testid":"tooltip",left:c.left,locked:c.locked,series:c.tooltipSeries,"show-tooltip":c.showTooltip,"tooltip-title":n.tooltipTitle,top:c.top,unit:n.metricUnit,onDimensions:x,onLeft:v[1]||(v[1]=y=>c.left=y),onTop:v[2]||(v[2]=y=>c.top=y)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),h.createVNode(Zo,{id:i.value,"chart-instance":r.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),tC=Ze(JM,[["__scopeId","data-v-6b51feb4"]]);var qn=(n=>(n.String="string",n.Number="number",n.Boolean="boolean",n.Object="object",n.Undefined="undefined",n))(qn||{}),xa={exports:{}};xa.exports,function(n,t){var e=200,r="Expected a function",i="__lodash_hash_undefined__",a=1,s=2,o=1/0,l=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object Boolean]",f="[object Date]",p="[object Error]",b="[object Function]",x="[object GeneratorFunction]",g="[object Map]",m="[object Number]",v="[object Object]",y="[object Promise]",_="[object RegExp]",T="[object Set]",D="[object String]",O="[object Symbol]",S="[object WeakMap]",M="[object ArrayBuffer]",k="[object DataView]",P="[object Float32Array]",E="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",$="[object Int32Array]",Y="[object Uint8Array]",I="[object Uint8ClampedArray]",it="[object Uint16Array]",B="[object Uint32Array]",yt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,z=/^\./,L=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/[\\^$.*+?()[\]{}|]/g,j=/\\(\\)?/g,Z=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,N={};N[P]=N[E]=N[F]=N[q]=N[$]=N[Y]=N[I]=N[it]=N[B]=!0,N[c]=N[u]=N[M]=N[d]=N[k]=N[f]=N[p]=N[b]=N[g]=N[m]=N[v]=N[_]=N[T]=N[D]=N[S]=!1;var A=typeof ge=="object"&&ge&&ge.Object===Object&&ge,Q=typeof self=="object"&&self&&self.Object===Object&&self,X=A||Q||Function("return this")(),bt=t&&!t.nodeType&&t,ct=bt&&!0&&n&&!n.nodeType&&n,Ot=ct&&ct.exports===bt,_t=Ot&&A.process,et=function(){try{return _t&&_t.binding("util")}catch{}}(),vt=et&&et.isTypedArray;function Nt(w,C){for(var R=-1,W=w?w.length:0;++R<W;)if(C(w[R],R,w))return!0;return!1}function Me(w){return function(C){return C==null?void 0:C[w]}}function Ee(w,C){for(var R=-1,W=Array(w);++R<w;)W[R]=C(R);return W}function me(w){return function(C){return w(C)}}function Lt(w,C){return w==null?void 0:w[C]}function Ft(w){var C=!1;if(w!=null&&typeof w.toString!="function")try{C=!!(w+"")}catch{}return C}function Je(w){var C=-1,R=Array(w.size);return w.forEach(function(W,ot){R[++C]=[ot,W]}),R}function Dt(w,C){return function(R){return w(C(R))}}function Cn(w){var C=-1,R=Array(w.size);return w.forEach(function(W){R[++C]=W}),R}var Re=Array.prototype,tn=Function.prototype,_e=Object.prototype,Ce=X["__core-js_shared__"],Ae=function(){var w=/[^.]+$/.exec(Ce&&Ce.keys&&Ce.keys.IE_PROTO||"");return w?"Symbol(src)_1."+w:""}(),ce=tn.toString,ye=_e.hasOwnProperty,Kt=_e.toString,_a=RegExp("^"+ce.call(ye).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),br=X.Symbol,lp=X.Uint8Array,gD=_e.propertyIsEnumerable,mD=Re.splice,yD=Dt(Object.keys,Object),Gl=vr(X,"DataView"),di=vr(X,"Map"),Kl=vr(X,"Promise"),Ql=vr(X,"Set"),Zl=vr(X,"WeakMap"),fi=vr(Object,"create"),bD=Gn(Gl),vD=Gn(di),xD=Gn(Kl),_D=Gn(Ql),wD=Gn(Zl),wa=br?br.prototype:void 0,Jl=wa?wa.valueOf:void 0,cp=wa?wa.toString:void 0;function Xn(w){var C=-1,R=w?w.length:0;for(this.clear();++C<R;){var W=w[C];this.set(W[0],W[1])}}function TD(){this.__data__=fi?fi(null):{}}function SD(w){return this.has(w)&&delete this.__data__[w]}function MD(w){var C=this.__data__;if(fi){var R=C[w];return R===i?void 0:R}return ye.call(C,w)?C[w]:void 0}function CD(w){var C=this.__data__;return fi?C[w]!==void 0:ye.call(C,w)}function DD(w,C){var R=this.__data__;return R[w]=fi&&C===void 0?i:C,this}Xn.prototype.clear=TD,Xn.prototype.delete=SD,Xn.prototype.get=MD,Xn.prototype.has=CD,Xn.prototype.set=DD;function en(w){var C=-1,R=w?w.length:0;for(this.clear();++C<R;){var W=w[C];this.set(W[0],W[1])}}function kD(){this.__data__=[]}function OD(w){var C=this.__data__,R=Sa(C,w);if(R<0)return!1;var W=C.length-1;return R==W?C.pop():mD.call(C,R,1),!0}function PD(w){var C=this.__data__,R=Sa(C,w);return R<0?void 0:C[R][1]}function ED(w){return Sa(this.__data__,w)>-1}function RD(w,C){var R=this.__data__,W=Sa(R,w);return W<0?R.push([w,C]):R[W][1]=C,this}en.prototype.clear=kD,en.prototype.delete=OD,en.prototype.get=PD,en.prototype.has=ED,en.prototype.set=RD;function nn(w){var C=-1,R=w?w.length:0;for(this.clear();++C<R;){var W=w[C];this.set(W[0],W[1])}}function AD(){this.__data__={hash:new Xn,map:new(di||en),string:new Xn}}function LD(w){return Ma(this,w).delete(w)}function ID(w){return Ma(this,w).get(w)}function ND(w){return Ma(this,w).has(w)}function FD(w,C){return Ma(this,w).set(w,C),this}nn.prototype.clear=AD,nn.prototype.delete=LD,nn.prototype.get=ID,nn.prototype.has=ND,nn.prototype.set=FD;function Ta(w){var C=-1,R=w?w.length:0;for(this.__data__=new nn;++C<R;)this.add(w[C])}function UD(w){return this.__data__.set(w,i),this}function BD(w){return this.__data__.has(w)}Ta.prototype.add=Ta.prototype.push=UD,Ta.prototype.has=BD;function rn(w){this.__data__=new en(w)}function WD(){this.__data__=new en}function zD(w){return this.__data__.delete(w)}function YD(w){return this.__data__.get(w)}function HD(w){return this.__data__.has(w)}function $D(w,C){var R=this.__data__;if(R instanceof en){var W=R.__data__;if(!di||W.length<e-1)return W.push([w,C]),this;R=this.__data__=new nn(W)}return R.set(w,C),this}rn.prototype.clear=WD,rn.prototype.delete=zD,rn.prototype.get=YD,rn.prototype.has=HD,rn.prototype.set=$D;function jD(w,C){var R=Kn(w)||yp(w)?Ee(w.length,String):[],W=R.length,ot=!!W;for(var tt in w)(C||ye.call(w,tt))&&!(ot&&(tt=="length"||hp(tt,W)))&&R.push(tt);return R}function Sa(w,C){for(var R=w.length;R--;)if(mp(w[R][0],C))return R;return-1}var VD=sk();function qD(w,C){return w&&VD(w,C,Pa)}function up(w,C){C=Ca(C,w)?[C]:dp(C);for(var R=0,W=C.length;w!=null&&R<W;)w=w[Da(C[R++])];return R&&R==W?w:void 0}function XD(w){return Kt.call(w)}function GD(w,C){return w!=null&&C in Object(w)}function tc(w,C,R,W,ot){return w===C?!0:w==null||C==null||!ka(w)&&!Oa(C)?w!==w&&C!==C:KD(w,C,tc,R,W,ot)}function KD(w,C,R,W,ot,tt){var wt=Kn(w),Pt=Kn(C),$t=u,Zt=u;wt||($t=Dn(w),$t=$t==c?v:$t),Pt||(Zt=Dn(C),Zt=Zt==c?v:Zt);var ue=$t==v&&!Ft(w),be=Zt==v&&!Ft(C),Jt=$t==Zt;if(Jt&&!ue)return tt||(tt=new rn),wt||mk(w)?fp(w,C,R,W,ot,tt):ok(w,C,$t,R,W,ot,tt);if(!(ot&s)){var De=ue&&ye.call(w,"__wrapped__"),ke=be&&ye.call(C,"__wrapped__");if(De||ke){var kn=De?w.value():w,an=ke?C.value():C;return tt||(tt=new rn),R(kn,an,W,ot,tt)}}return Jt?(tt||(tt=new rn),lk(w,C,R,W,ot,tt)):!1}function QD(w,C,R,W){var ot=R.length,tt=ot,wt=!W;if(w==null)return!tt;for(w=Object(w);ot--;){var Pt=R[ot];if(wt&&Pt[2]?Pt[1]!==w[Pt[0]]:!(Pt[0]in w))return!1}for(;++ot<tt;){Pt=R[ot];var $t=Pt[0],Zt=w[$t],ue=Pt[1];if(wt&&Pt[2]){if(Zt===void 0&&!($t in w))return!1}else{var be=new rn;if(W)var Jt=W(Zt,ue,$t,w,C,be);if(!(Jt===void 0?tc(ue,Zt,W,a|s,be):Jt))return!1}}return!0}function ZD(w){if(!ka(w)||fk(w))return!1;var C=vp(w)||Ft(w)?_a:Z;return C.test(Gn(w))}function JD(w){return Oa(w)&&nc(w.length)&&!!N[Kt.call(w)]}function tk(w){return typeof w=="function"?w:w==null?_k:typeof w=="object"?Kn(w)?rk(w[0],w[1]):nk(w):wk(w)}function ek(w){if(!hk(w))return yD(w);var C=[];for(var R in Object(w))ye.call(w,R)&&R!="constructor"&&C.push(R);return C}function nk(w){var C=ck(w);return C.length==1&&C[0][2]?gp(C[0][0],C[0][1]):function(R){return R===w||QD(R,w,C)}}function rk(w,C){return Ca(w)&&pp(C)?gp(Da(w),C):function(R){var W=bk(R,w);return W===void 0&&W===C?vk(R,w):tc(C,W,void 0,a|s)}}function ik(w){return function(C){return up(C,w)}}function ak(w){if(typeof w=="string")return w;if(rc(w))return cp?cp.call(w):"";var C=w+"";return C=="0"&&1/w==-o?"-0":C}function dp(w){return Kn(w)?w:pk(w)}function sk(w){return function(C,R,W){for(var ot=-1,tt=Object(C),wt=W(C),Pt=wt.length;Pt--;){var $t=wt[w?Pt:++ot];if(R(tt[$t],$t,tt)===!1)break}return C}}function fp(w,C,R,W,ot,tt){var wt=ot&s,Pt=w.length,$t=C.length;if(Pt!=$t&&!(wt&&$t>Pt))return!1;var Zt=tt.get(w);if(Zt&&tt.get(C))return Zt==C;var ue=-1,be=!0,Jt=ot&a?new Ta:void 0;for(tt.set(w,C),tt.set(C,w);++ue<Pt;){var De=w[ue],ke=C[ue];if(W)var kn=wt?W(ke,De,ue,C,w,tt):W(De,ke,ue,w,C,tt);if(kn!==void 0){if(kn)continue;be=!1;break}if(Jt){if(!Nt(C,function(an,Qn){if(!Jt.has(Qn)&&(De===an||R(De,an,W,ot,tt)))return Jt.add(Qn)})){be=!1;break}}else if(!(De===ke||R(De,ke,W,ot,tt))){be=!1;break}}return tt.delete(w),tt.delete(C),be}function ok(w,C,R,W,ot,tt,wt){switch(R){case k:if(w.byteLength!=C.byteLength||w.byteOffset!=C.byteOffset)return!1;w=w.buffer,C=C.buffer;case M:return!(w.byteLength!=C.byteLength||!W(new lp(w),new lp(C)));case d:case f:case m:return mp(+w,+C);case p:return w.name==C.name&&w.message==C.message;case _:case D:return w==C+"";case g:var Pt=Je;case T:var $t=tt&s;if(Pt||(Pt=Cn),w.size!=C.size&&!$t)return!1;var Zt=wt.get(w);if(Zt)return Zt==C;tt|=a,wt.set(w,C);var ue=fp(Pt(w),Pt(C),W,ot,tt,wt);return wt.delete(w),ue;case O:if(Jl)return Jl.call(w)==Jl.call(C)}return!1}function lk(w,C,R,W,ot,tt){var wt=ot&s,Pt=Pa(w),$t=Pt.length,Zt=Pa(C),ue=Zt.length;if($t!=ue&&!wt)return!1;for(var be=$t;be--;){var Jt=Pt[be];if(!(wt?Jt in C:ye.call(C,Jt)))return!1}var De=tt.get(w);if(De&&tt.get(C))return De==C;var ke=!0;tt.set(w,C),tt.set(C,w);for(var kn=wt;++be<$t;){Jt=Pt[be];var an=w[Jt],Qn=C[Jt];if(W)var xp=wt?W(Qn,an,Jt,C,w,tt):W(an,Qn,Jt,w,C,tt);if(!(xp===void 0?an===Qn||R(an,Qn,W,ot,tt):xp)){ke=!1;break}kn||(kn=Jt=="constructor")}if(ke&&!kn){var Ea=w.constructor,Ra=C.constructor;Ea!=Ra&&"constructor"in w&&"constructor"in C&&!(typeof Ea=="function"&&Ea instanceof Ea&&typeof Ra=="function"&&Ra instanceof Ra)&&(ke=!1)}return tt.delete(w),tt.delete(C),ke}function Ma(w,C){var R=w.__data__;return dk(C)?R[typeof C=="string"?"string":"hash"]:R.map}function ck(w){for(var C=Pa(w),R=C.length;R--;){var W=C[R],ot=w[W];C[R]=[W,ot,pp(ot)]}return C}function vr(w,C){var R=Lt(w,C);return ZD(R)?R:void 0}var Dn=XD;(Gl&&Dn(new Gl(new ArrayBuffer(1)))!=k||di&&Dn(new di)!=g||Kl&&Dn(Kl.resolve())!=y||Ql&&Dn(new Ql)!=T||Zl&&Dn(new Zl)!=S)&&(Dn=function(w){var C=Kt.call(w),R=C==v?w.constructor:void 0,W=R?Gn(R):void 0;if(W)switch(W){case bD:return k;case vD:return g;case xD:return y;case _D:return T;case wD:return S}return C});function uk(w,C,R){C=Ca(C,w)?[C]:dp(C);for(var W,ot=-1,wt=C.length;++ot<wt;){var tt=Da(C[ot]);if(!(W=w!=null&&R(w,tt)))break;w=w[tt]}if(W)return W;var wt=w?w.length:0;return!!wt&&nc(wt)&&hp(tt,wt)&&(Kn(w)||yp(w))}function hp(w,C){return C=C??l,!!C&&(typeof w=="number"||K.test(w))&&w>-1&&w%1==0&&w<C}function Ca(w,C){if(Kn(w))return!1;var R=typeof w;return R=="number"||R=="symbol"||R=="boolean"||w==null||rc(w)?!0:ut.test(w)||!yt.test(w)||C!=null&&w in Object(C)}function dk(w){var C=typeof w;return C=="string"||C=="number"||C=="symbol"||C=="boolean"?w!=="__proto__":w===null}function fk(w){return!!Ae&&Ae in w}function hk(w){var C=w&&w.constructor,R=typeof C=="function"&&C.prototype||_e;return w===R}function pp(w){return w===w&&!ka(w)}function gp(w,C){return function(R){return R==null?!1:R[w]===C&&(C!==void 0||w in Object(R))}}var pk=ec(function(w){w=yk(w);var C=[];return z.test(w)&&C.push(""),w.replace(L,function(R,W,ot,tt){C.push(ot?tt.replace(j,"$1"):W||R)}),C});function Da(w){if(typeof w=="string"||rc(w))return w;var C=w+"";return C=="0"&&1/w==-o?"-0":C}function Gn(w){if(w!=null){try{return ce.call(w)}catch{}try{return w+""}catch{}}return""}function ec(w,C){if(typeof w!="function"||C&&typeof C!="function")throw new TypeError(r);var R=function(){var W=arguments,ot=C?C.apply(this,W):W[0],tt=R.cache;if(tt.has(ot))return tt.get(ot);var wt=w.apply(this,W);return R.cache=tt.set(ot,wt),wt};return R.cache=new(ec.Cache||nn),R}ec.Cache=nn;function mp(w,C){return w===C||w!==w&&C!==C}function yp(w){return gk(w)&&ye.call(w,"callee")&&(!gD.call(w,"callee")||Kt.call(w)==c)}var Kn=Array.isArray;function bp(w){return w!=null&&nc(w.length)&&!vp(w)}function gk(w){return Oa(w)&&bp(w)}function vp(w){var C=ka(w)?Kt.call(w):"";return C==b||C==x}function nc(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=l}function ka(w){var C=typeof w;return!!w&&(C=="object"||C=="function")}function Oa(w){return!!w&&typeof w=="object"}function rc(w){return typeof w=="symbol"||Oa(w)&&Kt.call(w)==O}var mk=vt?me(vt):JD;function yk(w){return w==null?"":ak(w)}function bk(w,C,R){var W=w==null?void 0:up(w,C);return W===void 0?R:W}function vk(w,C){return w!=null&&uk(w,C,GD)}function Pa(w){return bp(w)?jD(w):ek(w)}function xk(w,C){var R={};return C=tk(C),qD(w,function(W,ot,tt){R[C(W,ot,tt)]=W}),R}function _k(w){return w}function wk(w){return Ca(w)?Me(Da(w)):ik(w)}n.exports=xk}(xa,xa.exports);var eC=xa.exports;const nC=Bn(eC);var rC=1/0,iC=9007199254740991,aC="[object Arguments]",sC="[object Function]",oC="[object GeneratorFunction]",lC="[object Symbol]",cC=typeof ge=="object"&&ge&&ge.Object===Object&&ge,uC=typeof self=="object"&&self&&self.Object===Object&&self,dC=cC||uC||Function("return this")();function fC(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function hC(n,t){for(var e=-1,r=n?n.length:0,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function pC(n,t){for(var e=-1,r=t.length,i=n.length;++e<r;)n[i+e]=t[e];return n}var ql=Object.prototype,gC=ql.hasOwnProperty,Xl=ql.toString,Qh=dC.Symbol,mC=ql.propertyIsEnumerable,Zh=Qh?Qh.isConcatSpreadable:void 0,Jh=Math.max;function tp(n,t,e,r,i){var a=-1,s=n.length;for(e||(e=xC),i||(i=[]);++a<s;){var o=n[a];t>0&&e(o)?t>1?tp(o,t-1,e,r,i):pC(i,o):r||(i[i.length]=o)}return i}function yC(n,t){return n=Object(n),bC(n,t,function(e,r){return r in n})}function bC(n,t,e){for(var r=-1,i=t.length,a={};++r<i;){var s=t[r],o=n[s];e(o,s)&&(a[s]=o)}return a}function vC(n,t){return t=Jh(t===void 0?n.length-1:t,0),function(){for(var e=arguments,r=-1,i=Jh(e.length-t,0),a=Array(i);++r<i;)a[r]=e[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=e[r];return s[t]=a,fC(n,this,s)}}function xC(n){return TC(n)||wC(n)||!!(Zh&&n&&n[Zh])}function _C(n){if(typeof n=="string"||OC(n))return n;var t=n+"";return t=="0"&&1/n==-rC?"-0":t}function wC(n){return MC(n)&&gC.call(n,"callee")&&(!mC.call(n,"callee")||Xl.call(n)==aC)}var TC=Array.isArray;function SC(n){return n!=null&&DC(n.length)&&!CC(n)}function MC(n){return ep(n)&&SC(n)}function CC(n){var t=kC(n)?Xl.call(n):"";return t==sC||t==oC}function DC(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=iC}function kC(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function ep(n){return!!n&&typeof n=="object"}function OC(n){return typeof n=="symbol"||ep(n)&&Xl.call(n)==lC}var PC=vC(function(n,t){return n==null?{}:yC(n,hC(tp(t,1),_C))}),EC=PC;const RC=Bn(EC);var np={exports:{}};(function(n,t){(function(e,r){r()})(ge,function(){function e(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function r(c,u,d){var f=new XMLHttpRequest;f.open("GET",c),f.responseType="blob",f.onload=function(){l(f.response,u,d)},f.onerror=function(){console.error("could not download file")},f.send()}function i(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ge=="object"&&ge.global===ge?ge:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,u,d){var f=s.URL||s.webkitURL,p=document.createElement("a");u=u||c.name||"download",p.download=u,p.rel="noopener",typeof c=="string"?(p.href=c,p.origin===location.origin?a(p):i(p.href)?r(c,u,d):a(p,p.target="_blank")):(p.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(p.href)},4e4),setTimeout(function(){a(p)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,d){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(e(c,d),u);else if(i(c))r(c,u,d);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){a(f)})}}:function(c,u,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof c=="string")return r(c,u,d);var p=c.type==="application/octet-stream",b=/constructor/i.test(s.HTMLElement)||s.safari,x=/CriOS\/[\d]+/.test(navigator.userAgent);if((x||p&&b||o)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var y=g.result;y=x?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=y:location=y,f=null},g.readAsDataURL(c)}else{var m=s.URL||s.webkitURL,v=m.createObjectURL(c);f?f.location=v:location.href=v,f=null,setTimeout(function(){m.revokeObjectURL(v)},4e4)}});s.saveAs=l.saveAs=l,n.exports=l})})(np);var AC=np.exports,rp={exports:{}};/* @license
|
|
29
|
+
*/const TS={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};uu._date.override({_id:"date-fns",formats:function(){return TS},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=nt(n):e==="string"&&(typeof t=="string"?n=a_(n,t,new Date,this.options):n=Kd(n,this.options)),ks(n)?n.getTime():null},format:function(n,t){return sx(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return Gr(n,t);case"second":return Nv(n,t);case"minute":return Lv(n,t);case"hour":return Ov(n,t);case"day":return Td(n,t);case"week":return Fv(n,t);case"month":return Cs(n,t);case"quarter":return Iv(n,t);case"year":return Uv(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return Ki(n,t);case"second":return Xv(n,t);case"minute":return jv(n,t);case"hour":return $v(n,t);case"day":return Cd(n,t);case"week":return Gv(n,t);case"month":return Pd(n,t);case"quarter":return qv(n,t);case"year":return Kv(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return l_(n);case"minute":return Qv(n);case"hour":return o_(n);case"day":return Ds(n);case"week":return Sd(n);case"isoWeek":return Sd(n,{weekStartsOn:+e});case"month":return Jv(n);case"quarter":return Zv(n);case"year":return eb(n);default:return n}},endOf:function(n,t){switch(t){case"second":return sb(n);case"minute":return ib(n);case"hour":return nb(n);case"day":return kd(n);case"week":return rb(n);case"month":return Od(n);case"quarter":return ab(n);case"year":return tb(n);default:return n}}});const Sh={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},SS={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Sh,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},MS=h.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function pr(n){return h.isProxy(n)?h.toRaw(n):n}function CS(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return h.isProxy(t)?new Proxy(n,{}):n}function DS(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function Mh(n,t){n.labels=t}function Ch(n,t,e){const r=[];n.datasets=t.map(i=>{const a=n.datasets.find(s=>s[e]===i[e]);return!a||!i.data||r.includes(a)?{...i}:(r.push(a),Object.assign(a,i),a)})}function kS(n,t){const e={labels:[],datasets:[]};return Mh(e,n.labels),Ch(e,n.datasets,t),e}const OS=h.defineComponent({props:SS,setup(n,t){let{expose:e,slots:r}=t;const i=h.ref(null),a=h.shallowRef(null);e({chart:a});const s=()=>{if(!i.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:p}=n,v=kS(u,p),x=CS(v,u);a.value=new Se(i.value,{type:c,data:x,options:{...d},plugins:f})},o=()=>{const c=h.toRaw(a.value);c&&(n.destroyDelay>0?setTimeout(()=>{c.destroy(),a.value=null},n.destroyDelay):(c.destroy(),a.value=null))},l=c=>{c.update(n.updateMode)};return h.onMounted(s),h.onUnmounted(o),h.watch([()=>n.options,()=>n.data],(c,u)=>{let[d,f]=c,[p,v]=u;const x=h.toRaw(a.value);if(!x)return;let g=!1;if(d){const m=pr(d),b=pr(p);m&&m!==b&&(DS(x,m),g=!0)}if(f){const m=pr(f.labels),b=pr(v.labels),y=pr(f.datasets),_=pr(v.datasets);m!==b&&(Mh(x.config.data,m),g=!0),y&&y!==_&&(Ch(x.config.data,y,n.datasetIdKey),g=!0)}g&&h.nextTick(()=>{l(x)})},{deep:!0}),()=>h.h("canvas",{role:"img",ariaLabel:n.ariaLabel,ariaDescribedby:n.ariaDescribedby,ref:i},[h.h("p",{},[r.default?r.default():""])])}});function Jo(n,t){return Se.register(t),h.defineComponent({props:Sh,setup(e,r){let{expose:i}=r;const a=h.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return i({chart:a}),()=>h.h(OS,MS({ref:s},{type:n,...e}))}})}const PS=Jo("bar",Lr),Dh=Jo("doughnut",gn),ES=Jo("line",Ir),RS={class:"chart-container"},AS=h.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Qe}},setup(n){const t=n,{translateUnit:e}=Ct.useTranslatedUnits(),r=h.ref(Sn()),i=h.ref(Sn()),a=h.ref([]),s=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:t.metricUnit,translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:ee.DOUGHNUT}),o={id:r.value,afterUpdate(x){a.value=x.options.plugins.legend.labels.generateLabels(x).map(g=>({...g,value:t.legendValues&&t.legendValues[g.text],hidden:!1}))}},l=h.computed(()=>[o]),c=h.computed(()=>[t.chartData.datasets.reduce((g,m)=>(g.labels.push(m.label),g.backgroundColor.push(m.backgroundColor),g.borderColor.push(Mf(m.backgroundColor,50)),g.data.push(m.data.reduce((b,y)=>b+y,0)),g),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),u=h.computed(()=>({...t.chartData,datasets:c.value}));Ct.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const{options:d}=Ct.useDoughnutChartOptions({tooltipState:s,legendID:r.value}),f=h.ref(),p=x=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[x],v=({width:x,height:g})=>{s.width=x,s.height=g};return(x,g)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",p(n.legendPosition)]),"data-testid":"doughnut-chart-parent"},[h.createElementVNode("div",RS,[h.createVNode(h.unref(Dh),{ref_key:"chartInstance",ref:f,"chart-id":i.value,data:u.value,options:h.unref(d),plugins:l.value},null,8,["chart-id","data","options","plugins"]),h.createVNode(Qo,{left:s.left,series:s.tooltipSeries,"show-tooltip":s.showTooltip,"tooltip-title":n.tooltipTitle,top:s.top,unit:n.metricUnit,onDimensions:v},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])]),h.createVNode(Zo,{id:r.value,"chart-instance":f.value,items:a.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),LS=Ze(AS,[["__scopeId","data-v-07ea8b82"]]);var IS=Object.defineProperty,NS=(n,t,e)=>t in n?IS(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,We=(n,t,e)=>(NS(n,typeof t!="symbol"?t+"":t,e),e),Yt=(n=>(n.FIFTEEN_MIN="15m",n.ONE_HOUR="1h",n.SIX_HOUR="6h",n.TWELVE_HOUR="12h",n.ONE_DAY="24h",n.SEVEN_DAY="7d",n.THIRTY_DAY="30d",n.CURRENT_WEEK="current_week",n.CURRENT_MONTH="current_month",n.CURRENT_QUARTER="current_quarter",n.PREVIOUS_WEEK="previous_week",n.PREVIOUS_MONTH="previous_month",n.PREVIOUS_QUARTER="previous_quarter",n))(Yt||{});const FS=["minutely","hourly","daily","weekly","trend"];function tl(n){"@babel/helpers - typeof";return tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tl(n)}function ya(n){if(n===null||n===!0||n===!1)return NaN;var t=Number(n);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ze(n,t){if(t.length<n)throw new TypeError(n+" argument"+(n>1?"s":"")+" required, but only "+t.length+" present")}function gr(n){ze(1,arguments);var t=Object.prototype.toString.call(n);return n instanceof Date||tl(n)==="object"&&t==="[object Date]"?new Date(n.getTime()):typeof n=="number"||t==="[object Number]"?new Date(n):((typeof n=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function kh(n,t){ze(2,arguments);var e=gr(n),r=ya(t);return isNaN(r)?new Date(NaN):(r&&e.setDate(e.getDate()+r),e)}function US(n,t){ze(2,arguments);var e=gr(n),r=ya(t);if(isNaN(r))return new Date(NaN);if(!r)return e;var i=e.getDate(),a=new Date(e.getTime());a.setMonth(e.getMonth()+r+1,0);var s=a.getDate();return i>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),i),e)}var BS={};function WS(){return BS}function va(n,t){var e,r,i,a,s,o,l,c;ze(1,arguments);var u=WS(),d=ya((e=(r=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&r!==void 0?r:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&e!==void 0?e:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=gr(n),p=f.getDay(),v=(p<d?7:0)+p-d;return f.setDate(f.getDate()-v),f.setHours(0,0,0,0),f}function Oh(n){ze(1,arguments);var t=gr(n);return t.setHours(0,0,0,0),t}var zS=60,YS=3600;function mr(n){ze(1,arguments);var t=gr(n);return t.setDate(1),t.setHours(0,0,0,0),t}function HS(n){ze(1,arguments);var t=gr(n),e=t.getFullYear(),r=t.getMonth(),i=new Date(0);return i.setFullYear(e,r+1,0),i.setHours(0,0,0,0),i.getDate()}function $S(n){return ze(1,arguments),Math.floor(n*YS)}function jS(n){ze(1,arguments);var t=n/zS;return Math.floor(t)}function Ph(n,t){ze(2,arguments);var e=ya(t);return US(n,-e)}function el(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Eh={exports:{}},Rh={exports:{}};(function(n){function t(e){return e&&e.__esModule?e:{default:e}}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Rh);var Ht=Rh.exports,nl={exports:{}},rl={exports:{}},Ah={exports:{}};(function(n){function t(e){"@babel/helpers - typeof";return n.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},n.exports.__esModule=!0,n.exports.default=n.exports,t(e)}n.exports=t,n.exports.__esModule=!0,n.exports.default=n.exports})(Ah);var Lh=Ah.exports,il={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(i.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+i.length+" present")}n.exports=t.default})(il,il.exports);var oe=il.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Lh),i=e(oe);function a(s){return(0,i.default)(1,arguments),s instanceof Date||(0,r.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}n.exports=t.default})(rl,rl.exports);var VS=rl.exports,al={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Lh),i=e(oe);function a(s){(0,i.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,r.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}n.exports=t.default})(al,al.exports);var Ye=al.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(VS),i=e(Ye),a=e(oe);function s(o){if((0,a.default)(1,arguments),!(0,r.default)(o)&&typeof o!="number")return!1;var l=(0,i.default)(o);return!isNaN(Number(l))}n.exports=t.default})(nl,nl.exports);var qS=nl.exports,sl={exports:{}},ol={exports:{}},ll={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){if(r===null||r===!0||r===!1)return NaN;var i=Number(r);return isNaN(i)?i:i<0?Math.ceil(i):Math.floor(i)}n.exports=t.default})(ll,ll.exports);var jn=ll.exports;const XS=el(jn);(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(jn),i=e(Ye),a=e(oe);function s(o,l){(0,a.default)(2,arguments);var c=(0,i.default)(o).getTime(),u=(0,r.default)(l);return new Date(c+u)}n.exports=t.default})(ol,ol.exports);var GS=ol.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(GS),i=e(oe),a=e(jn);function s(o,l){(0,i.default)(2,arguments);var c=(0,a.default)(l);return(0,r.default)(o,-c)}n.exports=t.default})(sl,sl.exports);var KS=sl.exports,cl={exports:{}},ul={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Ye),i=e(oe),a=864e5;function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}n.exports=t.default})(ul,ul.exports);var QS=ul.exports,dl={exports:{}},fl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=e(Ye),i=e(oe);function a(s){(0,i.default)(1,arguments);var o=1,l=(0,r.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}n.exports=t.default})(fl,fl.exports);var hl=fl.exports,pl={exports:{}},gl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Ye),i=e(oe),a=e(hl);function s(o){(0,i.default)(1,arguments);var l=(0,r.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),f=new Date(0);f.setUTCFullYear(c,0,4),f.setUTCHours(0,0,0,0);var p=(0,a.default)(f);return l.getTime()>=d.getTime()?c+1:l.getTime()>=p.getTime()?c:c-1}n.exports=t.default})(gl,gl.exports);var Ih=gl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=e(Ih),i=e(hl),a=e(oe);function s(o){(0,a.default)(1,arguments);var l=(0,r.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,i.default)(c);return u}n.exports=t.default})(pl,pl.exports);var ZS=pl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Ye),i=e(hl),a=e(ZS),s=e(oe),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,r.default)(c),d=(0,i.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}n.exports=t.default})(dl,dl.exports);var JS=dl.exports,ml={exports:{}},yl={exports:{}},Vn={};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.getDefaultOptions=tM,Vn.setDefaultOptions=eM;var Nh={};function tM(){return Nh}function eM(n){Nh=n}(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=e(Ye),i=e(oe),a=e(jn),s=Vn;function o(l,c){var u,d,f,p,v,x,g,m;(0,i.default)(1,arguments);var b=(0,s.getDefaultOptions)(),y=(0,a.default)((u=(d=(f=(p=c==null?void 0:c.weekStartsOn)!==null&&p!==void 0?p:c==null||(v=c.locale)===null||v===void 0||(x=v.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:b.weekStartsOn)!==null&&d!==void 0?d:(g=b.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var _=(0,r.default)(l),T=_.getUTCDay(),D=(T<y?7:0)+T-y;return _.setUTCDate(_.getUTCDate()-D),_.setUTCHours(0,0,0,0),_}n.exports=t.default})(yl,yl.exports);var vl=yl.exports,bl={exports:{}},xl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Ye),i=e(oe),a=e(vl),s=e(jn),o=Vn;function l(c,u){var d,f,p,v,x,g,m,b;(0,i.default)(1,arguments);var y=(0,r.default)(c),_=y.getUTCFullYear(),T=(0,o.getDefaultOptions)(),D=(0,s.default)((d=(f=(p=(v=u==null?void 0:u.firstWeekContainsDate)!==null&&v!==void 0?v:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:T.firstWeekContainsDate)!==null&&f!==void 0?f:(m=T.locale)===null||m===void 0||(b=m.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=new Date(0);O.setUTCFullYear(_+1,0,D),O.setUTCHours(0,0,0,0);var S=(0,a.default)(O,u),M=new Date(0);M.setUTCFullYear(_,0,D),M.setUTCHours(0,0,0,0);var k=(0,a.default)(M,u);return y.getTime()>=S.getTime()?_+1:y.getTime()>=k.getTime()?_:_-1}n.exports=t.default})(xl,xl.exports);var Fh=xl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Fh),i=e(oe),a=e(vl),s=e(jn),o=Vn;function l(c,u){var d,f,p,v,x,g,m,b;(0,i.default)(1,arguments);var y=(0,o.getDefaultOptions)(),_=(0,s.default)((d=(f=(p=(v=u==null?void 0:u.firstWeekContainsDate)!==null&&v!==void 0?v:u==null||(x=u.locale)===null||x===void 0||(g=x.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&p!==void 0?p:y.firstWeekContainsDate)!==null&&f!==void 0?f:(m=y.locale)===null||m===void 0||(b=m.options)===null||b===void 0?void 0:b.firstWeekContainsDate)!==null&&d!==void 0?d:1),T=(0,r.default)(c,u),D=new Date(0);D.setUTCFullYear(T,0,_),D.setUTCHours(0,0,0,0);var O=(0,a.default)(D,u);return O}n.exports=t.default})(bl,bl.exports);var nM=bl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=e(Ye),i=e(vl),a=e(nM),s=e(oe),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,r.default)(c),f=(0,i.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(f/o)+1}n.exports=t.default})(ml,ml.exports);var rM=ml.exports,_l={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){for(var a=r<0?"-":"",s=Math.abs(r).toString();s.length<i;)s="0"+s;return a+s}n.exports=t.default})(_l,_l.exports);var Uh=_l.exports,wl={exports:{}};(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(Uh),i={y:function(s,o){var l=s.getUTCFullYear(),c=l>0?l:1-l;return(0,r.default)(o==="yy"?c%100:c,o.length)},M:function(s,o){var l=s.getUTCMonth();return o==="M"?String(l+1):(0,r.default)(l+1,2)},d:function(s,o){return(0,r.default)(s.getUTCDate(),o.length)},a:function(s,o){var l=s.getUTCHours()/12>=1?"pm":"am";switch(o){case"a":case"aa":return l.toUpperCase();case"aaa":return l;case"aaaaa":return l[0];case"aaaa":default:return l==="am"?"a.m.":"p.m."}},h:function(s,o){return(0,r.default)(s.getUTCHours()%12||12,o.length)},H:function(s,o){return(0,r.default)(s.getUTCHours(),o.length)},m:function(s,o){return(0,r.default)(s.getUTCMinutes(),o.length)},s:function(s,o){return(0,r.default)(s.getUTCSeconds(),o.length)},S:function(s,o){var l=o.length,c=s.getUTCMilliseconds(),u=Math.floor(c*Math.pow(10,l-3));return(0,r.default)(u,o.length)}},a=i;t.default=a,n.exports=t.default})(wl,wl.exports);var iM=wl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(QS),i=e(JS),a=e(Ih),s=e(rM),o=e(Fh),l=e(Uh),c=e(iM),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(g,m,b){var y=g.getUTCFullYear()>0?1:0;switch(m){case"G":case"GG":case"GGG":return b.era(y,{width:"abbreviated"});case"GGGGG":return b.era(y,{width:"narrow"});case"GGGG":default:return b.era(y,{width:"wide"})}},y:function(g,m,b){if(m==="yo"){var y=g.getUTCFullYear(),_=y>0?y:1-y;return b.ordinalNumber(_,{unit:"year"})}return c.default.y(g,m)},Y:function(g,m,b,y){var _=(0,o.default)(g,y),T=_>0?_:1-_;if(m==="YY"){var D=T%100;return(0,l.default)(D,2)}return m==="Yo"?b.ordinalNumber(T,{unit:"year"}):(0,l.default)(T,m.length)},R:function(g,m){var b=(0,a.default)(g);return(0,l.default)(b,m.length)},u:function(g,m){var b=g.getUTCFullYear();return(0,l.default)(b,m.length)},Q:function(g,m,b){var y=Math.ceil((g.getUTCMonth()+1)/3);switch(m){case"Q":return String(y);case"QQ":return(0,l.default)(y,2);case"Qo":return b.ordinalNumber(y,{unit:"quarter"});case"QQQ":return b.quarter(y,{width:"abbreviated",context:"formatting"});case"QQQQQ":return b.quarter(y,{width:"narrow",context:"formatting"});case"QQQQ":default:return b.quarter(y,{width:"wide",context:"formatting"})}},q:function(g,m,b){var y=Math.ceil((g.getUTCMonth()+1)/3);switch(m){case"q":return String(y);case"qq":return(0,l.default)(y,2);case"qo":return b.ordinalNumber(y,{unit:"quarter"});case"qqq":return b.quarter(y,{width:"abbreviated",context:"standalone"});case"qqqqq":return b.quarter(y,{width:"narrow",context:"standalone"});case"qqqq":default:return b.quarter(y,{width:"wide",context:"standalone"})}},M:function(g,m,b){var y=g.getUTCMonth();switch(m){case"M":case"MM":return c.default.M(g,m);case"Mo":return b.ordinalNumber(y+1,{unit:"month"});case"MMM":return b.month(y,{width:"abbreviated",context:"formatting"});case"MMMMM":return b.month(y,{width:"narrow",context:"formatting"});case"MMMM":default:return b.month(y,{width:"wide",context:"formatting"})}},L:function(g,m,b){var y=g.getUTCMonth();switch(m){case"L":return String(y+1);case"LL":return(0,l.default)(y+1,2);case"Lo":return b.ordinalNumber(y+1,{unit:"month"});case"LLL":return b.month(y,{width:"abbreviated",context:"standalone"});case"LLLLL":return b.month(y,{width:"narrow",context:"standalone"});case"LLLL":default:return b.month(y,{width:"wide",context:"standalone"})}},w:function(g,m,b,y){var _=(0,s.default)(g,y);return m==="wo"?b.ordinalNumber(_,{unit:"week"}):(0,l.default)(_,m.length)},I:function(g,m,b){var y=(0,i.default)(g);return m==="Io"?b.ordinalNumber(y,{unit:"week"}):(0,l.default)(y,m.length)},d:function(g,m,b){return m==="do"?b.ordinalNumber(g.getUTCDate(),{unit:"date"}):c.default.d(g,m)},D:function(g,m,b){var y=(0,r.default)(g);return m==="Do"?b.ordinalNumber(y,{unit:"dayOfYear"}):(0,l.default)(y,m.length)},E:function(g,m,b){var y=g.getUTCDay();switch(m){case"E":case"EE":case"EEE":return b.day(y,{width:"abbreviated",context:"formatting"});case"EEEEE":return b.day(y,{width:"narrow",context:"formatting"});case"EEEEEE":return b.day(y,{width:"short",context:"formatting"});case"EEEE":default:return b.day(y,{width:"wide",context:"formatting"})}},e:function(g,m,b,y){var _=g.getUTCDay(),T=(_-y.weekStartsOn+8)%7||7;switch(m){case"e":return String(T);case"ee":return(0,l.default)(T,2);case"eo":return b.ordinalNumber(T,{unit:"day"});case"eee":return b.day(_,{width:"abbreviated",context:"formatting"});case"eeeee":return b.day(_,{width:"narrow",context:"formatting"});case"eeeeee":return b.day(_,{width:"short",context:"formatting"});case"eeee":default:return b.day(_,{width:"wide",context:"formatting"})}},c:function(g,m,b,y){var _=g.getUTCDay(),T=(_-y.weekStartsOn+8)%7||7;switch(m){case"c":return String(T);case"cc":return(0,l.default)(T,m.length);case"co":return b.ordinalNumber(T,{unit:"day"});case"ccc":return b.day(_,{width:"abbreviated",context:"standalone"});case"ccccc":return b.day(_,{width:"narrow",context:"standalone"});case"cccccc":return b.day(_,{width:"short",context:"standalone"});case"cccc":default:return b.day(_,{width:"wide",context:"standalone"})}},i:function(g,m,b){var y=g.getUTCDay(),_=y===0?7:y;switch(m){case"i":return String(_);case"ii":return(0,l.default)(_,m.length);case"io":return b.ordinalNumber(_,{unit:"day"});case"iii":return b.day(y,{width:"abbreviated",context:"formatting"});case"iiiii":return b.day(y,{width:"narrow",context:"formatting"});case"iiiiii":return b.day(y,{width:"short",context:"formatting"});case"iiii":default:return b.day(y,{width:"wide",context:"formatting"})}},a:function(g,m,b){var y=g.getUTCHours(),_=y/12>=1?"pm":"am";switch(m){case"a":case"aa":return b.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"aaa":return b.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return b.dayPeriod(_,{width:"narrow",context:"formatting"});case"aaaa":default:return b.dayPeriod(_,{width:"wide",context:"formatting"})}},b:function(g,m,b){var y=g.getUTCHours(),_;switch(y===12?_=u.noon:y===0?_=u.midnight:_=y/12>=1?"pm":"am",m){case"b":case"bb":return b.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"bbb":return b.dayPeriod(_,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return b.dayPeriod(_,{width:"narrow",context:"formatting"});case"bbbb":default:return b.dayPeriod(_,{width:"wide",context:"formatting"})}},B:function(g,m,b){var y=g.getUTCHours(),_;switch(y>=17?_=u.evening:y>=12?_=u.afternoon:y>=4?_=u.morning:_=u.night,m){case"B":case"BB":case"BBB":return b.dayPeriod(_,{width:"abbreviated",context:"formatting"});case"BBBBB":return b.dayPeriod(_,{width:"narrow",context:"formatting"});case"BBBB":default:return b.dayPeriod(_,{width:"wide",context:"formatting"})}},h:function(g,m,b){if(m==="ho"){var y=g.getUTCHours()%12;return y===0&&(y=12),b.ordinalNumber(y,{unit:"hour"})}return c.default.h(g,m)},H:function(g,m,b){return m==="Ho"?b.ordinalNumber(g.getUTCHours(),{unit:"hour"}):c.default.H(g,m)},K:function(g,m,b){var y=g.getUTCHours()%12;return m==="Ko"?b.ordinalNumber(y,{unit:"hour"}):(0,l.default)(y,m.length)},k:function(g,m,b){var y=g.getUTCHours();return y===0&&(y=24),m==="ko"?b.ordinalNumber(y,{unit:"hour"}):(0,l.default)(y,m.length)},m:function(g,m,b){return m==="mo"?b.ordinalNumber(g.getUTCMinutes(),{unit:"minute"}):c.default.m(g,m)},s:function(g,m,b){return m==="so"?b.ordinalNumber(g.getUTCSeconds(),{unit:"second"}):c.default.s(g,m)},S:function(g,m){return c.default.S(g,m)},X:function(g,m,b,y){var _=y._originalDate||g,T=_.getTimezoneOffset();if(T===0)return"Z";switch(m){case"X":return p(T);case"XXXX":case"XX":return v(T);case"XXXXX":case"XXX":default:return v(T,":")}},x:function(g,m,b,y){var _=y._originalDate||g,T=_.getTimezoneOffset();switch(m){case"x":return p(T);case"xxxx":case"xx":return v(T);case"xxxxx":case"xxx":default:return v(T,":")}},O:function(g,m,b,y){var _=y._originalDate||g,T=_.getTimezoneOffset();switch(m){case"O":case"OO":case"OOO":return"GMT"+f(T,":");case"OOOO":default:return"GMT"+v(T,":")}},z:function(g,m,b,y){var _=y._originalDate||g,T=_.getTimezoneOffset();switch(m){case"z":case"zz":case"zzz":return"GMT"+f(T,":");case"zzzz":default:return"GMT"+v(T,":")}},t:function(g,m,b,y){var _=y._originalDate||g,T=Math.floor(_.getTime()/1e3);return(0,l.default)(T,m.length)},T:function(g,m,b,y){var _=y._originalDate||g,T=_.getTime();return(0,l.default)(T,m.length)}};function f(g,m){var b=g>0?"-":"+",y=Math.abs(g),_=Math.floor(y/60),T=y%60;if(T===0)return b+String(_);var D=m||"";return b+String(_)+D+(0,l.default)(T,2)}function p(g,m){if(g%60===0){var b=g>0?"-":"+";return b+(0,l.default)(Math.abs(g)/60,2)}return v(g,m)}function v(g,m){var b=m||"",y=g>0?"-":"+",_=Math.abs(g),T=(0,l.default)(Math.floor(_/60),2),D=(0,l.default)(_%60,2);return y+T+b+D}var x=d;t.default=x,n.exports=t.default})(cl,cl.exports);var aM=cl.exports,Tl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=function(o,l){switch(o){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});case"PPPP":default:return l.date({width:"full"})}},r=function(o,l){switch(o){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});case"pppp":default:return l.time({width:"full"})}},i=function(o,l){var c=o.match(/(P+)(p+)?/)||[],u=c[1],d=c[2];if(!d)return e(o,l);var f;switch(u){case"P":f=l.dateTime({width:"short"});break;case"PP":f=l.dateTime({width:"medium"});break;case"PPP":f=l.dateTime({width:"long"});break;case"PPPP":default:f=l.dateTime({width:"full"});break}return f.replace("{{date}}",e(u,l)).replace("{{time}}",r(d,l))},a={p:r,P:i},s=a;t.default=s,n.exports=t.default})(Tl,Tl.exports);var sM=Tl.exports,Sl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){var i=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return i.setUTCFullYear(r.getFullYear()),r.getTime()-i.getTime()}n.exports=t.default})(Sl,Sl.exports);var Bh=Sl.exports;const Wh=el(Bh);var ui={};Object.defineProperty(ui,"__esModule",{value:!0}),ui.isProtectedDayOfYearToken=cM,ui.isProtectedWeekYearToken=uM,ui.throwProtectedError=dM;var oM=["D","DD"],lM=["YY","YYYY"];function cM(n){return oM.indexOf(n)!==-1}function uM(n){return lM.indexOf(n)!==-1}function dM(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ml={exports:{}},Cl={exports:{}},Dl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},r=function(a,s,o){var l,c=e[a];return typeof c=="string"?l=c:s===1?l=c.one:l=c.other.replace("{{count}}",s.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+l:l+" ago":l},i=r;t.default=i,n.exports=t.default})(Dl,Dl.exports);var fM=Dl.exports,kl={exports:{}},Ol={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=i.width?String(i.width):r.defaultWidth,s=r.formats[a]||r.formats[r.defaultWidth];return s}}n.exports=t.default})(Ol,Ol.exports);var hM=Ol.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(hM),i={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,r.default)({formats:i,defaultWidth:"full"}),time:(0,r.default)({formats:a,defaultWidth:"full"}),dateTime:(0,r.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,n.exports=t.default})(kl,kl.exports);var pM=kl.exports,Pl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r=function(a,s,o,l){return e[a]},i=r;t.default=i,n.exports=t.default})(Pl,Pl.exports);var gM=Pl.exports,El={exports:{}},Rl={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&r.formattingValues){var l=r.defaultFormattingWidth||r.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=r.formattingValues[c]||r.formattingValues[l]}else{var u=r.defaultWidth,d=a!=null&&a.width?String(a.width):r.defaultWidth;o=r.values[d]||r.values[u]}var f=r.argumentCallback?r.argumentCallback(i):i;return o[f]}}n.exports=t.default})(Rl,Rl.exports);var mM=Rl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(mM),i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(p,v){var x=Number(p),g=x%100;if(g>20||g<10)switch(g%10){case 1:return x+"st";case 2:return x+"nd";case 3:return x+"rd"}return x+"th"},d={ordinalNumber:u,era:(0,r.default)({values:i,defaultWidth:"wide"}),quarter:(0,r.default)({values:a,defaultWidth:"wide",argumentCallback:function(p){return p-1}}),month:(0,r.default)({values:s,defaultWidth:"wide"}),day:(0,r.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,r.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},f=d;t.default=f,n.exports=t.default})(El,El.exports);var yM=El.exports,Al={exports:{}},Ll={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],f=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],p=Array.isArray(f)?i(f,function(g){return g.test(d)}):r(f,function(g){return g.test(d)}),v;v=a.valueCallback?a.valueCallback(p):p,v=o.valueCallback?o.valueCallback(v):v;var x=s.slice(d.length);return{value:v,rest:x}}}function r(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function i(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}n.exports=t.default})(Ll,Ll.exports);var vM=Ll.exports,Il={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r){return function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.match(r.matchPattern);if(!s)return null;var o=s[0],l=i.match(r.parsePattern);if(!l)return null;var c=r.valueCallback?r.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=i.slice(o.length);return{value:c,rest:u}}}n.exports=t.default})(Il,Il.exports);var bM=Il.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(vM),i=e(bM),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},f={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},p={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},v={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},x={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,i.default)({matchPattern:a,parsePattern:s,valueCallback:function(y){return parseInt(y,10)}}),era:(0,r.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,r.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(y){return y+1}}),month:(0,r.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:f,defaultParseWidth:"any"}),day:(0,r.default)({matchPatterns:p,defaultMatchWidth:"wide",parsePatterns:v,defaultParseWidth:"any"}),dayPeriod:(0,r.default)({matchPatterns:x,defaultMatchWidth:"any",parsePatterns:g,defaultParseWidth:"any"})},b=m;t.default=b,n.exports=t.default})(Al,Al.exports);var xM=Al.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(fM),i=e(pM),a=e(gM),s=e(yM),o=e(xM),l={code:"en-US",formatDistance:r.default,formatLong:i.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,n.exports=t.default})(Cl,Cl.exports);var _M=Cl.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=e(_M),i=r.default;t.default=i,n.exports=t.default})(Ml,Ml.exports);var wM=Ml.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r=e(qS),i=e(KS),a=e(Ye),s=e(aM),o=e(sM),l=e(Bh),c=ui,u=e(jn),d=e(oe),f=Vn,p=e(wM),v=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,m=/''/g,b=/[a-zA-Z]/;function y(T,D,O){var S,M,k,P,E,F,q,$,Y,I,it,B,yt,ut,z,L,U,j;(0,d.default)(2,arguments);var Z=String(D),K=(0,f.getDefaultOptions)(),N=(S=(M=O==null?void 0:O.locale)!==null&&M!==void 0?M:K.locale)!==null&&S!==void 0?S:p.default,A=(0,u.default)((k=(P=(E=(F=O==null?void 0:O.firstWeekContainsDate)!==null&&F!==void 0?F:O==null||(q=O.locale)===null||q===void 0||($=q.options)===null||$===void 0?void 0:$.firstWeekContainsDate)!==null&&E!==void 0?E:K.firstWeekContainsDate)!==null&&P!==void 0?P:(Y=K.locale)===null||Y===void 0||(I=Y.options)===null||I===void 0?void 0:I.firstWeekContainsDate)!==null&&k!==void 0?k:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=(0,u.default)((it=(B=(yt=(ut=O==null?void 0:O.weekStartsOn)!==null&&ut!==void 0?ut:O==null||(z=O.locale)===null||z===void 0||(L=z.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&yt!==void 0?yt:K.weekStartsOn)!==null&&B!==void 0?B:(U=K.locale)===null||U===void 0||(j=U.options)===null||j===void 0?void 0:j.weekStartsOn)!==null&&it!==void 0?it:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var X=(0,a.default)(T);if(!(0,r.default)(X))throw new RangeError("Invalid time value");var vt=(0,l.default)(X),ct=(0,i.default)(X,vt),Ot={firstWeekContainsDate:A,weekStartsOn:Q,locale:N,_originalDate:X},_t=Z.match(x).map(function(et){var bt=et[0];if(bt==="p"||bt==="P"){var Nt=o.default[bt];return Nt(et,N.formatLong)}return et}).join("").match(v).map(function(et){if(et==="''")return"'";var bt=et[0];if(bt==="'")return _(et);var Nt=s.default[bt];if(Nt)return!(O!=null&&O.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),!(O!=null&&O.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(et)&&(0,c.throwProtectedError)(et,D,String(T)),Nt(ct,et,N.localize,Ot);if(bt.match(b))throw new RangeError("Format string contains an unescaped latin alphabet character `"+bt+"`");return et}).join("");return _t}function _(T){var D=T.match(g);return D?D[1].replace(m,"'"):T}n.exports=t.default})(Eh,Eh.exports);function TM(n,t){var e=DM(t);return e.formatToParts?MM(e,n):CM(e,n)}var SM={year:0,month:1,day:2,hour:3,minute:4,second:5};function MM(n,t){try{for(var e=n.formatToParts(t),r=[],i=0;i<e.length;i++){var a=SM[e[i].type];a>=0&&(r[a]=parseInt(e[i].value,10))}return r}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function CM(n,t){var e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var Nl={};function DM(n){if(!Nl[n]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),e=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";Nl[n]=e?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Nl[n]}function Fl(n,t,e,r,i,a,s){var o=new Date(0);return o.setUTCFullYear(n,t,e),o.setUTCHours(r,i,a,s),o}var zh=36e5,kM=6e4,Ul={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ba(n,t,e){var r,i;if(!n||(r=Ul.timezoneZ.exec(n),r))return 0;var a;if(r=Ul.timezoneHH.exec(n),r)return a=parseInt(r[1],10),Yh(a)?-(a*zh):NaN;if(r=Ul.timezoneHHMM.exec(n),r){a=parseInt(r[2],10);var s=parseInt(r[3],10);return Yh(a,s)?(i=Math.abs(a)*zh+s*kM,r[1]==="+"?-i:i):NaN}if(EM(n)){t=new Date(t||Date.now());var o=e?t:OM(t),l=Bl(o,n),c=e?l:PM(t,l,n);return-c}return NaN}function OM(n){return Fl(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Bl(n,t){var e=TM(n,t),r=Fl(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime(),i=n.getTime(),a=i%1e3;return i-=a>=0?a:1e3+a,r-i}function PM(n,t,e){var r=n.getTime(),i=r-t,a=Bl(new Date(i),e);if(t===a)return t;i-=a-t;var s=Bl(new Date(i),e);return a===s?a:Math.max(a,s)}function Yh(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}var Hh={};function EM(n){if(Hh[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Hh[n]=!0,!0}catch{return!1}}var RM=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;const $h=RM;var Wl=36e5,jh=6e4,AM=2,le={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:$h};function zl(n,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);var e=t||{},r=e.additionalDigits==null?AM:XS(e.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(!(typeof n=="string"||Object.prototype.toString.call(n)==="[object String]"))return new Date(NaN);var i=LM(n),a=IM(i.date,r),s=a.year,o=a.restDateString,l=NM(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(i.time&&(u=FM(i.time),isNaN(u)))return new Date(NaN);if(i.timeZone||e.timeZone){if(d=ba(i.timeZone||e.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=Wh(new Date(c+u)),d=Wh(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function LM(n){var t={},e=le.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=le.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){var i=le.timeZone.exec(r);i?(t.time=r.replace(i[1],""),t.timeZone=i[1].trim()):t.time=r}return t}function IM(n,t){var e=le.YYY[t],r=le.YYYYY[t],i;if(i=le.YYYY.exec(n)||r.exec(n),i){var a=i[1];return{year:parseInt(a,10),restDateString:n.slice(a.length)}}if(i=le.YY.exec(n)||e.exec(n),i){var s=i[1];return{year:parseInt(s,10)*100,restDateString:n.slice(s.length)}}return{year:null}}function NM(n,t){if(t===null)return null;var e,r,i,a;if(n.length===0)return r=new Date(0),r.setUTCFullYear(t),r;if(e=le.MM.exec(n),e)return r=new Date(0),i=parseInt(e[1],10)-1,Xh(t,i)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(e=le.DDD.exec(n),e){r=new Date(0);var s=parseInt(e[1],10);return WM(t,s)?(r.setUTCFullYear(t,0,s),r):new Date(NaN)}if(e=le.MMDD.exec(n),e){r=new Date(0),i=parseInt(e[1],10)-1;var o=parseInt(e[2],10);return Xh(t,i,o)?(r.setUTCFullYear(t,i,o),r):new Date(NaN)}if(e=le.Www.exec(n),e)return a=parseInt(e[1],10)-1,Gh(t,a)?Vh(t,a):new Date(NaN);if(e=le.WwwD.exec(n),e){a=parseInt(e[1],10)-1;var l=parseInt(e[2],10)-1;return Gh(t,a,l)?Vh(t,a,l):new Date(NaN)}return null}function FM(n){var t,e,r;if(t=le.HH.exec(n),t)return e=parseFloat(t[1].replace(",",".")),Yl(e)?e%24*Wl:NaN;if(t=le.HHMM.exec(n),t)return e=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),Yl(e,r)?e%24*Wl+r*jh:NaN;if(t=le.HHMMSS.exec(n),t){e=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Yl(e,r,i)?e%24*Wl+r*jh+i*1e3:NaN}return null}function Vh(n,t,e){t=t||0,e=e||0;var r=new Date(0);r.setUTCFullYear(n,0,4);var i=r.getUTCDay()||7,a=t*7+e+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var UM=[31,28,31,30,31,30,31,31,30,31,30,31],BM=[31,29,31,30,31,30,31,31,30,31,30,31];function qh(n){return n%400===0||n%4===0&&n%100!==0}function Xh(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;var r=qh(n);if(r&&e>BM[t]||!r&&e>UM[t])return!1}return!0}function WM(n,t){if(t<1)return!1;var e=qh(n);return!(e&&t>366||!e&&t>365)}function Gh(n,t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Yl(n,t,e){return!(n!=null&&(n<0||n>=25)||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}var Hl={exports:{}},$l={exports:{}};(function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=e;function e(r,i){if(r==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a]);return r}n.exports=t.default})($l,$l.exports);var zM=$l.exports;(function(n,t){var e=Ht.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=e(zM);function i(a){return(0,r.default)({},a)}n.exports=t.default})(Hl,Hl.exports);var YM=Hl.exports;const HM=el(YM);function $M(n,t,e){var r=zl(n,e),i=ba(t,r,!0),a=new Date(r.getTime()-i),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function jM(n,t){return-ba(n,t)}function VM(n,t,e){if(typeof n=="string"&&!n.match($h)){var r=HM(e);return r.timeZone=t,zl(n,r)}var i=zl(n,e),a=Fl(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()).getTime(),s=ba(t,new Date(a));return new Date(a+s)}const qM={minutely:60*1e3,hourly:60*60*1e3,daily:60*60*24*1e3,weekly:60*60*24*7*1e3,trend:0};function jl(n){return n&&FS.find(t=>n<=qM[t])||null}const yr=(n,t)=>new Date(n.getTime()-jM(t,n));class Pe{constructor(t){We(this,"timeframeText"),We(this,"key"),We(this,"display"),We(this,"timeframeLength"),We(this,"allowedTiers"),We(this,"defaultResponseGranularity"),We(this,"dataGranularity"),We(this,"isRelative"),We(this,"_startCustom"),We(this,"_endCustom"),this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom}rawEnd(t){return this._endCustom||new Date}rawStart(t){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(){const t=new Set,e=this.maximumTimeframeLength()/3600;return e<=6&&t.add("minutely"),e>=2&&e<=7*24&&t.add("hourly"),e>=2*24&&t.add("daily"),e>=2*24*14&&t.add("weekly"),t}cacheKey(){return this.key!=="custom"?this.key:`${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`}v4Query(t){return this.key==="custom"?{type:"absolute",start:this.rawStart(),end:this.rawEnd(),tz:t}:{type:"relative",time_range:this.key,tz:t}}tzAdjustedDate(t){if(!t)return new Date;const e=VM(new Date,new Intl.DateTimeFormat().resolvedOptions().timeZone);return $M(e,t)}}class XM extends Pe{rawStart(t){let e=va(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=yr(e,t)),e}maximumTimeframeLength(){return 60*60*24*7}}class GM extends Pe{rawStart(t){let e=mr(this.tzAdjustedDate(t));return t&&(e=yr(e,t)),e}maximumTimeframeLength(){return 60*60*24*31}}class KM extends Pe{rawEnd(t){let e=va(this.tzAdjustedDate(t),{weekStartsOn:1});return t&&(e=yr(e,t)),e}rawStart(t){const e=this.tzAdjustedDate(t);let r=va(e.setDate(e.getDate()-7),{weekStartsOn:1});return t&&(r=yr(r,t)),r}}class QM extends Pe{rawEnd(t){let e=mr(this.tzAdjustedDate(t));return t&&(e=yr(e,t)),e}rawStart(t){let e=mr(Ph(this.tzAdjustedDate(t),1));return t&&(e=yr(e,t)),e}}Yt.FIFTEEN_MIN,new Pe({key:Yt.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.ONE_HOUR,new Pe({key:Yt.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:"minutely",dataGranularity:"minutely",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.SIX_HOUR,new Pe({key:Yt.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.TWELVE_HOUR,new Pe({key:Yt.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.ONE_DAY,new Pe({key:Yt.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:"hourly",dataGranularity:"hourly",isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Yt.SEVEN_DAY,new Pe({key:Yt.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Yt.THIRTY_DAY,new Pe({key:Yt.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Yt.CURRENT_WEEK,new XM({key:Yt.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const n=va(new Date,{weekStartsOn:1});return(Oh(kh(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.CURRENT_MONTH,new GM({key:Yt.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const n=mr(new Date);return(Oh(kh(new Date,1)).getTime()-n.getTime())/1e3},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.PREVIOUS_WEEK,new KM({key:Yt.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]}),Yt.PREVIOUS_MONTH,new QM({key:Yt.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let n=0;const t=mr(new Date),e=mr(Ph(new Date,1));return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(n=ZM(t,e)),60*60*24*HS(new Date().setMonth(new Date().getMonth()-1))+$S(n)},defaultResponseGranularity:"daily",dataGranularity:"daily",isRelative:!1,allowedTiers:["plus","enterprise"]});function ZM(n,t){return jS(n.getTimezoneOffset()-t.getTimezoneOffset())}const Kh=(n,t,e,r)=>{n.save(),n.beginPath(),n.moveTo(t,e),n.lineTo(t,r),n.lineWidth=1,n.strokeStyle="#0275d8",n.stroke(),n.restore()},Vl={id:"linePlugin",afterDatasetsDraw:function(n){if(n.tooltip&&n.tooltip.getActiveElements()&&n.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:t}=n.tooltip.dataPoints[0].element,e=n.ctx;Kh(e,t,n.scales.y.top,n.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,e=n.ctx;Kh(e,t,n.scales.y.top,n.scales.y.bottom)}},beforeDestroy(){delete this.clickedSegment}},JM=h.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:ee.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRangeMs:{type:Number,required:!1,default:void 0},granularity:{type:String,required:!0},stacked:{type:Boolean,required:!1,default:!0},legendValues:{type:Object,required:!1,default:null},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{translateUnit:e}=Ct.useTranslatedUnits(),r=h.ref(),i=h.ref(Sn()),a=h.ref(Sn()),s=h.ref([]),o=h.ref(),l=h.ref(h.inject("legendPosition",Wt.Right)),c=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:h.toRef(t,"metricUnit"),translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartType:t.type,locked:!1,chartTooltipSortFn:t.chartTooltipSortFn}),u={id:i.value,afterUpdate(m){s.value=m.options.plugins.legend.labels.generateLabels(m).map(b=>({...b,value:t.legendValues&&t.legendValues[b.text]})).sort(t.chartLegendSortFn)}},d=h.computed(()=>[u,_h,...t.type===ee.TIMESERIES_LINE?[Vl]:[]]),{options:f}=Ct.useLinechartOptions({tooltipState:c,timeRangeMs:h.toRef(t,"timeRangeMs"),granularity:h.toRef(t,"granularity"),legendID:i.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle")});Ct.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const p=m=>ia(m,{short:["daily","weekly"].includes(t.granularity)}),v=m=>({[Wt.Right]:"legend-row",[Wt.Bottom]:"column",[Wt.Hidden]:"hidden"})[m],x=({width:m,height:b})=>{c.width=m,c.height=b},g=()=>{var m,b,y;c.locked=!c.locked,r.value&&((b=(m=r.value.chart.tooltip)==null?void 0:m.dataPoints)!=null&&b.length)&&(Vl.clickedSegment=c.locked?(y=r.value.chart.tooltip)==null?void 0:y.dataPoints[0]:void 0)};return h.watch(()=>t.type,()=>{c.locked=!1,c.showTooltip=!1,delete Vl.clickedSegment}),(m,b)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",v(l.value)]),"data-testid":"line-chart-parent"},[h.createElementVNode("div",{class:"chart-container",onClick:b[0]||(b[0]=y=>g())},[n.type===h.unref(ee).TIMESERIES_LINE?(h.openBlock(),h.createBlock(h.unref(ES),{key:0,ref_key:"chartInstance",ref:r,"chart-id":a.value,data:n.chartData,"data-testid":"time-series-line-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):n.type===h.unref(ee).TIMESERIES_BAR?(h.openBlock(),h.createBlock(h.unref(PS),{key:1,ref_key:"chartInstance",ref:r,"chart-id":a.value,data:n.chartData,"data-testid":"time-series-bar-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):h.createCommentVNode("",!0)]),h.createVNode(Qo,{ref_key:"tooltipElement",ref:o,context:p(c.tooltipContext),"data-testid":"tooltip",left:c.left,locked:c.locked,series:c.tooltipSeries,"show-tooltip":c.showTooltip,"tooltip-title":n.tooltipTitle,top:c.top,unit:n.metricUnit,onDimensions:x,onLeft:b[1]||(b[1]=y=>c.left=y),onTop:b[2]||(b[2]=y=>c.top=y)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),h.createVNode(Zo,{id:i.value,"chart-instance":r.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),tC=Ze(JM,[["__scopeId","data-v-6b51feb4"]]);var qn=(n=>(n.String="string",n.Number="number",n.Boolean="boolean",n.Object="object",n.Undefined="undefined",n))(qn||{}),xa={exports:{}};xa.exports,function(n,t){var e=200,r="Expected a function",i="__lodash_hash_undefined__",a=1,s=2,o=1/0,l=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object Boolean]",f="[object Date]",p="[object Error]",v="[object Function]",x="[object GeneratorFunction]",g="[object Map]",m="[object Number]",b="[object Object]",y="[object Promise]",_="[object RegExp]",T="[object Set]",D="[object String]",O="[object Symbol]",S="[object WeakMap]",M="[object ArrayBuffer]",k="[object DataView]",P="[object Float32Array]",E="[object Float64Array]",F="[object Int8Array]",q="[object Int16Array]",$="[object Int32Array]",Y="[object Uint8Array]",I="[object Uint8ClampedArray]",it="[object Uint16Array]",B="[object Uint32Array]",yt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,z=/^\./,L=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/[\\^$.*+?()[\]{}|]/g,j=/\\(\\)?/g,Z=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,N={};N[P]=N[E]=N[F]=N[q]=N[$]=N[Y]=N[I]=N[it]=N[B]=!0,N[c]=N[u]=N[M]=N[d]=N[k]=N[f]=N[p]=N[v]=N[g]=N[m]=N[b]=N[_]=N[T]=N[D]=N[S]=!1;var A=typeof ge=="object"&&ge&&ge.Object===Object&&ge,Q=typeof self=="object"&&self&&self.Object===Object&&self,X=A||Q||Function("return this")(),vt=t&&!t.nodeType&&t,ct=vt&&!0&&n&&!n.nodeType&&n,Ot=ct&&ct.exports===vt,_t=Ot&&A.process,et=function(){try{return _t&&_t.binding("util")}catch{}}(),bt=et&&et.isTypedArray;function Nt(w,C){for(var R=-1,W=w?w.length:0;++R<W;)if(C(w[R],R,w))return!0;return!1}function Me(w){return function(C){return C==null?void 0:C[w]}}function Ee(w,C){for(var R=-1,W=Array(w);++R<w;)W[R]=C(R);return W}function me(w){return function(C){return w(C)}}function Lt(w,C){return w==null?void 0:w[C]}function Ft(w){var C=!1;if(w!=null&&typeof w.toString!="function")try{C=!!(w+"")}catch{}return C}function Je(w){var C=-1,R=Array(w.size);return w.forEach(function(W,ot){R[++C]=[ot,W]}),R}function Dt(w,C){return function(R){return w(C(R))}}function Cn(w){var C=-1,R=Array(w.size);return w.forEach(function(W){R[++C]=W}),R}var Re=Array.prototype,tn=Function.prototype,_e=Object.prototype,Ce=X["__core-js_shared__"],Ae=function(){var w=/[^.]+$/.exec(Ce&&Ce.keys&&Ce.keys.IE_PROTO||"");return w?"Symbol(src)_1."+w:""}(),ce=tn.toString,ye=_e.hasOwnProperty,Kt=_e.toString,_a=RegExp("^"+ce.call(ye).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vr=X.Symbol,lp=X.Uint8Array,gD=_e.propertyIsEnumerable,mD=Re.splice,yD=Dt(Object.keys,Object),Gl=br(X,"DataView"),di=br(X,"Map"),Kl=br(X,"Promise"),Ql=br(X,"Set"),Zl=br(X,"WeakMap"),fi=br(Object,"create"),vD=Gn(Gl),bD=Gn(di),xD=Gn(Kl),_D=Gn(Ql),wD=Gn(Zl),wa=vr?vr.prototype:void 0,Jl=wa?wa.valueOf:void 0,cp=wa?wa.toString:void 0;function Xn(w){var C=-1,R=w?w.length:0;for(this.clear();++C<R;){var W=w[C];this.set(W[0],W[1])}}function TD(){this.__data__=fi?fi(null):{}}function SD(w){return this.has(w)&&delete this.__data__[w]}function MD(w){var C=this.__data__;if(fi){var R=C[w];return R===i?void 0:R}return ye.call(C,w)?C[w]:void 0}function CD(w){var C=this.__data__;return fi?C[w]!==void 0:ye.call(C,w)}function DD(w,C){var R=this.__data__;return R[w]=fi&&C===void 0?i:C,this}Xn.prototype.clear=TD,Xn.prototype.delete=SD,Xn.prototype.get=MD,Xn.prototype.has=CD,Xn.prototype.set=DD;function en(w){var C=-1,R=w?w.length:0;for(this.clear();++C<R;){var W=w[C];this.set(W[0],W[1])}}function kD(){this.__data__=[]}function OD(w){var C=this.__data__,R=Sa(C,w);if(R<0)return!1;var W=C.length-1;return R==W?C.pop():mD.call(C,R,1),!0}function PD(w){var C=this.__data__,R=Sa(C,w);return R<0?void 0:C[R][1]}function ED(w){return Sa(this.__data__,w)>-1}function RD(w,C){var R=this.__data__,W=Sa(R,w);return W<0?R.push([w,C]):R[W][1]=C,this}en.prototype.clear=kD,en.prototype.delete=OD,en.prototype.get=PD,en.prototype.has=ED,en.prototype.set=RD;function nn(w){var C=-1,R=w?w.length:0;for(this.clear();++C<R;){var W=w[C];this.set(W[0],W[1])}}function AD(){this.__data__={hash:new Xn,map:new(di||en),string:new Xn}}function LD(w){return Ma(this,w).delete(w)}function ID(w){return Ma(this,w).get(w)}function ND(w){return Ma(this,w).has(w)}function FD(w,C){return Ma(this,w).set(w,C),this}nn.prototype.clear=AD,nn.prototype.delete=LD,nn.prototype.get=ID,nn.prototype.has=ND,nn.prototype.set=FD;function Ta(w){var C=-1,R=w?w.length:0;for(this.__data__=new nn;++C<R;)this.add(w[C])}function UD(w){return this.__data__.set(w,i),this}function BD(w){return this.__data__.has(w)}Ta.prototype.add=Ta.prototype.push=UD,Ta.prototype.has=BD;function rn(w){this.__data__=new en(w)}function WD(){this.__data__=new en}function zD(w){return this.__data__.delete(w)}function YD(w){return this.__data__.get(w)}function HD(w){return this.__data__.has(w)}function $D(w,C){var R=this.__data__;if(R instanceof en){var W=R.__data__;if(!di||W.length<e-1)return W.push([w,C]),this;R=this.__data__=new nn(W)}return R.set(w,C),this}rn.prototype.clear=WD,rn.prototype.delete=zD,rn.prototype.get=YD,rn.prototype.has=HD,rn.prototype.set=$D;function jD(w,C){var R=Kn(w)||yp(w)?Ee(w.length,String):[],W=R.length,ot=!!W;for(var tt in w)(C||ye.call(w,tt))&&!(ot&&(tt=="length"||hp(tt,W)))&&R.push(tt);return R}function Sa(w,C){for(var R=w.length;R--;)if(mp(w[R][0],C))return R;return-1}var VD=sk();function qD(w,C){return w&&VD(w,C,Pa)}function up(w,C){C=Ca(C,w)?[C]:dp(C);for(var R=0,W=C.length;w!=null&&R<W;)w=w[Da(C[R++])];return R&&R==W?w:void 0}function XD(w){return Kt.call(w)}function GD(w,C){return w!=null&&C in Object(w)}function tc(w,C,R,W,ot){return w===C?!0:w==null||C==null||!ka(w)&&!Oa(C)?w!==w&&C!==C:KD(w,C,tc,R,W,ot)}function KD(w,C,R,W,ot,tt){var wt=Kn(w),Pt=Kn(C),$t=u,Zt=u;wt||($t=Dn(w),$t=$t==c?b:$t),Pt||(Zt=Dn(C),Zt=Zt==c?b:Zt);var ue=$t==b&&!Ft(w),ve=Zt==b&&!Ft(C),Jt=$t==Zt;if(Jt&&!ue)return tt||(tt=new rn),wt||mk(w)?fp(w,C,R,W,ot,tt):ok(w,C,$t,R,W,ot,tt);if(!(ot&s)){var De=ue&&ye.call(w,"__wrapped__"),ke=ve&&ye.call(C,"__wrapped__");if(De||ke){var kn=De?w.value():w,an=ke?C.value():C;return tt||(tt=new rn),R(kn,an,W,ot,tt)}}return Jt?(tt||(tt=new rn),lk(w,C,R,W,ot,tt)):!1}function QD(w,C,R,W){var ot=R.length,tt=ot,wt=!W;if(w==null)return!tt;for(w=Object(w);ot--;){var Pt=R[ot];if(wt&&Pt[2]?Pt[1]!==w[Pt[0]]:!(Pt[0]in w))return!1}for(;++ot<tt;){Pt=R[ot];var $t=Pt[0],Zt=w[$t],ue=Pt[1];if(wt&&Pt[2]){if(Zt===void 0&&!($t in w))return!1}else{var ve=new rn;if(W)var Jt=W(Zt,ue,$t,w,C,ve);if(!(Jt===void 0?tc(ue,Zt,W,a|s,ve):Jt))return!1}}return!0}function ZD(w){if(!ka(w)||fk(w))return!1;var C=bp(w)||Ft(w)?_a:Z;return C.test(Gn(w))}function JD(w){return Oa(w)&&nc(w.length)&&!!N[Kt.call(w)]}function tk(w){return typeof w=="function"?w:w==null?_k:typeof w=="object"?Kn(w)?rk(w[0],w[1]):nk(w):wk(w)}function ek(w){if(!hk(w))return yD(w);var C=[];for(var R in Object(w))ye.call(w,R)&&R!="constructor"&&C.push(R);return C}function nk(w){var C=ck(w);return C.length==1&&C[0][2]?gp(C[0][0],C[0][1]):function(R){return R===w||QD(R,w,C)}}function rk(w,C){return Ca(w)&&pp(C)?gp(Da(w),C):function(R){var W=vk(R,w);return W===void 0&&W===C?bk(R,w):tc(C,W,void 0,a|s)}}function ik(w){return function(C){return up(C,w)}}function ak(w){if(typeof w=="string")return w;if(rc(w))return cp?cp.call(w):"";var C=w+"";return C=="0"&&1/w==-o?"-0":C}function dp(w){return Kn(w)?w:pk(w)}function sk(w){return function(C,R,W){for(var ot=-1,tt=Object(C),wt=W(C),Pt=wt.length;Pt--;){var $t=wt[w?Pt:++ot];if(R(tt[$t],$t,tt)===!1)break}return C}}function fp(w,C,R,W,ot,tt){var wt=ot&s,Pt=w.length,$t=C.length;if(Pt!=$t&&!(wt&&$t>Pt))return!1;var Zt=tt.get(w);if(Zt&&tt.get(C))return Zt==C;var ue=-1,ve=!0,Jt=ot&a?new Ta:void 0;for(tt.set(w,C),tt.set(C,w);++ue<Pt;){var De=w[ue],ke=C[ue];if(W)var kn=wt?W(ke,De,ue,C,w,tt):W(De,ke,ue,w,C,tt);if(kn!==void 0){if(kn)continue;ve=!1;break}if(Jt){if(!Nt(C,function(an,Qn){if(!Jt.has(Qn)&&(De===an||R(De,an,W,ot,tt)))return Jt.add(Qn)})){ve=!1;break}}else if(!(De===ke||R(De,ke,W,ot,tt))){ve=!1;break}}return tt.delete(w),tt.delete(C),ve}function ok(w,C,R,W,ot,tt,wt){switch(R){case k:if(w.byteLength!=C.byteLength||w.byteOffset!=C.byteOffset)return!1;w=w.buffer,C=C.buffer;case M:return!(w.byteLength!=C.byteLength||!W(new lp(w),new lp(C)));case d:case f:case m:return mp(+w,+C);case p:return w.name==C.name&&w.message==C.message;case _:case D:return w==C+"";case g:var Pt=Je;case T:var $t=tt&s;if(Pt||(Pt=Cn),w.size!=C.size&&!$t)return!1;var Zt=wt.get(w);if(Zt)return Zt==C;tt|=a,wt.set(w,C);var ue=fp(Pt(w),Pt(C),W,ot,tt,wt);return wt.delete(w),ue;case O:if(Jl)return Jl.call(w)==Jl.call(C)}return!1}function lk(w,C,R,W,ot,tt){var wt=ot&s,Pt=Pa(w),$t=Pt.length,Zt=Pa(C),ue=Zt.length;if($t!=ue&&!wt)return!1;for(var ve=$t;ve--;){var Jt=Pt[ve];if(!(wt?Jt in C:ye.call(C,Jt)))return!1}var De=tt.get(w);if(De&&tt.get(C))return De==C;var ke=!0;tt.set(w,C),tt.set(C,w);for(var kn=wt;++ve<$t;){Jt=Pt[ve];var an=w[Jt],Qn=C[Jt];if(W)var xp=wt?W(Qn,an,Jt,C,w,tt):W(an,Qn,Jt,w,C,tt);if(!(xp===void 0?an===Qn||R(an,Qn,W,ot,tt):xp)){ke=!1;break}kn||(kn=Jt=="constructor")}if(ke&&!kn){var Ea=w.constructor,Ra=C.constructor;Ea!=Ra&&"constructor"in w&&"constructor"in C&&!(typeof Ea=="function"&&Ea instanceof Ea&&typeof Ra=="function"&&Ra instanceof Ra)&&(ke=!1)}return tt.delete(w),tt.delete(C),ke}function Ma(w,C){var R=w.__data__;return dk(C)?R[typeof C=="string"?"string":"hash"]:R.map}function ck(w){for(var C=Pa(w),R=C.length;R--;){var W=C[R],ot=w[W];C[R]=[W,ot,pp(ot)]}return C}function br(w,C){var R=Lt(w,C);return ZD(R)?R:void 0}var Dn=XD;(Gl&&Dn(new Gl(new ArrayBuffer(1)))!=k||di&&Dn(new di)!=g||Kl&&Dn(Kl.resolve())!=y||Ql&&Dn(new Ql)!=T||Zl&&Dn(new Zl)!=S)&&(Dn=function(w){var C=Kt.call(w),R=C==b?w.constructor:void 0,W=R?Gn(R):void 0;if(W)switch(W){case vD:return k;case bD:return g;case xD:return y;case _D:return T;case wD:return S}return C});function uk(w,C,R){C=Ca(C,w)?[C]:dp(C);for(var W,ot=-1,wt=C.length;++ot<wt;){var tt=Da(C[ot]);if(!(W=w!=null&&R(w,tt)))break;w=w[tt]}if(W)return W;var wt=w?w.length:0;return!!wt&&nc(wt)&&hp(tt,wt)&&(Kn(w)||yp(w))}function hp(w,C){return C=C??l,!!C&&(typeof w=="number"||K.test(w))&&w>-1&&w%1==0&&w<C}function Ca(w,C){if(Kn(w))return!1;var R=typeof w;return R=="number"||R=="symbol"||R=="boolean"||w==null||rc(w)?!0:ut.test(w)||!yt.test(w)||C!=null&&w in Object(C)}function dk(w){var C=typeof w;return C=="string"||C=="number"||C=="symbol"||C=="boolean"?w!=="__proto__":w===null}function fk(w){return!!Ae&&Ae in w}function hk(w){var C=w&&w.constructor,R=typeof C=="function"&&C.prototype||_e;return w===R}function pp(w){return w===w&&!ka(w)}function gp(w,C){return function(R){return R==null?!1:R[w]===C&&(C!==void 0||w in Object(R))}}var pk=ec(function(w){w=yk(w);var C=[];return z.test(w)&&C.push(""),w.replace(L,function(R,W,ot,tt){C.push(ot?tt.replace(j,"$1"):W||R)}),C});function Da(w){if(typeof w=="string"||rc(w))return w;var C=w+"";return C=="0"&&1/w==-o?"-0":C}function Gn(w){if(w!=null){try{return ce.call(w)}catch{}try{return w+""}catch{}}return""}function ec(w,C){if(typeof w!="function"||C&&typeof C!="function")throw new TypeError(r);var R=function(){var W=arguments,ot=C?C.apply(this,W):W[0],tt=R.cache;if(tt.has(ot))return tt.get(ot);var wt=w.apply(this,W);return R.cache=tt.set(ot,wt),wt};return R.cache=new(ec.Cache||nn),R}ec.Cache=nn;function mp(w,C){return w===C||w!==w&&C!==C}function yp(w){return gk(w)&&ye.call(w,"callee")&&(!gD.call(w,"callee")||Kt.call(w)==c)}var Kn=Array.isArray;function vp(w){return w!=null&&nc(w.length)&&!bp(w)}function gk(w){return Oa(w)&&vp(w)}function bp(w){var C=ka(w)?Kt.call(w):"";return C==v||C==x}function nc(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=l}function ka(w){var C=typeof w;return!!w&&(C=="object"||C=="function")}function Oa(w){return!!w&&typeof w=="object"}function rc(w){return typeof w=="symbol"||Oa(w)&&Kt.call(w)==O}var mk=bt?me(bt):JD;function yk(w){return w==null?"":ak(w)}function vk(w,C,R){var W=w==null?void 0:up(w,C);return W===void 0?R:W}function bk(w,C){return w!=null&&uk(w,C,GD)}function Pa(w){return vp(w)?jD(w):ek(w)}function xk(w,C){var R={};return C=tk(C),qD(w,function(W,ot,tt){R[C(W,ot,tt)]=W}),R}function _k(w){return w}function wk(w){return Ca(w)?Me(Da(w)):ik(w)}n.exports=xk}(xa,xa.exports);var eC=xa.exports;const nC=Bn(eC);var rC=1/0,iC=9007199254740991,aC="[object Arguments]",sC="[object Function]",oC="[object GeneratorFunction]",lC="[object Symbol]",cC=typeof ge=="object"&&ge&&ge.Object===Object&&ge,uC=typeof self=="object"&&self&&self.Object===Object&&self,dC=cC||uC||Function("return this")();function fC(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function hC(n,t){for(var e=-1,r=n?n.length:0,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function pC(n,t){for(var e=-1,r=t.length,i=n.length;++e<r;)n[i+e]=t[e];return n}var ql=Object.prototype,gC=ql.hasOwnProperty,Xl=ql.toString,Qh=dC.Symbol,mC=ql.propertyIsEnumerable,Zh=Qh?Qh.isConcatSpreadable:void 0,Jh=Math.max;function tp(n,t,e,r,i){var a=-1,s=n.length;for(e||(e=xC),i||(i=[]);++a<s;){var o=n[a];t>0&&e(o)?t>1?tp(o,t-1,e,r,i):pC(i,o):r||(i[i.length]=o)}return i}function yC(n,t){return n=Object(n),vC(n,t,function(e,r){return r in n})}function vC(n,t,e){for(var r=-1,i=t.length,a={};++r<i;){var s=t[r],o=n[s];e(o,s)&&(a[s]=o)}return a}function bC(n,t){return t=Jh(t===void 0?n.length-1:t,0),function(){for(var e=arguments,r=-1,i=Jh(e.length-t,0),a=Array(i);++r<i;)a[r]=e[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=e[r];return s[t]=a,fC(n,this,s)}}function xC(n){return TC(n)||wC(n)||!!(Zh&&n&&n[Zh])}function _C(n){if(typeof n=="string"||OC(n))return n;var t=n+"";return t=="0"&&1/n==-rC?"-0":t}function wC(n){return MC(n)&&gC.call(n,"callee")&&(!mC.call(n,"callee")||Xl.call(n)==aC)}var TC=Array.isArray;function SC(n){return n!=null&&DC(n.length)&&!CC(n)}function MC(n){return ep(n)&&SC(n)}function CC(n){var t=kC(n)?Xl.call(n):"";return t==sC||t==oC}function DC(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=iC}function kC(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function ep(n){return!!n&&typeof n=="object"}function OC(n){return typeof n=="symbol"||ep(n)&&Xl.call(n)==lC}var PC=bC(function(n,t){return n==null?{}:yC(n,hC(tp(t,1),_C))}),EC=PC;const RC=Bn(EC);var np={exports:{}};(function(n,t){(function(e,r){r()})(ge,function(){function e(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function r(c,u,d){var f=new XMLHttpRequest;f.open("GET",c),f.responseType="blob",f.onload=function(){l(f.response,u,d)},f.onerror=function(){console.error("could not download file")},f.send()}function i(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ge=="object"&&ge.global===ge?ge:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,u,d){var f=s.URL||s.webkitURL,p=document.createElement("a");u=u||c.name||"download",p.download=u,p.rel="noopener",typeof c=="string"?(p.href=c,p.origin===location.origin?a(p):i(p.href)?r(c,u,d):a(p,p.target="_blank")):(p.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(p.href)},4e4),setTimeout(function(){a(p)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,d){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(e(c,d),u);else if(i(c))r(c,u,d);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){a(f)})}}:function(c,u,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof c=="string")return r(c,u,d);var p=c.type==="application/octet-stream",v=/constructor/i.test(s.HTMLElement)||s.safari,x=/CriOS\/[\d]+/.test(navigator.userAgent);if((x||p&&v||o)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var y=g.result;y=x?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=y:location=y,f=null},g.readAsDataURL(c)}else{var m=s.URL||s.webkitURL,b=m.createObjectURL(c);f?f.location=b:location.href=b,f=null,setTimeout(function(){m.revokeObjectURL(b)},4e4)}});s.saveAs=l.saveAs=l,n.exports=l})})(np);var AC=np.exports,rp={exports:{}};/* @license
|
|
30
30
|
Papa Parse
|
|
31
31
|
v5.4.1
|
|
32
32
|
https://github.com/mholt/PapaParse
|
|
33
33
|
License: MIT
|
|
34
|
-
*/(function(n,t){(function(e,r){n.exports=r()})(ge,function e(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},i=!r.document&&!!r.postMessage,a=r.IS_PAPA_WORKER||!1,s={},o=0,l={parse:function(S,M){var k=(M=M||{}).dynamicTyping||!1;if(O(k)&&(M.dynamicTypingFunction=k,k={}),M.dynamicTyping=k,M.transform=!!O(M.transform)&&M.transform,M.worker&&l.WORKERS_SUPPORTED){var P=function(){if(!l.WORKERS_SUPPORTED)return!1;var F=($=r.URL||r.webkitURL||null,Y=e.toString(),l.BLOB_URL||(l.BLOB_URL=$.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",Y,")();"],{type:"text/javascript"})))),q=new r.Worker(F),$,Y;return q.onmessage=
|
|
35
|
-
`,q='"',$=q+q,Y=!1,I=null,it=!1;(function(){if(typeof M=="object"){if(typeof M.delimiter!="string"||l.BAD_DELIMITERS.filter(function(z){return M.delimiter.indexOf(z)!==-1}).length||(E=M.delimiter),(typeof M.quotes=="boolean"||typeof M.quotes=="function"||Array.isArray(M.quotes))&&(k=M.quotes),typeof M.skipEmptyLines!="boolean"&&typeof M.skipEmptyLines!="string"||(Y=M.skipEmptyLines),typeof M.newline=="string"&&(F=M.newline),typeof M.quoteChar=="string"&&(q=M.quoteChar),typeof M.header=="boolean"&&(P=M.header),Array.isArray(M.columns)){if(M.columns.length===0)throw new Error("Option columns is empty");I=M.columns}M.escapeChar!==void 0&&($=M.escapeChar+q),(typeof M.escapeFormulae=="boolean"||M.escapeFormulae instanceof RegExp)&&(it=M.escapeFormulae instanceof RegExp?M.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var B=new RegExp(g(q),"g");if(typeof S=="string"&&(S=JSON.parse(S)),Array.isArray(S)){if(!S.length||Array.isArray(S[0]))return yt(null,S,Y);if(typeof S[0]=="object")return yt(I||Object.keys(S[0]),S,Y)}else if(typeof S=="object")return typeof S.data=="string"&&(S.data=JSON.parse(S.data)),Array.isArray(S.data)&&(S.fields||(S.fields=S.meta&&S.meta.fields||I),S.fields||(S.fields=Array.isArray(S.data[0])?S.fields:typeof S.data[0]=="object"?Object.keys(S.data[0]):[]),Array.isArray(S.data[0])||typeof S.data[0]=="object"||(S.data=[S.data])),yt(S.fields||[],S.data||[],Y);throw new Error("Unable to serialize unrecognized input");function yt(z,L,U){var j="";typeof z=="string"&&(z=JSON.parse(z)),typeof L=="string"&&(L=JSON.parse(L));var Z=Array.isArray(z)&&0<z.length,K=!Array.isArray(L[0]);if(Z&&P){for(var N=0;N<z.length;N++)0<N&&(j+=E),j+=ut(z[N],N);0<L.length&&(j+=F)}for(var A=0;A<L.length;A++){var Q=Z?z.length:L[A].length,X=!1,
|
|
36
|
-
`,'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!i&&!!r.Worker,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=m,l.ParserHandle=x,l.NetworkStreamer=d,l.FileStreamer=f,l.StringStreamer=p,l.ReadableStreamStreamer=
|
|
34
|
+
*/(function(n,t){(function(e,r){n.exports=r()})(ge,function e(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},i=!r.document&&!!r.postMessage,a=r.IS_PAPA_WORKER||!1,s={},o=0,l={parse:function(S,M){var k=(M=M||{}).dynamicTyping||!1;if(O(k)&&(M.dynamicTypingFunction=k,k={}),M.dynamicTyping=k,M.transform=!!O(M.transform)&&M.transform,M.worker&&l.WORKERS_SUPPORTED){var P=function(){if(!l.WORKERS_SUPPORTED)return!1;var F=($=r.URL||r.webkitURL||null,Y=e.toString(),l.BLOB_URL||(l.BLOB_URL=$.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",Y,")();"],{type:"text/javascript"})))),q=new r.Worker(F),$,Y;return q.onmessage=b,q.id=o++,s[q.id]=q}();return P.userStep=M.step,P.userChunk=M.chunk,P.userComplete=M.complete,P.userError=M.error,M.step=O(M.step),M.chunk=O(M.chunk),M.complete=O(M.complete),M.error=O(M.error),delete M.worker,void P.postMessage({input:S,config:M,workerId:P.id})}var E=null;return l.NODE_STREAM_INPUT,typeof S=="string"?(S=function(F){return F.charCodeAt(0)===65279?F.slice(1):F}(S),E=M.download?new d(M):new p(M)):S.readable===!0&&O(S.read)&&O(S.on)?E=new v(M):(r.File&&S instanceof File||S instanceof Object)&&(E=new f(M)),E.stream(S)},unparse:function(S,M){var k=!1,P=!0,E=",",F=`\r
|
|
35
|
+
`,q='"',$=q+q,Y=!1,I=null,it=!1;(function(){if(typeof M=="object"){if(typeof M.delimiter!="string"||l.BAD_DELIMITERS.filter(function(z){return M.delimiter.indexOf(z)!==-1}).length||(E=M.delimiter),(typeof M.quotes=="boolean"||typeof M.quotes=="function"||Array.isArray(M.quotes))&&(k=M.quotes),typeof M.skipEmptyLines!="boolean"&&typeof M.skipEmptyLines!="string"||(Y=M.skipEmptyLines),typeof M.newline=="string"&&(F=M.newline),typeof M.quoteChar=="string"&&(q=M.quoteChar),typeof M.header=="boolean"&&(P=M.header),Array.isArray(M.columns)){if(M.columns.length===0)throw new Error("Option columns is empty");I=M.columns}M.escapeChar!==void 0&&($=M.escapeChar+q),(typeof M.escapeFormulae=="boolean"||M.escapeFormulae instanceof RegExp)&&(it=M.escapeFormulae instanceof RegExp?M.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var B=new RegExp(g(q),"g");if(typeof S=="string"&&(S=JSON.parse(S)),Array.isArray(S)){if(!S.length||Array.isArray(S[0]))return yt(null,S,Y);if(typeof S[0]=="object")return yt(I||Object.keys(S[0]),S,Y)}else if(typeof S=="object")return typeof S.data=="string"&&(S.data=JSON.parse(S.data)),Array.isArray(S.data)&&(S.fields||(S.fields=S.meta&&S.meta.fields||I),S.fields||(S.fields=Array.isArray(S.data[0])?S.fields:typeof S.data[0]=="object"?Object.keys(S.data[0]):[]),Array.isArray(S.data[0])||typeof S.data[0]=="object"||(S.data=[S.data])),yt(S.fields||[],S.data||[],Y);throw new Error("Unable to serialize unrecognized input");function yt(z,L,U){var j="";typeof z=="string"&&(z=JSON.parse(z)),typeof L=="string"&&(L=JSON.parse(L));var Z=Array.isArray(z)&&0<z.length,K=!Array.isArray(L[0]);if(Z&&P){for(var N=0;N<z.length;N++)0<N&&(j+=E),j+=ut(z[N],N);0<L.length&&(j+=F)}for(var A=0;A<L.length;A++){var Q=Z?z.length:L[A].length,X=!1,vt=Z?Object.keys(L[A]).length===0:L[A].length===0;if(U&&!Z&&(X=U==="greedy"?L[A].join("").trim()==="":L[A].length===1&&L[A][0].length===0),U==="greedy"&&Z){for(var ct=[],Ot=0;Ot<Q;Ot++){var _t=K?z[Ot]:Ot;ct.push(L[A][_t])}X=ct.join("").trim()===""}if(!X){for(var et=0;et<Q;et++){0<et&&!vt&&(j+=E);var bt=Z&&K?z[et]:et;j+=ut(L[A][bt],et)}A<L.length-1&&(!U||0<Q&&!vt)&&(j+=F)}}return j}function ut(z,L){if(z==null)return"";if(z.constructor===Date)return JSON.stringify(z).slice(1,25);var U=!1;it&&typeof z=="string"&&it.test(z)&&(z="'"+z,U=!0);var j=z.toString().replace(B,$);return(U=U||k===!0||typeof k=="function"&&k(z,L)||Array.isArray(k)&&k[L]||function(Z,K){for(var N=0;N<K.length;N++)if(-1<Z.indexOf(K[N]))return!0;return!1}(j,l.BAD_DELIMITERS)||-1<j.indexOf(E)||j.charAt(0)===" "||j.charAt(j.length-1)===" ")?q+j+q:j}}};if(l.RECORD_SEP="",l.UNIT_SEP="",l.BYTE_ORDER_MARK="\uFEFF",l.BAD_DELIMITERS=["\r",`
|
|
36
|
+
`,'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!i&&!!r.Worker,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=m,l.ParserHandle=x,l.NetworkStreamer=d,l.FileStreamer=f,l.StringStreamer=p,l.ReadableStreamStreamer=v,r.jQuery){var c=r.jQuery;c.fn.parse=function(S){var M=S.config||{},k=[];return this.each(function(F){if(!(c(this).prop("tagName").toUpperCase()==="INPUT"&&c(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var q=0;q<this.files.length;q++)k.push({file:this.files[q],inputElem:this,instanceConfig:c.extend({},M)})}),P(),this;function P(){if(k.length!==0){var F,q,$,Y,I=k[0];if(O(S.before)){var it=S.before(I.file,I.inputElem);if(typeof it=="object"){if(it.action==="abort")return F="AbortError",q=I.file,$=I.inputElem,Y=it.reason,void(O(S.error)&&S.error({name:F},q,$,Y));if(it.action==="skip")return void E();typeof it.config=="object"&&(I.instanceConfig=c.extend(I.instanceConfig,it.config))}else if(it==="skip")return void E()}var B=I.instanceConfig.complete;I.instanceConfig.complete=function(yt){O(B)&&B(yt,I.file,I.inputElem),E()},l.parse(I.file,I.instanceConfig)}else O(S.complete)&&S.complete()}function E(){k.splice(0,1),P()}}}function u(S){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(M){var k=T(M);k.chunkSize=parseInt(k.chunkSize),M.step||M.chunk||(k.chunkSize=null),this._handle=new x(k),(this._handle.streamer=this)._config=k}).call(this,S),this.parseChunk=function(M,k){if(this.isFirstChunk&&O(this._config.beforeFirstChunk)){var P=this._config.beforeFirstChunk(M);P!==void 0&&(M=P)}this.isFirstChunk=!1,this._halted=!1;var E=this._partialLine+M;this._partialLine="";var F=this._handle.parse(E,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var q=F.meta.cursor;this._finished||(this._partialLine=E.substring(q-this._baseIndex),this._baseIndex=q),F&&F.data&&(this._rowCount+=F.data.length);var $=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(a)r.postMessage({results:F,workerId:l.WORKER_ID,finished:$});else if(O(this._config.chunk)&&!k){if(this._config.chunk(F,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);F=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(F.data),this._completeResults.errors=this._completeResults.errors.concat(F.errors),this._completeResults.meta=F.meta),this._completed||!$||!O(this._config.complete)||F&&F.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),$||F&&F.meta.paused||this._nextChunk(),F}this._halted=!0},this._sendError=function(M){O(this._config.error)?this._config.error(M):a&&this._config.error&&r.postMessage({workerId:l.WORKER_ID,error:M,finished:!1})}}function d(S){var M;(S=S||{}).chunkSize||(S.chunkSize=l.RemoteChunkSize),u.call(this,S),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(k){this._input=k,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(M=new XMLHttpRequest,this._config.withCredentials&&(M.withCredentials=this._config.withCredentials),i||(M.onload=D(this._chunkLoaded,this),M.onerror=D(this._chunkError,this)),M.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var k=this._config.downloadRequestHeaders;for(var P in k)M.setRequestHeader(P,k[P])}if(this._config.chunkSize){var E=this._start+this._config.chunkSize-1;M.setRequestHeader("Range","bytes="+this._start+"-"+E)}try{M.send(this._config.downloadRequestBody)}catch(F){this._chunkError(F.message)}i&&M.status===0&&this._chunkError()}},this._chunkLoaded=function(){M.readyState===4&&(M.status<200||400<=M.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:M.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(k){var P=k.getResponseHeader("Content-Range");return P===null?-1:parseInt(P.substring(P.lastIndexOf("/")+1))}(M),this.parseChunk(M.responseText)))},this._chunkError=function(k){var P=M.statusText||k;this._sendError(new Error(P))}}function f(S){var M,k;(S=S||{}).chunkSize||(S.chunkSize=l.LocalChunkSize),u.call(this,S);var P=typeof FileReader<"u";this.stream=function(E){this._input=E,k=E.slice||E.webkitSlice||E.mozSlice,P?((M=new FileReader).onload=D(this._chunkLoaded,this),M.onerror=D(this._chunkError,this)):M=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var E=this._input;if(this._config.chunkSize){var F=Math.min(this._start+this._config.chunkSize,this._input.size);E=k.call(E,this._start,F)}var q=M.readAsText(E,this._config.encoding);P||this._chunkLoaded({target:{result:q}})},this._chunkLoaded=function(E){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(E.target.result)},this._chunkError=function(){this._sendError(M.error)}}function p(S){var M;u.call(this,S=S||{}),this.stream=function(k){return M=k,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var k,P=this._config.chunkSize;return P?(k=M.substring(0,P),M=M.substring(P)):(k=M,M=""),this._finished=!M,this.parseChunk(k)}}}function v(S){u.call(this,S=S||{});var M=[],k=!0,P=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(E){this._input=E,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){P&&M.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),M.length?this.parseChunk(M.shift()):k=!0},this._streamData=D(function(E){try{M.push(typeof E=="string"?E:E.toString(this._config.encoding)),k&&(k=!1,this._checkIsFinished(),this.parseChunk(M.shift()))}catch(F){this._streamError(F)}},this),this._streamError=D(function(E){this._streamCleanUp(),this._sendError(E)},this),this._streamEnd=D(function(){this._streamCleanUp(),P=!0,this._streamData("")},this),this._streamCleanUp=D(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function x(S){var M,k,P,E=Math.pow(2,53),F=-E,q=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,$=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Y=this,I=0,it=0,B=!1,yt=!1,ut=[],z={data:[],errors:[],meta:{}};if(O(S.step)){var L=S.step;S.step=function(A){if(z=A,Z())j();else{if(j(),z.data.length===0)return;I+=A.data.length,S.preview&&I>S.preview?k.abort():(z.data=z.data[0],L(z,Y))}}}function U(A){return S.skipEmptyLines==="greedy"?A.join("").trim()==="":A.length===1&&A[0].length===0}function j(){return z&&P&&(N("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+l.DefaultDelimiter+"'"),P=!1),S.skipEmptyLines&&(z.data=z.data.filter(function(A){return!U(A)})),Z()&&function(){if(!z)return;function A(X,vt){O(S.transformHeader)&&(X=S.transformHeader(X,vt)),ut.push(X)}if(Array.isArray(z.data[0])){for(var Q=0;Z()&&Q<z.data.length;Q++)z.data[Q].forEach(A);z.data.splice(0,1)}else z.data.forEach(A)}(),function(){if(!z||!S.header&&!S.dynamicTyping&&!S.transform)return z;function A(X,vt){var ct,Ot=S.header?{}:[];for(ct=0;ct<X.length;ct++){var _t=ct,et=X[ct];S.header&&(_t=ct>=ut.length?"__parsed_extra":ut[ct]),S.transform&&(et=S.transform(et,_t)),et=K(_t,et),_t==="__parsed_extra"?(Ot[_t]=Ot[_t]||[],Ot[_t].push(et)):Ot[_t]=et}return S.header&&(ct>ut.length?N("FieldMismatch","TooManyFields","Too many fields: expected "+ut.length+" fields but parsed "+ct,it+vt):ct<ut.length&&N("FieldMismatch","TooFewFields","Too few fields: expected "+ut.length+" fields but parsed "+ct,it+vt)),Ot}var Q=1;return!z.data.length||Array.isArray(z.data[0])?(z.data=z.data.map(A),Q=z.data.length):z.data=A(z.data,0),S.header&&z.meta&&(z.meta.fields=ut),it+=Q,z}()}function Z(){return S.header&&ut.length===0}function K(A,Q){return X=A,S.dynamicTypingFunction&&S.dynamicTyping[X]===void 0&&(S.dynamicTyping[X]=S.dynamicTypingFunction(X)),(S.dynamicTyping[X]||S.dynamicTyping)===!0?Q==="true"||Q==="TRUE"||Q!=="false"&&Q!=="FALSE"&&(function(vt){if(q.test(vt)){var ct=parseFloat(vt);if(F<ct&&ct<E)return!0}return!1}(Q)?parseFloat(Q):$.test(Q)?new Date(Q):Q===""?null:Q):Q;var X}function N(A,Q,X,vt){var ct={type:A,code:Q,message:X};vt!==void 0&&(ct.row=vt),z.errors.push(ct)}this.parse=function(A,Q,X){var vt=S.quoteChar||'"';if(S.newline||(S.newline=function(_t,et){_t=_t.substring(0,1048576);var bt=new RegExp(g(et)+"([^]*?)"+g(et),"gm"),Nt=(_t=_t.replace(bt,"")).split("\r"),Me=_t.split(`
|
|
37
37
|
`),Ee=1<Me.length&&Me[0].length<Nt[0].length;if(Nt.length===1||Ee)return`
|
|
38
38
|
`;for(var me=0,Lt=0;Lt<Nt.length;Lt++)Nt[Lt][0]===`
|
|
39
39
|
`&&me++;return me>=Nt.length/2?`\r
|
|
40
|
-
`:"\r"}(A,
|
|
40
|
+
`:"\r"}(A,vt)),P=!1,S.delimiter)O(S.delimiter)&&(S.delimiter=S.delimiter(A),z.meta.delimiter=S.delimiter);else{var ct=function(_t,et,bt,Nt,Me){var Ee,me,Lt,Ft;Me=Me||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var Je=0;Je<Me.length;Je++){var Dt=Me[Je],Cn=0,Re=0,tn=0;Lt=void 0;for(var _e=new m({comments:Nt,delimiter:Dt,newline:et,preview:10}).parse(_t),Ce=0;Ce<_e.data.length;Ce++)if(bt&&U(_e.data[Ce]))tn++;else{var Ae=_e.data[Ce].length;Re+=Ae,Lt!==void 0?0<Ae&&(Cn+=Math.abs(Ae-Lt),Lt=Ae):Lt=Ae}0<_e.data.length&&(Re/=_e.data.length-tn),(me===void 0||Cn<=me)&&(Ft===void 0||Ft<Re)&&1.99<Re&&(me=Cn,Ee=Dt,Ft=Re)}return{successful:!!(S.delimiter=Ee),bestDelimiter:Ee}}(A,S.newline,S.skipEmptyLines,S.comments,S.delimitersToGuess);ct.successful?S.delimiter=ct.bestDelimiter:(P=!0,S.delimiter=l.DefaultDelimiter),z.meta.delimiter=S.delimiter}var Ot=T(S);return S.preview&&S.header&&Ot.preview++,M=A,k=new m(Ot),z=k.parse(M,Q,X),j(),B?{meta:{paused:!0}}:z||{meta:{paused:!1}}},this.paused=function(){return B},this.pause=function(){B=!0,k.abort(),M=O(S.chunk)?"":M.substring(k.getCharIndex())},this.resume=function(){Y.streamer._halted?(B=!1,Y.streamer.parseChunk(M,!0)):setTimeout(Y.resume,3)},this.aborted=function(){return yt},this.abort=function(){yt=!0,k.abort(),z.meta.aborted=!0,O(S.complete)&&S.complete(z),M=""}}function g(S){return S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(S){var M,k=(S=S||{}).delimiter,P=S.newline,E=S.comments,F=S.step,q=S.preview,$=S.fastMode,Y=M=S.quoteChar===void 0||S.quoteChar===null?'"':S.quoteChar;if(S.escapeChar!==void 0&&(Y=S.escapeChar),(typeof k!="string"||-1<l.BAD_DELIMITERS.indexOf(k))&&(k=","),E===k)throw new Error("Comment character same as delimiter");E===!0?E="#":(typeof E!="string"||-1<l.BAD_DELIMITERS.indexOf(E))&&(E=!1),P!==`
|
|
41
41
|
`&&P!=="\r"&&P!==`\r
|
|
42
42
|
`&&(P=`
|
|
43
|
-
`);var I=0,it=!1;this.parse=function(B,yt,ut){if(typeof B!="string")throw new Error("Input must be a string");var z=B.length,L=k.length,U=P.length,j=E.length,Z=O(F),K=[],N=[],A=[],Q=I=0;if(!B)return ce();if(S.header&&!yt){var X=B.split(P)[0].split(k),
|
|
44
|
-
`+u),r.encoding==="utf-8"&&(u="\uFEFF"+u),e("export-finished",r.filename),!r.testing){const d=new Blob([u],{type:"text/csv;charset="+r.encoding});AC.saveAs(d,r.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:i.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,IC))}}),FC=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(r,i)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(NC,{data:r.rows,fields:e.value,filename:r.filename,labels:r.headers},{default:h.withCtx(()=>[h.renderSlot(r.$slots,"default")]),_:3},8,["data","fields","filename","labels"])]))}}),UC={class:"kong-ui-public-csv-export-modal"},BC={key:0,class:"selected-range"},WC={key:1,class:"text-muted",tag:"span"},ip=3,ap=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=Ct.useI18n(),r=n,i=t,a=`${r.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,s=h.ref(!0),o=h.computed(()=>{var x,g;return!!((g=(x=r.chartData)==null?void 0:x.data)!=null&&g.length)}),l=h.ref(1),c=h.computed(()=>p.value.rows.length),u=Ct.useChartSelectedRange(h.toRef(r,"chartData")),d=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(ip,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),f=()=>{i("toggleModal",!1)},p=h.computed(()=>{var T,D,O;if(!o.value||!((T=r.chartData)!=null&&T.meta.metric_names))return{headers:[],rows:[],csvHeaders:{}};const x=r.chartData.data.some(S=>S.timestamp!==r.chartData.data[0].timestamp),g=r.chartData.data.map(S=>{const M=new Date(S.timestamp);return{...Object.keys(S.event).reduce((P,E)=>{if(E in r.chartData.meta.display){const F=S.event[E],q=r.chartData.meta.display[E];P[E]=F&&q&&q[F].name||S.event[E]}else P[E]=S.event[E];return P},{}),...x?{timestamp:Do(M,"yyyy-MM-dd HH:mm:ss"),tzOffset:Do(M,"XXX")}:{}}});let m=[];x&&(m=[{label:e.t("csvExport.Timestamp"),key:"timestamp"},{label:e.t("csvExport.UtcOffset"),key:"tzOffset"}]);const v="display"in r.chartData.meta&&((D=r.chartData.meta)!=null&&D.display)?(O=r.chartData.meta)==null?void 0:O.display:{},y=[...m,...Object.keys(v).map(S=>({label:e.t(`chartLabels.${S}`),key:S})),...r.chartData.meta.metric_names.map(S=>({label:e.t(`chartLabels.${S}`),key:S}))],_=y.reduce((S,M)=>(S[M.key]=M.label,S),{});return{headers:y,csvHeaders:_,rows:g}}),b=()=>{const{rows:x}=p.value;return s.value=!1,{total:Number(x.length)||0,data:x.slice(0,ip)}};return h.watch(p,()=>{l.value++}),(x,g)=>{const m=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KTable"),y=h.resolveComponent("KButton"),_=h.resolveComponent("KModal");return h.openBlock(),h.createElementBlock("div",UC,[h.createVNode(_,{class:"vitals-report","data-testid":"csv-export-modal","show-dismiss-icon":"",title:h.unref(e).t("csvExport.exportPreview"),visible:"",onCancel:f,onKeyup:h.withKeys(f,["esc"])},{default:h.withCtx(()=>{var T;return[h.createElementVNode("div",null,[o.value?(h.openBlock(),h.createElementBlock("div",BC,[h.createElementVNode("p",null,h.toDisplayString(x.modalDescription?x.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(h.unref(u)),1)])):h.createCommentVNode("",!0),h.createVNode(v,{class:"vitals-table","disable-pagination":"","disable-sorting":"",fetcher:b,"fetcher-cache-key":String(l.value),"has-hover":!1,headers:((T=p.value)==null?void 0:T.headers)||[]},{"empty-state":h.withCtx(()=>[h.createVNode(m,{"action-button-visible":!1},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),default:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!s.value&&o.value?(h.openBlock(),h.createElementBlock("div",WC,h.toDisplayString(d.value),1)):h.createCommentVNode("",!0)])]}),"footer-actions":h.withCtx(()=>[h.createVNode(y,{appearance:"tertiary",class:"cancel-btn",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(FC,{class:"vitals-report-export-button",filename:a,headers:p.value.csvHeaders,rows:p.value.rows},{default:h.withCtx(()=>[h.createVNode(y,{appearance:"primary","data-testid":"csv-download-button",disabled:s.value||!o.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.downloadButton")),1)]),_:1},8,["disabled"])]),_:1},8,["headers","rows"])]),_:1},8,["title"])])}}}),sp=h.defineComponent({__name:"CsvExportButton",props:{data:{type:Object,required:!0},text:{type:String,required:!1,default:void 0},buttonAppearance:{type:String,required:!1,default:()=>"tertiary"},filenamePrefix:{type:String,required:!1,default:void 0}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),r=h.computed(()=>t.filenamePrefix||e.t("csvExport.defaultFilename")),i=h.ref(!1),a=o=>{i.value=o},s=()=>{a(!0)};return(o,l)=>{const c=h.resolveComponent("KButton");return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(c,{appearance:n.buttonAppearance,class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(s,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.text||h.unref(e).t("csvExport.exportButton")),1)]),_:1},8,["appearance"]),i.value?(h.openBlock(),h.createBlock(ap,{key:0,"chart-data":n.data,filename:r.value,onToggleModal:a},null,8,["chart-data","filename"])):h.createCommentVNode("",!0)],64)}}}),zC={class:"analytics-chart-shell"},YC={key:0,class:"chart-header"},HC={key:0,class:"chart-title"},$C={class:"chart-header-icons-wrapper"},jC={key:1,class:"chart-export-button"},VC={key:2,class:"analytics-chart-parent"},qC=h.defineComponent({__name:"AnalyticsChart",props:{allowCsvExport:{type:Boolean,required:!1,default:!1},chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!1,default:""},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:""},filenamePrefix:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},syntheticsDataKey:{type:String,required:!1,default:""},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),r=h.toRef(t,"chartData"),i=h.computed(()=>p.value?Ct.useExploreResultToTimeDataset({fill:t.chartOptions.stacked,colorPalette:t.chartOptions.chartDatasetColors||sa},h.toRef(t,"chartData")).value:Ct.useExploreResultToDatasets({fill:t.chartOptions.stacked,colorPalette:t.chartOptions.chartDatasetColors||sa},h.toRef(t,"chartData")).value),a=h.computed(()=>{var k;return(k=t.chartData)!=null&&k.meta?"start_ms"in t.chartData.meta?t.chartData.meta.end_ms-t.chartData.meta.start_ms:void 0:0}),s=h.computed(()=>{var k;return(k=t.chartData.meta)!=null&&k.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),o=h.computed(()=>t.showLegendValues&&t.legendPosition!==Wt.Bottom),{legendValues:l}=Ct.useChartLegendValues(i,t.chartOptions.type,s),c=h.computed(()=>{var k,P,E;return((E=(P=(k=t.chartData)==null?void 0:k.meta)==null?void 0:P.limit)==null?void 0:E.toString())||null}),u=h.computed(()=>{var k,P;return((P=(k=t.chartData)==null?void 0:k.meta)==null?void 0:P.truncated)||!1}),d=e.t("limitedResultsShown",{maxReturned:c.value}),f=h.computed(()=>[ee.VERTICAL_BAR.toString(),ee.HORIZONTAL_BAR.toString()].includes(t.chartOptions.type)),p=h.computed(()=>[ee.TIMESERIES_BAR,ee.TIMESERIES_LINE].some(k=>k===t.chartOptions.type)),b=h.computed(()=>t.chartOptions.type===ee.DOUGHNUT),x=h.computed(()=>t.chartOptions.type.includes("Vertical")?"vertical":"horizontal"),g=h.computed(()=>{var E,F,q;if(!((E=t.chartData)!=null&&E.meta.metric_names)||!((F=t.chartData)!=null&&F.meta.metric_units))return;const k=t.chartData.meta.metric_names[0],P=t.chartData.meta.metric_units[k];return((q=t.chartOptions)==null?void 0:q.metricAxesTitle)||e.te(`metricAxisTitles.${k}`)&&e.te(`chartUnits.${P}`)&&e.t(`metricAxisTitles.${k}`,{unit:e.t(`chartUnits.${P}`,{plural:"s"})})||void 0}),m=h.computed(()=>{const k=p.value?"Time":Object.keys(t.chartData.meta.display||t.chartData.meta.metric_names)[0];return t.chartOptions.dimensionAxesTitle||e.te(`chartLabels.${k}`)&&e.t(`chartLabels.${k}`)||void 0}),v=h.computed(()=>{const k=jl(Number(t.chartData.meta.granularity_ms));return e.t(`granularityAxisTitles.${k}`)}),y=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),_=h.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),T=h.computed(()=>p.value?O_(i.value):t.chartData&&t.chartData.meta&&t.chartData.data.length),D=h.computed(()=>T.value&&u.value&&c.value||t.chartTitle||t.allowCsvExport&&T.value),O=h.computed(()=>t.chartData.meta.granularity_ms?jl(t.chartData.meta.granularity_ms)||"hourly":jl(new Date(t.chartData.data[1].timestamp).getTime()-new Date(t.chartData.data[0].timestamp).getTime())||"hourly"),S=h.computed(()=>t.chartOptions.chartLegendSortFn?t.chartOptions.chartLegendSortFn:(k,P)=>k.text===e.t("chartLabels.____OTHER____")?1:P.text===e.t("chartLabels.____OTHER____")?-1:typeof parseInt(k.text,10)=="number"&&typeof parseInt(P.text,10)=="number"?k.text<P.text?-1:1:k.value&&P.value?P.value.raw-k.value.raw:0),M=h.computed(()=>t.chartOptions.chartTooltipSortFn?t.chartOptions.chartTooltipSortFn:(k,P)=>k.label===e.t("chartLabels.____OTHER____")?1:P.label===e.t("chartLabels.____OTHER____")?-1:typeof parseInt(k.label,10)=="number"&&typeof parseInt(P.label,10)=="number"?k.label<P.label?-1:1:k.value&&P.value?P.rawValue-k.rawValue:0);return h.provide("showLegendValues",o),h.provide("legendPosition",h.toRef(t,"legendPosition")),(k,P)=>{const E=h.resolveComponent("KTooltip"),F=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",zC,[D.value?(h.openBlock(),h.createElementBlock("div",YC,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",HC,h.toDisplayString(n.chartTitle),1)):h.createCommentVNode("",!0),h.createElementVNode("div",$C,[T.value&&u.value&&c.value?(h.openBlock(),h.createBlock(E,{key:0,class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(d)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(XT),{color:h.unref(KT),decorative:"",size:h.unref(QT)},null,8,["color","size"])]),_:1})):h.createCommentVNode("",!0)]),n.allowCsvExport&&T.value?(h.openBlock(),h.createElementBlock("div",jC,[h.createVNode(sp,{data:r.value,"filename-prefix":n.filenamePrefix},null,8,["data","filename-prefix"])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),T.value?(h.openBlock(),h.createElementBlock("div",VC,[p.value?(h.openBlock(),h.createBlock(tC,{key:0,"chart-data":i.value,"chart-legend-sort-fn":S.value,"chart-tooltip-sort-fn":M.value,"dimension-axes-title":v.value,fill:n.chartOptions.stacked,granularity:O.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":a.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","tooltip-title","type"])):f.value?(h.openBlock(),h.createBlock(wS,{key:1,annotations:n.showAnnotations,"chart-data":i.value,"chart-legend-sort-fn":S.value,"chart-tooltip-sort-fn":M.value,"data-testid":"bar-chart-container","dimension-axes-title":m.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,orientation:x.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["annotations","chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","stacked","synthetics-data-key","tooltip-title"])):b.value?(h.openBlock(),h.createBlock(LS,{key:2,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors||h.unref(sa),"legend-position":n.legendPosition,"legend-values":h.unref(l),"metric-unit":s.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["chart-data","dataset-colors","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(F,{key:1,"action-button-visible":!1,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(y.value),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(_.value),1)]),_:1}))])}}}),XC=Ze(qC,[["__scopeId","data-v-f5c861d0"]]),GC={class:"chart-parent","data-testid":"doughnut-chart-parent"},KC={class:"chart-totals-flex"},QC={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},ZC=h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:or.Hidden},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Qe},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),r=h.ref(Sn()),i=h.computed(()=>[t.chartData.datasets.reduce((b,x)=>(b.labels.push(x.label),b.borderColor.push(x.backgroundColor),b.backgroundColor.push(x.backgroundColor),b.data.push(x.data.reduce((g,m)=>g+m,0)),b),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),a=h.computed(()=>({...t.chartData,datasets:i.value}));Ct.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const s={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},o=h.ref(),l=h.computed(()=>{var p;return ii((p=i==null?void 0:i.value[0])==null?void 0:p.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var p,b;return ii(((p=i==null?void 0:i.value[0])==null?void 0:p.data[0])+((b=i==null?void 0:i.value[0])==null?void 0:b.data[1]),{capital:!0})}),u=h.computed(()=>{var p;return`color: ${(p=i==null?void 0:i.value[0])==null?void 0:p.backgroundColor[t.numerator]}`}),d=h.computed(()=>[or.Full,or.SingleMetric].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay===or.Full);return(p,b)=>(h.openBlock(),h.createElementBlock("div",GC,[h.createElementVNode("div",KC,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",QC,h.toDisplayString(h.unref(e).t("total"))+": "+h.toDisplayString(c.value),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({height:n.height,width:n.width})},[h.createVNode(h.unref(Dh),{ref_key:"chartInstance",ref:o,"chart-id":r.value,data:a.value,options:s},null,8,["chart-id","data","options"])],4)]))}}),JC=Ze(ZC,[["__scopeId","data-v-5871cb7a"]]),tD={class:"simple-chart-shell"},eD={key:1,class:"analytics-chart-parent"},nD=Ze(h.defineComponent({__name:"SimpleChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},emptyStateTitle:{type:String,required:!1,default:""},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),r=h.computed(()=>{var c;const l=Ct.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||Qe},h.toRef(t,"chartData")).value;return(c=t.chartOptions)!=null&&c.reverseDataset&&(l==null||l.datasets.reverse()),l}),i=h.computed(()=>{var l;return(l=t.chartData.meta)!=null&&l.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),a=h.computed(()=>t.chartOptions.type===ea.GAUGE),s=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),o=h.computed(()=>t.chartData&&t.chartData.meta&&t.chartData.data.length);return(l,c)=>{const u=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",tD,[o.value?(h.openBlock(),h.createElementBlock("div",eD,[a.value?(h.openBlock(),h.createBlock(JC,{key:0,"chart-data":r.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":i.value,numerator:n.chartOptions.numerator,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","numerator","synthetics-data-key","width"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(u,{key:0,"action-button-visible":!0,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(s.value),1)]),_:1}))])}}}),[["__scopeId","data-v-cb92de46"]]),rD={class:"top-n-card-title","data-testid":"top-n-card-title"},iD={class:"top-n-card-description","data-testid":"top-n-card-description"},aD={key:3,class:"top-n-table","data-testid":"top-n-table"},sD={class:"table-headings"},oD={class:"table-row"},lD={class:"column-1"},cD={class:"column-2"},uD={class:"table-body","data-testid":"top-n-data"},dD=["data-testid"],fD={class:"column-1"},hD={class:"column-2"},pD=Ze(h.defineComponent({__name:"TopNTable",props:{title:{type:String,required:!0},description:{type:String,default:""},data:{type:Object,required:!0},emptyStateTitle:{type:String,default:""},isLoading:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),r=h.computed(()=>t.data.data),i=h.computed(()=>{var b;return!!((b=r.value)!=null&&b.length)}),a=h.computed(()=>{var b,x;return(b=t.data.meta)!=null&&b.display&&((x=Object.keys(t.data.meta.display))==null?void 0:x[0])||""}),s=h.computed(()=>a.value?t.data.meta.display[a.value]:{}),o=h.computed(()=>{var b,x;return(x=(b=t.data.meta)==null?void 0:b.metric_names)!=null&&x.length?t.data.meta.metric_names[0]:""}),l=h.computed(()=>o.value?e.t(`chartLabels.${o.value}`)||o.value:""),c=h.computed(()=>{if(!i.value)return"";if(t.data.meta){if(s.value&&!Object.keys(s.value).length)return e.t("topNTable.errors.display");if(!o.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.meta");return""}),u=b=>{const x=b.event;return String(x[a.value])},d=b=>{const x=u(b),g=s.value&&s.value[x];return g?g.name:"-"},f=b=>{const x=u(b),g=s.value&&s.value[x];return g?!!g.deleted:!1},p=b=>{if(!o.value)return"–";const g=b.event[o.value];return g?ii(g,{capital:!0,round:!0}):"–"};return(b,x)=>{const g=h.resolveComponent("KEmptyState"),m=h.resolveComponent("KSkeleton"),v=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(v,{class:"kong-ui-public-top-n-table","title-tag":n.titleTag},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(g,{key:0,"action-button-visible":!1,"data-testid":"top-n-error-state","icon-variant":"error"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(m,{key:1,"table-columns":2,type:"table"})):i.value?(h.openBlock(),h.createElementBlock("div",aD,[h.createElementVNode("div",sD,[h.createElementVNode("div",oD,[h.createElementVNode("div",lD,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",cD,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",uD,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.value,(y,_)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${_}`,class:"table-row","data-testid":`row-${u(y)}`},[h.createElementVNode("div",fD,[h.renderSlot(b.$slots,"name",{record:{id:u(y),name:d(y),deleted:f(y),dimension:a.value}},()=>[h.createTextVNode(h.toDisplayString(d(y)),1)],!0)]),h.createElementVNode("div",hD," "+h.toDisplayString(p(y)),1)],8,dD))),128))])])):(h.openBlock(),h.createBlock(g,{key:2,"action-button-visible":!1,"data-testid":"top-n-empty-state"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.emptyStateTitle||h.unref(e).t("topNTable.defaultEmptyStateTitle")),1)]),_:1}))]),_:2},[n.title?{name:"title",fn:h.withCtx(()=>[h.createElementVNode("span",rD,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",iD,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1032,["title-tag"])}}}),[["__scopeId","data-v-80a3b24a"]]);at.AnalyticsChart=XC,at.ChartLegendPosition=Wt,at.ChartMetricDisplay=or,at.ChartTypes=ee,at.ChartTypesSimple=ea,at.CsvExportButton=sp,at.CsvExportModal=ap,at.DECIMAL_DISPLAY=_f,at.FONT_SIZE_REGULAR=Tf,at.FONT_SIZE_SMALL=wf,at.MAX_LABEL_LENGTH=aa,at.OTHERS_COLOR=$w,at.SimpleChart=nD,at.TopNTable=pD,at.ValidType=qn,at.accessibleGrey=Cf,at.apiRequestStatusCodeColors=Df,at.codesInSpec=Ef,at.darkenColor=Mf,at.datavisPalette=Qe,at.defaultStatusCodeColors=sa,at.errorRateColors=Yw,at.formatTime=ia,at.latencyColors=Hw,at.lightGrey=Ro,at.lookupColor=jw,at.lookupDatavisColor=cr,at.lookupStatusCodeCategoryColor=Zw,at.lookupStatusCodeColor=Ao,at.numberFormatter=ra,at.statusCodeBadgeBackgroundColor=Ww,at.trafficColors=zw,Object.defineProperty(at,Symbol.toStringTag,{value:"Module"})});
|
|
43
|
+
`);var I=0,it=!1;this.parse=function(B,yt,ut){if(typeof B!="string")throw new Error("Input must be a string");var z=B.length,L=k.length,U=P.length,j=E.length,Z=O(F),K=[],N=[],A=[],Q=I=0;if(!B)return ce();if(S.header&&!yt){var X=B.split(P)[0].split(k),vt=[],ct={},Ot=!1;for(var _t in X){var et=X[_t];O(S.transformHeader)&&(et=S.transformHeader(et,_t));var bt=et,Nt=ct[et]||0;for(0<Nt&&(Ot=!0,bt=et+"_"+Nt),ct[et]=Nt+1;vt.includes(bt);)bt=bt+"_"+Nt;vt.push(bt)}if(Ot){var Me=B.split(P);Me[0]=vt.join(k),B=Me.join(P)}}if($||$!==!1&&B.indexOf(M)===-1){for(var Ee=B.split(P),me=0;me<Ee.length;me++){if(A=Ee[me],I+=A.length,me!==Ee.length-1)I+=P.length;else if(ut)return ce();if(!E||A.substring(0,j)!==E){if(Z){if(K=[],tn(A.split(k)),ye(),it)return ce()}else tn(A.split(k));if(q&&q<=me)return K=K.slice(0,q),ce(!0)}}return ce()}for(var Lt=B.indexOf(k,I),Ft=B.indexOf(P,I),Je=new RegExp(g(Y)+g(M),"g"),Dt=B.indexOf(M,I);;)if(B[I]!==M)if(E&&A.length===0&&B.substring(I,I+j)===E){if(Ft===-1)return ce();I=Ft+U,Ft=B.indexOf(P,I),Lt=B.indexOf(k,I)}else if(Lt!==-1&&(Lt<Ft||Ft===-1))A.push(B.substring(I,Lt)),I=Lt+L,Lt=B.indexOf(k,I);else{if(Ft===-1)break;if(A.push(B.substring(I,Ft)),Ae(Ft+U),Z&&(ye(),it))return ce();if(q&&K.length>=q)return ce(!0)}else for(Dt=I,I++;;){if((Dt=B.indexOf(M,Dt+1))===-1)return ut||N.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:K.length,index:I}),Ce();if(Dt===z-1)return Ce(B.substring(I,Dt).replace(Je,M));if(M!==Y||B[Dt+1]!==Y){if(M===Y||Dt===0||B[Dt-1]!==Y){Lt!==-1&&Lt<Dt+1&&(Lt=B.indexOf(k,Dt+1)),Ft!==-1&&Ft<Dt+1&&(Ft=B.indexOf(P,Dt+1));var Cn=_e(Ft===-1?Lt:Math.min(Lt,Ft));if(B.substr(Dt+1+Cn,L)===k){A.push(B.substring(I,Dt).replace(Je,M)),B[I=Dt+1+Cn+L]!==M&&(Dt=B.indexOf(M,I)),Lt=B.indexOf(k,I),Ft=B.indexOf(P,I);break}var Re=_e(Ft);if(B.substring(Dt+1+Re,Dt+1+Re+U)===P){if(A.push(B.substring(I,Dt).replace(Je,M)),Ae(Dt+1+Re+U),Lt=B.indexOf(k,I),Dt=B.indexOf(M,I),Z&&(ye(),it))return ce();if(q&&K.length>=q)return ce(!0);break}N.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:K.length,index:I}),Dt++}}else Dt++}return Ce();function tn(Kt){K.push(Kt),Q=I}function _e(Kt){var _a=0;if(Kt!==-1){var vr=B.substring(Dt+1,Kt);vr&&vr.trim()===""&&(_a=vr.length)}return _a}function Ce(Kt){return ut||(Kt===void 0&&(Kt=B.substring(I)),A.push(Kt),I=z,tn(A),Z&&ye()),ce()}function Ae(Kt){I=Kt,tn(A),A=[],Ft=B.indexOf(P,I)}function ce(Kt){return{data:K,errors:N,meta:{delimiter:k,linebreak:P,aborted:it,truncated:!!Kt,cursor:Q+(yt||0)}}}function ye(){F(ce()),K=[],N=[]}},this.abort=function(){it=!0},this.getCharIndex=function(){return I}}function b(S){var M=S.data,k=s[M.workerId],P=!1;if(M.error)k.userError(M.error,M.file);else if(M.results&&M.results.data){var E={abort:function(){P=!0,y(M.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_,resume:_};if(O(k.userStep)){for(var F=0;F<M.results.data.length&&(k.userStep({data:M.results.data[F],errors:M.results.errors,meta:M.results.meta},E),!P);F++);delete M.results}else O(k.userChunk)&&(k.userChunk(M.results,E,M.file),delete M.results)}M.finished&&!P&&y(M.workerId,M.results)}function y(S,M){var k=s[S];O(k.userComplete)&&k.userComplete(M),k.terminate(),delete s[S]}function _(){throw new Error("Not implemented.")}function T(S){if(typeof S!="object"||S===null)return S;var M=Array.isArray(S)?[]:{};for(var k in S)M[k]=T(S[k]);return M}function D(S,M){return function(){S.apply(M,arguments)}}function O(S){return typeof S=="function"}return a&&(r.onmessage=function(S){var M=S.data;if(l.WORKER_ID===void 0&&M&&(l.WORKER_ID=M.workerId),typeof M.input=="string")r.postMessage({workerId:l.WORKER_ID,results:l.parse(M.input,M.config),finished:!0});else if(r.File&&M.input instanceof File||M.input instanceof Object){var k=l.parse(M.input,M.config);k&&r.postMessage({workerId:l.WORKER_ID,results:k,finished:!0})}}),(d.prototype=Object.create(u.prototype)).constructor=d,(f.prototype=Object.create(u.prototype)).constructor=f,(p.prototype=Object.create(p.prototype)).constructor=p,(v.prototype=Object.create(u.prototype)).constructor=v,l})})(rp);var LC=rp.exports;const IC=["id"],NC=h.defineComponent({__name:"VueJsonCsv",props:{data:{type:Array,required:!0},fields:{type:Array,required:!1,default:null},labels:{type:Object,required:!1,default:null},filename:{type:String,default:"report-data.csv"},delimiter:{type:String,default:",",required:!1},separatorExcel:{type:Boolean,default:!1},encoding:{type:String,default:"utf-8"},testing:{type:Boolean,required:!1,default:!1}},emits:["export-started","export-finished"],setup(n,{emit:t}){const e=t,r=n,i=h.computed(()=>`export_${new Date().getTime()}`),a=h.computed(()=>{const u=l();return u.length?u:null}),s=()=>{const u=r.labels;if(typeof r.fields!==qn.Object)throw new Error("Labels needs to be a object containing key / value pairs.");return typeof u===qn.Object?d=>nC(d,(f,p)=>u[p]||p):d=>d},o=()=>{const u=r.fields;if(typeof r.fields!==qn.Object&&!Array.isArray(u))throw new Error("Fields needs to be an array of strings.");return Array.isArray(u)?d=>RC(d,u):d=>d},l=()=>{if(typeof r.fields===qn.Undefined&&typeof r.labels===qn.Undefined)return r.data;const u=s(),d=o();return r.data.map(f=>u(d(f)))},c=()=>{if(!(a!=null&&a.value)){console.warn("No data to export");return}e("export-started",a.value);let u=LC.unparse(a.value,Object.assign({delimiter:r.delimiter,encoding:r.encoding}));if(r.separatorExcel&&(u="SEP="+r.delimiter+`\r
|
|
44
|
+
`+u),r.encoding==="utf-8"&&(u="\uFEFF"+u),e("export-finished",r.filename),!r.testing){const d=new Blob([u],{type:"text/csv;charset="+r.encoding});AC.saveAs(d,r.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:i.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,IC))}}),FC=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(r,i)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(NC,{data:r.rows,fields:e.value,filename:r.filename,labels:r.headers},{default:h.withCtx(()=>[h.renderSlot(r.$slots,"default")]),_:3},8,["data","fields","filename","labels"])]))}}),UC={class:"kong-ui-public-csv-export-modal"},BC={key:0,class:"selected-range"},WC={key:1,class:"text-muted",tag:"span"},ip=3,ap=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=Ct.useI18n(),r=n,i=t,a=`${r.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,s=h.ref(!0),o=h.computed(()=>{var x,g;return!!((g=(x=r.chartData)==null?void 0:x.data)!=null&&g.length)}),l=h.ref(1),c=h.computed(()=>p.value.rows.length),u=Ct.useChartSelectedRange(h.toRef(r,"chartData")),d=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(ip,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),f=()=>{i("toggleModal",!1)},p=h.computed(()=>{var T,D,O;if(!o.value||!((T=r.chartData)!=null&&T.meta.metric_names))return{headers:[],rows:[],csvHeaders:{}};const x=r.chartData.data.some(S=>S.timestamp!==r.chartData.data[0].timestamp),g=r.chartData.data.map(S=>{const M=new Date(S.timestamp);return{...Object.keys(S.event).reduce((P,E)=>{if(E in r.chartData.meta.display){const F=S.event[E],q=r.chartData.meta.display[E];P[E]=F&&q&&q[F].name||S.event[E]}else P[E]=S.event[E];return P},{}),...x?{timestamp:Do(M,"yyyy-MM-dd HH:mm:ss"),tzOffset:Do(M,"XXX")}:{}}});let m=[];x&&(m=[{label:e.t("csvExport.Timestamp"),key:"timestamp"},{label:e.t("csvExport.UtcOffset"),key:"tzOffset"}]);const b="display"in r.chartData.meta&&((D=r.chartData.meta)!=null&&D.display)?(O=r.chartData.meta)==null?void 0:O.display:{},y=[...m,...Object.keys(b).map(S=>({label:e.t(`chartLabels.${S}`),key:S})),...r.chartData.meta.metric_names.map(S=>({label:e.t(`chartLabels.${S}`),key:S}))],_=y.reduce((S,M)=>(S[M.key]=M.label,S),{});return{headers:y,csvHeaders:_,rows:g}}),v=()=>{const{rows:x}=p.value;return s.value=!1,{total:Number(x.length)||0,data:x.slice(0,ip)}};return h.watch(p,()=>{l.value++}),(x,g)=>{const m=h.resolveComponent("KEmptyState"),b=h.resolveComponent("KTable"),y=h.resolveComponent("KButton"),_=h.resolveComponent("KModal");return h.openBlock(),h.createElementBlock("div",UC,[h.createVNode(_,{class:"vitals-report","data-testid":"csv-export-modal","show-dismiss-icon":"",title:h.unref(e).t("csvExport.exportPreview"),visible:"",onCancel:f,onKeyup:h.withKeys(f,["esc"])},{default:h.withCtx(()=>{var T;return[h.createElementVNode("div",null,[o.value?(h.openBlock(),h.createElementBlock("div",BC,[h.createElementVNode("p",null,h.toDisplayString(x.modalDescription?x.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(h.unref(u)),1)])):h.createCommentVNode("",!0),h.createVNode(b,{class:"vitals-table","disable-pagination":"","disable-sorting":"",fetcher:v,"fetcher-cache-key":String(l.value),"has-hover":!1,headers:((T=p.value)==null?void 0:T.headers)||[]},{"empty-state":h.withCtx(()=>[h.createVNode(m,{"action-button-visible":!1},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),default:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!s.value&&o.value?(h.openBlock(),h.createElementBlock("div",WC,h.toDisplayString(d.value),1)):h.createCommentVNode("",!0)])]}),"footer-actions":h.withCtx(()=>[h.createVNode(y,{appearance:"tertiary",class:"cancel-btn",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(FC,{class:"vitals-report-export-button",filename:a,headers:p.value.csvHeaders,rows:p.value.rows},{default:h.withCtx(()=>[h.createVNode(y,{appearance:"primary","data-testid":"csv-download-button",disabled:s.value||!o.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.downloadButton")),1)]),_:1},8,["disabled"])]),_:1},8,["headers","rows"])]),_:1},8,["title"])])}}}),sp=h.defineComponent({__name:"CsvExportButton",props:{data:{type:Object,required:!0},text:{type:String,required:!1,default:void 0},buttonAppearance:{type:String,required:!1,default:()=>"tertiary"},filenamePrefix:{type:String,required:!1,default:void 0}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),r=h.computed(()=>t.filenamePrefix||e.t("csvExport.defaultFilename")),i=h.ref(!1),a=o=>{i.value=o},s=()=>{a(!0)};return(o,l)=>{const c=h.resolveComponent("KButton");return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(c,{appearance:n.buttonAppearance,class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(s,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.text||h.unref(e).t("csvExport.exportButton")),1)]),_:1},8,["appearance"]),i.value?(h.openBlock(),h.createBlock(ap,{key:0,"chart-data":n.data,filename:r.value,onToggleModal:a},null,8,["chart-data","filename"])):h.createCommentVNode("",!0)],64)}}}),zC={class:"analytics-chart-shell"},YC={key:0,class:"chart-header"},HC={key:0,class:"chart-title"},$C={class:"chart-header-icons-wrapper"},jC={key:1,class:"chart-export-button"},VC={key:2,class:"analytics-chart-parent"},qC=h.defineComponent({__name:"AnalyticsChart",props:{allowCsvExport:{type:Boolean,required:!1,default:!1},chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!1,default:""},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:""},filenamePrefix:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},syntheticsDataKey:{type:String,required:!1,default:""},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),r=h.toRef(t,"chartData"),i=h.computed(()=>p.value?Ct.useExploreResultToTimeDataset({fill:t.chartOptions.stacked,colorPalette:t.chartOptions.chartDatasetColors||sa},h.toRef(t,"chartData")).value:Ct.useExploreResultToDatasets({fill:t.chartOptions.stacked,colorPalette:t.chartOptions.chartDatasetColors||sa},h.toRef(t,"chartData")).value),a=h.computed(()=>{var k;return(k=t.chartData)!=null&&k.meta?"start_ms"in t.chartData.meta?t.chartData.meta.end_ms-t.chartData.meta.start_ms:void 0:0}),s=h.computed(()=>{var k;return(k=t.chartData.meta)!=null&&k.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),o=h.computed(()=>t.showLegendValues&&t.legendPosition!==Wt.Bottom),{legendValues:l}=Ct.useChartLegendValues(i,t.chartOptions.type,s),c=h.computed(()=>{var k,P,E;return((E=(P=(k=t.chartData)==null?void 0:k.meta)==null?void 0:P.limit)==null?void 0:E.toString())||null}),u=h.computed(()=>{var k,P;return((P=(k=t.chartData)==null?void 0:k.meta)==null?void 0:P.truncated)||!1}),d=e.t("limitedResultsShown",{maxReturned:c.value}),f=h.computed(()=>[ee.VERTICAL_BAR.toString(),ee.HORIZONTAL_BAR.toString()].includes(t.chartOptions.type)),p=h.computed(()=>[ee.TIMESERIES_BAR,ee.TIMESERIES_LINE].some(k=>k===t.chartOptions.type)),v=h.computed(()=>t.chartOptions.type===ee.DOUGHNUT),x=h.computed(()=>t.chartOptions.type.includes("Vertical")?"vertical":"horizontal"),g=h.computed(()=>{var E,F,q;if(!((E=t.chartData)!=null&&E.meta.metric_names)||!((F=t.chartData)!=null&&F.meta.metric_units))return;const k=t.chartData.meta.metric_names[0],P=t.chartData.meta.metric_units[k];return((q=t.chartOptions)==null?void 0:q.metricAxesTitle)||e.te(`metricAxisTitles.${k}`)&&e.te(`chartUnits.${P}`)&&e.t(`metricAxisTitles.${k}`,{unit:e.t(`chartUnits.${P}`,{plural:"s"})})||void 0}),m=h.computed(()=>{const k=p.value?"Time":Object.keys(t.chartData.meta.display||t.chartData.meta.metric_names)[0];return t.chartOptions.dimensionAxesTitle||e.te(`chartLabels.${k}`)&&e.t(`chartLabels.${k}`)||void 0}),b=h.computed(()=>{const k=jl(Number(t.chartData.meta.granularity_ms));return e.t(`granularityAxisTitles.${k}`)}),y=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),_=h.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),T=h.computed(()=>p.value?O_(i.value):t.chartData&&t.chartData.meta&&t.chartData.data.length),D=h.computed(()=>T.value&&u.value&&c.value||t.chartTitle||t.allowCsvExport&&T.value),O=h.computed(()=>t.chartData.meta.granularity_ms?jl(t.chartData.meta.granularity_ms)||"hourly":jl(new Date(t.chartData.data[1].timestamp).getTime()-new Date(t.chartData.data[0].timestamp).getTime())||"hourly"),S=h.computed(()=>t.chartOptions.chartLegendSortFn?t.chartOptions.chartLegendSortFn:(k,P)=>k.text===e.t("chartLabels.____OTHER____")?1:P.text===e.t("chartLabels.____OTHER____")?-1:typeof parseInt(k.text,10)=="number"&&typeof parseInt(P.text,10)=="number"?k.text<P.text?-1:1:k.value&&P.value?P.value.raw-k.value.raw:0),M=h.computed(()=>t.chartOptions.chartTooltipSortFn?t.chartOptions.chartTooltipSortFn:(k,P)=>k.label===e.t("chartLabels.____OTHER____")?1:P.label===e.t("chartLabels.____OTHER____")?-1:typeof parseInt(k.label,10)=="number"&&typeof parseInt(P.label,10)=="number"?k.label<P.label?-1:1:k.value&&P.value?P.rawValue-k.rawValue:0);return h.provide("showLegendValues",o),h.provide("legendPosition",h.toRef(t,"legendPosition")),(k,P)=>{const E=h.resolveComponent("KTooltip"),F=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",zC,[D.value?(h.openBlock(),h.createElementBlock("div",YC,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",HC,h.toDisplayString(n.chartTitle),1)):h.createCommentVNode("",!0),h.createElementVNode("div",$C,[T.value&&u.value&&c.value?(h.openBlock(),h.createBlock(E,{key:0,class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(d)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(XT),{color:h.unref(KT),decorative:"",size:h.unref(QT)},null,8,["color","size"])]),_:1})):h.createCommentVNode("",!0)]),n.allowCsvExport&&T.value?(h.openBlock(),h.createElementBlock("div",jC,[h.createVNode(sp,{data:r.value,"filename-prefix":n.filenamePrefix},null,8,["data","filename-prefix"])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),T.value?(h.openBlock(),h.createElementBlock("div",VC,[p.value?(h.openBlock(),h.createBlock(tC,{key:0,"chart-data":i.value,"chart-legend-sort-fn":S.value,"chart-tooltip-sort-fn":M.value,"dimension-axes-title":b.value,fill:n.chartOptions.stacked,granularity:O.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":a.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","tooltip-title","type"])):f.value?(h.openBlock(),h.createBlock(wS,{key:1,annotations:n.showAnnotations,"chart-data":i.value,"chart-legend-sort-fn":S.value,"chart-tooltip-sort-fn":M.value,"data-testid":"bar-chart-container","dimension-axes-title":m.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,orientation:x.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["annotations","chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","stacked","synthetics-data-key","tooltip-title"])):v.value?(h.openBlock(),h.createBlock(LS,{key:2,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors||h.unref(sa),"legend-position":n.legendPosition,"legend-values":h.unref(l),"metric-unit":s.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["chart-data","dataset-colors","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(F,{key:1,"action-button-visible":!1,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(y.value),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(_.value),1)]),_:1}))])}}}),XC=Ze(qC,[["__scopeId","data-v-f5c861d0"]]),GC={class:"chart-parent","data-testid":"doughnut-chart-parent"},KC={class:"chart-totals-flex"},QC={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},ZC=h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:or.Hidden},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Qe},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),r=h.ref(Sn()),i=h.computed(()=>[t.chartData.datasets.reduce((v,x)=>(v.labels.push(x.label),v.borderColor.push(x.backgroundColor),v.backgroundColor.push(x.backgroundColor),v.data.push(x.data.reduce((g,m)=>g+m,0)),v),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),a=h.computed(()=>({...t.chartData,datasets:i.value}));Ct.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const s={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},o=h.ref(),l=h.computed(()=>{var p;return ii((p=i==null?void 0:i.value[0])==null?void 0:p.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var p,v;return ii(((p=i==null?void 0:i.value[0])==null?void 0:p.data[0])+((v=i==null?void 0:i.value[0])==null?void 0:v.data[1]),{capital:!0})}),u=h.computed(()=>{var p;return`color: ${(p=i==null?void 0:i.value[0])==null?void 0:p.backgroundColor[t.numerator]}`}),d=h.computed(()=>[or.Full,or.SingleMetric].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay===or.Full);return(p,v)=>(h.openBlock(),h.createElementBlock("div",GC,[h.createElementVNode("div",KC,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",QC,h.toDisplayString(h.unref(e).t("total"))+": "+h.toDisplayString(c.value),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({height:n.height,width:n.width})},[h.createVNode(h.unref(Dh),{ref_key:"chartInstance",ref:o,"chart-id":r.value,data:a.value,options:s},null,8,["chart-id","data","options"])],4)]))}}),JC=Ze(ZC,[["__scopeId","data-v-5871cb7a"]]),tD={class:"simple-chart-shell"},eD={key:1,class:"analytics-chart-parent"},nD=Ze(h.defineComponent({__name:"SimpleChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},emptyStateTitle:{type:String,required:!1,default:""},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),r=h.computed(()=>{var c;const l=Ct.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||Qe},h.toRef(t,"chartData")).value;return(c=t.chartOptions)!=null&&c.reverseDataset&&(l==null||l.datasets.reverse()),l}),i=h.computed(()=>{var l;return(l=t.chartData.meta)!=null&&l.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),a=h.computed(()=>t.chartOptions.type===ea.GAUGE),s=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),o=h.computed(()=>t.chartData&&t.chartData.meta&&t.chartData.data.length);return(l,c)=>{const u=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",tD,[o.value?(h.openBlock(),h.createElementBlock("div",eD,[a.value?(h.openBlock(),h.createBlock(JC,{key:0,"chart-data":r.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":i.value,numerator:n.chartOptions.numerator,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","numerator","synthetics-data-key","width"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(u,{key:0,"action-button-visible":!0,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(s.value),1)]),_:1}))])}}}),[["__scopeId","data-v-cb92de46"]]),rD={class:"top-n-card-title","data-testid":"top-n-card-title"},iD={class:"top-n-card-description","data-testid":"top-n-card-description"},aD={key:3,class:"top-n-table","data-testid":"top-n-table"},sD={class:"table-headings"},oD={class:"table-row"},lD={class:"column-1"},cD={class:"column-2"},uD={class:"table-body","data-testid":"top-n-data"},dD=["data-testid"],fD={class:"column-1"},hD={class:"column-2"},pD=Ze(h.defineComponent({__name:"TopNTable",props:{title:{type:String,required:!0},description:{type:String,default:""},data:{type:Object,required:!0},emptyStateTitle:{type:String,default:""},isLoading:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(n){const t=n,{i18n:e}=Ct.useI18n(),r=h.computed(()=>t.data.data),i=h.computed(()=>{var v;return!!((v=r.value)!=null&&v.length)}),a=h.computed(()=>{var v,x;return(v=t.data.meta)!=null&&v.display&&((x=Object.keys(t.data.meta.display))==null?void 0:x[0])||""}),s=h.computed(()=>a.value?t.data.meta.display[a.value]:{}),o=h.computed(()=>{var v,x;return(x=(v=t.data.meta)==null?void 0:v.metric_names)!=null&&x.length?t.data.meta.metric_names[0]:""}),l=h.computed(()=>o.value?e.t(`chartLabels.${o.value}`)||o.value:""),c=h.computed(()=>{if(!i.value)return"";if(t.data.meta){if(s.value&&!Object.keys(s.value).length)return e.t("topNTable.errors.display");if(!o.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.meta");return""}),u=v=>{const x=v.event;return String(x[a.value])},d=v=>{const x=u(v),g=s.value&&s.value[x];return g?g.name:"-"},f=v=>{const x=u(v),g=s.value&&s.value[x];return g?!!g.deleted:!1},p=v=>{if(!o.value)return"–";const g=v.event[o.value];return g?ii(g,{capital:!0,round:!0}):"–"};return(v,x)=>{const g=h.resolveComponent("KEmptyState"),m=h.resolveComponent("KSkeleton"),b=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(b,{class:"kong-ui-public-top-n-table","title-tag":n.titleTag},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(g,{key:0,"action-button-visible":!1,"data-testid":"top-n-error-state","icon-variant":"error"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(m,{key:1,"table-columns":2,type:"table"})):i.value?(h.openBlock(),h.createElementBlock("div",aD,[h.createElementVNode("div",sD,[h.createElementVNode("div",oD,[h.createElementVNode("div",lD,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",cD,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",uD,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.value,(y,_)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${_}`,class:"table-row","data-testid":`row-${u(y)}`},[h.createElementVNode("div",fD,[h.renderSlot(v.$slots,"name",{record:{id:u(y),name:d(y),deleted:f(y),dimension:a.value}},()=>[h.createTextVNode(h.toDisplayString(d(y)),1)],!0)]),h.createElementVNode("div",hD," "+h.toDisplayString(p(y)),1)],8,dD))),128))])])):(h.openBlock(),h.createBlock(g,{key:2,"action-button-visible":!1,"data-testid":"top-n-empty-state"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.emptyStateTitle||h.unref(e).t("topNTable.defaultEmptyStateTitle")),1)]),_:1}))]),_:2},[n.title?{name:"title",fn:h.withCtx(()=>[h.createElementVNode("span",rD,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",iD,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1032,["title-tag"])}}}),[["__scopeId","data-v-80a3b24a"]]);at.AnalyticsChart=XC,at.ChartLegendPosition=Wt,at.ChartMetricDisplay=or,at.ChartTypes=ee,at.ChartTypesSimple=ea,at.CsvExportButton=sp,at.CsvExportModal=ap,at.DECIMAL_DISPLAY=_f,at.FONT_SIZE_REGULAR=Tf,at.FONT_SIZE_SMALL=wf,at.MAX_LABEL_LENGTH=aa,at.OTHERS_COLOR=$w,at.SimpleChart=nD,at.TopNTable=pD,at.ValidType=qn,at.accessibleGrey=Cf,at.apiRequestStatusCodeColors=Df,at.codesInSpec=Ef,at.darkenColor=Mf,at.datavisPalette=Qe,at.defaultStatusCodeColors=sa,at.errorRateColors=Yw,at.formatTime=ia,at.latencyColors=Hw,at.lightGrey=Ro,at.lookupColor=jw,at.lookupDatavisColor=cr,at.lookupStatusCodeCategoryColor=Zw,at.lookupStatusCodeColor=Ao,at.numberFormatter=ra,at.statusCodeBadgeBackgroundColor=Ww,at.trafficColors=zw,Object.defineProperty(at,Symbol.toStringTag,{value:"Module"})});
|