-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.js
32 lines (32 loc) · 341 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(function(){"use strict";const rv="";function ne(e,t,s,i,n,r,a,o){var l=typeof e=="function"?e.options:e;t&&(l.render=t,l.staticRenderFns=s,l._compiled=!0),i&&(l.functional=!0),r&&(l._scopeId="data-v-"+r);var c;if(a?(c=function(f){f=f||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!f&&typeof __VUE_SSR_CONTEXT__<"u"&&(f=__VUE_SSR_CONTEXT__),n&&n.call(this,f),f&&f._registeredComponents&&f._registeredComponents.add(a)},l._ssrRegister=c):n&&(c=o?function(){n.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:n),c)if(l.functional){l._injectStyles=c;var h=l.render;l.render=function(g,m){return c.call(m),h(g,m)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:l}}var qh=ne({extends:"k-pages-section",data(){return{isLoading:!0,error:""}},props:{sectionName:{type:String,required:!0},dateFrom:{type:String,default:null},dateTo:{type:String,default:null}},created(){this.load()},computed:{},watch:{dateFrom(){this.load(!0)},dateTo(){this.load(!0)}},methods:{dateQueryString(e="?"){return!this.dateFrom||!this.dateTo?"":""+e+"dateFrom="+this.dateFrom+"&dateTo="+this.dateTo},async load(e){var t;e||(this.isLoading=!0),this.isProcessing=!0;try{const s=await this.$api.get("simplestats/"+this.sectionName+this.dateQueryString());this.loadData(s)}catch(s){this.error=s.message,this.$store.dispatch("notification/error",(t=s.message)!=null?t:"Unknown error")}finally{this.isLoading=!1,this.isProcessing=!1}},loadData(e){}}},null,null,!1,null,null,null,null);const Ys=qh.exports,cv="",Xh={components:{},mounted(){},data(){return{searchterm:null,sortBy:null,sortAsc:!0}},props:{label:{type:String,default:""},columns:{type:Object,default(){return{}}},rows:{type:Array,default(){return[]}}},computed:{isSearchable(){return(this.rows&&this.rows.length>=0)===!1||(this.columns&&Object.keys(this.columns).length>=0)===!1?!1:Object.values(this.columns).some(e=>e.search===!0)},sortedFilteredRows(){return this.rows.filter((e,t)=>{var s,i;if(!((s=this.searchterm)!=null&&s.length))return!0;for(const[n,r]of Object.entries(this.columns))if(r.search===!0){if(typeof e[n]=="object")continue;const a=String(e[n]);if(a&&a.includes(this.searchterm))return!0}return(i=e.slug)==null?void 0:i.includes(this.searchterm)}).sort((e,t)=>{if(this.sortBy===null)return 0;const s=this.columns[this.sortBy],i=s.type==="number"||s.type==="percentage"?Number(e[this.sortBy]):String(e[this.sortBy]),n=s.type==="number"||s.type==="percentage"?Number(t[this.sortBy]):String(t[this.sortBy]);return i>n?this.sortAsc?-1:1:i<n?this.sortAsc?1:-1:0})}},methods:{cancelSearch(){this.searchterm=null},onHeaderClick(e){e.column.sortable&&(this.sortBy!==e.columnIndex?(this.sortBy=e.columnIndex,this.sortAsc=!0):this.sortAsc?this.sortAsc=!1:this.sortBy=null)}}};var Kh=function(){var t=this,s=t._self._c;return s("div",{staticClass:"ss-table"},[s("header",{staticClass:"k-section-header"},[s("k-headline",{attrs:{size:""}},[t._v(" "+t._s(t.label)+" ")]),s("k-button-group",{staticClass:"ss-table-buttons"},[t.isSearchable?s("k-input",{staticClass:"k-models-section-search k-button",attrs:{autofocus:!1,placeholder:t.$t("simplestats.table.filter","Filter items \u2026"),type:"text",icon:"search"},on:{keydown:function(i){return!i.type.indexOf("key")&&t._k(i.keyCode,"esc",27,i.key,["Esc","Escape"])?null:t.cancelSearch.apply(null,arguments)}},model:{value:t.searchterm,callback:function(i){t.searchterm=i},expression:"searchterm"}}):t._e()],1)],1),s("k-table",{attrs:{columns:t.columns,rows:t.sortedFilteredRows,layout:"table",sortable:!1,size:"tiny",empty:t.searchterm&&t.searchterm.length?"No Search results...":t.$t("simplestats.nodatayet")},on:{header:t.onHeaderClick}})],1)},Zh=[],Jh=ne(Xh,Kh,Zh,!1,null,null,null,null);const un=Jh.exports,hv="",Qh={extends:Ys,data(){return{rows:[],columns:{}}},components:{SearchableTable:un},methods:{loadData(e){this.columns=e.columns,this.rows=e.rows}}};var tu=function(){var t=this,s=t._self._c;return s("k-grid",[s("k-column",[s("k-headline",{attrs:{size:"large"}},[t._v(t._s(t.$t("simplestats.info.config.currentusers.title","Visitors (current sessions)")))]),s("searchable-table",{attrs:{rows:t.rows,columns:t.columns}}),s("k-box",{attrs:{theme:"info",text:t.$t("simplestats.info.config.currentusers.info")}})],1)],1)},eu=[],su=ne(Qh,tu,eu,!1,null,null,null,null);const iu=su.exports;/*!
* Chart.js v3.9.1
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/function He(){}const nu=function(){let e=0;return function(){return e++}}();function ft(e){return e===null||typeof e>"u"}function wt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function it(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}const Yt=e=>(typeof e=="number"||e instanceof Number)&&isFinite(+e);function de(e,t){return Yt(e)?e:t}function q(e,t){return typeof e>"u"?t:e}const ru=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:e/t,Io=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function St(e,t,s){if(e&&typeof e.call=="function")return e.apply(s,t)}function pt(e,t,s,i){let n,r,a;if(wt(e))if(r=e.length,i)for(n=r-1;n>=0;n--)t.call(s,e[n],n);else for(n=0;n<r;n++)t.call(s,e[n],n);else if(it(e))for(a=Object.keys(e),r=a.length,n=0;n<r;n++)t.call(s,e[a[n]],a[n])}function dn(e,t){let s,i,n,r;if(!e||!t||e.length!==t.length)return!1;for(s=0,i=e.length;s<i;++s)if(n=e[s],r=t[s],n.datasetIndex!==r.datasetIndex||n.index!==r.index)return!1;return!0}function fn(e){if(wt(e))return e.map(fn);if(it(e)){const t=Object.create(null),s=Object.keys(e),i=s.length;let n=0;for(;n<i;++n)t[s[n]]=fn(e[s[n]]);return t}return e}function No(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function au(e,t,s,i){if(!No(e))return;const n=t[e],r=s[e];it(n)&&it(r)?fi(n,r,i):t[e]=fn(r)}function fi(e,t,s){const i=wt(t)?t:[t],n=i.length;if(!it(e))return e;s=s||{};const r=s.merger||au;for(let a=0;a<n;++a){if(t=i[a],!it(t))continue;const o=Object.keys(t);for(let l=0,c=o.length;l<c;++l)r(o[l],e,t,s)}return e}function gi(e,t){return fi(e,t,{merger:ou})}function ou(e,t,s){if(!No(e))return;const i=t[e],n=s[e];it(i)&&it(n)?gi(i,n):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=fn(n))}const zo={"":e=>e,x:e=>e.x,y:e=>e.y};function ns(e,t){return(zo[t]||(zo[t]=lu(t)))(e)}function lu(e){const t=cu(e);return s=>{for(const i of t){if(i==="")break;s=s&&s[i]}return s}}function cu(e){const t=e.split("."),s=[];let i="";for(const n of t)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(s.push(i),i="");return s}function Ir(e){return e.charAt(0).toUpperCase()+e.slice(1)}const fe=e=>typeof e<"u",rs=e=>typeof e=="function",Yo=(e,t)=>{if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0};function hu(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const At=Math.PI,mt=2*At,uu=mt+At,gn=Number.POSITIVE_INFINITY,du=At/180,zt=At/2,pi=At/4,Vo=At*2/3,ge=Math.log10,Re=Math.sign;function $o(e){const t=Math.round(e);e=mi(e,t,e/1e3)?t:e;const s=Math.pow(10,Math.floor(ge(e))),i=e/s;return(i<=1?1:i<=2?2:i<=5?5:10)*s}function fu(e){const t=[],s=Math.sqrt(e);let i;for(i=1;i<s;i++)e%i===0&&(t.push(i),t.push(e/i));return s===(s|0)&&t.push(s),t.sort((n,r)=>n-r).pop(),t}function Vs(e){return!isNaN(parseFloat(e))&&isFinite(e)}function mi(e,t,s){return Math.abs(e-t)<s}function gu(e,t){const s=Math.round(e);return s-t<=e&&s+t>=e}function Wo(e,t,s){let i,n,r;for(i=0,n=e.length;i<n;i++)r=e[i][s],isNaN(r)||(t.min=Math.min(t.min,r),t.max=Math.max(t.max,r))}function we(e){return e*(At/180)}function Nr(e){return e*(180/At)}function Ho(e){if(!Yt(e))return;let t=1,s=0;for(;Math.round(e*t)/t!==e;)t*=10,s++;return s}function Bo(e,t){const s=t.x-e.x,i=t.y-e.y,n=Math.sqrt(s*s+i*i);let r=Math.atan2(i,s);return r<-.5*At&&(r+=mt),{angle:r,distance:n}}function zr(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function pu(e,t){return(e-t+uu)%mt-At}function le(e){return(e%mt+mt)%mt}function bi(e,t,s,i){const n=le(e),r=le(t),a=le(s),o=le(r-n),l=le(a-n),c=le(n-r),h=le(n-a);return n===r||n===a||i&&r===a||o>l&&c<h}function Zt(e,t,s){return Math.max(t,Math.min(s,e))}function mu(e){return Zt(e,-32768,32767)}function Be(e,t,s,i=1e-6){return e>=Math.min(t,s)-i&&e<=Math.max(t,s)+i}function Yr(e,t,s){s=s||(a=>e[a]<t);let i=e.length-1,n=0,r;for(;i-n>1;)r=n+i>>1,s(r)?n=r:i=r;return{lo:n,hi:i}}const vs=(e,t,s,i)=>Yr(e,s,i?n=>e[n][t]<=s:n=>e[n][t]<s),bu=(e,t,s)=>Yr(e,s,i=>e[i][t]>=s);function _u(e,t,s){let i=0,n=e.length;for(;i<n&&e[i]<t;)i++;for(;n>i&&e[n-1]>s;)n--;return i>0||n<e.length?e.slice(i,n):e}const jo=["push","pop","shift","splice","unshift"];function yu(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),jo.forEach(s=>{const i="_onData"+Ir(s),n=e[s];Object.defineProperty(e,s,{configurable:!0,enumerable:!1,value(...r){const a=n.apply(this,r);return e._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...r)}),a}})})}function Uo(e,t){const s=e._chartjs;if(!s)return;const i=s.listeners,n=i.indexOf(t);n!==-1&&i.splice(n,1),!(i.length>0)&&(jo.forEach(r=>{delete e[r]}),delete e._chartjs)}function Go(e){const t=new Set;let s,i;for(s=0,i=e.length;s<i;++s)t.add(e[s]);return t.size===i?e:Array.from(t)}const qo=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Xo(e,t,s){const i=s||(a=>Array.prototype.slice.call(a));let n=!1,r=[];return function(...a){r=i(a),n||(n=!0,qo.call(window,()=>{n=!1,e.apply(t,r)}))}}function vu(e,t){let s;return function(...i){return t?(clearTimeout(s),s=setTimeout(e,t,i)):e.apply(this,i),t}}const Vr=e=>e==="start"?"left":e==="end"?"right":"center",Jt=(e,t,s)=>e==="start"?t:e==="end"?s:(t+s)/2,xu=(e,t,s,i)=>e===(i?"left":"right")?s:e==="center"?(t+s)/2:t;function Ko(e,t,s){const i=t.length;let n=0,r=i;if(e._sorted){const{iScale:a,_parsed:o}=e,l=a.axis,{min:c,max:h,minDefined:u,maxDefined:f}=a.getUserBounds();u&&(n=Zt(Math.min(vs(o,a.axis,c).lo,s?i:vs(t,l,a.getPixelForValue(c)).lo),0,i-1)),f?r=Zt(Math.max(vs(o,a.axis,h,!0).hi+1,s?0:vs(t,l,a.getPixelForValue(h),!0).hi+1),n,i)-n:r=i-n}return{start:n,count:r}}function Zo(e){const{xScale:t,yScale:s,_scaleRanges:i}=e,n={xmin:t.min,xmax:t.max,ymin:s.min,ymax:s.max};if(!i)return e._scaleRanges=n,!0;const r=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==s.min||i.ymax!==s.max;return Object.assign(i,n),r}const pn=e=>e===0||e===1,Jo=(e,t,s)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*mt/s)),Qo=(e,t,s)=>Math.pow(2,-10*e)*Math.sin((e-t)*mt/s)+1,_i={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*zt)+1,easeOutSine:e=>Math.sin(e*zt),easeInOutSine:e=>-.5*(Math.cos(At*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>pn(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>pn(e)?e:Jo(e,.075,.3),easeOutElastic:e=>pn(e)?e:Qo(e,.075,.3),easeInOutElastic(e){return pn(e)?e:e<.5?.5*Jo(e*2,.1125,.45):.5+.5*Qo(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-_i.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?_i.easeInBounce(e*2)*.5:_i.easeOutBounce(e*2-1)*.5+.5};/*!
* @kurkle/color v0.2.1
* https://github.com/kurkle/color#readme
* (c) 2022 Jukka Kurkela
* Released under the MIT License
*/function yi(e){return e+.5|0}const as=(e,t,s)=>Math.max(Math.min(e,s),t);function vi(e){return as(yi(e*2.55),0,255)}function os(e){return as(yi(e*255),0,255)}function je(e){return as(yi(e/2.55)/100,0,1)}function tl(e){return as(yi(e*100),0,100)}const pe={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},$r=[..."0123456789ABCDEF"],wu=e=>$r[e&15],Su=e=>$r[(e&240)>>4]+$r[e&15],mn=e=>(e&240)>>4===(e&15),ku=e=>mn(e.r)&&mn(e.g)&&mn(e.b)&&mn(e.a);function Mu(e){var t=e.length,s;return e[0]==="#"&&(t===4||t===5?s={r:255&pe[e[1]]*17,g:255&pe[e[2]]*17,b:255&pe[e[3]]*17,a:t===5?pe[e[4]]*17:255}:(t===7||t===9)&&(s={r:pe[e[1]]<<4|pe[e[2]],g:pe[e[3]]<<4|pe[e[4]],b:pe[e[5]]<<4|pe[e[6]],a:t===9?pe[e[7]]<<4|pe[e[8]]:255})),s}const Du=(e,t)=>e<255?t(e):"";function Cu(e){var t=ku(e)?wu:Su;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Du(e.a,t):void 0}const Ou=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function el(e,t,s){const i=t*Math.min(s,1-s),n=(r,a=(r+e/30)%12)=>s-i*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function Pu(e,t,s){const i=(n,r=(n+e/60)%6)=>s-s*t*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function Tu(e,t,s){const i=el(e,1,.5);let n;for(t+s>1&&(n=1/(t+s),t*=n,s*=n),n=0;n<3;n++)i[n]*=1-t-s,i[n]+=t;return i}function Au(e,t,s,i,n){return e===n?(t-s)/i+(t<s?6:0):t===n?(s-e)/i+2:(e-t)/i+4}function Wr(e){const s=e.r/255,i=e.g/255,n=e.b/255,r=Math.max(s,i,n),a=Math.min(s,i,n),o=(r+a)/2;let l,c,h;return r!==a&&(h=r-a,c=o>.5?h/(2-r-a):h/(r+a),l=Au(s,i,n,h,r),l=l*60+.5),[l|0,c||0,o]}function Hr(e,t,s,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,s,i)).map(os)}function Br(e,t,s){return Hr(el,e,t,s)}function Lu(e,t,s){return Hr(Tu,e,t,s)}function Ru(e,t,s){return Hr(Pu,e,t,s)}function sl(e){return(e%360+360)%360}function Fu(e){const t=Ou.exec(e);let s=255,i;if(!t)return;t[5]!==i&&(s=t[6]?vi(+t[5]):os(+t[5]));const n=sl(+t[2]),r=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?i=Lu(n,r,a):t[1]==="hsv"?i=Ru(n,r,a):i=Br(n,r,a),{r:i[0],g:i[1],b:i[2],a:s}}function Eu(e,t){var s=Wr(e);s[0]=sl(s[0]+t),s=Br(s),e.r=s[0],e.g=s[1],e.b=s[2]}function Iu(e){if(!e)return;const t=Wr(e),s=t[0],i=tl(t[1]),n=tl(t[2]);return e.a<255?`hsla(${s}, ${i}%, ${n}%, ${je(e.a)})`:`hsl(${s}, ${i}%, ${n}%)`}const il={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},nl={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Nu(){const e={},t=Object.keys(nl),s=Object.keys(il);let i,n,r,a,o;for(i=0;i<t.length;i++){for(a=o=t[i],n=0;n<s.length;n++)r=s[n],o=o.replace(r,il[r]);r=parseInt(nl[a],16),e[o]=[r>>16&255,r>>8&255,r&255]}return e}let bn;function zu(e){bn||(bn=Nu(),bn.transparent=[0,0,0,0]);const t=bn[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Yu=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Vu(e){const t=Yu.exec(e);let s=255,i,n,r;if(t){if(t[7]!==i){const a=+t[7];s=t[8]?vi(a):as(a*255,0,255)}return i=+t[1],n=+t[3],r=+t[5],i=255&(t[2]?vi(i):as(i,0,255)),n=255&(t[4]?vi(n):as(n,0,255)),r=255&(t[6]?vi(r):as(r,0,255)),{r:i,g:n,b:r,a:s}}}function $u(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${je(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const jr=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,$s=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Wu(e,t,s){const i=$s(je(e.r)),n=$s(je(e.g)),r=$s(je(e.b));return{r:os(jr(i+s*($s(je(t.r))-i))),g:os(jr(n+s*($s(je(t.g))-n))),b:os(jr(r+s*($s(je(t.b))-r))),a:e.a+s*(t.a-e.a)}}function _n(e,t,s){if(e){let i=Wr(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*s,t===0?360:1)),i=Br(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function rl(e,t){return e&&Object.assign(t||{},e)}function al(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=os(e[3]))):(t=rl(e,{r:0,g:0,b:0,a:1}),t.a=os(t.a)),t}function Hu(e){return e.charAt(0)==="r"?Vu(e):Fu(e)}class yn{constructor(t){if(t instanceof yn)return t;const s=typeof t;let i;s==="object"?i=al(t):s==="string"&&(i=Mu(t)||zu(t)||Hu(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=rl(this._rgb);return t&&(t.a=je(t.a)),t}set rgb(t){this._rgb=al(t)}rgbString(){return this._valid?$u(this._rgb):void 0}hexString(){return this._valid?Cu(this._rgb):void 0}hslString(){return this._valid?Iu(this._rgb):void 0}mix(t,s){if(t){const i=this.rgb,n=t.rgb;let r;const a=s===r?.5:s,o=2*a-1,l=i.a-n.a,c=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;r=1-c,i.r=255&c*i.r+r*n.r+.5,i.g=255&c*i.g+r*n.g+.5,i.b=255&c*i.b+r*n.b+.5,i.a=a*i.a+(1-a)*n.a,this.rgb=i}return this}interpolate(t,s){return t&&(this._rgb=Wu(this._rgb,t._rgb,s)),this}clone(){return new yn(this.rgb)}alpha(t){return this._rgb.a=os(t),this}clearer(t){const s=this._rgb;return s.a*=1-t,this}greyscale(){const t=this._rgb,s=yi(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=s,this}opaquer(t){const s=this._rgb;return s.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return _n(this._rgb,2,t),this}darken(t){return _n(this._rgb,2,-t),this}saturate(t){return _n(this._rgb,1,t),this}desaturate(t){return _n(this._rgb,1,-t),this}rotate(t){return Eu(this._rgb,t),this}}function ol(e){return new yn(e)}function ll(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function cl(e){return ll(e)?e:ol(e)}function Ur(e){return ll(e)?e:ol(e).saturate(.5).darken(.1).hexString()}const xs=Object.create(null),Gr=Object.create(null);function xi(e,t){if(!t)return e;const s=t.split(".");for(let i=0,n=s.length;i<n;++i){const r=s[i];e=e[r]||(e[r]=Object.create(null))}return e}function qr(e,t,s){return typeof t=="string"?fi(xi(e,t),s):fi(xi(e,""),t)}class Bu{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,i)=>Ur(i.backgroundColor),this.hoverBorderColor=(s,i)=>Ur(i.borderColor),this.hoverColor=(s,i)=>Ur(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)}set(t,s){return qr(this,t,s)}get(t){return xi(this,t)}describe(t,s){return qr(Gr,t,s)}override(t,s){return qr(xs,t,s)}route(t,s,i,n){const r=xi(this,t),a=xi(this,i),o="_"+s;Object.defineProperties(r,{[o]:{value:r[s],writable:!0},[s]:{enumerable:!0,get(){const l=this[o],c=a[n];return it(l)?Object.assign({},c,l):q(l,c)},set(l){this[o]=l}}})}}var rt=new Bu({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ju(e){return!e||ft(e.size)||ft(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function vn(e,t,s,i,n){let r=t[n];return r||(r=t[n]=e.measureText(n).width,s.push(n)),r>i&&(i=r),i}function Uu(e,t,s,i){i=i||{};let n=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(n=i.data={},r=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let a=0;const o=s.length;let l,c,h,u,f;for(l=0;l<o;l++)if(u=s[l],u!=null&&wt(u)!==!0)a=vn(e,n,r,a,u);else if(wt(u))for(c=0,h=u.length;c<h;c++)f=u[c],f!=null&&!wt(f)&&(a=vn(e,n,r,a,f));e.restore();const g=r.length/2;if(g>s.length){for(l=0;l<g;l++)delete n[r[l]];r.splice(0,g)}return a}function ws(e,t,s){const i=e.currentDevicePixelRatio,n=s!==0?Math.max(s/2,.5):0;return Math.round((t-n)*i)/i+n}function hl(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function Xr(e,t,s,i){ul(e,t,s,i,null)}function ul(e,t,s,i,n){let r,a,o,l,c,h;const u=t.pointStyle,f=t.rotation,g=t.radius;let m=(f||0)*du;if(u&&typeof u=="object"&&(r=u.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){e.save(),e.translate(s,i),e.rotate(m),e.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),e.restore();return}if(!(isNaN(g)||g<=0)){switch(e.beginPath(),u){default:n?e.ellipse(s,i,n/2,g,0,0,mt):e.arc(s,i,g,0,mt),e.closePath();break;case"triangle":e.moveTo(s+Math.sin(m)*g,i-Math.cos(m)*g),m+=Vo,e.lineTo(s+Math.sin(m)*g,i-Math.cos(m)*g),m+=Vo,e.lineTo(s+Math.sin(m)*g,i-Math.cos(m)*g),e.closePath();break;case"rectRounded":c=g*.516,l=g-c,a=Math.cos(m+pi)*l,o=Math.sin(m+pi)*l,e.arc(s-a,i-o,c,m-At,m-zt),e.arc(s+o,i-a,c,m-zt,m),e.arc(s+a,i+o,c,m,m+zt),e.arc(s-o,i+a,c,m+zt,m+At),e.closePath();break;case"rect":if(!f){l=Math.SQRT1_2*g,h=n?n/2:l,e.rect(s-h,i-l,2*h,2*l);break}m+=pi;case"rectRot":a=Math.cos(m)*g,o=Math.sin(m)*g,e.moveTo(s-a,i-o),e.lineTo(s+o,i-a),e.lineTo(s+a,i+o),e.lineTo(s-o,i+a),e.closePath();break;case"crossRot":m+=pi;case"cross":a=Math.cos(m)*g,o=Math.sin(m)*g,e.moveTo(s-a,i-o),e.lineTo(s+a,i+o),e.moveTo(s+o,i-a),e.lineTo(s-o,i+a);break;case"star":a=Math.cos(m)*g,o=Math.sin(m)*g,e.moveTo(s-a,i-o),e.lineTo(s+a,i+o),e.moveTo(s+o,i-a),e.lineTo(s-o,i+a),m+=pi,a=Math.cos(m)*g,o=Math.sin(m)*g,e.moveTo(s-a,i-o),e.lineTo(s+a,i+o),e.moveTo(s+o,i-a),e.lineTo(s-o,i+a);break;case"line":a=n?n/2:Math.cos(m)*g,o=Math.sin(m)*g,e.moveTo(s-a,i-o),e.lineTo(s+a,i+o);break;case"dash":e.moveTo(s,i),e.lineTo(s+Math.cos(m)*g,i+Math.sin(m)*g);break}e.fill(),t.borderWidth>0&&e.stroke()}}function wi(e,t,s){return s=s||.5,!t||e&&e.x>t.left-s&&e.x<t.right+s&&e.y>t.top-s&&e.y<t.bottom+s}function xn(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function wn(e){e.restore()}function Gu(e,t,s,i,n){if(!t)return e.lineTo(s.x,s.y);if(n==="middle"){const r=(t.x+s.x)/2;e.lineTo(r,t.y),e.lineTo(r,s.y)}else n==="after"!=!!i?e.lineTo(t.x,s.y):e.lineTo(s.x,t.y);e.lineTo(s.x,s.y)}function qu(e,t,s,i){if(!t)return e.lineTo(s.x,s.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?s.cp2x:s.cp1x,i?s.cp2y:s.cp1y,s.x,s.y)}function Ss(e,t,s,i,n,r={}){const a=wt(t)?t:[t],o=r.strokeWidth>0&&r.strokeColor!=="";let l,c;for(e.save(),e.font=n.string,Xu(e,r),l=0;l<a.length;++l)c=a[l],o&&(r.strokeColor&&(e.strokeStyle=r.strokeColor),ft(r.strokeWidth)||(e.lineWidth=r.strokeWidth),e.strokeText(c,s,i,r.maxWidth)),e.fillText(c,s,i,r.maxWidth),Ku(e,s,i,c,r),i+=n.lineHeight;e.restore()}function Xu(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),ft(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Ku(e,t,s,i,n){if(n.strikethrough||n.underline){const r=e.measureText(i),a=t-r.actualBoundingBoxLeft,o=t+r.actualBoundingBoxRight,l=s-r.actualBoundingBoxAscent,c=s+r.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=n.decorationWidth||2,e.moveTo(a,h),e.lineTo(o,h),e.stroke()}}function Si(e,t){const{x:s,y:i,w:n,h:r,radius:a}=t;e.arc(s+a.topLeft,i+a.topLeft,a.topLeft,-zt,At,!0),e.lineTo(s,i+r-a.bottomLeft),e.arc(s+a.bottomLeft,i+r-a.bottomLeft,a.bottomLeft,At,zt,!0),e.lineTo(s+n-a.bottomRight,i+r),e.arc(s+n-a.bottomRight,i+r-a.bottomRight,a.bottomRight,zt,0,!0),e.lineTo(s+n,i+a.topRight),e.arc(s+n-a.topRight,i+a.topRight,a.topRight,0,-zt,!0),e.lineTo(s+a.topLeft,i)}const Zu=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Ju=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Qu(e,t){const s=(""+e).match(Zu);if(!s||s[1]==="normal")return t*1.2;switch(e=+s[2],s[3]){case"px":return e;case"%":e/=100;break}return t*e}const td=e=>+e||0;function Kr(e,t){const s={},i=it(t),n=i?Object.keys(t):t,r=it(e)?i?a=>q(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of n)s[a]=td(r(a));return s}function dl(e){return Kr(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ks(e){return Kr(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Qt(e){const t=dl(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Bt(e,t){e=e||{},t=t||rt.font;let s=q(e.size,t.size);typeof s=="string"&&(s=parseInt(s,10));let i=q(e.style,t.style);i&&!(""+i).match(Ju)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const n={family:q(e.family,t.family),lineHeight:Qu(q(e.lineHeight,t.lineHeight),s),size:s,style:i,weight:q(e.weight,t.weight),string:""};return n.string=ju(n),n}function Sn(e,t,s,i){let n=!0,r,a,o;for(r=0,a=e.length;r<a;++r)if(o=e[r],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),n=!1),s!==void 0&&wt(o)&&(o=o[s%o.length],n=!1),o!==void 0))return i&&!n&&(i.cacheable=!1),o}function ed(e,t,s){const{min:i,max:n}=e,r=Io(t,(n-i)/2),a=(o,l)=>s&&o===0?0:o+l;return{min:a(i,-Math.abs(r)),max:a(n,r)}}function ls(e,t){return Object.assign(Object.create(e),t)}function Zr(e,t=[""],s=e,i,n=()=>e[0]){fe(i)||(i=bl("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:i,_getTarget:n,override:a=>Zr([a,...e],t,s,i)};return new Proxy(r,{deleteProperty(a,o){return delete a[o],delete a._keys,delete e[0][o],!0},get(a,o){return gl(a,o,()=>cd(o,t,e,a))},getOwnPropertyDescriptor(a,o){return Reflect.getOwnPropertyDescriptor(a._scopes[0],o)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,o){return _l(a).includes(o)},ownKeys(a){return _l(a)},set(a,o,l){const c=a._storage||(a._storage=n());return a[o]=c[o]=l,delete a._keys,!0}})}function Ws(e,t,s,i){const n={_cacheable:!1,_proxy:e,_context:t,_subProxy:s,_stack:new Set,_descriptors:fl(e,i),setContext:r=>Ws(e,r,s,i),override:r=>Ws(e.override(r),t,s,i)};return new Proxy(n,{deleteProperty(r,a){return delete r[a],delete e[a],!0},get(r,a,o){return gl(r,a,()=>id(r,a,o))},getOwnPropertyDescriptor(r,a){return r._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(r,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(r,a,o){return e[a]=o,delete r[a],!0}})}function fl(e,t={scriptable:!0,indexable:!0}){const{_scriptable:s=t.scriptable,_indexable:i=t.indexable,_allKeys:n=t.allKeys}=e;return{allKeys:n,scriptable:s,indexable:i,isScriptable:rs(s)?s:()=>s,isIndexable:rs(i)?i:()=>i}}const sd=(e,t)=>e?e+Ir(t):t,Jr=(e,t)=>it(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function gl(e,t,s){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const i=s();return e[t]=i,i}function id(e,t,s){const{_proxy:i,_context:n,_subProxy:r,_descriptors:a}=e;let o=i[t];return rs(o)&&a.isScriptable(t)&&(o=nd(t,o,e,s)),wt(o)&&o.length&&(o=rd(t,o,e,a.isIndexable)),Jr(t,o)&&(o=Ws(o,n,r&&r[t],a)),o}function nd(e,t,s,i){const{_proxy:n,_context:r,_subProxy:a,_stack:o}=s;if(o.has(e))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+e);return o.add(e),t=t(r,a||i),o.delete(e),Jr(e,t)&&(t=Qr(n._scopes,n,e,t)),t}function rd(e,t,s,i){const{_proxy:n,_context:r,_subProxy:a,_descriptors:o}=s;if(fe(r.index)&&i(e))t=t[r.index%t.length];else if(it(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const u=Qr(c,n,e,h);t.push(Ws(u,r,a&&a[e],o))}}return t}function pl(e,t,s){return rs(e)?e(t,s):e}const ad=(e,t)=>e===!0?t:typeof e=="string"?ns(t,e):void 0;function od(e,t,s,i,n){for(const r of t){const a=ad(s,r);if(a){e.add(a);const o=pl(a._fallback,s,n);if(fe(o)&&o!==s&&o!==i)return o}else if(a===!1&&fe(i)&&s!==i)return null}return!1}function Qr(e,t,s,i){const n=t._rootScopes,r=pl(t._fallback,s,i),a=[...e,...n],o=new Set;o.add(i);let l=ml(o,a,s,r||s,i);return l===null||fe(r)&&r!==s&&(l=ml(o,a,r,l,i),l===null)?!1:Zr(Array.from(o),[""],n,r,()=>ld(t,s,i))}function ml(e,t,s,i,n){for(;s;)s=od(e,t,s,i,n);return s}function ld(e,t,s){const i=e._getTarget();t in i||(i[t]={});const n=i[t];return wt(n)&&it(s)?s:n}function cd(e,t,s,i){let n;for(const r of t)if(n=bl(sd(r,e),s),fe(n))return Jr(e,n)?Qr(s,i,e,n):n}function bl(e,t){for(const s of t){if(!s)continue;const i=s[e];if(fe(i))return i}}function _l(e){let t=e._keys;return t||(t=e._keys=hd(e._scopes)),t}function hd(e){const t=new Set;for(const s of e)for(const i of Object.keys(s).filter(n=>!n.startsWith("_")))t.add(i);return Array.from(t)}function yl(e,t,s,i){const{iScale:n}=e,{key:r="r"}=this._parsing,a=new Array(i);let o,l,c,h;for(o=0,l=i;o<l;++o)c=o+s,h=t[c],a[o]={r:n.parse(ns(h,r),c)};return a}const ud=Number.EPSILON||1e-14,Hs=(e,t)=>t<e.length&&!e[t].skip&&e[t],vl=e=>e==="x"?"y":"x";function dd(e,t,s,i){const n=e.skip?t:e,r=t,a=s.skip?t:s,o=zr(r,n),l=zr(a,r);let c=o/(o+l),h=l/(o+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=i*c,f=i*h;return{previous:{x:r.x-u*(a.x-n.x),y:r.y-u*(a.y-n.y)},next:{x:r.x+f*(a.x-n.x),y:r.y+f*(a.y-n.y)}}}function fd(e,t,s){const i=e.length;let n,r,a,o,l,c=Hs(e,0);for(let h=0;h<i-1;++h)if(l=c,c=Hs(e,h+1),!(!l||!c)){if(mi(t[h],0,ud)){s[h]=s[h+1]=0;continue}n=s[h]/t[h],r=s[h+1]/t[h],o=Math.pow(n,2)+Math.pow(r,2),!(o<=9)&&(a=3/Math.sqrt(o),s[h]=n*a*t[h],s[h+1]=r*a*t[h])}}function gd(e,t,s="x"){const i=vl(s),n=e.length;let r,a,o,l=Hs(e,0);for(let c=0;c<n;++c){if(a=o,o=l,l=Hs(e,c+1),!o)continue;const h=o[s],u=o[i];a&&(r=(h-a[s])/3,o[`cp1${s}`]=h-r,o[`cp1${i}`]=u-r*t[c]),l&&(r=(l[s]-h)/3,o[`cp2${s}`]=h+r,o[`cp2${i}`]=u+r*t[c])}}function pd(e,t="x"){const s=vl(t),i=e.length,n=Array(i).fill(0),r=Array(i);let a,o,l,c=Hs(e,0);for(a=0;a<i;++a)if(o=l,l=c,c=Hs(e,a+1),!!l){if(c){const h=c[t]-l[t];n[a]=h!==0?(c[s]-l[s])/h:0}r[a]=o?c?Re(n[a-1])!==Re(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}fd(e,n,r),gd(e,r,t)}function kn(e,t,s){return Math.max(Math.min(e,s),t)}function md(e,t){let s,i,n,r,a,o=wi(e[0],t);for(s=0,i=e.length;s<i;++s)a=r,r=o,o=s<i-1&&wi(e[s+1],t),r&&(n=e[s],a&&(n.cp1x=kn(n.cp1x,t.left,t.right),n.cp1y=kn(n.cp1y,t.top,t.bottom)),o&&(n.cp2x=kn(n.cp2x,t.left,t.right),n.cp2y=kn(n.cp2y,t.top,t.bottom)))}function bd(e,t,s,i,n){let r,a,o,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")pd(e,n);else{let c=i?e[e.length-1]:e[0];for(r=0,a=e.length;r<a;++r)o=e[r],l=dd(c,o,e[Math.min(r+1,a-(i?0:1))%a],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&&md(e,s)}function xl(){return typeof window<"u"&&typeof document<"u"}function ta(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Mn(e,t,s){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[s])):i=e,i}const Dn=e=>window.getComputedStyle(e,null);function _d(e,t){return Dn(e).getPropertyValue(t)}const yd=["top","right","bottom","left"];function Ms(e,t,s){const i={};s=s?"-"+s:"";for(let n=0;n<4;n++){const r=yd[n];i[r]=parseFloat(e[t+"-"+r+s])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const vd=(e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot);function xd(e,t){const s=e.touches,i=s&&s.length?s[0]:e,{offsetX:n,offsetY:r}=i;let a=!1,o,l;if(vd(n,r,e.target))o=n,l=r;else{const c=t.getBoundingClientRect();o=i.clientX-c.left,l=i.clientY-c.top,a=!0}return{x:o,y:l,box:a}}function Ds(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:i}=t,n=Dn(s),r=n.boxSizing==="border-box",a=Ms(n,"padding"),o=Ms(n,"border","width"),{x:l,y:c,box:h}=xd(e,s),u=a.left+(h&&o.left),f=a.top+(h&&o.top);let{width:g,height:m}=t;return r&&(g-=a.width+o.width,m-=a.height+o.height),{x:Math.round((l-u)/g*s.width/i),y:Math.round((c-f)/m*s.height/i)}}function wd(e,t,s){let i,n;if(t===void 0||s===void 0){const r=ta(e);if(!r)t=e.clientWidth,s=e.clientHeight;else{const a=r.getBoundingClientRect(),o=Dn(r),l=Ms(o,"border","width"),c=Ms(o,"padding");t=a.width-c.width-l.width,s=a.height-c.height-l.height,i=Mn(o.maxWidth,r,"clientWidth"),n=Mn(o.maxHeight,r,"clientHeight")}}return{width:t,height:s,maxWidth:i||gn,maxHeight:n||gn}}const ea=e=>Math.round(e*10)/10;function Sd(e,t,s,i){const n=Dn(e),r=Ms(n,"margin"),a=Mn(n.maxWidth,e,"clientWidth")||gn,o=Mn(n.maxHeight,e,"clientHeight")||gn,l=wd(e,t,s);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=Ms(n,"border","width"),f=Ms(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-r.width),h=Math.max(0,i?Math.floor(c/i):h-r.height),c=ea(Math.min(c,a,l.maxWidth)),h=ea(Math.min(h,o,l.maxHeight)),c&&!h&&(h=ea(c/2)),{width:c,height:h}}function wl(e,t,s){const i=t||1,n=Math.floor(e.height*i),r=Math.floor(e.width*i);e.height=n/i,e.width=r/i;const a=e.canvas;return a.style&&(s||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||a.height!==n||a.width!==r?(e.currentDevicePixelRatio=i,a.height=n,a.width=r,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const kd=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function Sl(e,t){const s=_d(e,t),i=s&&s.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Cs(e,t,s,i){return{x:e.x+s*(t.x-e.x),y:e.y+s*(t.y-e.y)}}function Md(e,t,s,i){return{x:e.x+s*(t.x-e.x),y:i==="middle"?s<.5?e.y:t.y:i==="after"?s<1?e.y:t.y:s>0?t.y:e.y}}function Dd(e,t,s,i){const n={x:e.cp2x,y:e.cp2y},r={x:t.cp1x,y:t.cp1y},a=Cs(e,n,s),o=Cs(n,r,s),l=Cs(r,t,s),c=Cs(a,o,s),h=Cs(o,l,s);return Cs(c,h,s)}const kl=new Map;function Cd(e,t){t=t||{};const s=e+JSON.stringify(t);let i=kl.get(s);return i||(i=new Intl.NumberFormat(e,t),kl.set(s,i)),i}function ki(e,t,s){return Cd(t,s).format(e)}const Od=function(e,t){return{x(s){return e+e+t-s},setWidth(s){t=s},textAlign(s){return s==="center"?s:s==="right"?"left":"right"},xPlus(s,i){return s-i},leftForLtr(s,i){return s-i}}},Pd=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Bs(e,t,s){return e?Od(t,s):Pd()}function Ml(e,t){let s,i;(t==="ltr"||t==="rtl")&&(s=e.canvas.style,i=[s.getPropertyValue("direction"),s.getPropertyPriority("direction")],s.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Dl(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Cl(e){return e==="angle"?{between:bi,compare:pu,normalize:le}:{between:Be,compare:(t,s)=>t-s,normalize:t=>t}}function Ol({start:e,end:t,count:s,loop:i,style:n}){return{start:e%s,end:t%s,loop:i&&(t-e+1)%s===0,style:n}}function Td(e,t,s){const{property:i,start:n,end:r}=s,{between:a,normalize:o}=Cl(i),l=t.length;let{start:c,end:h,loop:u}=e,f,g;if(u){for(c+=l,h+=l,f=0,g=l;f<g&&a(o(t[c%l][i]),n,r);++f)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:u,style:e.style}}function Pl(e,t,s){if(!s)return[e];const{property:i,start:n,end:r}=s,a=t.length,{compare:o,between:l,normalize:c}=Cl(i),{start:h,end:u,loop:f,style:g}=Td(e,t,s),m=[];let v=!1,x=null,k,D,P;const T=()=>l(n,P,k)&&o(n,P)!==0,O=()=>o(r,k)===0||l(r,P,k),N=()=>v||T(),I=()=>!v||O();for(let j=h,H=h;j<=u;++j)D=t[j%a],!D.skip&&(k=c(D[i]),k!==P&&(v=l(k,n,r),x===null&&N()&&(x=o(k,n)===0?j:H),x!==null&&I()&&(m.push(Ol({start:x,end:j,loop:f,count:a,style:g})),x=null),H=j,P=k));return x!==null&&m.push(Ol({start:x,end:u,loop:f,count:a,style:g})),m}function Tl(e,t){const s=[],i=e.segments;for(let n=0;n<i.length;n++){const r=Pl(i[n],e.points,t);r.length&&s.push(...r)}return s}function Ad(e,t,s,i){let n=0,r=t-1;if(s&&!i)for(;n<t&&!e[n].skip;)n++;for(;n<t&&e[n].skip;)n++;for(n%=t,s&&(r+=n);r>n&&e[r%t].skip;)r--;return r%=t,{start:n,end:r}}function Ld(e,t,s,i){const n=e.length,r=[];let a=t,o=e[t],l;for(l=t+1;l<=s;++l){const c=e[l%n];c.skip||c.stop?o.skip||(i=!1,r.push({start:t%n,end:(l-1)%n,loop:i}),t=a=c.stop?l:null):(a=l,o.skip&&(t=l)),o=c}return a!==null&&r.push({start:t%n,end:a%n,loop:i}),r}function Rd(e,t){const s=e.points,i=e.options.spanGaps,n=s.length;if(!n)return[];const r=!!e._loop,{start:a,end:o}=Ad(s,n,r,i);if(i===!0)return Al(e,[{start:a,end:o,loop:r}],s,t);const l=o<a?o+n:o,c=!!e._fullLoop&&a===0&&o===n-1;return Al(e,Ld(s,a,l,c),s,t)}function Al(e,t,s,i){return!i||!i.setContext||!s?t:Fd(e,t,s,i)}function Fd(e,t,s,i){const n=e._chart.getContext(),r=Ll(e.options),{_datasetIndex:a,options:{spanGaps:o}}=e,l=s.length,c=[];let h=r,u=t[0].start,f=u;function g(m,v,x,k){const D=o?-1:1;if(m!==v){for(m+=l;s[m%l].skip;)m-=D;for(;s[v%l].skip;)v+=D;m%l!==v%l&&(c.push({start:m%l,end:v%l,loop:x,style:k}),h=k,u=v%l)}}for(const m of t){u=o?u:m.start;let v=s[u%l],x;for(f=u+1;f<=m.end;f++){const k=s[f%l];x=Ll(i.setContext(ls(n,{type:"segment",p0:v,p1:k,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:a}))),Ed(x,h)&&g(u,f-1,m.loop,h),v=k,h=x}u<f-1&&g(u,f-1,m.loop,h)}return c}function Ll(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Ed(e,t){return t&&JSON.stringify(e)!==JSON.stringify(t)}/*!
* Chart.js v3.9.1
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/class Id{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,s,i,n){const r=s.listeners[n],a=s.duration;r.forEach(o=>o({chart:t,initial:s.initial,numSteps:a,currentStep:Math.min(i-s.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=qo.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let s=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let a=r.length-1,o=!1,l;for(;a>=0;--a)l=r[a],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),o=!0):(r[a]=r[r.length-1],r.pop());o&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),s+=r.length}),this._lastDate=t,s===0&&(this._running=!1)}_getAnims(t){const s=this._charts;let i=s.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},s.set(t,i)),i}listen(t,s,i){this._getAnims(t).listeners[s].push(i)}add(t,s){!s||!s.length||this._getAnims(t).items.push(...s)}has(t){return this._getAnims(t).items.length>0}start(t){const s=this._charts.get(t);s&&(s.running=!0,s.start=Date.now(),s.duration=s.items.reduce((i,n)=>Math.max(i,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const s=this._charts.get(t);return!(!s||!s.running||!s.items.length)}stop(t){const s=this._charts.get(t);if(!s||!s.items.length)return;const i=s.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();s.items=[],this._notify(t,s,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ue=new Id;const Rl="transparent",Nd={boolean(e,t,s){return s>.5?t:e},color(e,t,s){const i=cl(e||Rl),n=i.valid&&cl(t||Rl);return n&&n.valid?n.mix(i,s).hexString():t},number(e,t,s){return e+(t-e)*s}};class zd{constructor(t,s,i,n){const r=s[i];n=Sn([t.to,n,r,t.from]);const a=Sn([t.from,r,n]);this._active=!0,this._fn=t.fn||Nd[t.type||typeof a],this._easing=_i[t.easing]||_i.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=s,this._prop=i,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,s,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,a=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=Sn([t.to,s,n,t.from]),this._from=Sn([t.from,n,s])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const s=t-this._start,i=this._duration,n=this._prop,r=this._from,a=this._loop,o=this._to;let l;if(this._active=r!==o&&(a||s<i),!this._active){this._target[n]=o,this._notify(!0);return}if(s<0){this._target[n]=r;return}l=s/i%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(r,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((s,i)=>{t.push({res:s,rej:i})})}_notify(t){const s=t?"res":"rej",i=this._promises||[];for(let n=0;n<i.length;n++)i[n][s]()}}const Yd=["x","y","borderWidth","radius","tension"],Vd=["color","borderColor","backgroundColor"];rt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const $d=Object.keys(rt.animation);rt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),rt.set("animations",{colors:{type:"color",properties:Vd},numbers:{type:"number",properties:Yd}}),rt.describe("animations",{_fallback:"animation"}),rt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}});class Fl{constructor(t,s){this._chart=t,this._properties=new Map,this.configure(s)}configure(t){if(!it(t))return;const s=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!it(n))return;const r={};for(const a of $d)r[a]=n[a];(wt(n.properties)&&n.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,s){const i=s.options,n=Hd(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&Wd(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,s){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),a=Object.keys(s),o=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,s));continue}const h=s[c];let u=r[c];const f=i.get(c);if(u)if(f&&u.active()){u.update(f,h,o);continue}else u.cancel();if(!f||!f.duration){t[c]=h;continue}r[c]=u=new zd(f,t,c,h),n.push(u)}return n}update(t,s){if(this._properties.size===0){Object.assign(t,s);return}const i=this._createAnimations(t,s);if(i.length)return Ue.add(this._chart,i),!0}}function Wd(e,t){const s=[],i=Object.keys(t);for(let n=0;n<i.length;n++){const r=e[i[n]];r&&r.active()&&s.push(r.wait())}return Promise.all(s)}function Hd(e,t){if(!t)return;let s=e.options;if(!s){e.options=t;return}return s.$shared&&(e.options=s=Object.assign({},s,{$shared:!1,$animations:{}})),s}function El(e,t){const s=e&&e.options||{},i=s.reverse,n=s.min===void 0?t:0,r=s.max===void 0?t:0;return{start:i?r:n,end:i?n:r}}function Bd(e,t,s){if(s===!1)return!1;const i=El(e,s),n=El(t,s);return{top:n.end,right:i.end,bottom:n.start,left:i.start}}function jd(e){let t,s,i,n;return it(e)?(t=e.top,s=e.right,i=e.bottom,n=e.left):t=s=i=n=e,{top:t,right:s,bottom:i,left:n,disabled:e===!1}}function Il(e,t){const s=[],i=e._getSortedDatasetMetas(t);let n,r;for(n=0,r=i.length;n<r;++n)s.push(i[n].index);return s}function Nl(e,t,s,i={}){const n=e.keys,r=i.mode==="single";let a,o,l,c;if(t!==null){for(a=0,o=n.length;a<o;++a){if(l=+n[a],l===s){if(i.all)continue;break}c=e.values[l],Yt(c)&&(r||t===0||Re(t)===Re(c))&&(t+=c)}return t}}function Ud(e){const t=Object.keys(e),s=new Array(t.length);let i,n,r;for(i=0,n=t.length;i<n;++i)r=t[i],s[i]={x:r,y:e[r]};return s}function zl(e,t){const s=e&&e.options.stacked;return s||s===void 0&&t.stack!==void 0}function Gd(e,t,s){return`${e.id}.${t.id}.${s.stack||s.type}`}function qd(e){const{min:t,max:s,minDefined:i,maxDefined:n}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:n?s:Number.POSITIVE_INFINITY}}function Xd(e,t,s){const i=e[t]||(e[t]={});return i[s]||(i[s]={})}function Yl(e,t,s,i){for(const n of t.getMatchingVisibleMetas(i).reverse()){const r=e[n.index];if(s&&r>0||!s&&r<0)return n.index}return null}function Vl(e,t){const{chart:s,_cachedMeta:i}=e,n=s._stacks||(s._stacks={}),{iScale:r,vScale:a,index:o}=i,l=r.axis,c=a.axis,h=Gd(r,a,i),u=t.length;let f;for(let g=0;g<u;++g){const m=t[g],{[l]:v,[c]:x}=m,k=m._stacks||(m._stacks={});f=k[c]=Xd(n,h,v),f[o]=x,f._top=Yl(f,a,!0,i.type),f._bottom=Yl(f,a,!1,i.type)}}function sa(e,t){const s=e.scales;return Object.keys(s).filter(i=>s[i].axis===t).shift()}function Kd(e,t){return ls(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Zd(e,t,s){return ls(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:s,index:t,mode:"default",type:"data"})}function Mi(e,t){const s=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const n of t){const r=n._stacks;if(!r||r[i]===void 0||r[i][s]===void 0)return;delete r[i][s]}}}const ia=e=>e==="reset"||e==="none",$l=(e,t)=>t?e:Object.assign({},e),Jd=(e,t,s)=>e&&!t.hidden&&t._stacked&&{keys:Il(s,!0),values:null};class Se{constructor(t,s){this.chart=t,this._ctx=t.ctx,this.index=s,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.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=zl(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Mi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,s=this._cachedMeta,i=this.getDataset(),n=(u,f,g,m)=>u==="x"?f:u==="r"?m:g,r=s.xAxisID=q(i.xAxisID,sa(t,"x")),a=s.yAxisID=q(i.yAxisID,sa(t,"y")),o=s.rAxisID=q(i.rAxisID,sa(t,"r")),l=s.indexAxis,c=s.iAxisID=n(l,r,a,o),h=s.vAxisID=n(l,a,r,o);s.xScale=this.getScaleForId(r),s.yScale=this.getScaleForId(a),s.rScale=this.getScaleForId(o),s.iScale=this.getScaleForId(c),s.vScale=this.getScaleForId(h)}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 s=this._cachedMeta;return t===s.iScale?s.vScale:s.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Uo(this._data,this),t._stacked&&Mi(t)}_dataCheck(){const t=this.getDataset(),s=t.data||(t.data=[]),i=this._data;if(it(s))this._data=Ud(s);else if(i!==s){if(i){Uo(i,this);const n=this._cachedMeta;Mi(n),n._parsed=[]}s&&Object.isExtensible(s)&&yu(s,this),this._syncList=[],this._data=s}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const s=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=s._stacked;s._stacked=zl(s.vScale,s),s.stack!==i.stack&&(n=!0,Mi(s),s.stack=i.stack),this._resyncElements(t),(n||r!==s._stacked)&&Vl(this,s._parsed)}configure(){const t=this.chart.config,s=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),s,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,s){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:a}=i,o=r.axis;let l=t===0&&s===n.length?!0:i._sorted,c=t>0&&i._parsed[t-1],h,u,f;if(this._parsing===!1)i._parsed=n,i._sorted=!0,f=n;else{wt(n[t])?f=this.parseArrayData(i,n,t,s):it(n[t])?f=this.parseObjectData(i,n,t,s):f=this.parsePrimitiveData(i,n,t,s);const g=()=>u[o]===null||c&&u[o]<c[o];for(h=0;h<s;++h)i._parsed[h+t]=u=f[h],l&&(g()&&(l=!1),c=u);i._sorted=l}a&&Vl(this,f)}parsePrimitiveData(t,s,i,n){const{iScale:r,vScale:a}=t,o=r.axis,l=a.axis,c=r.getLabels(),h=r===a,u=new Array(n);let f,g,m;for(f=0,g=n;f<g;++f)m=f+i,u[f]={[o]:h||r.parse(c[m],m),[l]:a.parse(s[m],m)};return u}parseArrayData(t,s,i,n){const{xScale:r,yScale:a}=t,o=new Array(n);let l,c,h,u;for(l=0,c=n;l<c;++l)h=l+i,u=s[h],o[l]={x:r.parse(u[0],h),y:a.parse(u[1],h)};return o}parseObjectData(t,s,i,n){const{xScale:r,yScale:a}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let h,u,f,g;for(h=0,u=n;h<u;++h)f=h+i,g=s[f],c[h]={x:r.parse(ns(g,o),f),y:a.parse(ns(g,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,s,i){const n=this.chart,r=this._cachedMeta,a=s[t.axis],o={keys:Il(n,!0),values:s._stacks[t.axis]};return Nl(o,a,r.index,{mode:i})}updateRangeFromParsed(t,s,i,n){const r=i[s.axis];let a=r===null?NaN:r;const o=n&&i._stacks[s.axis];n&&o&&(n.values=o,a=Nl(n,r,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,s){const i=this._cachedMeta,n=i._parsed,r=i._sorted&&t===i.iScale,a=n.length,o=this._getOtherScale(t),l=Jd(s,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:u}=qd(o);let f,g;function m(){g=n[f];const v=g[o.axis];return!Yt(g[t.axis])||h>v||u<v}for(f=0;f<a&&!(!m()&&(this.updateRangeFromParsed(c,t,g,l),r));++f);if(r){for(f=a-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(c,t,g,l);break}}return c}getAllParsedValues(t){const s=this._cachedMeta._parsed,i=[];let n,r,a;for(n=0,r=s.length;n<r;++n)a=s[n][t.axis],Yt(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const s=this._cachedMeta,i=s.iScale,n=s.vScale,r=this.getParsed(t);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:n?""+n.getLabelForValue(r[n.axis]):""}}_update(t){const s=this._cachedMeta;this.update(t||"default"),s._clip=jd(q(this.options.clip,Bd(s.xScale,s.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,s=this.chart,i=this._cachedMeta,n=i.data||[],r=s.chartArea,a=[],o=this._drawStart||0,l=this._drawCount||n.length-o,c=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,r,o,l),h=o;h<o+l;++h){const u=n[h];u.hidden||(u.active&&c?a.push(u):u.draw(t,r))}for(h=0;h<a.length;++h)a[h].draw(t,r)}getStyle(t,s){const i=s?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,s,i){const n=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];r=a.$context||(a.$context=Zd(this.getContext(),t,a)),r.parsed=this.getParsed(t),r.raw=n.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=Kd(this.chart.getContext(),this.index)),r.dataset=n,r.index=r.datasetIndex=this.index;return r.active=!!s,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,s){return this._resolveElementOptions(this.dataElementType.id,s,t)}_resolveElementOptions(t,s="default",i){const n=s==="active",r=this._cachedDataOpts,a=t+"-"+s,o=r[a],l=this.enableOptionSharing&&fe(i);if(o)return $l(o,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),u=n?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),h),g=Object.keys(rt.elements[t]),m=()=>this.getContext(i,n),v=c.resolveNamedOptions(f,g,m,u);return v.$shared&&(v.$shared=l,r[a]=Object.freeze($l(v,l))),v}_resolveAnimations(t,s,i){const n=this.chart,r=this._cachedDataOpts,a=`animation-${s}`,o=r[a];if(o)return o;let l;if(n.options.animation!==!1){const h=this.chart.config,u=h.datasetAnimationScopeKeys(this._type,s),f=h.getOptionScopes(this.getDataset(),u);l=h.createResolver(f,this.getContext(t,i,s))}const c=new Fl(n,l&&l.animations);return l&&l._cacheable&&(r[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,s){return!s||ia(t)||this.chart._animationsDisabled}_getSharedOptions(t,s){const i=this.resolveDataElementOptions(t,s),n=this._sharedOptions,r=this.getSharedOptions(i),a=this.includeOptions(s,r)||r!==n;return this.updateSharedOptions(r,s,i),{sharedOptions:r,includeOptions:a}}updateElement(t,s,i,n){ia(n)?Object.assign(t,i):this._resolveAnimations(s,n).update(t,i)}updateSharedOptions(t,s,i){t&&!ia(s)&&this._resolveAnimations(void 0,s).update(t,i)}_setStyle(t,s,i,n){t.active=n;const r=this.getStyle(s,n);this._resolveAnimations(s,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,s,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,s,i){this._setStyle(t,i,"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 s=this._data,i=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const n=i.length,r=s.length,a=Math.min(r,n);a&&this.parse(0,a),r>n?this._insertElements(n,r-n,t):r<n&&this._removeElements(r,n-r)}_insertElements(t,s,i=!0){const n=this._cachedMeta,r=n.data,a=t+s;let o;const l=c=>{for(c.length+=s,o=c.length-1;o>=a;o--)c[o]=c[o-s]};for(l(r),o=t;o<a;++o)r[o]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,s),i&&this.updateElements(r,t,s,"reset")}updateElements(t,s,i,n){}_removeElements(t,s){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,s);i._stacked&&Mi(i,n)}i.data.splice(t,s)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[s,i,n]=t;this[s](i,n)}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,s){s&&this._sync(["_removeElements",t,s]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Se.defaults={},Se.prototype.datasetElementType=null,Se.prototype.dataElementType=null;function Qd(e,t){if(!e._cache.$bar){const s=e.getMatchingVisibleMetas(t);let i=[];for(let n=0,r=s.length;n<r;n++)i=i.concat(s[n].controller.getAllParsedValues(e));e._cache.$bar=Go(i.sort((n,r)=>n-r))}return e._cache.$bar}function tf(e){const t=e.iScale,s=Qd(t,e.type);let i=t._length,n,r,a,o;const l=()=>{a===32767||a===-32768||(fe(o)&&(i=Math.min(i,Math.abs(a-o)||i)),o=a)};for(n=0,r=s.length;n<r;++n)a=t.getPixelForValue(s[n]),l();for(o=void 0,n=0,r=t.ticks.length;n<r;++n)a=t.getPixelForTick(n),l();return i}function ef(e,t,s,i){const n=s.barThickness;let r,a;return ft(n)?(r=t.min*s.categoryPercentage,a=s.barPercentage):(r=n*i,a=1),{chunk:r/i,ratio:a,start:t.pixels[e]-r/2}}function sf(e,t,s,i){const n=t.pixels,r=n[e];let a=e>0?n[e-1]:null,o=e<n.length-1?n[e+1]:null;const l=s.categoryPercentage;a===null&&(a=r-(o===null?t.end-t.start:o-r)),o===null&&(o=r+r-a);const c=r-(r-Math.min(a,o))/2*l;return{chunk:Math.abs(o-a)/2*l/i,ratio:s.barPercentage,start:c}}function nf(e,t,s,i){const n=s.parse(e[0],i),r=s.parse(e[1],i),a=Math.min(n,r),o=Math.max(n,r);let l=a,c=o;Math.abs(a)>Math.abs(o)&&(l=o,c=a),t[s.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:r,min:a,max:o}}function Wl(e,t,s,i){return wt(e)?nf(e,t,s,i):t[s.axis]=s.parse(e,i),t}function Hl(e,t,s,i){const n=e.iScale,r=e.vScale,a=n.getLabels(),o=n===r,l=[];let c,h,u,f;for(c=s,h=s+i;c<h;++c)f=t[c],u={},u[n.axis]=o||n.parse(a[c],c),l.push(Wl(f,u,r,c));return l}function na(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function rf(e,t,s){return e!==0?Re(e):(t.isHorizontal()?1:-1)*(t.min>=s?1:-1)}function af(e){let t,s,i,n,r;return e.horizontal?(t=e.base>e.x,s="left",i="right"):(t=e.base<e.y,s="bottom",i="top"),t?(n="end",r="start"):(n="start",r="end"),{start:s,end:i,reverse:t,top:n,bottom:r}}function of(e,t,s,i){let n=t.borderSkipped;const r={};if(!n){e.borderSkipped=r;return}if(n===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:o,reverse:l,top:c,bottom:h}=af(e);n==="middle"&&s&&(e.enableBorderRadius=!0,(s._top||0)===i?n=c:(s._bottom||0)===i?n=h:(r[Bl(h,a,o,l)]=!0,n=c)),r[Bl(n,a,o,l)]=!0,e.borderSkipped=r}function Bl(e,t,s,i){return i?(e=lf(e,t,s),e=jl(e,s,t)):e=jl(e,t,s),e}function lf(e,t,s){return e===t?s:e===s?t:e}function jl(e,t,s){return e==="start"?t:e==="end"?s:e}function cf(e,{inflateAmount:t},s){e.inflateAmount=t==="auto"?s===1?.33:0:t}class Cn extends Se{parsePrimitiveData(t,s,i,n){return Hl(t,s,i,n)}parseArrayData(t,s,i,n){return Hl(t,s,i,n)}parseObjectData(t,s,i,n){const{iScale:r,vScale:a}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=r.axis==="x"?o:l,h=a.axis==="x"?o:l,u=[];let f,g,m,v;for(f=i,g=i+n;f<g;++f)v=s[f],m={},m[r.axis]=r.parse(ns(v,c),f),u.push(Wl(ns(v,h),m,a,f));return u}updateRangeFromParsed(t,s,i,n){super.updateRangeFromParsed(t,s,i,n);const r=i._custom;r&&s===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const s=this._cachedMeta,{iScale:i,vScale:n}=s,r=this.getParsed(t),a=r._custom,o=na(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(r[n.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const s=this._cachedMeta;this.updateElements(s.data,0,s.data.length,t)}updateElements(t,s,i,n){const r=n==="reset",{index:a,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),h=this._getRuler(),{sharedOptions:u,includeOptions:f}=this._getSharedOptions(s,n);for(let g=s;g<s+i;g++){const m=this.getParsed(g),v=r||ft(m[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(g),x=this._calculateBarIndexPixels(g,h),k=(m._stacks||{})[o.axis],D={horizontal:c,base:v.base,enableBorderRadius:!k||na(m._custom)||a===k._top||a===k._bottom,x:c?v.head:x.center,y:c?x.center:v.head,height:c?x.size:Math.abs(v.size),width:c?Math.abs(v.size):x.size};f&&(D.options=u||this.resolveDataElementOptions(g,t[g].active?"active":n));const P=D.options||t[g].options;of(D,P,k,a),cf(D,P,h.ratio),this.updateElement(t[g],g,D,n)}}_getStacks(t,s){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),r=i.options.stacked,a=[],o=l=>{const c=l.controller.getParsed(s),h=c&&c[l.vScale.axis];if(ft(h)||isNaN(h))return!0};for(const l of n)if(!(s!==void 0&&o(l))&&((r===!1||a.indexOf(l.stack)===-1||r===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,s,i){const n=this._getStacks(t,i),r=s!==void 0?n.indexOf(s):-1;return r===-1?n.length-1:r}_getRuler(){const t=this.options,s=this._cachedMeta,i=s.iScale,n=[];let r,a;for(r=0,a=s.data.length;r<a;++r)n.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const o=t.barThickness;return{min:o||tf(s),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:s,_stacked:i},options:{base:n,minBarLength:r}}=this,a=n||0,o=this.getParsed(t),l=o._custom,c=na(l);let h=o[s.axis],u=0,f=i?this.applyStack(s,o,i):h,g,m;f!==h&&(u=f-h,f=h),c&&(h=l.barStart,f=l.barEnd-l.barStart,h!==0&&Re(h)!==Re(l.barEnd)&&(u=0),u+=h);const v=!ft(n)&&!c?n:u;let x=s.getPixelForValue(v);if(this.chart.getDataVisibility(t)?g=s.getPixelForValue(u+f):g=x,m=g-x,Math.abs(m)<r){m=rf(m,s,a)*r,h===a&&(x-=m/2);const k=s.getPixelForDecimal(0),D=s.getPixelForDecimal(1),P=Math.min(k,D),T=Math.max(k,D);x=Math.max(Math.min(x,T),P),g=x+m}if(x===s.getPixelForValue(a)){const k=Re(m)*s.getLineWidthForValue(a)/2;x+=k,m-=k}return{size:m,base:x,head:g,center:g+m/2}}_calculateBarIndexPixels(t,s){const i=s.scale,n=this.options,r=n.skipNull,a=q(n.maxBarThickness,1/0);let o,l;if(s.grouped){const c=r?this._getStackCount(t):s.stackCount,h=n.barThickness==="flex"?sf(t,s,n,c):ef(t,s,n,c),u=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0);o=h.start+h.chunk*u+h.chunk/2,l=Math.min(a,h.chunk*h.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(a,s.min*s.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,s=t.vScale,i=t.data,n=i.length;let r=0;for(;r<n;++r)this.getParsed(r)[s.axis]!==null&&i[r].draw(this._ctx)}}Cn.id="bar",Cn.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Cn.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class ra extends Se{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,s,i,n){const r=super.parsePrimitiveData(t,s,i,n);for(let a=0;a<r.length;a++)r[a]._custom=this.resolveDataElementOptions(a+i).radius;return r}parseArrayData(t,s,i,n){const r=super.parseArrayData(t,s,i,n);for(let a=0;a<r.length;a++){const o=s[i+a];r[a]._custom=q(o[2],this.resolveDataElementOptions(a+i).radius)}return r}parseObjectData(t,s,i,n){const r=super.parseObjectData(t,s,i,n);for(let a=0;a<r.length;a++){const o=s[i+a];r[a]._custom=q(o&&o.r&&+o.r,this.resolveDataElementOptions(a+i).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let s=0;for(let i=t.length-1;i>=0;--i)s=Math.max(s,t[i].size(this.resolveDataElementOptions(i))/2);return s>0&&s}getLabelAndValue(t){const s=this._cachedMeta,{xScale:i,yScale:n}=s,r=this.getParsed(t),a=i.getLabelForValue(r.x),o=n.getLabelForValue(r.y),l=r._custom;return{label:s.label,value:"("+a+", "+o+(l?", "+l:"")+")"}}update(t){const s=this._cachedMeta.data;this.updateElements(s,0,s.length,t)}updateElements(t,s,i,n){const r=n==="reset",{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(s,n),h=a.axis,u=o.axis;for(let f=s;f<s+i;f++){const g=t[f],m=!r&&this.getParsed(f),v={},x=v[h]=r?a.getPixelForDecimal(.5):a.getPixelForValue(m[h]),k=v[u]=r?o.getBasePixel():o.getPixelForValue(m[u]);v.skip=isNaN(x)||isNaN(k),c&&(v.options=l||this.resolveDataElementOptions(f,g.active?"active":n),r&&(v.options.radius=0)),this.updateElement(g,f,v,n)}}resolveDataElementOptions(t,s){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,s);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const r=n.radius;return s!=="active"&&(n.radius=0),n.radius+=q(i&&i._custom,r),n}}ra.id="bubble",ra.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},ra.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function hf(e,t,s){let i=1,n=1,r=0,a=0;if(t<mt){const o=e,l=o+t,c=Math.cos(o),h=Math.sin(o),u=Math.cos(l),f=Math.sin(l),g=(P,T,O)=>bi(P,o,l,!0)?1:Math.max(T,T*s,O,O*s),m=(P,T,O)=>bi(P,o,l,!0)?-1:Math.min(T,T*s,O,O*s),v=g(0,c,u),x=g(zt,h,f),k=m(At,c,u),D=m(At+zt,h,f);i=(v-k)/2,n=(x-D)/2,r=-(v+k)/2,a=-(x+D)/2}return{ratioX:i,ratioY:n,offsetX:r,offsetY:a}}class Di extends Se{constructor(t,s){super(t,s),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,s){const i=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=i;else{let r=l=>+i[l];if(it(i[t])){const{key:l="value"}=this._parsing;r=c=>+ns(i[c],l)}let a,o;for(a=t,o=t+s;a<o;++a)n._parsed[a]=r(a)}}_getRotation(){return we(this.options.rotation-90)}_getCircumference(){return we(this.options.circumference)}_getRotationExtents(){let t=mt,s=-mt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const n=this.chart.getDatasetMeta(i).controller,r=n._getRotation(),a=n._getCircumference();t=Math.min(t,r),s=Math.max(s,r+a)}return{rotation:t,circumference:s-t}}update(t){const s=this.chart,{chartArea:i}=s,n=this._cachedMeta,r=n.data,a=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-a)/2,0),l=Math.min(ru(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:h,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:g,offsetX:m,offsetY:v}=hf(u,h,l),x=(i.width-a)/f,k=(i.height-a)/g,D=Math.max(Math.min(x,k)/2,0),P=Io(this.options.radius,D),T=Math.max(P*l,0),O=(P-T)/this._getVisibleDatasetWeightTotal();this.offsetX=m*P,this.offsetY=v*P,n.total=this.calculateTotal(),this.outerRadius=P-O*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-O*c,0),this.updateElements(r,0,r.length,t)}_circumference(t,s){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return s&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/mt)}updateElements(t,s,i,n){const r=n==="reset",a=this.chart,o=a.chartArea,c=a.options.animation,h=(o.left+o.right)/2,u=(o.top+o.bottom)/2,f=r&&c.animateScale,g=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:v,includeOptions:x}=this._getSharedOptions(s,n);let k=this._getRotation(),D;for(D=0;D<s;++D)k+=this._circumference(D,r);for(D=s;D<s+i;++D){const P=this._circumference(D,r),T=t[D],O={x:h+this.offsetX,y:u+this.offsetY,startAngle:k,endAngle:k+P,circumference:P,outerRadius:m,innerRadius:g};x&&(O.options=v||this.resolveDataElementOptions(D,T.active?"active":n)),k+=P,this.updateElement(T,D,O,n)}}calculateTotal(){const t=this._cachedMeta,s=t.data;let i=0,n;for(n=0;n<s.length;n++){const r=t._parsed[n];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(n)&&!s[n].hidden&&(i+=Math.abs(r))}return i}calculateCircumference(t){const s=this._cachedMeta.total;return s>0&&!isNaN(t)?mt*(Math.abs(t)/s):0}getLabelAndValue(t){const s=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=ki(s._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let s=0;const i=this.chart;let n,r,a,o,l;if(!t){for(n=0,r=i.data.datasets.length;n<r;++n)if(i.isDatasetVisible(n)){a=i.getDatasetMeta(n),t=a.data,o=a.controller;break}}if(!t)return 0;for(n=0,r=t.length;n<r;++n)l=o.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(s=Math.max(s,l.borderWidth||0,l.hoverBorderWidth||0));return s}getMaxOffset(t){let s=0;for(let i=0,n=t.length;i<n;++i){const r=this.resolveDataElementOptions(i);s=Math.max(s,r.offset||0,r.hoverOffset||0)}return s}_getRingWeightOffset(t){let s=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(s+=this._getRingWeight(i));return s}_getRingWeight(t){return Math.max(q(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Di.id="doughnut",Di.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"},Di.descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"},Di.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:s}}=e.legend.options;return t.labels.map((i,n)=>{const a=e.getDatasetMeta(0).controller.getStyle(n);return{text:i,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(n),index:n}})}return[]}},onClick(e,t,s){s.chart.toggleDataVisibility(t.index),s.chart.update()}},tooltip:{callbacks:{title(){return""},label(e){let t=e.label;const s=": "+e.formattedValue;return wt(t)?(t=t.slice(),t[0]+=s):t+=s,t}}}}};class On extends Se{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const s=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=s,a=this.chart._animationsDisabled;let{start:o,count:l}=Ko(s,n,a);this._drawStart=o,this._drawCount=l,Zo(s)&&(o=0,l=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:c},t),this.updateElements(n,o,l,t)}updateElements(t,s,i,n){const r=n==="reset",{iScale:a,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(s,n),f=a.axis,g=o.axis,{spanGaps:m,segment:v}=this.options,x=Vs(m)?m:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||r||n==="none";let D=s>0&&this.getParsed(s-1);for(let P=s;P<s+i;++P){const T=t[P],O=this.getParsed(P),N=k?T:{},I=ft(O[g]),j=N[f]=a.getPixelForValue(O[f],P),H=N[g]=r||I?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,O,l):O[g],P);N.skip=isNaN(j)||isNaN(H)||I,N.stop=P>0&&Math.abs(O[f]-D[f])>x,v&&(N.parsed=O,N.raw=c.data[P]),u&&(N.options=h||this.resolveDataElementOptions(P,T.active?"active":n)),k||this.updateElement(T,P,N,n),D=O}}getMaxOverflow(){const t=this._cachedMeta,s=t.dataset,i=s.options&&s.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}On.id="line",On.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},On.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class aa extends Se{constructor(t,s){super(t,s),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const s=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=ki(s._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}parseObjectData(t,s,i,n){return yl.bind(this)(t,s,i,n)}update(t){const s=this._cachedMeta.data;this._updateRadius(),this.updateElements(s,0,s.length,t)}getMinMax(){const t=this._cachedMeta,s={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,n)=>{const r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(r<s.min&&(s.min=r),r>s.max&&(s.max=r))}),s}_updateRadius(){const t=this.chart,s=t.chartArea,i=t.options,n=Math.min(s.right-s.left,s.bottom-s.top),r=Math.max(n/2,0),a=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),o=(r-a)/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,s,i,n){const r=n==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,u=c.yCenter,f=c.getIndexAngle(0)-.5*At;let g=f,m;const v=360/this.countVisibleElements();for(m=0;m<s;++m)g+=this._computeAngle(m,n,v);for(m=s;m<s+i;m++){const x=t[m];let k=g,D=g+this._computeAngle(m,n,v),P=a.getDataVisibility(m)?c.getDistanceFromCenterForValue(this.getParsed(m).r):0;g=D,r&&(l.animateScale&&(P=0),l.animateRotate&&(k=D=f));const T={x:h,y:u,innerRadius:0,outerRadius:P,startAngle:k,endAngle:D,options:this.resolveDataElementOptions(m,x.active?"active":n)};this.updateElement(x,m,T,n)}}countVisibleElements(){const t=this._cachedMeta;let s=0;return t.data.forEach((i,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&s++}),s}_computeAngle(t,s,i){return this.chart.getDataVisibility(t)?we(this.resolveDataElementOptions(t,s).angle||i):0}}aa.id="polarArea",aa.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},aa.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:s}}=e.legend.options;return t.labels.map((i,n)=>{const a=e.getDatasetMeta(0).controller.getStyle(n);return{text:i,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(n),index:n}})}return[]}},onClick(e,t,s){s.chart.toggleDataVisibility(t.index),s.chart.update()}},tooltip:{callbacks:{title(){return""},label(e){return e.chart.data.labels[e.dataIndex]+": "+e.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class oa extends Di{}oa.id="pie",oa.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class la extends Se{getLabelAndValue(t){const s=this._cachedMeta.vScale,i=this.getParsed(t);return{label:s.getLabels()[t],value:""+s.getLabelForValue(i[s.axis])}}parseObjectData(t,s,i,n){return yl.bind(this)(t,s,i,n)}update(t){const s=this._cachedMeta,i=s.dataset,n=s.data||[],r=s.iScale.getLabels();if(i.points=n,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:a};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,s,i,n){const r=this._cachedMeta.rScale,a=n==="reset";for(let o=s;o<s+i;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":n),h=r.getPointPositionForValue(o,this.getParsed(o).r),u=a?r.xCenter:h.x,f=a?r.yCenter:h.y,g={x:u,y:f,angle:h.angle,skip:isNaN(u)||isNaN(f),options:c};this.updateElement(l,o,g,n)}}}la.id="radar",la.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},la.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class ke{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:s,y:i}=this.getProps(["x","y"],t);return{x:s,y:i}}hasValue(){return Vs(this.x)&&Vs(this.y)}getProps(t,s){const i=this.$animations;if(!s||!i)return this;const n={};return t.forEach(r=>{n[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),n}}ke.defaults={},ke.defaultRoutes=void 0;const Ul={values(e){return wt(e)?e:""+e},numeric(e,t,s){if(e===0)return"0";const i=this.chart.options.locale;let n,r=e;if(s.length>1){const c=Math.max(Math.abs(s[0].value),Math.abs(s[s.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),r=uf(e,s)}const a=ge(Math.abs(r)),o=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),ki(e,i,l)},logarithmic(e,t,s){if(e===0)return"0";const i=e/Math.pow(10,Math.floor(ge(e)));return i===1||i===2||i===5?Ul.numeric.call(this,e,t,s):""}};function uf(e,t){let s=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(s)>=1&&e!==Math.floor(e)&&(s=e-Math.floor(e)),s}var Pn={formatters:Ul};rt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:Pn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),rt.route("scale.ticks","color","","color"),rt.route("scale.grid","color","","borderColor"),rt.route("scale.grid","borderColor","","borderColor"),rt.route("scale.title","color","","color"),rt.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"}),rt.describe("scales",{_fallback:"scale"}),rt.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"});function df(e,t){const s=e.options.ticks,i=s.maxTicksLimit||ff(e),n=s.major.enabled?pf(t):[],r=n.length,a=n[0],o=n[r-1],l=[];if(r>i)return mf(t,l,n,r/i),l;const c=gf(n,t,i);if(r>0){let h,u;const f=r>1?Math.round((o-a)/(r-1)):null;for(Tn(t,l,c,ft(f)?0:a-f,a),h=0,u=r-1;h<u;h++)Tn(t,l,c,n[h],n[h+1]);return Tn(t,l,c,o,ft(f)?t.length:o+f),l}return Tn(t,l,c),l}function ff(e){const t=e.options.offset,s=e._tickSize(),i=e._length/s+(t?0:1),n=e._maxLength/s;return Math.floor(Math.min(i,n))}function gf(e,t,s){const i=bf(e),n=t.length/s;if(!i)return Math.max(n,1);const r=fu(i);for(let a=0,o=r.length-1;a<o;a++){const l=r[a];if(l>n)return l}return Math.max(n,1)}function pf(e){const t=[];let s,i;for(s=0,i=e.length;s<i;s++)e[s].major&&t.push(s);return t}function mf(e,t,s,i){let n=0,r=s[0],a;for(i=Math.ceil(i),a=0;a<e.length;a++)a===r&&(t.push(e[a]),n++,r=s[n*i])}function Tn(e,t,s,i,n){const r=q(i,0),a=Math.min(q(n,e.length),e.length);let o=0,l,c,h;for(s=Math.ceil(s),n&&(l=n-i,s=l/Math.floor(l/s)),h=r;h<0;)o++,h=Math.round(r+o*s);for(c=Math.max(r,0);c<a;c++)c===h&&(t.push(e[c]),o++,h=Math.round(r+o*s))}function bf(e){const t=e.length;let s,i;if(t<2)return!1;for(i=e[0],s=1;s<t;++s)if(e[s]-e[s-1]!==i)return!1;return i}const _f=e=>e==="left"?"right":e==="right"?"left":e,Gl=(e,t,s)=>t==="top"||t==="left"?e[t]+s:e[t]-s;function ql(e,t){const s=[],i=e.length/t,n=e.length;let r=0;for(;r<n;r+=i)s.push(e[Math.floor(r)]);return s}function yf(e,t,s){const i=e.ticks.length,n=Math.min(t,i-1),r=e._startPixel,a=e._endPixel,o=1e-6;let l=e.getPixelForTick(n),c;if(!(s&&(i===1?c=Math.max(l-r,a-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<r-o||l>a+o)))return l}function vf(e,t){pt(e,s=>{const i=s.gc,n=i.length/2;let r;if(n>t){for(r=0;r<n;++r)delete s.data[i[r]];i.splice(0,n)}})}function Ci(e){return e.drawTicks?e.tickLength:0}function Xl(e,t){if(!e.display)return 0;const s=Bt(e.font,t),i=Qt(e.padding);return(wt(e.text)?e.text.length:1)*s.lineHeight+i.height}function xf(e,t){return ls(e,{scale:t,type:"scale"})}function wf(e,t,s){return ls(e,{tick:s,index:t,type:"tick"})}function Sf(e,t,s){let i=Vr(e);return(s&&t!=="right"||!s&&t==="right")&&(i=_f(i)),i}function kf(e,t,s,i){const{top:n,left:r,bottom:a,right:o,chart:l}=e,{chartArea:c,scales:h}=l;let u=0,f,g,m;const v=a-n,x=o-r;if(e.isHorizontal()){if(g=Jt(i,r,o),it(s)){const k=Object.keys(s)[0],D=s[k];m=h[k].getPixelForValue(D)+v-t}else s==="center"?m=(c.bottom+c.top)/2+v-t:m=Gl(e,s,t);f=o-r}else{if(it(s)){const k=Object.keys(s)[0],D=s[k];g=h[k].getPixelForValue(D)-x+t}else s==="center"?g=(c.left+c.right)/2-x+t:g=Gl(e,s,t);m=Jt(i,a,n),u=s==="left"?-zt:zt}return{titleX:g,titleY:m,maxWidth:f,rotation:u}}class Os extends ke{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,s){return t}getUserBounds(){let{_userMin:t,_userMax:s,_suggestedMin:i,_suggestedMax:n}=this;return t=de(t,Number.POSITIVE_INFINITY),s=de(s,Number.NEGATIVE_INFINITY),i=de(i,Number.POSITIVE_INFINITY),n=de(n,Number.NEGATIVE_INFINITY),{min:de(t,i),max:de(s,n),minDefined:Yt(t),maxDefined:Yt(s)}}getMinMax(t){let{min:s,max:i,minDefined:n,maxDefined:r}=this.getUserBounds(),a;if(n&&r)return{min:s,max:i};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)a=o[l].controller.getMinMax(this,t),n||(s=Math.min(s,a.min)),r||(i=Math.max(i,a.max));return s=r&&s>i?i:s,i=n&&s>i?s:i,{min:de(s,de(i,s)),max:de(i,de(s,i))}}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||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){St(this.options.beforeUpdate,[this])}update(t,s,i){const{beginAtZero:n,grace:r,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=s,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ed(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?ql(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=df(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,s,i;this.isHorizontal()?(s=this.left,i=this.right):(s=this.top,i=this.bottom,t=!t),this._startPixel=s,this._endPixel=i,this._reversePixels=t,this._length=i-s,this._alignToPixels=this.options.alignToPixels}afterUpdate(){St(this.options.afterUpdate,[this])}beforeSetDimensions(){St(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(){St(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),St(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){St(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const s=this.options.ticks;let i,n,r;for(i=0,n=t.length;i<n;i++)r=t[i],r.label=St(s.callback,[r.value,i,t],this)}afterTickToLabelConversion(){St(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){St(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,s=t.ticks,i=this.ticks.length,n=s.minRotation||0,r=s.maxRotation;let a=n,o,l,c;if(!this._isVisible()||!s.display||n>=r||i<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),u=h.widest.width,f=h.highest.height,g=Zt(this.chart.width-u,0,this.maxWidth);o=t.offset?this.maxWidth/i:g/(i-1),u+6>o&&(o=g/(i-(t.offset?.5:1)),l=this.maxHeight-Ci(t.grid)-s.padding-Xl(t.title,this.chart.options.font),c=Math.sqrt(u*u+f*f),a=Nr(Math.min(Math.asin(Zt((h.highest.height+6)/o,-1,1)),Math.asin(Zt(l/c,-1,1))-Math.asin(Zt(f/c,-1,1)))),a=Math.max(n,Math.min(r,a))),this.labelRotation=a}afterCalculateLabelRotation(){St(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){St(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:s,options:{ticks:i,title:n,grid:r}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const l=Xl(n,s.options.font);if(o?(t.width=this.maxWidth,t.height=Ci(r)+l):(t.height=this.maxHeight,t.width=Ci(r)+l),i.display&&this.ticks.length){const{first:c,last:h,widest:u,highest:f}=this._getLabelSizes(),g=i.padding*2,m=we(this.labelRotation),v=Math.cos(m),x=Math.sin(m);if(o){const k=i.mirror?0:x*u.width+v*f.height;t.height=Math.min(this.maxHeight,t.height+k+g)}else{const k=i.mirror?0:v*u.width+x*f.height;t.width=Math.min(this.maxWidth,t.width+k+g)}this._calculatePadding(c,h,x,v)}}this._handleMargins(),o?(this.width=this._length=s.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=s.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,s,i,n){const{ticks:{align:r,padding:a},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,g=0;l?c?(f=n*t.width,g=i*s.height):(f=i*t.height,g=n*s.width):r==="start"?g=s.width:r==="end"?f=t.width:r!=="inner"&&(f=t.width/2,g=s.width/2),this.paddingLeft=Math.max((f-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((g-u+a)*this.width/(this.width-u),0)}else{let h=s.height/2,u=t.height/2;r==="start"?(h=0,u=t.height):r==="end"&&(h=s.height,u=0),this.paddingTop=h+a,this.paddingBottom=u+a}}_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(){St(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:s}=this.options;return s==="top"||s==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let s,i;for(s=0,i=t.length;s<i;s++)ft(t[s].label)&&(t.splice(s,1),i--,s--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const s=this.options.ticks.sampleSize;let i=this.ticks;s<i.length&&(i=ql(i,s)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,s){const{ctx:i,_longestTextCache:n}=this,r=[],a=[];let o=0,l=0,c,h,u,f,g,m,v,x,k,D,P;for(c=0;c<s;++c){if(f=t[c].label,g=this._resolveTickFontOptions(c),i.font=m=g.string,v=n[m]=n[m]||{data:{},gc:[]},x=g.lineHeight,k=D=0,!ft(f)&&!wt(f))k=vn(i,v.data,v.gc,k,f),D=x;else if(wt(f))for(h=0,u=f.length;h<u;++h)P=f[h],!ft(P)&&!wt(P)&&(k=vn(i,v.data,v.gc,k,P),D+=x);r.push(k),a.push(D),o=Math.max(k,o),l=Math.max(D,l)}vf(n,s);const T=r.indexOf(o),O=a.indexOf(l),N=I=>({width:r[I]||0,height:a[I]||0});return{first:N(0),last:N(s-1),widest:N(T),highest:N(O),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,s){return NaN}getValueForPixel(t){}getPixelForTick(t){const s=this.ticks;return t<0||t>s.length-1?null:this.getPixelForValue(s[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const s=this._startPixel+t*this._length;return mu(this._alignToPixels?ws(this.chart,s,0):s)}getDecimalForPixel(t){const s=(t-this._startPixel)/this._length;return this._reversePixels?1-s:s}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:s}=this;return t<0&&s<0?s:t>0&&s>0?t:0}getContext(t){const s=this.ticks||[];if(t>=0&&t<s.length){const i=s[t];return i.$context||(i.$context=wf(this.getContext(),t,i))}return this.$context||(this.$context=xf(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,s=we(this.labelRotation),i=Math.abs(Math.cos(s)),n=Math.abs(Math.sin(s)),r=this._getLabelSizes(),a=t.autoSkipPadding||0,o=r?r.widest.width+a:0,l=r?r.highest.height+a:0;return this.isHorizontal()?l*i>o*n?o/i:l/n:l*n<o*i?l/i:o/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const s=this.axis,i=this.chart,n=this.options,{grid:r,position:a}=n,o=r.offset,l=this.isHorizontal(),h=this.ticks.length+(o?1:0),u=Ci(r),f=[],g=r.setContext(this.getContext()),m=g.drawBorder?g.borderWidth:0,v=m/2,x=function(G){return ws(i,G,m)};let k,D,P,T,O,N,I,j,H,nt,Z,J;if(a==="top")k=x(this.bottom),N=this.bottom-u,j=k-v,nt=x(t.top)+v,J=t.bottom;else if(a==="bottom")k=x(this.top),nt=t.top,J=x(t.bottom)-v,N=k+v,j=this.top+u;else if(a==="left")k=x(this.right),O=this.right-u,I=k-v,H=x(t.left)+v,Z=t.right;else if(a==="right")k=x(this.left),H=t.left,Z=x(t.right)-v,O=k+v,I=this.left+u;else if(s==="x"){if(a==="center")k=x((t.top+t.bottom)/2+.5);else if(it(a)){const G=Object.keys(a)[0],Ot=a[G];k=x(this.chart.scales[G].getPixelForValue(Ot))}nt=t.top,J=t.bottom,N=k+v,j=N+u}else if(s==="y"){if(a==="center")k=x((t.left+t.right)/2);else if(it(a)){const G=Object.keys(a)[0],Ot=a[G];k=x(this.chart.scales[G].getPixelForValue(Ot))}O=k-v,I=O-u,H=t.left,Z=t.right}const Rt=q(n.ticks.maxTicksLimit,h),Ut=Math.max(1,Math.ceil(h/Rt));for(D=0;D<h;D+=Ut){const G=r.setContext(this.getContext(D)),Ot=G.lineWidth,_t=G.color,qt=G.borderDash||[],Fs=G.borderDashOffset,Ve=G.tickWidth,ps=G.tickColor,$e=G.tickBorderDash||[],ht=G.tickBorderDashOffset;P=yf(this,D,o),P!==void 0&&(T=ws(i,P,Ot),l?O=I=H=Z=T:N=j=nt=J=T,f.push({tx1:O,ty1:N,tx2:I,ty2:j,x1:H,y1:nt,x2:Z,y2:J,width:Ot,color:_t,borderDash:qt,borderDashOffset:Fs,tickWidth:Ve,tickColor:ps,tickBorderDash:$e,tickBorderDashOffset:ht}))}return this._ticksLength=h,this._borderValue=k,f}_computeLabelItems(t){const s=this.axis,i=this.options,{position:n,ticks:r}=i,a=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:h,mirror:u}=r,f=Ci(i.grid),g=f+h,m=u?-h:g,v=-we(this.labelRotation),x=[];let k,D,P,T,O,N,I,j,H,nt,Z,J,Rt="middle";if(n==="top")N=this.bottom-m,I=this._getXAxisLabelAlignment();else if(n==="bottom")N=this.top+m,I=this._getXAxisLabelAlignment();else if(n==="left"){const G=this._getYAxisLabelAlignment(f);I=G.textAlign,O=G.x}else if(n==="right"){const G=this._getYAxisLabelAlignment(f);I=G.textAlign,O=G.x}else if(s==="x"){if(n==="center")N=(t.top+t.bottom)/2+g;else if(it(n)){const G=Object.keys(n)[0],Ot=n[G];N=this.chart.scales[G].getPixelForValue(Ot)+g}I=this._getXAxisLabelAlignment()}else if(s==="y"){if(n==="center")O=(t.left+t.right)/2-g;else if(it(n)){const G=Object.keys(n)[0],Ot=n[G];O=this.chart.scales[G].getPixelForValue(Ot)}I=this._getYAxisLabelAlignment(f).textAlign}s==="y"&&(l==="start"?Rt="top":l==="end"&&(Rt="bottom"));const Ut=this._getLabelSizes();for(k=0,D=o.length;k<D;++k){P=o[k],T=P.label;const G=r.setContext(this.getContext(k));j=this.getPixelForTick(k)+r.labelOffset,H=this._resolveTickFontOptions(k),nt=H.lineHeight,Z=wt(T)?T.length:1;const Ot=Z/2,_t=G.color,qt=G.textStrokeColor,Fs=G.textStrokeWidth;let Ve=I;a?(O=j,I==="inner"&&(k===D-1?Ve=this.options.reverse?"left":"right":k===0?Ve=this.options.reverse?"right":"left":Ve="center"),n==="top"?c==="near"||v!==0?J=-Z*nt+nt/2:c==="center"?J=-Ut.highest.height/2-Ot*nt+nt:J=-Ut.highest.height+nt/2:c==="near"||v!==0?J=nt/2:c==="center"?J=Ut.highest.height/2-Ot*nt:J=Ut.highest.height-Z*nt,u&&(J*=-1)):(N=j,J=(1-Z)*nt/2);let ps;if(G.showLabelBackdrop){const $e=Qt(G.backdropPadding),ht=Ut.heights[k],ms=Ut.widths[k];let Es=N+J-$e.top,Pe=O-$e.left;switch(Rt){case"middle":Es-=ht/2;break;case"bottom":Es-=ht;break}switch(I){case"center":Pe-=ms/2;break;case"right":Pe-=ms;break}ps={left:Pe,top:Es,width:ms+$e.width,height:ht+$e.height,color:G.backdropColor}}x.push({rotation:v,label:T,font:H,color:_t,strokeColor:qt,strokeWidth:Fs,textOffset:J,textAlign:Ve,textBaseline:Rt,translation:[O,N],backdrop:ps})}return x}_getXAxisLabelAlignment(){const{position:t,ticks:s}=this.options;if(-we(this.labelRotation))return t==="top"?"left":"right";let n="center";return s.align==="start"?n="left":s.align==="end"?n="right":s.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:s,ticks:{crossAlign:i,mirror:n,padding:r}}=this.options,a=this._getLabelSizes(),o=t+r,l=a.widest.width;let c,h;return s==="left"?n?(h=this.right+r,i==="near"?c="left":i==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-o,i==="near"?c="right":i==="center"?(c="center",h-=l/2):(c="left",h=this.left)):s==="right"?n?(h=this.left+r,i==="near"?c="right":i==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+o,i==="near"?c="left":i==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,s=this.options.position;if(s==="left"||s==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(s==="top"||s==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:s},left:i,top:n,width:r,height:a}=this;s&&(t.save(),t.fillStyle=s,t.fillRect(i,n,r,a),t.restore())}getLineWidthForValue(t){const s=this.options.grid;if(!this._isVisible()||!s.display)return 0;const n=this.ticks.findIndex(r=>r.value===t);return n>=0?s.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const s=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,a;const o=(l,c,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(s.display)for(r=0,a=n.length;r<a;++r){const l=n[r];s.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),s.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:s,options:{grid:i}}=this,n=i.setContext(this.getContext()),r=i.drawBorder?n.borderWidth:0;if(!r)return;const a=i.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let l,c,h,u;this.isHorizontal()?(l=ws(t,this.left,r)-r/2,c=ws(t,this.right,a)+a/2,h=u=o):(h=ws(t,this.top,r)-r/2,u=ws(t,this.bottom,a)+a/2,l=c=o),s.save(),s.lineWidth=n.borderWidth,s.strokeStyle=n.borderColor,s.beginPath(),s.moveTo(l,h),s.lineTo(c,u),s.stroke(),s.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,n=this._computeLabelArea();n&&xn(i,n);const r=this._labelItems||(this._labelItems=this._computeLabelItems(t));let a,o;for(a=0,o=r.length;a<o;++a){const l=r[a],c=l.font,h=l.label;l.backdrop&&(i.fillStyle=l.backdrop.color,i.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let u=l.textOffset;Ss(i,h,0,u,c,l)}n&&wn(i)}drawTitle(){const{ctx:t,options:{position:s,title:i,reverse:n}}=this;if(!i.display)return;const r=Bt(i.font),a=Qt(i.padding),o=i.align;let l=r.lineHeight/2;s==="bottom"||s==="center"||it(s)?(l+=a.bottom,wt(i.text)&&(l+=r.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:u,rotation:f}=kf(this,l,s,o);Ss(t,i.text,0,0,r,{color:i.color,maxWidth:u,rotation:f,textAlign:Sf(o,s,n),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,s=t.ticks&&t.ticks.z||0,i=q(t.grid&&t.grid.z,-1);return!this._isVisible()||this.draw!==Os.prototype.draw?[{z:s,draw:n=>{this.draw(n)}}]:[{z:i,draw:n=>{this.drawBackground(),this.drawGrid(n),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:s,draw:n=>{this.drawLabels(n)}}]}getMatchingVisibleMetas(t){const s=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,a;for(r=0,a=s.length;r<a;++r){const o=s[r];o[i]===this.id&&(!t||o.type===t)&&n.push(o)}return n}_resolveTickFontOptions(t){const s=this.options.ticks.setContext(this.getContext(t));return Bt(s.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class An{constructor(t,s,i){this.type=t,this.scope=s,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const s=Object.getPrototypeOf(t);let i;Cf(s)&&(i=this.register(s));const n=this.items,r=t.id,a=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in n||(n[r]=t,Mf(t,a,i),this.override&&rt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const s=this.items,i=t.id,n=this.scope;i in s&&delete s[i],n&&i in rt[n]&&(delete rt[n][i],this.override&&delete xs[i])}}function Mf(e,t,s){const i=fi(Object.create(null),[s?rt.get(s):{},rt.get(t),e.defaults]);rt.set(t,i),e.defaultRoutes&&Df(t,e.defaultRoutes),e.descriptors&&rt.describe(t,e.descriptors)}function Df(e,t){Object.keys(t).forEach(s=>{const i=s.split("."),n=i.pop(),r=[e].concat(i).join("."),a=t[s].split("."),o=a.pop(),l=a.join(".");rt.route(r,n,l,o)})}function Cf(e){return"id"in e&&"defaults"in e}class Of{constructor(){this.controllers=new An(Se,"datasets",!0),this.elements=new An(ke,"elements"),this.plugins=new An(Object,"plugins"),this.scales=new An(Os,"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,s,i){[...s].forEach(n=>{const r=i||this._getRegistryForType(n);i||r.isForType(n)||r===this.plugins&&n.id?this._exec(t,r,n):pt(n,a=>{const o=i||this._getRegistryForType(a);this._exec(t,o,a)})})}_exec(t,s,i){const n=Ir(t);St(i["before"+n],[],i),s[t](i),St(i["after"+n],[],i)}_getRegistryForType(t){for(let s=0;s<this._typedRegistries.length;s++){const i=this._typedRegistries[s];if(i.isForType(t))return i}return this.plugins}_get(t,s,i){const n=s.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var Fe=new Of;class ca extends Se{update(t){const s=this._cachedMeta,{data:i=[]}=s,n=this.chart._animationsDisabled;let{start:r,count:a}=Ko(s,i,n);if(this._drawStart=r,this._drawCount=a,Zo(s)&&(r=0,a=i.length),this.options.showLine){const{dataset:o,_dataset:l}=s;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=i;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!n,options:c},t)}this.updateElements(i,r,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=Fe.getElement("line")),super.addElements()}updateElements(t,s,i,n){const r=n==="reset",{iScale:a,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(s,n),u=this.getSharedOptions(h),f=this.includeOptions(n,u),g=a.axis,m=o.axis,{spanGaps:v,segment:x}=this.options,k=Vs(v)?v:Number.POSITIVE_INFINITY,D=this.chart._animationsDisabled||r||n==="none";let P=s>0&&this.getParsed(s-1);for(let T=s;T<s+i;++T){const O=t[T],N=this.getParsed(T),I=D?O:{},j=ft(N[m]),H=I[g]=a.getPixelForValue(N[g],T),nt=I[m]=r||j?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,N,l):N[m],T);I.skip=isNaN(H)||isNaN(nt)||j,I.stop=T>0&&Math.abs(N[g]-P[g])>k,x&&(I.parsed=N,I.raw=c.data[T]),f&&(I.options=u||this.resolveDataElementOptions(T,O.active?"active":n)),D||this.updateElement(O,T,I,n),P=N}this.updateSharedOptions(u,n,h)}getMaxOverflow(){const t=this._cachedMeta,s=t.data||[];if(!this.options.showLine){let o=0;for(let l=s.length-1;l>=0;--l)o=Math.max(o,s[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!s.length)return n;const r=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(n,r,a)/2}}ca.id="scatter",ca.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},ca.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(e){return"("+e.label+", "+e.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Ps(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ha{constructor(t){this.options=t||{}}init(t){}formats(){return Ps()}parse(t,s){return Ps()}format(t,s){return Ps()}add(t,s,i){return Ps()}diff(t,s,i){return Ps()}startOf(t,s,i){return Ps()}endOf(t,s){return Ps()}}ha.override=function(e){Object.assign(ha.prototype,e)};var Kl={_date:ha};function Pf(e,t,s,i){const{controller:n,data:r,_sorted:a}=e,o=n._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&a&&r.length){const l=o._reversePixels?bu:vs;if(i){if(n._sharedOptions){const c=r[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const u=l(r,t,s-h),f=l(r,t,s+h);return{lo:u.lo,hi:f.hi}}}}else return l(r,t,s)}return{lo:0,hi:r.length-1}}function Oi(e,t,s,i,n){const r=e.getSortedVisibleDatasetMetas(),a=s[t];for(let o=0,l=r.length;o<l;++o){const{index:c,data:h}=r[o],{lo:u,hi:f}=Pf(r[o],t,a,n);for(let g=u;g<=f;++g){const m=h[g];m.skip||i(m,c,g)}}}function Tf(e){const t=e.indexOf("x")!==-1,s=e.indexOf("y")!==-1;return function(i,n){const r=t?Math.abs(i.x-n.x):0,a=s?Math.abs(i.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(a,2))}}function ua(e,t,s,i,n){const r=[];return!n&&!e.isPointInArea(t)||Oi(e,s,t,function(o,l,c){!n&&!wi(o,e.chartArea,0)||o.inRange(t.x,t.y,i)&&r.push({element:o,datasetIndex:l,index:c})},!0),r}function Af(e,t,s,i){let n=[];function r(a,o,l){const{startAngle:c,endAngle:h}=a.getProps(["startAngle","endAngle"],i),{angle:u}=Bo(a,{x:t.x,y:t.y});bi(u,c,h)&&n.push({element:a,datasetIndex:o,index:l})}return Oi(e,s,t,r),n}function Lf(e,t,s,i,n,r){let a=[];const o=Tf(s);let l=Number.POSITIVE_INFINITY;function c(h,u,f){const g=h.inRange(t.x,t.y,n);if(i&&!g)return;const m=h.getCenterPoint(n);if(!(!!r||e.isPointInArea(m))&&!g)return;const x=o(t,m);x<l?(a=[{element:h,datasetIndex:u,index:f}],l=x):x===l&&a.push({element:h,datasetIndex:u,index:f})}return Oi(e,s,t,c),a}function da(e,t,s,i,n,r){return!r&&!e.isPointInArea(t)?[]:s==="r"&&!i?Af(e,t,s,n):Lf(e,t,s,i,n,r)}function Zl(e,t,s,i,n){const r=[],a=s==="x"?"inXRange":"inYRange";let o=!1;return Oi(e,s,t,(l,c,h)=>{l[a](t[s],n)&&(r.push({element:l,datasetIndex:c,index:h}),o=o||l.inRange(t.x,t.y,n))}),i&&!o?[]:r}var Rf={evaluateInteractionItems:Oi,modes:{index(e,t,s,i){const n=Ds(t,e),r=s.axis||"x",a=s.includeInvisible||!1,o=s.intersect?ua(e,n,r,i,a):da(e,n,r,!1,i,a),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const h=o[0].index,u=c.data[h];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:h})}),l):[]},dataset(e,t,s,i){const n=Ds(t,e),r=s.axis||"xy",a=s.includeInvisible||!1;let o=s.intersect?ua(e,n,r,i,a):da(e,n,r,!1,i,a);if(o.length>0){const l=o[0].datasetIndex,c=e.getDatasetMeta(l).data;o=[];for(let h=0;h<c.length;++h)o.push({element:c[h],datasetIndex:l,index:h})}return o},point(e,t,s,i){const n=Ds(t,e),r=s.axis||"xy",a=s.includeInvisible||!1;return ua(e,n,r,i,a)},nearest(e,t,s,i){const n=Ds(t,e),r=s.axis||"xy",a=s.includeInvisible||!1;return da(e,n,r,s.intersect,i,a)},x(e,t,s,i){const n=Ds(t,e);return Zl(e,n,"x",s.intersect,i)},y(e,t,s,i){const n=Ds(t,e);return Zl(e,n,"y",s.intersect,i)}}};const Jl=["left","top","right","bottom"];function Pi(e,t){return e.filter(s=>s.pos===t)}function Ql(e,t){return e.filter(s=>Jl.indexOf(s.pos)===-1&&s.box.axis===t)}function Ti(e,t){return e.sort((s,i)=>{const n=t?i:s,r=t?s:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function Ff(e){const t=[];let s,i,n,r,a,o;for(s=0,i=(e||[]).length;s<i;++s)n=e[s],{position:r,options:{stack:a,stackWeight:o=1}}=n,t.push({index:s,box:n,pos:r,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&r+a,stackWeight:o});return t}function Ef(e){const t={};for(const s of e){const{stack:i,pos:n,stackWeight:r}=s;if(!i||!Jl.includes(n))continue;const a=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=r}return t}function If(e,t){const s=Ef(e),{vBoxMaxWidth:i,hBoxMaxHeight:n}=t;let r,a,o;for(r=0,a=e.length;r<a;++r){o=e[r];const{fullSize:l}=o.box,c=s[o.stack],h=c&&o.stackWeight/c.weight;o.horizontal?(o.width=h?h*i:l&&t.availableWidth,o.height=n):(o.width=i,o.height=h?h*n:l&&t.availableHeight)}return s}function Nf(e){const t=Ff(e),s=Ti(t.filter(c=>c.box.fullSize),!0),i=Ti(Pi(t,"left"),!0),n=Ti(Pi(t,"right")),r=Ti(Pi(t,"top"),!0),a=Ti(Pi(t,"bottom")),o=Ql(t,"x"),l=Ql(t,"y");return{fullSize:s,leftAndTop:i.concat(r),rightAndBottom:n.concat(l).concat(a).concat(o),chartArea:Pi(t,"chartArea"),vertical:i.concat(n).concat(l),horizontal:r.concat(a).concat(o)}}function tc(e,t,s,i){return Math.max(e[s],t[s])+Math.max(e[i],t[i])}function ec(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function zf(e,t,s,i){const{pos:n,box:r}=s,a=e.maxPadding;if(!it(n)){s.size&&(e[n]-=s.size);const u=i[s.stack]||{size:0,count:1};u.size=Math.max(u.size,s.horizontal?r.height:r.width),s.size=u.size/u.count,e[n]+=s.size}r.getPadding&&ec(a,r.getPadding());const o=Math.max(0,t.outerWidth-tc(a,e,"left","right")),l=Math.max(0,t.outerHeight-tc(a,e,"top","bottom")),c=o!==e.w,h=l!==e.h;return e.w=o,e.h=l,s.horizontal?{same:c,other:h}:{same:h,other:c}}function Yf(e){const t=e.maxPadding;function s(i){const n=Math.max(t[i]-e[i],0);return e[i]+=n,n}e.y+=s("top"),e.x+=s("left"),s("right"),s("bottom")}function Vf(e,t){const s=t.maxPadding;function i(n){const r={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{r[a]=Math.max(t[a],s[a])}),r}return i(e?["left","right"]:["top","bottom"])}function Ai(e,t,s,i){const n=[];let r,a,o,l,c,h;for(r=0,a=e.length,c=0;r<a;++r){o=e[r],l=o.box,l.update(o.width||t.w,o.height||t.h,Vf(o.horizontal,t));const{same:u,other:f}=zf(t,s,o,i);c|=u&&n.length,h=h||f,l.fullSize||n.push(o)}return c&&Ai(n,t,s,i)||h}function Ln(e,t,s,i,n){e.top=s,e.left=t,e.right=t+i,e.bottom=s+n,e.width=i,e.height=n}function sc(e,t,s,i){const n=s.padding;let{x:r,y:a}=t;for(const o of e){const l=o.box,c=i[o.stack]||{count:1,placed:0,weight:1},h=o.stackWeight/c.weight||1;if(o.horizontal){const u=t.w*h,f=c.size||l.height;fe(c.start)&&(a=c.start),l.fullSize?Ln(l,n.left,a,s.outerWidth-n.right-n.left,f):Ln(l,t.left+c.placed,a,u,f),c.start=a,c.placed+=u,a=l.bottom}else{const u=t.h*h,f=c.size||l.width;fe(c.start)&&(r=c.start),l.fullSize?Ln(l,r,n.top,f,s.outerHeight-n.bottom-n.top):Ln(l,r,t.top+c.placed,f,u),c.start=r,c.placed+=u,r=l.right}}t.x=r,t.y=a}rt.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var me={addBox(e,t){e.boxes||(e.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(s){t.draw(s)}}]},e.boxes.push(t)},removeBox(e,t){const s=e.boxes?e.boxes.indexOf(t):-1;s!==-1&&e.boxes.splice(s,1)},configure(e,t,s){t.fullSize=s.fullSize,t.position=s.position,t.weight=s.weight},update(e,t,s,i){if(!e)return;const n=Qt(e.options.layout.padding),r=Math.max(t-n.width,0),a=Math.max(s-n.height,0),o=Nf(e.boxes),l=o.vertical,c=o.horizontal;pt(e.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const h=l.reduce((v,x)=>x.box.options&&x.box.options.display===!1?v:v+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:s,padding:n,availableWidth:r,availableHeight:a,vBoxMaxWidth:r/2/h,hBoxMaxHeight:a/2}),f=Object.assign({},n);ec(f,Qt(i));const g=Object.assign({maxPadding:f,w:r,h:a,x:n.left,y:n.top},n),m=If(l.concat(c),u);Ai(o.fullSize,g,u,m),Ai(l,g,u,m),Ai(c,g,u,m)&&Ai(l,g,u,m),Yf(g),sc(o.leftAndTop,g,u,m),g.x+=g.w,g.y+=g.h,sc(o.rightAndBottom,g,u,m),e.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},pt(o.chartArea,v=>{const x=v.box;Object.assign(x,e.chartArea),x.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class ic{acquireContext(t,s){}releaseContext(t){return!1}addEventListener(t,s,i){}removeEventListener(t,s,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,s,i,n){return s=Math.max(0,s||t.width),i=i||t.height,{width:s,height:Math.max(0,n?Math.floor(s/n):i)}}isAttached(t){return!0}updateConfig(t){}}class $f extends ic{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Rn="$chartjs",Wf={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},nc=e=>e===null||e==="";function Hf(e,t){const s=e.style,i=e.getAttribute("height"),n=e.getAttribute("width");if(e[Rn]={initial:{height:i,width:n,style:{display:s.display,height:s.height,width:s.width}}},s.display=s.display||"block",s.boxSizing=s.boxSizing||"border-box",nc(n)){const r=Sl(e,"width");r!==void 0&&(e.width=r)}if(nc(i))if(e.style.height==="")e.height=e.width/(t||2);else{const r=Sl(e,"height");r!==void 0&&(e.height=r)}return e}const rc=kd?{passive:!0}:!1;function Bf(e,t,s){e.addEventListener(t,s,rc)}function jf(e,t,s){e.canvas.removeEventListener(t,s,rc)}function Uf(e,t){const s=Wf[e.type]||e.type,{x:i,y:n}=Ds(e,t);return{type:s,chart:t,native:e,x:i!==void 0?i:null,y:n!==void 0?n:null}}function Fn(e,t){for(const s of e)if(s===t||s.contains(t))return!0}function Gf(e,t,s){const i=e.canvas,n=new MutationObserver(r=>{let a=!1;for(const o of r)a=a||Fn(o.addedNodes,i),a=a&&!Fn(o.removedNodes,i);a&&s()});return n.observe(document,{childList:!0,subtree:!0}),n}function qf(e,t,s){const i=e.canvas,n=new MutationObserver(r=>{let a=!1;for(const o of r)a=a||Fn(o.removedNodes,i),a=a&&!Fn(o.addedNodes,i);a&&s()});return n.observe(document,{childList:!0,subtree:!0}),n}const Li=new Map;let ac=0;function oc(){const e=window.devicePixelRatio;e!==ac&&(ac=e,Li.forEach((t,s)=>{s.currentDevicePixelRatio!==e&&t()}))}function Xf(e,t){Li.size||window.addEventListener("resize",oc),Li.set(e,t)}function Kf(e){Li.delete(e),Li.size||window.removeEventListener("resize",oc)}function Zf(e,t,s){const i=e.canvas,n=i&&ta(i);if(!n)return;const r=Xo((o,l)=>{const c=n.clientWidth;s(o,l),c<n.clientWidth&&s()},window),a=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||r(c,h)});return a.observe(n),Xf(e,r),a}function fa(e,t,s){s&&s.disconnect(),t==="resize"&&Kf(e)}function Jf(e,t,s){const i=e.canvas,n=Xo(r=>{e.ctx!==null&&s(Uf(r,e))},e,r=>{const a=r[0];return[a,a.offsetX,a.offsetY]});return Bf(i,t,n),n}class Qf extends ic{acquireContext(t,s){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Hf(t,s),i):null}releaseContext(t){const s=t.canvas;if(!s[Rn])return!1;const i=s[Rn].initial;["height","width"].forEach(r=>{const a=i[r];ft(a)?s.removeAttribute(r):s.setAttribute(r,a)});const n=i.style||{};return Object.keys(n).forEach(r=>{s.style[r]=n[r]}),s.width=s.width,delete s[Rn],!0}addEventListener(t,s,i){this.removeEventListener(t,s);const n=t.$proxies||(t.$proxies={}),a={attach:Gf,detach:qf,resize:Zf}[s]||Jf;n[s]=a(t,s,i)}removeEventListener(t,s){const i=t.$proxies||(t.$proxies={}),n=i[s];if(!n)return;({attach:fa,detach:fa,resize:fa}[s]||jf)(t,s,n),i[s]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,s,i,n){return Sd(t,s,i,n)}isAttached(t){const s=ta(t);return!!(s&&s.isConnected)}}function tg(e){return!xl()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?$f:Qf}class eg{constructor(){this._init=[]}notify(t,s,i,n){s==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const r=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(r,t,s,i);return s==="afterDestroy"&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,s,i,n){n=n||{};for(const r of t){const a=r.plugin,o=a[i],l=[s,n,r.options];if(St(o,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){ft(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const s=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),s}_createDescriptors(t,s){const i=t&&t.config,n=q(i.options&&i.options.plugins,{}),r=sg(i);return n===!1&&!s?[]:ng(t,r,n,s)}_notifyStateChanges(t){const s=this._oldCache||[],i=this._cache,n=(r,a)=>r.filter(o=>!a.some(l=>o.plugin.id===l.plugin.id));this._notify(n(s,i),t,"stop"),this._notify(n(i,s),t,"start")}}function sg(e){const t={},s=[],i=Object.keys(Fe.plugins.items);for(let r=0;r<i.length;r++)s.push(Fe.getPlugin(i[r]));const n=e.plugins||[];for(let r=0;r<n.length;r++){const a=n[r];s.indexOf(a)===-1&&(s.push(a),t[a.id]=!0)}return{plugins:s,localIds:t}}function ig(e,t){return!t&&e===!1?null:e===!0?{}:e}function ng(e,{plugins:t,localIds:s},i,n){const r=[],a=e.getContext();for(const o of t){const l=o.id,c=ig(i[l],n);c!==null&&r.push({plugin:o,options:rg(e.config,{plugin:o,local:s[l]},c,a)})}return r}function rg(e,{plugin:t,local:s},i,n){const r=e.pluginScopeKeys(t),a=e.getOptionScopes(i,r);return s&&t.defaults&&a.push(t.defaults),e.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ga(e,t){const s=rt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||s.indexAxis||"x"}function ag(e,t){let s=e;return e==="_index_"?s=t:e==="_value_"&&(s=t==="x"?"y":"x"),s}function og(e,t){return e===t?"_index_":"_value_"}function lg(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function pa(e,t){return e==="x"||e==="y"?e:t.axis||lg(t.position)||e.charAt(0).toLowerCase()}function cg(e,t){const s=xs[e.type]||{scales:{}},i=t.scales||{},n=ga(e.type,t),r=Object.create(null),a=Object.create(null);return Object.keys(i).forEach(o=>{const l=i[o];if(!it(l))return console.error(`Invalid scale configuration for scale: ${o}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const c=pa(o,l),h=og(c,n),u=s.scales||{};r[c]=r[c]||o,a[o]=gi(Object.create(null),[{axis:c},l,u[c],u[h]])}),e.data.datasets.forEach(o=>{const l=o.type||e.type,c=o.indexAxis||ga(l,t),u=(xs[l]||{}).scales||{};Object.keys(u).forEach(f=>{const g=ag(f,c),m=o[g+"AxisID"]||r[g]||g;a[m]=a[m]||Object.create(null),gi(a[m],[{axis:g},i[m],u[f]])})}),Object.keys(a).forEach(o=>{const l=a[o];gi(l,[rt.scales[l.type],rt.scale])}),a}function lc(e){const t=e.options||(e.options={});t.plugins=q(t.plugins,{}),t.scales=cg(e,t)}function cc(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function hg(e){return e=e||{},e.data=cc(e.data),lc(e),e}const hc=new Map,uc=new Set;function En(e,t){let s=hc.get(e);return s||(s=t(),hc.set(e,s),uc.add(s)),s}const Ri=(e,t,s)=>{const i=ns(t,s);i!==void 0&&e.add(i)};class ug{constructor(t){this._config=hg(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=cc(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(),lc(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return En(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,s){return En(`${t}.transition.${s}`,()=>[[`datasets.${t}.transitions.${s}`,`transitions.${s}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,s){return En(`${t}-${s}`,()=>[[`datasets.${t}.elements.${s}`,`datasets.${t}`,`elements.${s}`,""]])}pluginScopeKeys(t){const s=t.id,i=this.type;return En(`${i}-plugin-${s}`,()=>[[`plugins.${s}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,s){const i=this._scopeCache;let n=i.get(t);return(!n||s)&&(n=new Map,i.set(t,n)),n}getOptionScopes(t,s,i){const{options:n,type:r}=this,a=this._cachedScopes(t,i),o=a.get(s);if(o)return o;const l=new Set;s.forEach(h=>{t&&(l.add(t),h.forEach(u=>Ri(l,t,u))),h.forEach(u=>Ri(l,n,u)),h.forEach(u=>Ri(l,xs[r]||{},u)),h.forEach(u=>Ri(l,rt,u)),h.forEach(u=>Ri(l,Gr,u))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),uc.has(s)&&a.set(s,c),c}chartOptionScopes(){const{options:t,type:s}=this;return[t,xs[s]||{},rt.datasets[s]||{},{type:s},rt,Gr]}resolveNamedOptions(t,s,i,n=[""]){const r={$shared:!0},{resolver:a,subPrefixes:o}=dc(this._resolverCache,t,n);let l=a;if(fg(a,s)){r.$shared=!1,i=rs(i)?i():i;const c=this.createResolver(t,i,o);l=Ws(a,i,c)}for(const c of s)r[c]=l[c];return r}createResolver(t,s,i=[""],n){const{resolver:r}=dc(this._resolverCache,t,i);return it(s)?Ws(r,s,void 0,n):r}}function dc(e,t,s){let i=e.get(t);i||(i=new Map,e.set(t,i));const n=s.join();let r=i.get(n);return r||(r={resolver:Zr(t,s),subPrefixes:s.filter(o=>!o.toLowerCase().includes("hover"))},i.set(n,r)),r}const dg=e=>it(e)&&Object.getOwnPropertyNames(e).reduce((t,s)=>t||rs(e[s]),!1);function fg(e,t){const{isScriptable:s,isIndexable:i}=fl(e);for(const n of t){const r=s(n),a=i(n),o=(a||r)&&e[n];if(r&&(rs(o)||dg(o))||a&&wt(o))return!0}return!1}var gg="3.9.1";const pg=["top","bottom","left","right","chartArea"];function fc(e,t){return e==="top"||e==="bottom"||pg.indexOf(e)===-1&&t==="x"}function gc(e,t){return function(s,i){return s[e]===i[e]?s[t]-i[t]:s[e]-i[e]}}function pc(e){const t=e.chart,s=t.options.animation;t.notifyPlugins("afterRender"),St(s&&s.onComplete,[e],t)}function mg(e){const t=e.chart,s=t.options.animation;St(s&&s.onProgress,[e],t)}function mc(e){return xl()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const In={},bc=e=>{const t=mc(e);return Object.values(In).filter(s=>s.canvas===t).pop()};function bg(e,t,s){const i=Object.keys(e);for(const n of i){const r=+n;if(r>=t){const a=e[n];delete e[n],(s>0||r>t)&&(e[r+s]=a)}}}function _g(e,t,s,i){return!s||e.type==="mouseout"?null:i?t:e}class Fi{constructor(t,s){const i=this.config=new ug(s),n=mc(t),r=bc(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||tg(n)),this.platform.updateConfig(i);const o=this.platform.acquireContext(n,a.aspectRatio),l=o&&o.canvas,c=l&&l.height,h=l&&l.width;if(this.id=nu(),this.ctx=o,this.canvas=l,this.width=h,this.height=c,this._options=a,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 eg,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=vu(u=>this.update(u),a.resizeDelay||0),this._dataChanges=[],In[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ue.listen(this,"complete",pc),Ue.listen(this,"progress",mg),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:s},width:i,height:n,_aspectRatio:r}=this;return ft(t)?s&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():wl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return hl(this.canvas,this.ctx),this}stop(){return Ue.stop(this),this}resize(t,s){Ue.running(this)?this._resizeBeforeDraw={width:t,height:s}:this._resize(t,s)}_resize(t,s){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,s,r),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,wl(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),St(i.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const s=this.options.scales||{};pt(s,(i,n)=>{i.id=n})}buildOrUpdateScales(){const t=this.options,s=t.scales,i=this.scales,n=Object.keys(i).reduce((a,o)=>(a[o]=!1,a),{});let r=[];s&&(r=r.concat(Object.keys(s).map(a=>{const o=s[a],l=pa(a,o),c=l==="r",h=l==="x";return{options:o,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),pt(r,a=>{const o=a.options,l=o.id,c=pa(l,o),h=q(o.type,a.dtype);(o.position===void 0||fc(o.position,c)!==fc(a.dposition))&&(o.position=a.dposition),n[l]=!0;let u=null;if(l in i&&i[l].type===h)u=i[l];else{const f=Fe.getScale(h);u=new f({id:l,type:h,ctx:this.ctx,chart:this}),i[u.id]=u}u.init(o,t)}),pt(n,(a,o)=>{a||delete i[o]}),pt(i,a=>{me.configure(this,a,a.options),me.addBox(this,a)})}_updateMetasets(){const t=this._metasets,s=this.data.datasets.length,i=t.length;if(t.sort((n,r)=>n.index-r.index),i>s){for(let n=s;n<i;++n)this._destroyDatasetMeta(n);t.splice(s,i-s)}this._sortedMetasets=t.slice(0).sort(gc("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:s}}=this;t.length>s.length&&delete this._stacks,t.forEach((i,n)=>{s.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],s=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=s.length;i<n;i++){const r=s[i];let a=this.getDatasetMeta(i);const o=r.type||this.config.type;if(a.type&&a.type!==o&&(this._destroyDatasetMeta(i),a=this.getDatasetMeta(i)),a.type=o,a.indexAxis=r.indexAxis||ga(o,this.options),a.order=r.order||0,a.index=i,a.label=""+r.label,a.visible=this.isDatasetVisible(i),a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{const l=Fe.getController(o),{datasetElementType:c,dataElementType:h}=rt.datasets[o];Object.assign(l.prototype,{dataElementType:Fe.getElement(h),datasetElementType:c&&Fe.getElement(c)}),a.controller=new l(this,i),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){pt(this.data.datasets,(t,s)=>{this.getDatasetMeta(s).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const s=this.config;s.update();const i=this._options=s.createResolver(s.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:u}=this.getDatasetMeta(c),f=!n&&r.indexOf(u)===-1;u.buildOrUpdateElements(f),a=Math.max(+u.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),n||pt(r,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(gc("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){pt(this.scales,t=>{me.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,s=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Yo(s,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,s=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:r}of s){const a=i==="_removeElements"?-r:r;bg(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const s=this.data.datasets.length,i=r=>new Set(t.filter(a=>a[0]===r).map((a,o)=>o+","+a.splice(1).join(","))),n=i(0);for(let r=1;r<s;r++)if(!Yo(n,i(r)))return;return Array.from(n).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;me.update(this,this.width,this.height,t);const s=this.chartArea,i=s.width<=0||s.height<=0;this._layers=[],pt(this.boxes,n=>{i&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,r)=>{n._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let s=0,i=this.data.datasets.length;s<i;++s)this.getDatasetMeta(s).controller.configure();for(let s=0,i=this.data.datasets.length;s<i;++s)this._updateDataset(s,rs(t)?t({datasetIndex:s}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,s){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:s,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(i.controller._update(s),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ue.has(this)?this.attached&&!Ue.running(this)&&Ue.start(this):(this.draw(),pc({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:n}=this._resizeBeforeDraw;this._resize(i,n),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const s=this._layers;for(t=0;t<s.length&&s[t].z<=0;++t)s[t].draw(this.chartArea);for(this._drawDatasets();t<s.length;++t)s[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const s=this._sortedMetasets,i=[];let n,r;for(n=0,r=s.length;n<r;++n){const a=s[n];(!t||a.visible)&&i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let s=t.length-1;s>=0;--s)this._drawDataset(t[s]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const s=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&xn(s,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&wn(s),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return wi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,s,i,n){const r=Rf.modes[s];return typeof r=="function"?r(this,t,i,n):[]}getDatasetMeta(t){const s=this.data.datasets[t],i=this._metasets;let n=i.filter(r=>r&&r._dataset===s).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:s&&s.order||0,index:t,_dataset:s,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=ls(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const s=this.data.datasets[t];if(!s)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!s.hidden}setDatasetVisibility(t,s){const i=this.getDatasetMeta(t);i.hidden=!s}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,s,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),a=r.controller._resolveAnimations(void 0,n);fe(s)?(r.data[s].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(r,{visible:i}),this.update(o=>o.datasetIndex===t?n:void 0))}hide(t,s){this._updateVisibility(t,s,!1)}show(t,s){this._updateVisibility(t,s,!0)}_destroyDatasetMeta(t){const s=this._metasets[t];s&&s.controller&&s.controller._destroy(),delete this._metasets[t]}_stop(){let t,s;for(this.stop(),Ue.remove(this),t=0,s=this.data.datasets.length;t<s;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:s}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),hl(t,s),this.platform.releaseContext(s),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete In[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,s=this.platform,i=(r,a)=>{s.addEventListener(this,r,a),t[r]=a},n=(r,a,o)=>{r.offsetX=a,r.offsetY=o,this._eventHandler(r)};pt(this.options.events,r=>i(r,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,s=this.platform,i=(l,c)=>{s.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(s.removeEventListener(this,l,c),delete t[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const o=()=>{n("attach",o),this.attached=!0,this.resize(),i("resize",r),i("detach",a)};a=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",o)},s.isAttached(this.canvas)?o():a()}unbindEvents(){pt(this._listeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._listeners={},pt(this._responsiveListeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,s,i){const n=i?"set":"remove";let r,a,o,l;for(s==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){a=t[o];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[n+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const s=this._active||[],i=t.map(({datasetIndex:r,index:a})=>{const o=this.getDatasetMeta(r);if(!o)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:o.data[a],index:a}});!dn(i,s)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,s))}notifyPlugins(t,s,i){return this._plugins.notify(this,t,s,i)}_updateHoverStyles(t,s,i){const n=this.options.hover,r=(l,c)=>l.filter(h=>!c.some(u=>h.datasetIndex===u.datasetIndex&&h.index===u.index)),a=r(s,t),o=i?t:r(t,s);a.length&&this.updateHoverStyle(a,n.mode,!1),o.length&&n.mode&&this.updateHoverStyle(o,n.mode,!0)}_eventHandler(t,s){const i={event:t,replay:s,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,n)===!1)return;const r=this._handleEvent(t,s,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,s,i){const{_active:n=[],options:r}=this,a=s,o=this._getActiveElements(t,n,i,a),l=hu(t),c=_g(t,this._lastEvent,i,l);i&&(this._lastEvent=null,St(r.onHover,[t,o,this],this),l&&St(r.onClick,[t,o,this],this));const h=!dn(o,n);return(h||s)&&(this._active=o,this._updateHoverStyles(o,n,s)),this._lastEvent=c,h}_getActiveElements(t,s,i,n){if(t.type==="mouseout")return[];if(!i)return s;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,n)}}const _c=()=>pt(Fi.instances,e=>e._plugins.invalidate()),cs=!0;Object.defineProperties(Fi,{defaults:{enumerable:cs,value:rt},instances:{enumerable:cs,value:In},overrides:{enumerable:cs,value:xs},registry:{enumerable:cs,value:Fe},version:{enumerable:cs,value:gg},getChart:{enumerable:cs,value:bc},register:{enumerable:cs,value:(...e)=>{Fe.add(...e),_c()}},unregister:{enumerable:cs,value:(...e)=>{Fe.remove(...e),_c()}}});function yc(e,t,s){const{startAngle:i,pixelMargin:n,x:r,y:a,outerRadius:o,innerRadius:l}=t;let c=n/o;e.beginPath(),e.arc(r,a,o,i-c,s+c),l>n?(c=n/l,e.arc(r,a,l,s+c,i-c,!0)):e.arc(r,a,n,s+zt,i-zt),e.closePath(),e.clip()}function yg(e){return Kr(e,["outerStart","outerEnd","innerStart","innerEnd"])}function vg(e,t,s,i){const n=yg(e.options.borderRadius),r=(s-t)/2,a=Math.min(r,i*t/2),o=l=>{const c=(s-Math.min(r,l))*i/2;return Zt(l,0,Math.min(r,c))};return{outerStart:o(n.outerStart),outerEnd:o(n.outerEnd),innerStart:Zt(n.innerStart,0,a),innerEnd:Zt(n.innerEnd,0,a)}}function js(e,t,s,i){return{x:s+e*Math.cos(t),y:i+e*Math.sin(t)}}function ma(e,t,s,i,n,r){const{x:a,y:o,startAngle:l,pixelMargin:c,innerRadius:h}=t,u=Math.max(t.outerRadius+i+s-c,0),f=h>0?h+i+s+c:0;let g=0;const m=n-l;if(i){const G=h>0?h-i:0,Ot=u>0?u-i:0,_t=(G+Ot)/2,qt=_t!==0?m*_t/(_t+i):m;g=(m-qt)/2}const v=Math.max(.001,m*u-s/At)/u,x=(m-v)/2,k=l+x+g,D=n-x-g,{outerStart:P,outerEnd:T,innerStart:O,innerEnd:N}=vg(t,f,u,D-k),I=u-P,j=u-T,H=k+P/I,nt=D-T/j,Z=f+O,J=f+N,Rt=k+O/Z,Ut=D-N/J;if(e.beginPath(),r){if(e.arc(a,o,u,H,nt),T>0){const _t=js(j,nt,a,o);e.arc(_t.x,_t.y,T,nt,D+zt)}const G=js(J,D,a,o);if(e.lineTo(G.x,G.y),N>0){const _t=js(J,Ut,a,o);e.arc(_t.x,_t.y,N,D+zt,Ut+Math.PI)}if(e.arc(a,o,f,D-N/f,k+O/f,!0),O>0){const _t=js(Z,Rt,a,o);e.arc(_t.x,_t.y,O,Rt+Math.PI,k-zt)}const Ot=js(I,k,a,o);if(e.lineTo(Ot.x,Ot.y),P>0){const _t=js(I,H,a,o);e.arc(_t.x,_t.y,P,k-zt,H)}}else{e.moveTo(a,o);const G=Math.cos(H)*u+a,Ot=Math.sin(H)*u+o;e.lineTo(G,Ot);const _t=Math.cos(nt)*u+a,qt=Math.sin(nt)*u+o;e.lineTo(_t,qt)}e.closePath()}function xg(e,t,s,i,n){const{fullCircles:r,startAngle:a,circumference:o}=t;let l=t.endAngle;if(r){ma(e,t,s,i,a+mt,n);for(let c=0;c<r;++c)e.fill();isNaN(o)||(l=a+o%mt,o%mt===0&&(l+=mt))}return ma(e,t,s,i,l,n),e.fill(),l}function wg(e,t,s){const{x:i,y:n,startAngle:r,pixelMargin:a,fullCircles:o}=t,l=Math.max(t.outerRadius-a,0),c=t.innerRadius+a;let h;for(s&&yc(e,t,r+mt),e.beginPath(),e.arc(i,n,c,r+mt,r,!0),h=0;h<o;++h)e.stroke();for(e.beginPath(),e.arc(i,n,l,r,r+mt),h=0;h<o;++h)e.stroke()}function Sg(e,t,s,i,n,r){const{options:a}=t,{borderWidth:o,borderJoinStyle:l}=a,c=a.borderAlign==="inner";o&&(c?(e.lineWidth=o*2,e.lineJoin=l||"round"):(e.lineWidth=o,e.lineJoin=l||"bevel"),t.fullCircles&&wg(e,t,c),c&&yc(e,t,n),ma(e,t,s,i,n,r),e.stroke())}class Nn extends ke{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,s,i){const n=this.getProps(["x","y"],i),{angle:r,distance:a}=Bo(n,{x:t,y:s}),{startAngle:o,endAngle:l,innerRadius:c,outerRadius:h,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),f=this.options.spacing/2,m=q(u,l-o)>=mt||bi(r,o,l),v=Be(a,c+f,h+f);return m&&v}getCenterPoint(t){const{x:s,y:i,startAngle:n,endAngle:r,innerRadius:a,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,h=(n+r)/2,u=(a+o+c+l)/2;return{x:s+Math.cos(h)*u,y:i+Math.sin(h)*u}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:s,circumference:i}=this,n=(s.offset||0)/2,r=(s.spacing||0)/2,a=s.circular;if(this.pixelMargin=s.borderAlign==="inner"?.33:0,this.fullCircles=i>mt?Math.floor(i/mt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const c=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(c)*o,Math.sin(c)*o),this.circumference>=At&&(o=n)}t.fillStyle=s.backgroundColor,t.strokeStyle=s.borderColor;const l=xg(t,this,o,r,a);Sg(t,this,o,r,l,a),t.restore()}}Nn.id="arc",Nn.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},Nn.defaultRoutes={backgroundColor:"backgroundColor"};function vc(e,t,s=t){e.lineCap=q(s.borderCapStyle,t.borderCapStyle),e.setLineDash(q(s.borderDash,t.borderDash)),e.lineDashOffset=q(s.borderDashOffset,t.borderDashOffset),e.lineJoin=q(s.borderJoinStyle,t.borderJoinStyle),e.lineWidth=q(s.borderWidth,t.borderWidth),e.strokeStyle=q(s.borderColor,t.borderColor)}function kg(e,t,s){e.lineTo(s.x,s.y)}function Mg(e){return e.stepped?Gu:e.tension||e.cubicInterpolationMode==="monotone"?qu:kg}function xc(e,t,s={}){const i=e.length,{start:n=0,end:r=i-1}=s,{start:a,end:o}=t,l=Math.max(n,a),c=Math.min(r,o),h=n<a&&r<a||n>o&&r>o;return{count:i,start:l,loop:t.loop,ilen:c<l&&!h?i+c-l:c-l}}function Dg(e,t,s,i){const{points:n,options:r}=t,{count:a,start:o,loop:l,ilen:c}=xc(n,s,i),h=Mg(r);let{move:u=!0,reverse:f}=i||{},g,m,v;for(g=0;g<=c;++g)m=n[(o+(f?c-g:g))%a],!m.skip&&(u?(e.moveTo(m.x,m.y),u=!1):h(e,v,m,f,r.stepped),v=m);return l&&(m=n[(o+(f?c:0))%a],h(e,v,m,f,r.stepped)),!!l}function Cg(e,t,s,i){const n=t.points,{count:r,start:a,ilen:o}=xc(n,s,i),{move:l=!0,reverse:c}=i||{};let h=0,u=0,f,g,m,v,x,k;const D=T=>(a+(c?o-T:T))%r,P=()=>{v!==x&&(e.lineTo(h,x),e.lineTo(h,v),e.lineTo(h,k))};for(l&&(g=n[D(0)],e.moveTo(g.x,g.y)),f=0;f<=o;++f){if(g=n[D(f)],g.skip)continue;const T=g.x,O=g.y,N=T|0;N===m?(O<v?v=O:O>x&&(x=O),h=(u*h+T)/++u):(P(),e.lineTo(T,O),m=N,u=0,v=x=O),k=O}P()}function ba(e){const t=e.options,s=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!s?Cg:Dg}function Og(e){return e.stepped?Md:e.tension||e.cubicInterpolationMode==="monotone"?Dd:Cs}function Pg(e,t,s,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,s,i)&&n.closePath()),vc(e,t.options),e.stroke(n)}function Tg(e,t,s,i){const{segments:n,options:r}=t,a=ba(t);for(const o of n)vc(e,r,o.style),e.beginPath(),a(e,t,o,{start:s,end:s+i-1})&&e.closePath(),e.stroke()}const Ag=typeof Path2D=="function";function Lg(e,t,s,i){Ag&&!t.options.segment?Pg(e,t,s,i):Tg(e,t,s,i)}class hs extends ke{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,s){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;bd(this._points,i,t,n,s),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=Rd(this,this.options.segment))}first(){const t=this.segments,s=this.points;return t.length&&s[t[0].start]}last(){const t=this.segments,s=this.points,i=t.length;return i&&s[t[i-1].end]}interpolate(t,s){const i=this.options,n=t[s],r=this.points,a=Tl(this,{property:s,start:n,end:n});if(!a.length)return;const o=[],l=Og(i);let c,h;for(c=0,h=a.length;c<h;++c){const{start:u,end:f}=a[c],g=r[u],m=r[f];if(g===m){o.push(g);continue}const v=Math.abs((n-g[s])/(m[s]-g[s])),x=l(g,m,v,i.stepped);x[s]=t[s],o.push(x)}return o.length===1?o[0]:o}pathSegment(t,s,i){return ba(this)(t,this,s,i)}path(t,s,i){const n=this.segments,r=ba(this);let a=this._loop;s=s||0,i=i||this.points.length-s;for(const o of n)a&=r(t,this,o,{start:s,end:s+i-1});return!!a}draw(t,s,i,n){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),Lg(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}hs.id="line",hs.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},hs.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},hs.descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};function wc(e,t,s,i){const n=e.options,{[s]:r}=e.getProps([s],i);return Math.abs(t-r)<n.radius+n.hitRadius}class zn extends ke{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,s,i){const n=this.options,{x:r,y:a}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(s-a,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,s){return wc(this,t,"x",s)}inYRange(t,s){return wc(this,t,"y",s)}getCenterPoint(t){const{x:s,y:i}=this.getProps(["x","y"],t);return{x:s,y:i}}size(t){t=t||this.options||{};let s=t.radius||0;s=Math.max(s,s&&t.hoverRadius||0);const i=s&&t.borderWidth||0;return(s+i)*2}draw(t,s){const i=this.options;this.skip||i.radius<.1||!wi(this,s,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Xr(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}zn.id="point",zn.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},zn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Sc(e,t){const{x:s,y:i,base:n,width:r,height:a}=e.getProps(["x","y","base","width","height"],t);let o,l,c,h,u;return e.horizontal?(u=a/2,o=Math.min(s,n),l=Math.max(s,n),c=i-u,h=i+u):(u=r/2,o=s-u,l=s+u,c=Math.min(i,n),h=Math.max(i,n)),{left:o,top:c,right:l,bottom:h}}function us(e,t,s,i){return e?0:Zt(t,s,i)}function Rg(e,t,s){const i=e.options.borderWidth,n=e.borderSkipped,r=dl(i);return{t:us(n.top,r.top,0,s),r:us(n.right,r.right,0,t),b:us(n.bottom,r.bottom,0,s),l:us(n.left,r.left,0,t)}}function Fg(e,t,s){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),n=e.options.borderRadius,r=ks(n),a=Math.min(t,s),o=e.borderSkipped,l=i||it(n);return{topLeft:us(!l||o.top||o.left,r.topLeft,0,a),topRight:us(!l||o.top||o.right,r.topRight,0,a),bottomLeft:us(!l||o.bottom||o.left,r.bottomLeft,0,a),bottomRight:us(!l||o.bottom||o.right,r.bottomRight,0,a)}}function Eg(e){const t=Sc(e),s=t.right-t.left,i=t.bottom-t.top,n=Rg(e,s/2,i/2),r=Fg(e,s/2,i/2);return{outer:{x:t.left,y:t.top,w:s,h:i,radius:r},inner:{x:t.left+n.l,y:t.top+n.t,w:s-n.l-n.r,h:i-n.t-n.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,r.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(n.b,n.r))}}}}function _a(e,t,s,i){const n=t===null,r=s===null,o=e&&!(n&&r)&&Sc(e,i);return o&&(n||Be(t,o.left,o.right))&&(r||Be(s,o.top,o.bottom))}function Ig(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Ng(e,t){e.rect(t.x,t.y,t.w,t.h)}function ya(e,t,s={}){const i=e.x!==s.x?-t:0,n=e.y!==s.y?-t:0,r=(e.x+e.w!==s.x+s.w?t:0)-i,a=(e.y+e.h!==s.y+s.h?t:0)-n;return{x:e.x+i,y:e.y+n,w:e.w+r,h:e.h+a,radius:e.radius}}class Yn extends ke{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:s,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:a}=Eg(this),o=Ig(a.radius)?Si:Ng;t.save(),(a.w!==r.w||a.h!==r.h)&&(t.beginPath(),o(t,ya(a,s,r)),t.clip(),o(t,ya(r,-s,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,ya(r,s)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,s,i){return _a(this,t,s,i)}inXRange(t,s){return _a(this,t,null,s)}inYRange(t,s){return _a(this,null,t,s)}getCenterPoint(t){const{x:s,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(s+n)/2:s,y:r?i:(i+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Yn.id="bar",Yn.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Yn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function zg(e,t,s){const i=e.segments,n=e.points,r=t.points,a=[];for(const o of i){let{start:l,end:c}=o;c=xa(l,c,n);const h=va(s,n[l],n[c],o.loop);if(!t.segments){a.push({source:o,target:h,start:n[l],end:n[c]});continue}const u=Tl(t,h);for(const f of u){const g=va(s,r[f.start],r[f.end],f.loop),m=Pl(o,n,g);for(const v of m)a.push({source:v,target:f,start:{[s]:kc(h,g,"start",Math.max)},end:{[s]:kc(h,g,"end",Math.min)}})}}return a}function va(e,t,s,i){if(i)return;let n=t[e],r=s[e];return e==="angle"&&(n=le(n),r=le(r)),{property:e,start:n,end:r}}function Yg(e,t){const{x:s=null,y:i=null}=e||{},n=t.points,r=[];return t.segments.forEach(({start:a,end:o})=>{o=xa(a,o,n);const l=n[a],c=n[o];i!==null?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):s!==null&&(r.push({x:s,y:l.y}),r.push({x:s,y:c.y}))}),r}function xa(e,t,s){for(;t>e;t--){const i=s[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function kc(e,t,s,i){return e&&t?i(e[s],t[s]):e?e[s]:t?t[s]:0}function Mc(e,t){let s=[],i=!1;return wt(e)?(i=!0,s=e):s=Yg(e,t),s.length?new hs({points:s,options:{tension:0},_loop:i,_fullLoop:i}):null}function Dc(e){return e&&e.fill!==!1}function Vg(e,t,s){let n=e[t].fill;const r=[t];let a;if(!s)return n;for(;n!==!1&&r.indexOf(n)===-1;){if(!Yt(n))return n;if(a=e[n],!a)return!1;if(a.visible)return n;r.push(n),n=a.fill}return!1}function $g(e,t,s){const i=jg(e);if(it(i))return isNaN(i.value)?!1:i;let n=parseFloat(i);return Yt(n)&&Math.floor(n)===n?Wg(i[0],t,n,s):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function Wg(e,t,s,i){return(e==="-"||e==="+")&&(s=t+s),s===t||s<0||s>=i?!1:s}function Hg(e,t){let s=null;return e==="start"?s=t.bottom:e==="end"?s=t.top:it(e)?s=t.getPixelForValue(e.value):t.getBasePixel&&(s=t.getBasePixel()),s}function Bg(e,t,s){let i;return e==="start"?i=s:e==="end"?i=t.options.reverse?t.min:t.max:it(e)?i=e.value:i=t.getBaseValue(),i}function jg(e){const t=e.options,s=t.fill;let i=q(s&&s.target,s);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Ug(e){const{scale:t,index:s,line:i}=e,n=[],r=i.segments,a=i.points,o=Gg(t,s);o.push(Mc({x:null,y:t.bottom},i));for(let l=0;l<r.length;l++){const c=r[l];for(let h=c.start;h<=c.end;h++)qg(n,a[h],o)}return new hs({points:n,options:{}})}function Gg(e,t){const s=[],i=e.getMatchingVisibleMetas("line");for(let n=0;n<i.length;n++){const r=i[n];if(r.index===t)break;r.hidden||s.unshift(r.dataset)}return s}function qg(e,t,s){const i=[];for(let n=0;n<s.length;n++){const r=s[n],{first:a,last:o,point:l}=Xg(r,t,"x");if(!(!l||a&&o)){if(a)i.unshift(l);else if(e.push(l),!o)break}}e.push(...i)}function Xg(e,t,s){const i=e.interpolate(t,s);if(!i)return{};const n=i[s],r=e.segments,a=e.points;let o=!1,l=!1;for(let c=0;c<r.length;c++){const h=r[c],u=a[h.start][s],f=a[h.end][s];if(Be(n,u,f)){o=n===u,l=n===f;break}}return{first:o,last:l,point:i}}class Cc{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,s,i){const{x:n,y:r,radius:a}=this;return s=s||{start:0,end:mt},t.arc(n,r,a,s.end,s.start,!0),!i.bounds}interpolate(t){const{x:s,y:i,radius:n}=this,r=t.angle;return{x:s+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function Kg(e){const{chart:t,fill:s,line:i}=e;if(Yt(s))return Zg(t,s);if(s==="stack")return Ug(e);if(s==="shape")return!0;const n=Jg(e);return n instanceof Cc?n:Mc(n,i)}function Zg(e,t){const s=e.getDatasetMeta(t);return s&&e.isDatasetVisible(t)?s.dataset:null}function Jg(e){return(e.scale||{}).getPointPositionForValue?tp(e):Qg(e)}function Qg(e){const{scale:t={},fill:s}=e,i=Hg(s,t);if(Yt(i)){const n=t.isHorizontal();return{x:n?i:null,y:n?null:i}}return null}function tp(e){const{scale:t,fill:s}=e,i=t.options,n=t.getLabels().length,r=i.reverse?t.max:t.min,a=Bg(s,t,r),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,r);return new Cc({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(a)})}for(let l=0;l<n;++l)o.push(t.getPointPositionForValue(l,a));return o}function wa(e,t,s){const i=Kg(t),{line:n,scale:r,axis:a}=t,o=n.options,l=o.fill,c=o.backgroundColor,{above:h=c,below:u=c}=l||{};i&&n.points.length&&(xn(e,s),ep(e,{line:n,target:i,above:h,below:u,area:s,scale:r,axis:a}),wn(e))}function ep(e,t){const{line:s,target:i,above:n,below:r,area:a,scale:o}=t,l=s._loop?"angle":t.axis;e.save(),l==="x"&&r!==n&&(Oc(e,i,a.top),Pc(e,{line:s,target:i,color:n,scale:o,property:l}),e.restore(),e.save(),Oc(e,i,a.bottom)),Pc(e,{line:s,target:i,color:r,scale:o,property:l}),e.restore()}function Oc(e,t,s){const{segments:i,points:n}=t;let r=!0,a=!1;e.beginPath();for(const o of i){const{start:l,end:c}=o,h=n[l],u=n[xa(l,c,n)];r?(e.moveTo(h.x,h.y),r=!1):(e.lineTo(h.x,s),e.lineTo(h.x,h.y)),a=!!t.pathSegment(e,o,{move:a}),a?e.closePath():e.lineTo(u.x,s)}e.lineTo(t.first().x,s),e.closePath(),e.clip()}function Pc(e,t){const{line:s,target:i,property:n,color:r,scale:a}=t,o=zg(s,i,n);for(const{source:l,target:c,start:h,end:u}of o){const{style:{backgroundColor:f=r}={}}=l,g=i!==!0;e.save(),e.fillStyle=f,sp(e,a,g&&va(n,h,u)),e.beginPath();const m=!!s.pathSegment(e,l);let v;if(g){m?e.closePath():Tc(e,i,u,n);const x=!!i.pathSegment(e,c,{move:m,reverse:!0});v=m&&x,v||Tc(e,i,h,n)}e.closePath(),e.fill(v?"evenodd":"nonzero"),e.restore()}}function sp(e,t,s){const{top:i,bottom:n}=t.chart.chartArea,{property:r,start:a,end:o}=s||{};r==="x"&&(e.beginPath(),e.rect(a,i,o-a,n-i),e.clip())}function Tc(e,t,s,i){const n=t.interpolate(s,i);n&&e.lineTo(n.x,n.y)}var ip={id:"filler",afterDatasetsUpdate(e,t,s){const i=(e.data.datasets||[]).length,n=[];let r,a,o,l;for(a=0;a<i;++a)r=e.getDatasetMeta(a),o=r.dataset,l=null,o&&o.options&&o instanceof hs&&(l={visible:e.isDatasetVisible(a),index:a,fill:$g(o,a,i),chart:e,axis:r.controller.options.indexAxis,scale:r.vScale,line:o}),r.$filler=l,n.push(l);for(a=0;a<i;++a)l=n[a],!(!l||l.fill===!1)&&(l.fill=Vg(n,a,s.propagate))},beforeDraw(e,t,s){const i=s.drawTime==="beforeDraw",n=e.getSortedVisibleDatasetMetas(),r=e.chartArea;for(let a=n.length-1;a>=0;--a){const o=n[a].$filler;o&&(o.line.updateControlPoints(r,o.axis),i&&o.fill&&wa(e.ctx,o,r))}},beforeDatasetsDraw(e,t,s){if(s.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const r=i[n].$filler;Dc(r)&&wa(e.ctx,r,e.chartArea)}},beforeDatasetDraw(e,t,s){const i=t.meta.$filler;!Dc(i)||s.drawTime!=="beforeDatasetDraw"||wa(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Ac=(e,t)=>{let{boxHeight:s=t,boxWidth:i=t}=e;return e.usePointStyle&&(s=Math.min(s,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:s,itemHeight:Math.max(t,s)}},np=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Lc extends ke{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,s,i){this.maxWidth=t,this.maxHeight=s,this._margins=i,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 s=St(t.generateLabels,[this.chart],this)||[];t.filter&&(s=s.filter(i=>t.filter(i,this.chart.data))),t.sort&&(s=s.sort((i,n)=>t.sort(i,n,this.chart.data))),this.options.reverse&&s.reverse(),this.legendItems=s}fit(){const{options:t,ctx:s}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,n=Bt(i.font),r=n.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=Ac(i,r);let c,h;s.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,r,o,l)+10):(h=this.maxHeight,c=this._fitCols(a,r,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,s,i,n){const{ctx:r,maxWidth:a,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+o;let u=t;r.textAlign="left",r.textBaseline="middle";let f=-1,g=-h;return this.legendItems.forEach((m,v)=>{const x=i+s/2+r.measureText(m.text).width;(v===0||c[c.length-1]+x+2*o>a)&&(u+=h,c[c.length-(v>0?0:1)]=0,g+=h,f++),l[v]={left:0,top:g,row:f,width:x,height:n},c[c.length-1]+=x+o}),u}_fitCols(t,s,i,n){const{ctx:r,maxHeight:a,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t;let u=o,f=0,g=0,m=0,v=0;return this.legendItems.forEach((x,k)=>{const D=i+s/2+r.measureText(x.text).width;k>0&&g+n+2*o>h&&(u+=f+o,c.push({width:f,height:g}),m+=f+o,v++,f=g=0),l[k]={left:m,top:g,col:v,width:D,height:n},f=Math.max(f,D),g+=n+o}),u+=f,c.push({width:f,height:g}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:s,options:{align:i,labels:{padding:n},rtl:r}}=this,a=Bs(r,this.left,this.width);if(this.isHorizontal()){let o=0,l=Jt(i,this.left+n,this.right-this.lineWidths[o]);for(const c of s)o!==c.row&&(o=c.row,l=Jt(i,this.left+n,this.right-this.lineWidths[o])),c.top+=this.top+t+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let o=0,l=Jt(i,this.top+t+n,this.bottom-this.columnSizes[o].height);for(const c of s)c.col!==o&&(o=c.col,l=Jt(i,this.top+t+n,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;xn(t,this),this._draw(),wn(t)}}_draw(){const{options:t,columnSizes:s,lineWidths:i,ctx:n}=this,{align:r,labels:a}=t,o=rt.color,l=Bs(t.rtl,this.left,this.width),c=Bt(a.font),{color:h,padding:u}=a,f=c.size,g=f/2;let m;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:v,boxHeight:x,itemHeight:k}=Ac(a,f),D=function(I,j,H){if(isNaN(v)||v<=0||isNaN(x)||x<0)return;n.save();const nt=q(H.lineWidth,1);if(n.fillStyle=q(H.fillStyle,o),n.lineCap=q(H.lineCap,"butt"),n.lineDashOffset=q(H.lineDashOffset,0),n.lineJoin=q(H.lineJoin,"miter"),n.lineWidth=nt,n.strokeStyle=q(H.strokeStyle,o),n.setLineDash(q(H.lineDash,[])),a.usePointStyle){const Z={radius:x*Math.SQRT2/2,pointStyle:H.pointStyle,rotation:H.rotation,borderWidth:nt},J=l.xPlus(I,v/2),Rt=j+g;ul(n,Z,J,Rt,a.pointStyleWidth&&v)}else{const Z=j+Math.max((f-x)/2,0),J=l.leftForLtr(I,v),Rt=ks(H.borderRadius);n.beginPath(),Object.values(Rt).some(Ut=>Ut!==0)?Si(n,{x:J,y:Z,w:v,h:x,radius:Rt}):n.rect(J,Z,v,x),n.fill(),nt!==0&&n.stroke()}n.restore()},P=function(I,j,H){Ss(n,H.text,I,j+k/2,c,{strikethrough:H.hidden,textAlign:l.textAlign(H.textAlign)})},T=this.isHorizontal(),O=this._computeTitleHeight();T?m={x:Jt(r,this.left+u,this.right-i[0]),y:this.top+u+O,line:0}:m={x:this.left+u,y:Jt(r,this.top+O+u,this.bottom-s[0].height),line:0},Ml(this.ctx,t.textDirection);const N=k+u;this.legendItems.forEach((I,j)=>{n.strokeStyle=I.fontColor||h,n.fillStyle=I.fontColor||h;const H=n.measureText(I.text).width,nt=l.textAlign(I.textAlign||(I.textAlign=a.textAlign)),Z=v+g+H;let J=m.x,Rt=m.y;l.setWidth(this.width),T?j>0&&J+Z+u>this.right&&(Rt=m.y+=N,m.line++,J=m.x=Jt(r,this.left+u,this.right-i[m.line])):j>0&&Rt+N>this.bottom&&(J=m.x=J+s[m.line].width+u,m.line++,Rt=m.y=Jt(r,this.top+O+u,this.bottom-s[m.line].height));const Ut=l.x(J);D(Ut,Rt,I),J=xu(nt,J+v+g,T?J+Z:this.right,t.rtl),P(l.x(J),Rt,I),T?m.x+=Z+u:m.y+=N}),Dl(this.ctx,t.textDirection)}drawTitle(){const t=this.options,s=t.title,i=Bt(s.font),n=Qt(s.padding);if(!s.display)return;const r=Bs(t.rtl,this.left,this.width),a=this.ctx,o=s.position,l=i.size/2,c=n.top+l;let h,u=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),h=this.top+c,u=Jt(t.align,u,this.right-f);else{const m=this.columnSizes.reduce((v,x)=>Math.max(v,x.height),0);h=c+Jt(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const g=Jt(o,u,u+f);a.textAlign=r.textAlign(Vr(o)),a.textBaseline="middle",a.strokeStyle=s.color,a.fillStyle=s.color,a.font=i.string,Ss(a,s.text,g,h,i)}_computeTitleHeight(){const t=this.options.title,s=Bt(t.font),i=Qt(t.padding);return t.display?s.lineHeight+i.height:0}_getLegendItemAt(t,s){let i,n,r;if(Be(t,this.left,this.right)&&Be(s,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(n=r[i],Be(t,n.left,n.left+n.width)&&Be(s,n.top,n.top+n.height))return this.legendItems[i]}return null}handleEvent(t){const s=this.options;if(!rp(t.type,s))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,r=np(n,i);n&&!r&&St(s.onLeave,[t,n,this],this),this._hoveredItem=i,i&&!r&&St(s.onHover,[t,i,this],this)}else i&&St(s.onClick,[t,i,this],this)}}function rp(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var ap={id:"legend",_element:Lc,start(e,t,s){const i=e.legend=new Lc({ctx:e.ctx,options:s,chart:e});me.configure(e,i,s),me.addBox(e,i)},stop(e){me.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,s){const i=e.legend;me.configure(e,i,s),i.options=s},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,s){const i=t.datasetIndex,n=s.chart;n.isDatasetVisible(i)?(n.hide(i),t.hidden=!0):(n.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:s,pointStyle:i,textAlign:n,color:r}}=e.legend.options;return e._getSortedDatasetMetas().map(a=>{const o=a.controller.getStyle(s?0:void 0),l=Qt(o.borderWidth);return{text:t[a.index].label,fillStyle:o.backgroundColor,fontColor:r,hidden:!a.visible,lineCap:o.borderCapStyle,lineDash:o.borderDash,lineDashOffset:o.borderDashOffset,lineJoin:o.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:o.borderColor,pointStyle:i||o.pointStyle,rotation:o.rotation,textAlign:n||o.textAlign,borderRadius:0,datasetIndex:a.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Rc extends ke{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,s){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=s;const n=wt(i.text)?i.text.length:1;this._padding=Qt(i.padding);const r=n*Bt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:s,left:i,bottom:n,right:r,options:a}=this,o=a.align;let l=0,c,h,u;return this.isHorizontal()?(h=Jt(o,i,r),u=s+t,c=r-i):(a.position==="left"?(h=i+t,u=Jt(o,n,s),l=At*-.5):(h=r-t,u=Jt(o,s,n),l=At*.5),c=n-s),{titleX:h,titleY:u,maxWidth:c,rotation:l}}draw(){const t=this.ctx,s=this.options;if(!s.display)return;const i=Bt(s.font),r=i.lineHeight/2+this._padding.top,{titleX:a,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(r);Ss(t,s.text,0,0,i,{color:s.color,maxWidth:l,rotation:c,textAlign:Vr(s.align),textBaseline:"middle",translation:[a,o]})}}function op(e,t){const s=new Rc({ctx:e.ctx,options:t,chart:e});me.configure(e,s,t),me.addBox(e,s),e.titleBlock=s}var lp={id:"title",_element:Rc,start(e,t,s){op(e,s)},stop(e){const t=e.titleBlock;me.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,s){const i=e.titleBlock;me.configure(e,i,s),i.options=s},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 Ei={average(e){if(!e.length)return!1;let t,s,i=0,n=0,r=0;for(t=0,s=e.length;t<s;++t){const a=e[t].element;if(a&&a.hasValue()){const o=a.tooltipPosition();i+=o.x,n+=o.y,++r}}return{x:i/r,y:n/r}},nearest(e,t){if(!e.length)return!1;let s=t.x,i=t.y,n=Number.POSITIVE_INFINITY,r,a,o;for(r=0,a=e.length;r<a;++r){const l=e[r].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=zr(t,c);h<n&&(n=h,o=l)}}if(o){const l=o.tooltipPosition();s=l.x,i=l.y}return{x:s,y:i}}};function Ee(e,t){return t&&(wt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ge(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function cp(e,t){const{element:s,datasetIndex:i,index:n}=t,r=e.getDatasetMeta(i).controller,{label:a,value:o}=r.getLabelAndValue(n);return{chart:e,label:a,parsed:r.getParsed(n),raw:e.data.datasets[i].data[n],formattedValue:o,dataset:r.getDataset(),dataIndex:n,datasetIndex:i,element:s}}function Fc(e,t){const s=e.chart.ctx,{body:i,footer:n,title:r}=e,{boxWidth:a,boxHeight:o}=t,l=Bt(t.bodyFont),c=Bt(t.titleFont),h=Bt(t.footerFont),u=r.length,f=n.length,g=i.length,m=Qt(t.padding);let v=m.height,x=0,k=i.reduce((T,O)=>T+O.before.length+O.lines.length+O.after.length,0);if(k+=e.beforeBody.length+e.afterBody.length,u&&(v+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),k){const T=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;v+=g*T+(k-g)*l.lineHeight+(k-1)*t.bodySpacing}f&&(v+=t.footerMarginTop+f*h.lineHeight+(f-1)*t.footerSpacing);let D=0;const P=function(T){x=Math.max(x,s.measureText(T).width+D)};return s.save(),s.font=c.string,pt(e.title,P),s.font=l.string,pt(e.beforeBody.concat(e.afterBody),P),D=t.displayColors?a+2+t.boxPadding:0,pt(i,T=>{pt(T.before,P),pt(T.lines,P),pt(T.after,P)}),D=0,s.font=h.string,pt(e.footer,P),s.restore(),x+=m.width,{width:x,height:v}}function hp(e,t){const{y:s,height:i}=t;return s<i/2?"top":s>e.height-i/2?"bottom":"center"}function up(e,t,s,i){const{x:n,width:r}=i,a=s.caretSize+s.caretPadding;if(e==="left"&&n+r+a>t.width||e==="right"&&n-r-a<0)return!0}function dp(e,t,s,i){const{x:n,width:r}=s,{width:a,chartArea:{left:o,right:l}}=e;let c="center";return i==="center"?c=n<=(o+l)/2?"left":"right":n<=r/2?c="left":n>=a-r/2&&(c="right"),up(c,e,t,s)&&(c="center"),c}function Ec(e,t,s){const i=s.yAlign||t.yAlign||hp(e,s);return{xAlign:s.xAlign||t.xAlign||dp(e,t,s,i),yAlign:i}}function fp(e,t){let{x:s,width:i}=e;return t==="right"?s-=i:t==="center"&&(s-=i/2),s}function gp(e,t,s){let{y:i,height:n}=e;return t==="top"?i+=s:t==="bottom"?i-=n+s:i-=n/2,i}function Ic(e,t,s,i){const{caretSize:n,caretPadding:r,cornerRadius:a}=e,{xAlign:o,yAlign:l}=s,c=n+r,{topLeft:h,topRight:u,bottomLeft:f,bottomRight:g}=ks(a);let m=fp(t,o);const v=gp(t,l,c);return l==="center"?o==="left"?m+=c:o==="right"&&(m-=c):o==="left"?m-=Math.max(h,f)+n:o==="right"&&(m+=Math.max(u,g)+n),{x:Zt(m,0,i.width-t.width),y:Zt(v,0,i.height-t.height)}}function Vn(e,t,s){const i=Qt(s.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function Nc(e){return Ee([],Ge(e))}function pp(e,t,s){return ls(e,{tooltip:t,tooltipItems:s,type:"tooltip"})}function zc(e,t){const s=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return s?e.override(s):e}class Sa extends ke{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||t._chart,this._chart=this.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 s=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&s.options.animation&&i.animations,r=new Fl(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=pp(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,s){const{callbacks:i}=s,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),a=i.afterTitle.apply(this,[t]);let o=[];return o=Ee(o,Ge(n)),o=Ee(o,Ge(r)),o=Ee(o,Ge(a)),o}getBeforeBody(t,s){return Nc(s.callbacks.beforeBody.apply(this,[t]))}getBody(t,s){const{callbacks:i}=s,n=[];return pt(t,r=>{const a={before:[],lines:[],after:[]},o=zc(i,r);Ee(a.before,Ge(o.beforeLabel.call(this,r))),Ee(a.lines,o.label.call(this,r)),Ee(a.after,Ge(o.afterLabel.call(this,r))),n.push(a)}),n}getAfterBody(t,s){return Nc(s.callbacks.afterBody.apply(this,[t]))}getFooter(t,s){const{callbacks:i}=s,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),a=i.afterFooter.apply(this,[t]);let o=[];return o=Ee(o,Ge(n)),o=Ee(o,Ge(r)),o=Ee(o,Ge(a)),o}_createItems(t){const s=this._active,i=this.chart.data,n=[],r=[],a=[];let o=[],l,c;for(l=0,c=s.length;l<c;++l)o.push(cp(this.chart,s[l]));return t.filter&&(o=o.filter((h,u,f)=>t.filter(h,u,f,i))),t.itemSort&&(o=o.sort((h,u)=>t.itemSort(h,u,i))),pt(o,h=>{const u=zc(t.callbacks,h);n.push(u.labelColor.call(this,h)),r.push(u.labelPointStyle.call(this,h)),a.push(u.labelTextColor.call(this,h))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=a,this.dataPoints=o,o}update(t,s){const i=this.options.setContext(this.getContext()),n=this._active;let r,a=[];if(!n.length)this.opacity!==0&&(r={opacity:0});else{const o=Ei[i.position].call(this,n,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const l=this._size=Fc(this,i),c=Object.assign({},o,l),h=Ec(this.chart,i,c),u=Ic(i,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,r={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=a,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:s})}drawCaret(t,s,i,n){const r=this.getCaretPosition(t,i,n);s.lineTo(r.x1,r.y1),s.lineTo(r.x2,r.y2),s.lineTo(r.x3,r.y3)}getCaretPosition(t,s,i){const{xAlign:n,yAlign:r}=this,{caretSize:a,cornerRadius:o}=i,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:u}=ks(o),{x:f,y:g}=t,{width:m,height:v}=s;let x,k,D,P,T,O;return r==="center"?(T=g+v/2,n==="left"?(x=f,k=x-a,P=T+a,O=T-a):(x=f+m,k=x+a,P=T-a,O=T+a),D=x):(n==="left"?k=f+Math.max(l,h)+a:n==="right"?k=f+m-Math.max(c,u)-a:k=this.caretX,r==="top"?(P=g,T=P-a,x=k-a,D=k+a):(P=g+v,T=P+a,x=k+a,D=k-a),O=P),{x1:x,x2:k,x3:D,y1:P,y2:T,y3:O}}drawTitle(t,s,i){const n=this.title,r=n.length;let a,o,l;if(r){const c=Bs(i.rtl,this.x,this.width);for(t.x=Vn(this,i.titleAlign,i),s.textAlign=c.textAlign(i.titleAlign),s.textBaseline="middle",a=Bt(i.titleFont),o=i.titleSpacing,s.fillStyle=i.titleColor,s.font=a.string,l=0;l<r;++l)s.fillText(n[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+o,l+1===r&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,s,i,n,r){const a=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:l,boxWidth:c,boxPadding:h}=r,u=Bt(r.bodyFont),f=Vn(this,"left",r),g=n.x(f),m=l<u.lineHeight?(u.lineHeight-l)/2:0,v=s.y+m;if(r.usePointStyle){const x={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},k=n.leftForLtr(g,c)+c/2,D=v+l/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,Xr(t,x,k,D),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Xr(t,x,k,D)}else{t.lineWidth=it(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const x=n.leftForLtr(g,c-h),k=n.leftForLtr(n.xPlus(g,1),c-h-2),D=ks(a.borderRadius);Object.values(D).some(P=>P!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Si(t,{x,y:v,w:c,h:l,radius:D}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Si(t,{x:k,y:v+1,w:c-2,h:l-2,radius:D}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(x,v,c,l),t.strokeRect(x,v,c,l),t.fillStyle=a.backgroundColor,t.fillRect(k,v+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,s,i){const{body:n}=this,{bodySpacing:r,bodyAlign:a,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:h}=i,u=Bt(i.bodyFont);let f=u.lineHeight,g=0;const m=Bs(i.rtl,this.x,this.width),v=function(j){s.fillText(j,m.x(t.x+g),t.y+f/2),t.y+=f+r},x=m.textAlign(a);let k,D,P,T,O,N,I;for(s.textAlign=a,s.textBaseline="middle",s.font=u.string,t.x=Vn(this,x,i),s.fillStyle=i.bodyColor,pt(this.beforeBody,v),g=o&&x!=="right"?a==="center"?c/2+h:c+2+h:0,T=0,N=n.length;T<N;++T){for(k=n[T],D=this.labelTextColors[T],s.fillStyle=D,pt(k.before,v),P=k.lines,o&&P.length&&(this._drawColorBox(s,t,T,m,i),f=Math.max(u.lineHeight,l)),O=0,I=P.length;O<I;++O)v(P[O]),f=u.lineHeight;pt(k.after,v)}g=0,f=u.lineHeight,pt(this.afterBody,v),t.y-=r}drawFooter(t,s,i){const n=this.footer,r=n.length;let a,o;if(r){const l=Bs(i.rtl,this.x,this.width);for(t.x=Vn(this,i.footerAlign,i),t.y+=i.footerMarginTop,s.textAlign=l.textAlign(i.footerAlign),s.textBaseline="middle",a=Bt(i.footerFont),s.fillStyle=i.footerColor,s.font=a.string,o=0;o<r;++o)s.fillText(n[o],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,s,i,n){const{xAlign:r,yAlign:a}=this,{x:o,y:l}=t,{width:c,height:h}=i,{topLeft:u,topRight:f,bottomLeft:g,bottomRight:m}=ks(n.cornerRadius);s.fillStyle=n.backgroundColor,s.strokeStyle=n.borderColor,s.lineWidth=n.borderWidth,s.beginPath(),s.moveTo(o+u,l),a==="top"&&this.drawCaret(t,s,i,n),s.lineTo(o+c-f,l),s.quadraticCurveTo(o+c,l,o+c,l+f),a==="center"&&r==="right"&&this.drawCaret(t,s,i,n),s.lineTo(o+c,l+h-m),s.quadraticCurveTo(o+c,l+h,o+c-m,l+h),a==="bottom"&&this.drawCaret(t,s,i,n),s.lineTo(o+g,l+h),s.quadraticCurveTo(o,l+h,o,l+h-g),a==="center"&&r==="left"&&this.drawCaret(t,s,i,n),s.lineTo(o,l+u),s.quadraticCurveTo(o,l,o+u,l),s.closePath(),s.fill(),n.borderWidth>0&&s.stroke()}_updateAnimationTarget(t){const s=this.chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const a=Ei[t.position].call(this,this._active,this._eventPosition);if(!a)return;const o=this._size=Fc(this,t),l=Object.assign({},a,this._size),c=Ec(s,t,l),h=Ic(t,l,c,s);(n._to!==h.x||r._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const s=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(s);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=Qt(s.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;s.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,s),Ml(t,s.textDirection),r.y+=a.top,this.drawTitle(r,t,s),this.drawBody(r,t,s),this.drawFooter(r,t,s),Dl(t,s.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,s){const i=this._active,n=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}}),r=!dn(i,n),a=this._positionChanged(n,s);(r||a)&&(this._active=n,this._eventPosition=s,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,s,i=!0){if(s&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,r=this._active||[],a=this._getActiveElements(t,r,s,i),o=this._positionChanged(a,t),l=s||!dn(a,r)||o;return l&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,s))),l}_getActiveElements(t,s,i,n){const r=this.options;if(t.type==="mouseout")return[];if(!n)return s;const a=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&a.reverse(),a}_positionChanged(t,s){const{caretX:i,caretY:n,options:r}=this,a=Ei[r.position].call(this,t,s);return a!==!1&&(i!==a.x||n!==a.y)}}Sa.positioners=Ei;var mp={id:"tooltip",_element:Sa,positioners:Ei,afterInit(e,t,s){s&&(e.tooltip=new Sa({chart:e,options:s}))},beforeUpdate(e,t,s){e.tooltip&&e.tooltip.initialize(s)},reset(e,t,s){e.tooltip&&e.tooltip.initialize(s)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const s={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",s)===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",s)}},afterEvent(e,t){if(e.tooltip){const s=t.replay;e.tooltip.handleEvent(t.event,s,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:(e,t)=>t.bodyFont.size,boxWidth:(e,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:{beforeTitle:He,title(e){if(e.length>0){const t=e[0],s=t.chart.data.labels,i=s?s.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return s[t.dataIndex]}return""},afterTitle:He,beforeBody:He,beforeLabel:He,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const s=e.formattedValue;return ft(s)||(t+=s),t},labelColor(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:s.borderColor,backgroundColor:s.backgroundColor,borderWidth:s.borderWidth,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const s=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:s.pointStyle,rotation:s.rotation}},afterLabel:He,afterBody:He,beforeFooter:He,footer:He,afterFooter:He}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const bp=(e,t,s,i)=>(typeof t=="string"?(s=e.push(t)-1,i.unshift({index:s,label:t})):isNaN(t)&&(s=null),s);function _p(e,t,s,i){const n=e.indexOf(t);if(n===-1)return bp(e,t,s,i);const r=e.lastIndexOf(t);return n!==r?s:n}const yp=(e,t)=>e===null?null:Zt(Math.round(e),0,t);class $n extends Os{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const s=this._addedLabels;if(s.length){const i=this.getLabels();for(const{index:n,label:r}of s)i[n]===r&&i.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,s){if(ft(t))return null;const i=this.getLabels();return s=isFinite(s)&&i[s]===t?s:_p(i,t,q(s,t),this._addedLabels),yp(s,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:s}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),s||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,s=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=t===0&&s===r.length-1?r:r.slice(t,s+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let a=t;a<=s;a++)n.push({value:a});return n}getLabelForValue(t){const s=this.getLabels();return t>=0&&t<s.length?s[t]: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 s=this.ticks;return t<0||t>s.length-1?null:this.getPixelForValue(s[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}$n.id="category",$n.defaults={ticks:{callback:$n.prototype.getLabelForValue}};function vp(e,t){const s=[],{bounds:n,step:r,min:a,max:o,precision:l,count:c,maxTicks:h,maxDigits:u,includeBounds:f}=e,g=r||1,m=h-1,{min:v,max:x}=t,k=!ft(a),D=!ft(o),P=!ft(c),T=(x-v)/(u+1);let O=$o((x-v)/m/g)*g,N,I,j,H;if(O<1e-14&&!k&&!D)return[{value:v},{value:x}];H=Math.ceil(x/O)-Math.floor(v/O),H>m&&(O=$o(H*O/m/g)*g),ft(l)||(N=Math.pow(10,l),O=Math.ceil(O*N)/N),n==="ticks"?(I=Math.floor(v/O)*O,j=Math.ceil(x/O)*O):(I=v,j=x),k&&D&&r&&gu((o-a)/r,O/1e3)?(H=Math.round(Math.min((o-a)/O,h)),O=(o-a)/H,I=a,j=o):P?(I=k?a:I,j=D?o:j,H=c-1,O=(j-I)/H):(H=(j-I)/O,mi(H,Math.round(H),O/1e3)?H=Math.round(H):H=Math.ceil(H));const nt=Math.max(Ho(O),Ho(I));N=Math.pow(10,ft(l)?nt:l),I=Math.round(I*N)/N,j=Math.round(j*N)/N;let Z=0;for(k&&(f&&I!==a?(s.push({value:a}),I<a&&Z++,mi(Math.round((I+Z*O)*N)/N,a,Yc(a,T,e))&&Z++):I<a&&Z++);Z<H;++Z)s.push({value:Math.round((I+Z*O)*N)/N});return D&&f&&j!==o?s.length&&mi(s[s.length-1].value,o,Yc(o,T,e))?s[s.length-1].value=o:s.push({value:o}):(!D||j===o)&&s.push({value:j}),s}function Yc(e,t,{horizontal:s,minRotation:i}){const n=we(i),r=(s?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+e).length;return Math.min(t/r,a)}class Wn extends Os{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,s){return ft(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:s,maxDefined:i}=this.getUserBounds();let{min:n,max:r}=this;const a=l=>n=s?n:l,o=l=>r=i?r:l;if(t){const l=Re(n),c=Re(r);l<0&&c<0?o(0):l>0&&c>0&&a(0)}if(n===r){let l=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(r*.05)),o(r+l),t||a(n-l)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:s,stepSize:i}=t,n;return i?(n=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),s=s||11),s&&(n=Math.min(s,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,s=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:s.precision,step:s.stepSize,count:s.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:s.minRotation||0,includeBounds:s.includeBounds!==!1},r=this._range||this,a=vp(n,r);return t.bounds==="ticks"&&Wo(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let s=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-s)/Math.max(t.length-1,1)/2;s-=n,i+=n}this._startValue=s,this._endValue=i,this._valueRange=i-s}getLabelForValue(t){return ki(t,this.chart.options.locale,this.options.ticks.format)}}class ka extends Wn{determineDataLimits(){const{min:t,max:s}=this.getMinMax(!0);this.min=Yt(t)?t:0,this.max=Yt(s)?s:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),s=t?this.width:this.height,i=we(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(s/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}ka.id="linear",ka.defaults={ticks:{callback:Pn.formatters.numeric}};function Vc(e){return e/Math.pow(10,Math.floor(ge(e)))===1}function xp(e,t){const s=Math.floor(ge(t.max)),i=Math.ceil(t.max/Math.pow(10,s)),n=[];let r=de(e.min,Math.pow(10,Math.floor(ge(t.min)))),a=Math.floor(ge(r)),o=Math.floor(r/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do n.push({value:r,major:Vc(r)}),++o,o===10&&(o=1,++a,l=a>=0?1:l),r=Math.round(o*Math.pow(10,a)*l)/l;while(a<s||a===s&&o<i);const c=de(e.max,r);return n.push({value:c,major:Vc(r)}),n}class $c extends Os{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,s){const i=Wn.prototype.parse.apply(this,[t,s]);if(i===0){this._zero=!0;return}return Yt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:s}=this.getMinMax(!0);this.min=Yt(t)?Math.max(0,t):null,this.max=Yt(s)?Math.max(0,s):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:s}=this.getUserBounds();let i=this.min,n=this.max;const r=l=>i=t?i:l,a=l=>n=s?n:l,o=(l,c)=>Math.pow(10,Math.floor(ge(l))+c);i===n&&(i<=0?(r(1),a(10)):(r(o(i,-1)),a(o(n,1)))),i<=0&&r(o(n,-1)),n<=0&&a(o(i,1)),this._zero&&this.min!==this._suggestedMin&&i===o(this.min,0)&&r(o(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,s={min:this._userMin,max:this._userMax},i=xp(s,this);return t.bounds==="ticks"&&Wo(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":ki(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ge(t),this._valueRange=ge(this.max)-ge(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ge(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const s=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+s*this._valueRange)}}$c.id="logarithmic",$c.defaults={ticks:{callback:Pn.formatters.logarithmic,major:{enabled:!0}}};function Ma(e){const t=e.ticks;if(t.display&&e.display){const s=Qt(t.backdropPadding);return q(t.font&&t.font.size,rt.font.size)+s.height}return 0}function wp(e,t,s){return s=wt(s)?s:[s],{w:Uu(e,t.string,s),h:s.length*t.lineHeight}}function Wc(e,t,s,i,n){return e===i||e===n?{start:t-s/2,end:t+s/2}:e<i||e>n?{start:t-s,end:t}:{start:t,end:t+s}}function Sp(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},s=Object.assign({},t),i=[],n=[],r=e._pointLabels.length,a=e.options.pointLabels,o=a.centerPointLabels?At/r:0;for(let l=0;l<r;l++){const c=a.setContext(e.getPointLabelContext(l));n[l]=c.padding;const h=e.getPointPosition(l,e.drawingArea+n[l],o),u=Bt(c.font),f=wp(e.ctx,u,e._pointLabels[l]);i[l]=f;const g=le(e.getIndexAngle(l)+o),m=Math.round(Nr(g)),v=Wc(m,h.x,f.w,0,180),x=Wc(m,h.y,f.h,90,270);kp(s,t,g,v,x)}e.setCenterPoint(t.l-s.l,s.r-t.r,t.t-s.t,s.b-t.b),e._pointLabelItems=Mp(e,i,n)}function kp(e,t,s,i,n){const r=Math.abs(Math.sin(s)),a=Math.abs(Math.cos(s));let o=0,l=0;i.start<t.l?(o=(t.l-i.start)/r,e.l=Math.min(e.l,t.l-o)):i.end>t.r&&(o=(i.end-t.r)/r,e.r=Math.max(e.r,t.r+o)),n.start<t.t?(l=(t.t-n.start)/a,e.t=Math.min(e.t,t.t-l)):n.end>t.b&&(l=(n.end-t.b)/a,e.b=Math.max(e.b,t.b+l))}function Mp(e,t,s){const i=[],n=e._pointLabels.length,r=e.options,a=Ma(r)/2,o=e.drawingArea,l=r.pointLabels.centerPointLabels?At/n:0;for(let c=0;c<n;c++){const h=e.getPointPosition(c,o+a+s[c],l),u=Math.round(Nr(le(h.angle+zt))),f=t[c],g=Op(h.y,f.h,u),m=Dp(u),v=Cp(h.x,f.w,m);i.push({x:h.x,y:g,textAlign:m,left:v,top:g,right:v+f.w,bottom:g+f.h})}return i}function Dp(e){return e===0||e===180?"center":e<180?"left":"right"}function Cp(e,t,s){return s==="right"?e-=t:s==="center"&&(e-=t/2),e}function Op(e,t,s){return s===90||s===270?e-=t/2:(s>270||s<90)&&(e-=t),e}function Pp(e,t){const{ctx:s,options:{pointLabels:i}}=e;for(let n=t-1;n>=0;n--){const r=i.setContext(e.getPointLabelContext(n)),a=Bt(r.font),{x:o,y:l,textAlign:c,left:h,top:u,right:f,bottom:g}=e._pointLabelItems[n],{backdropColor:m}=r;if(!ft(m)){const v=ks(r.borderRadius),x=Qt(r.backdropPadding);s.fillStyle=m;const k=h-x.left,D=u-x.top,P=f-h+x.width,T=g-u+x.height;Object.values(v).some(O=>O!==0)?(s.beginPath(),Si(s,{x:k,y:D,w:P,h:T,radius:v}),s.fill()):s.fillRect(k,D,P,T)}Ss(s,e._pointLabels[n],o,l+a.lineHeight/2,a,{color:r.color,textAlign:c,textBaseline:"middle"})}}function Hc(e,t,s,i){const{ctx:n}=e;if(s)n.arc(e.xCenter,e.yCenter,t,0,mt);else{let r=e.getPointPosition(0,t);n.moveTo(r.x,r.y);for(let a=1;a<i;a++)r=e.getPointPosition(a,t),n.lineTo(r.x,r.y)}}function Tp(e,t,s,i){const n=e.ctx,r=t.circular,{color:a,lineWidth:o}=t;!r&&!i||!a||!o||s<0||(n.save(),n.strokeStyle=a,n.lineWidth=o,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.beginPath(),Hc(e,s,r,i),n.closePath(),n.stroke(),n.restore())}function Ap(e,t,s){return ls(e,{label:s,index:t,type:"pointLabel"})}class Hn extends Wn{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=Qt(Ma(this.options)/2),s=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+s/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(s,i)/2)}determineDataLimits(){const{min:t,max:s}=this.getMinMax(!1);this.min=Yt(t)&&!isNaN(t)?t:0,this.max=Yt(s)&&!isNaN(s)?s:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ma(this.options))}generateTickLabels(t){Wn.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((s,i)=>{const n=St(this.options.pointLabels.callback,[s,i],this);return n||n===0?n:""}).filter((s,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Sp(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,s,i,n){this.xCenter+=Math.floor((t-s)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,s,i,n))}getIndexAngle(t){const s=mt/(this._pointLabels.length||1),i=this.options.startAngle||0;return le(t*s+we(i))}getDistanceFromCenterForValue(t){if(ft(t))return NaN;const s=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*s:(t-this.min)*s}getValueForDistanceFromCenter(t){if(ft(t))return NaN;const s=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-s:this.min+s}getPointLabelContext(t){const s=this._pointLabels||[];if(t>=0&&t<s.length){const i=s[t];return Ap(this.getContext(),t,i)}}getPointPosition(t,s,i=0){const n=this.getIndexAngle(t)-zt+i;return{x:Math.cos(n)*s+this.xCenter,y:Math.sin(n)*s+this.yCenter,angle:n}}getPointPositionForValue(t,s){return this.getPointPosition(t,this.getDistanceFromCenterForValue(s))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:s,top:i,right:n,bottom:r}=this._pointLabelItems[t];return{left:s,top:i,right:n,bottom:r}}drawBackground(){const{backgroundColor:t,grid:{circular:s}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Hc(this,this.getDistanceFromCenterForValue(this._endValue),s,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,s=this.options,{angleLines:i,grid:n}=s,r=this._pointLabels.length;let a,o,l;if(s.pointLabels.display&&Pp(this,r),n.display&&this.ticks.forEach((c,h)=>{if(h!==0){o=this.getDistanceFromCenterForValue(c.value);const u=n.setContext(this.getContext(h-1));Tp(this,u,o,r)}}),i.display){for(t.save(),a=r-1;a>=0;a--){const c=i.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:u}=c;!u||!h||(t.lineWidth=u,t.strokeStyle=h,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,o=this.getDistanceFromCenterForValue(s.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,o),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,s=this.options,i=s.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&!s.reverse)return;const c=i.setContext(this.getContext(l)),h=Bt(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,a=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const u=Qt(c.backdropPadding);t.fillRect(-a/2-u.left,-r-h.size/2-u.top,a+u.width,h.size+u.height)}Ss(t,o.label,0,-r,h,{color:c.color})}),t.restore()}drawTitle(){}}Hn.id="radialLinear",Hn.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Pn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}},Hn.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Hn.descriptors={angleLines:{_fallback:"grid"}};const Bn={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}},ae=Object.keys(Bn);function Lp(e,t){return e-t}function Bc(e,t){if(ft(t))return null;const s=e._adapter,{parser:i,round:n,isoWeekday:r}=e._parseOpts;let a=t;return typeof i=="function"&&(a=i(a)),Yt(a)||(a=typeof i=="string"?s.parse(a,i):s.parse(a)),a===null?null:(n&&(a=n==="week"&&(Vs(r)||r===!0)?s.startOf(a,"isoWeek",r):s.startOf(a,n)),+a)}function jc(e,t,s,i){const n=ae.length;for(let r=ae.indexOf(e);r<n-1;++r){const a=Bn[ae[r]],o=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((s-t)/(o*a.size))<=i)return ae[r]}return ae[n-1]}function Rp(e,t,s,i,n){for(let r=ae.length-1;r>=ae.indexOf(s);r--){const a=ae[r];if(Bn[a].common&&e._adapter.diff(n,i,a)>=t-1)return a}return ae[s?ae.indexOf(s):0]}function Fp(e){for(let t=ae.indexOf(e)+1,s=ae.length;t<s;++t)if(Bn[ae[t]].common)return ae[t]}function Uc(e,t,s){if(!s)e[t]=!0;else if(s.length){const{lo:i,hi:n}=Yr(s,t),r=s[i]>=t?s[i]:s[n];e[r]=!0}}function Ep(e,t,s,i){const n=e._adapter,r=+n.startOf(t[0].value,i),a=t[t.length-1].value;let o,l;for(o=r;o<=a;o=+n.add(o,1,i))l=s[o],l>=0&&(t[l].major=!0);return t}function Gc(e,t,s){const i=[],n={},r=t.length;let a,o;for(a=0;a<r;++a)o=t[a],n[o]=a,i.push({value:o,major:!1});return r===0||!s?i:Ep(e,i,n,s)}class Ii extends Os{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,s){const i=t.time||(t.time={}),n=this._adapter=new Kl._date(t.adapters.date);n.init(s),gi(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=s.normalized}parse(t,s){return t===void 0?null:Bc(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,s=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:a,maxDefined:o}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(n=Math.min(n,c.min)),!o&&!isNaN(c.max)&&(r=Math.max(r,c.max))}(!a||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=Yt(n)&&!isNaN(n)?n:+s.startOf(Date.now(),i),r=Yt(r)&&!isNaN(r)?r:+s.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let s=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(s=t[0],i=t[t.length-1]),{min:s,max:i}}buildTicks(){const t=this.options,s=t.time,i=t.ticks,n=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,a=this.max,o=_u(n,r,a);return this._unit=s.unit||(i.autoSkip?jc(s.minUnit,this.min,this.max,this._getLabelCapacity(r)):Rp(this,o.length,s.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Fp(this._unit),this.initOffsets(n),t.reverse&&o.reverse(),Gc(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let s=0,i=0,n,r;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?s=1-n:s=(this.getDecimalForValue(t[1])-n)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?i=r:i=(r-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;s=Zt(s,0,a),i=Zt(i,0,a),this._offsets={start:s,end:i,factor:1/(s+1+i)}}_generate(){const t=this._adapter,s=this.min,i=this.max,n=this.options,r=n.time,a=r.unit||jc(r.minUnit,s,i,this._getLabelCapacity(s)),o=q(r.stepSize,1),l=a==="week"?r.isoWeekday:!1,c=Vs(l)||l===!0,h={};let u=s,f,g;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":a),t.diff(i,s,a)>1e5*o)throw new Error(s+" and "+i+" are too far apart with stepSize of "+o+" "+a);const m=n.ticks.source==="data"&&this.getDataTimestamps();for(f=u,g=0;f<i;f=+t.add(f,o,a),g++)Uc(h,f,m);return(f===i||n.bounds==="ticks"||g===1)&&Uc(h,f,m),Object.keys(h).sort((v,x)=>v-x).map(v=>+v)}getLabelForValue(t){const s=this._adapter,i=this.options.time;return i.tooltipFormat?s.format(t,i.tooltipFormat):s.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,s,i,n){const r=this.options,a=r.time.displayFormats,o=this._unit,l=this._majorUnit,c=o&&a[o],h=l&&a[l],u=i[s],f=l&&h&&u&&u.major,g=this._adapter.format(t,n||(f?h:c)),m=r.ticks.callback;return m?St(m,[g,s,i],this):g}generateTickLabels(t){let s,i,n;for(s=0,i=t.length;s<i;++s)n=t[s],n.label=this._tickFormatFunction(n.value,s,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const s=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((s.start+i)*s.factor)}getValueForPixel(t){const s=this._offsets,i=this.getDecimalForPixel(t)/s.factor-s.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const s=this.options.ticks,i=this.ctx.measureText(t).width,n=we(this.isHorizontal()?s.maxRotation:s.minRotation),r=Math.cos(n),a=Math.sin(n),o=this._resolveTickFontOptions(0).size;return{w:i*r+o*a,h:i*a+o*r}}_getLabelCapacity(t){const s=this.options.time,i=s.displayFormats,n=i[s.unit]||i.millisecond,r=this._tickFormatFunction(t,0,Gc(this,[t],this._majorUnit),n),a=this._getLabelSize(r),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],s,i;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(s=0,i=n.length;s<i;++s)t=t.concat(n[s].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let s,i;if(t.length)return t;const n=this.getLabels();for(s=0,i=n.length;s<i;++s)t.push(Bc(this,n[s]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Go(t.sort(Lp))}}Ii.id="time",Ii.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function jn(e,t,s){let i=0,n=e.length-1,r,a,o,l;s?(t>=e[i].pos&&t<=e[n].pos&&({lo:i,hi:n}=vs(e,"pos",t)),{pos:r,time:o}=e[i],{pos:a,time:l}=e[n]):(t>=e[i].time&&t<=e[n].time&&({lo:i,hi:n}=vs(e,"time",t)),{time:r,pos:o}=e[i],{time:a,pos:l}=e[n]);const c=a-r;return c?o+(l-o)*(t-r)/c:o}class qc extends Ii{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),s=this._table=this.buildLookupTable(t);this._minPos=jn(s,this.min),this._tableRange=jn(s,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:s,max:i}=this,n=[],r=[];let a,o,l,c,h;for(a=0,o=t.length;a<o;++a)c=t[a],c>=s&&c<=i&&n.push(c);if(n.length<2)return[{time:s,pos:0},{time:i,pos:1}];for(a=0,o=n.length;a<o;++a)h=n[a+1],l=n[a-1],c=n[a],Math.round((h+l)/2)!==c&&r.push({time:c,pos:a/(o-1)});return r}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const s=this.getDataTimestamps(),i=this.getLabelTimestamps();return s.length&&i.length?t=this.normalize(s.concat(i)):t=s.length?s:i,t=this._cache.all=t,t}getDecimalForValue(t){return(jn(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const s=this._offsets,i=this.getDecimalForPixel(t)/s.factor-s.end;return jn(this._table,i*this._tableRange+this._minPos,!0)}}qc.id="timeseries",qc.defaults=Ii.defaults;var re;(function(e){e.ChartRendered="chart:rendered",e.ChartUpdated="chart:updated",e.ChartDestroyed="chart:destroyed",e.LabelsUpdated="labels:updated"})(re||(re={}));function Un(e,t,s,i){e(t,s),i!==void 0&&i.emit(re.ChartRendered)}function Ip(e,t){e.update(),t!==void 0&&t.emit(re.ChartUpdated)}function Gn(e,t){e.destroy(),t!==void 0&&t.emit(re.ChartDestroyed)}function Np(e,t){const s={labels:typeof e.labels>"u"?[]:[...e.labels],datasets:[]};return Xc(s,{...e},t),s}function Xc(e,t,s){const i=[];e.datasets=t.datasets.map(n=>{const r=e.datasets.find(a=>a[s]===n[s]);return!r||!n.data||i.includes(r)?{...n}:(i.push(r),Object.assign(r,n),r)})}function zp(e,t,s){e.data.labels=t,s!==void 0&&s.emit(re.LabelsUpdated)}function Yp(e,t){e.options={...t}}function Vp(e,t){const s=e.datasets.map(n=>n.label),i=t.datasets.map(n=>n.label);return t.datasets.length===e.datasets.length&&s.every((n,r)=>n===i[r])}const $p="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",Wp="annotation";function Da(e,t,s){let i={};return{props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:e},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},data(){return{_chart:null,_id:Math.random().toString(36).substring(2)}},computed:{hasAnnotationPlugin(){var n,r;return typeof((n=this.chartOptions)===null||n===void 0||(r=n.plugins)===null||r===void 0?void 0:r[Wp])<"u"}},created(){Fi.register(s)},mounted(){i[this.$data._id]=null,"datasets"in this.chartData&&this.chartData.datasets.length>0&&(Un(this.renderChart,this.chartData,this.chartOptions),this.$emit(re.ChartRendered))},watch:{chartData:{handler:function(n,r){this.chartDataHandler(n,r)},deep:!0},chartOptions:{handler:function(n){this.chartOptionsHandler(n)},deep:!0}},methods:{renderChart(n,r){const a=this.getCurrentChart();if(a!==null&&(Gn(a),this.$emit(re.ChartDestroyed)),this.$refs.canvas){const o=Np(n,this.datasetIdKey),l=this.$refs.canvas.getContext("2d");l!==null&&this.setCurrentChart(new Fi(l,{type:t,data:o,options:r,plugins:this.plugins}))}else throw new Error($p)},chartDataHandler(n,r){const a={...n},o={...r},l=this.getCurrentChart();Object.keys(o).length>0?Vp(a,o)&&l!==null?(Xc(l.data,a,this.datasetIdKey),a.labels!==void 0&&(zp(l,a.labels),this.$emit(re.LabelsUpdated)),this.updateChart(),this.$emit(re.ChartUpdated)):(l!==null&&(Gn(l),this.$emit(re.ChartDestroyed)),Un(this.renderChart,this.chartData,this.chartOptions),this.$emit(re.ChartRendered)):(l!==null&&(Gn(l),this.$emit(re.ChartDestroyed)),Un(this.renderChart,this.chartData,this.chartOptions),this.$emit(re.ChartRendered))},chartOptionsHandler(n){const r=this.getCurrentChart();r!==null?(Yp(r,n),this.updateChart()):Un(this.renderChart,this.chartData,this.chartOptions)},updateChart(){const n=this.getCurrentChart();Ip(n)},getCurrentChart(){return this.hasAnnotationPlugin?i[this.$data._id]:this.$data._chart},setCurrentChart(n){this.hasAnnotationPlugin?i[this.$data._id]=n:this.$data._chart=n}},beforeDestroy(){const n=this.getCurrentChart();n!==null&&(Gn(n),this.$emit(re.ChartDestroyed))},render:function(n){return n("div",{style:this.styles,class:this.cssClasses},[n("canvas",{attrs:{id:this.chartId,width:this.width,height:this.height},ref:"canvas"})])}}}const Hp=Da("bar-chart","bar",Cn),Bp=Da("line-chart","line",On),jp=Da("pie-chart","pie",oa);//! moment.js
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var Kc;function E(){return Kc.apply(null,arguments)}function Up(e){Kc=e}function Me(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Ts(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function ut(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ca(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(ut(e,t))return!1;return!0}function oe(e){return e===void 0}function qe(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Ni(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Zc(e,t){var s=[],i,n=e.length;for(i=0;i<n;++i)s.push(t(e[i],i));return s}function ds(e,t){for(var s in t)ut(t,s)&&(e[s]=t[s]);return ut(t,"toString")&&(e.toString=t.toString),ut(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Ie(e,t,s,i){return kh(e,t,s,i,!0).utc()}function Gp(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function X(e){return e._pf==null&&(e._pf=Gp()),e._pf}var Oa;Array.prototype.some?Oa=Array.prototype.some:Oa=function(e){var t=Object(this),s=t.length>>>0,i;for(i=0;i<s;i++)if(i in t&&e.call(this,t[i],i,t))return!0;return!1};function Pa(e){if(e._isValid==null){var t=X(e),s=Oa.call(t.parsedDateParts,function(n){return n!=null}),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s);if(e._strict&&(i=i&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=i;else return i}return e._isValid}function qn(e){var t=Ie(NaN);return e!=null?ds(X(t),e):X(t).userInvalidated=!0,t}var Jc=E.momentProperties=[],Ta=!1;function Aa(e,t){var s,i,n,r=Jc.length;if(oe(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),oe(t._i)||(e._i=t._i),oe(t._f)||(e._f=t._f),oe(t._l)||(e._l=t._l),oe(t._strict)||(e._strict=t._strict),oe(t._tzm)||(e._tzm=t._tzm),oe(t._isUTC)||(e._isUTC=t._isUTC),oe(t._offset)||(e._offset=t._offset),oe(t._pf)||(e._pf=X(t)),oe(t._locale)||(e._locale=t._locale),r>0)for(s=0;s<r;s++)i=Jc[s],n=t[i],oe(n)||(e[i]=n);return e}function zi(e){Aa(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Ta===!1&&(Ta=!0,E.updateOffset(this),Ta=!1)}function De(e){return e instanceof zi||e!=null&&e._isAMomentObject!=null}function Qc(e){E.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function be(e,t){var s=!0;return ds(function(){if(E.deprecationHandler!=null&&E.deprecationHandler(null,e),s){var i=[],n,r,a,o=arguments.length;for(r=0;r<o;r++){if(n="",typeof arguments[r]=="object"){n+=`
[`+r+"] ";for(a in arguments[0])ut(arguments[0],a)&&(n+=a+": "+arguments[0][a]+", ");n=n.slice(0,-2)}else n=arguments[r];i.push(n)}Qc(e+`
Arguments: `+Array.prototype.slice.call(i).join("")+`
`+new Error().stack),s=!1}return t.apply(this,arguments)},t)}var th={};function eh(e,t){E.deprecationHandler!=null&&E.deprecationHandler(e,t),th[e]||(Qc(t),th[e]=!0)}E.suppressDeprecationWarnings=!1,E.deprecationHandler=null;function Ne(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function qp(e){var t,s;for(s in e)ut(e,s)&&(t=e[s],Ne(t)?this[s]=t:this["_"+s]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function La(e,t){var s=ds({},e),i;for(i in t)ut(t,i)&&(Ts(e[i])&&Ts(t[i])?(s[i]={},ds(s[i],e[i]),ds(s[i],t[i])):t[i]!=null?s[i]=t[i]:delete s[i]);for(i in e)ut(e,i)&&!ut(t,i)&&Ts(e[i])&&(s[i]=ds({},s[i]));return s}function Ra(e){e!=null&&this.set(e)}var Fa;Object.keys?Fa=Object.keys:Fa=function(e){var t,s=[];for(t in e)ut(e,t)&&s.push(t);return s};var Xp={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Kp(e,t,s){var i=this._calendar[e]||this._calendar.sameElse;return Ne(i)?i.call(t,s):i}function ze(e,t,s){var i=""+Math.abs(e),n=t-i.length,r=e>=0;return(r?s?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+i}var Ea=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Xn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ia={},Us={};function B(e,t,s,i){var n=i;typeof i=="string"&&(n=function(){return this[i]()}),e&&(Us[e]=n),t&&(Us[t[0]]=function(){return ze(n.apply(this,arguments),t[1],t[2])}),s&&(Us[s]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function Zp(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Jp(e){var t=e.match(Ea),s,i;for(s=0,i=t.length;s<i;s++)Us[t[s]]?t[s]=Us[t[s]]:t[s]=Zp(t[s]);return function(n){var r="",a;for(a=0;a<i;a++)r+=Ne(t[a])?t[a].call(n,e):t[a];return r}}function Kn(e,t){return e.isValid()?(t=sh(t,e.localeData()),Ia[t]=Ia[t]||Jp(t),Ia[t](e)):e.localeData().invalidDate()}function sh(e,t){var s=5;function i(n){return t.longDateFormat(n)||n}for(Xn.lastIndex=0;s>=0&&Xn.test(e);)e=e.replace(Xn,i),Xn.lastIndex=0,s-=1;return e}var Qp={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function tm(e){var t=this._longDateFormat[e],s=this._longDateFormat[e.toUpperCase()];return t||!s?t:(this._longDateFormat[e]=s.match(Ea).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[e])}var em="Invalid date";function sm(){return this._invalidDate}var im="%d",nm=/\d{1,2}/;function rm(e){return this._ordinal.replace("%d",e)}var am={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function om(e,t,s,i){var n=this._relativeTime[s];return Ne(n)?n(e,t,s,i):n.replace(/%d/i,e)}function lm(e,t){var s=this._relativeTime[e>0?"future":"past"];return Ne(s)?s(t):s.replace(/%s/i,t)}var Yi={};function te(e,t){var s=e.toLowerCase();Yi[s]=Yi[s+"s"]=Yi[t]=e}function _e(e){return typeof e=="string"?Yi[e]||Yi[e.toLowerCase()]:void 0}function Na(e){var t={},s,i;for(i in e)ut(e,i)&&(s=_e(i),s&&(t[s]=e[i]));return t}var ih={};function ee(e,t){ih[e]=t}function cm(e){var t=[],s;for(s in e)ut(e,s)&&t.push({unit:s,priority:ih[s]});return t.sort(function(i,n){return i.priority-n.priority}),t}function Zn(e){return e%4===0&&e%100!==0||e%400===0}function ye(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function et(e){var t=+e,s=0;return t!==0&&isFinite(t)&&(s=ye(t)),s}function Gs(e,t){return function(s){return s!=null?(nh(this,e,s),E.updateOffset(this,t),this):Jn(this,e)}}function Jn(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function nh(e,t,s){e.isValid()&&!isNaN(s)&&(t==="FullYear"&&Zn(e.year())&&e.month()===1&&e.date()===29?(s=et(s),e._d["set"+(e._isUTC?"UTC":"")+t](s,e.month(),rr(s,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](s))}function hm(e){return e=_e(e),Ne(this[e])?this[e]():this}function um(e,t){if(typeof e=="object"){e=Na(e);var s=cm(e),i,n=s.length;for(i=0;i<n;i++)this[s[i].unit](e[s[i].unit])}else if(e=_e(e),Ne(this[e]))return this[e](t);return this}var rh=/\d/,ce=/\d\d/,ah=/\d{3}/,za=/\d{4}/,Qn=/[+-]?\d{6}/,Dt=/\d\d?/,oh=/\d\d\d\d?/,lh=/\d\d\d\d\d\d?/,tr=/\d{1,3}/,Ya=/\d{1,4}/,er=/[+-]?\d{1,6}/,qs=/\d+/,sr=/[+-]?\d+/,dm=/Z|[+-]\d\d:?\d\d/gi,ir=/Z|[+-]\d\d(?::?\d\d)?/gi,fm=/[+-]?\d+(\.\d{1,3})?/,Vi=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,nr;nr={};function V(e,t,s){nr[e]=Ne(t)?t:function(i,n){return i&&s?s:t}}function gm(e,t){return ut(nr,e)?nr[e](t._strict,t._locale):new RegExp(pm(e))}function pm(e){return he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,s,i,n,r){return s||i||n||r}))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Va={};function bt(e,t){var s,i=t,n;for(typeof e=="string"&&(e=[e]),qe(t)&&(i=function(r,a){a[t]=et(r)}),n=e.length,s=0;s<n;s++)Va[e[s]]=i}function $i(e,t){bt(e,function(s,i,n,r){n._w=n._w||{},t(s,n._w,n,r)})}function mm(e,t,s){t!=null&&ut(Va,e)&&Va[e](t,s._a,s,e)}var se=0,Xe=1,Ye=2,jt=3,Ce=4,Ke=5,As=6,bm=7,_m=8;function ym(e,t){return(e%t+t)%t}var Vt;Array.prototype.indexOf?Vt=Array.prototype.indexOf:Vt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function rr(e,t){if(isNaN(e)||isNaN(t))return NaN;var s=ym(t,12);return e+=(t-s)/12,s===1?Zn(e)?29:28:31-s%7%2}B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),B("MMMM",0,0,function(e){return this.localeData().months(this,e)}),te("month","M"),ee("month",8),V("M",Dt),V("MM",Dt,ce),V("MMM",function(e,t){return t.monthsShortRegex(e)}),V("MMMM",function(e,t){return t.monthsRegex(e)}),bt(["M","MM"],function(e,t){t[Xe]=et(e)-1}),bt(["MMM","MMMM"],function(e,t,s,i){var n=s._locale.monthsParse(e,i,s._strict);n!=null?t[Xe]=n:X(s).invalidMonth=e});var vm="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ch="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),hh=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,xm=Vi,wm=Vi;function Sm(e,t){return e?Me(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||hh).test(t)?"format":"standalone"][e.month()]:Me(this._months)?this._months:this._months.standalone}function km(e,t){return e?Me(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[hh.test(t)?"format":"standalone"][e.month()]:Me(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Mm(e,t,s){var i,n,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=Ie([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return s?t==="MMM"?(n=Vt.call(this._shortMonthsParse,a),n!==-1?n:null):(n=Vt.call(this._longMonthsParse,a),n!==-1?n:null):t==="MMM"?(n=Vt.call(this._shortMonthsParse,a),n!==-1?n:(n=Vt.call(this._longMonthsParse,a),n!==-1?n:null)):(n=Vt.call(this._longMonthsParse,a),n!==-1?n:(n=Vt.call(this._shortMonthsParse,a),n!==-1?n:null))}function Dm(e,t,s){var i,n,r;if(this._monthsParseExact)return Mm.call(this,e,t,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(n=Ie([2e3,i]),s&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),!s&&!this._monthsParse[i]&&(r="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),s&&t==="MMMM"&&this._longMonthsParse[i].test(e))return i;if(s&&t==="MMM"&&this._shortMonthsParse[i].test(e))return i;if(!s&&this._monthsParse[i].test(e))return i}}function uh(e,t){var s;if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=et(t);else if(t=e.localeData().monthsParse(t),!qe(t))return e}return s=Math.min(e.date(),rr(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,s),e}function dh(e){return e!=null?(uh(this,e),E.updateOffset(this,!0),this):Jn(this,"Month")}function Cm(){return rr(this.year(),this.month())}function Om(e){return this._monthsParseExact?(ut(this,"_monthsRegex")||fh.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(ut(this,"_monthsShortRegex")||(this._monthsShortRegex=xm),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Pm(e){return this._monthsParseExact?(ut(this,"_monthsRegex")||fh.call(this),e?this._monthsStrictRegex:this._monthsRegex):(ut(this,"_monthsRegex")||(this._monthsRegex=wm),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function fh(){function e(a,o){return o.length-a.length}var t=[],s=[],i=[],n,r;for(n=0;n<12;n++)r=Ie([2e3,n]),t.push(this.monthsShort(r,"")),s.push(this.months(r,"")),i.push(this.months(r,"")),i.push(this.monthsShort(r,""));for(t.sort(e),s.sort(e),i.sort(e),n=0;n<12;n++)t[n]=he(t[n]),s[n]=he(s[n]);for(n=0;n<24;n++)i[n]=he(i[n]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}B("Y",0,0,function(){var e=this.year();return e<=9999?ze(e,4):"+"+e}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),te("year","y"),ee("year",1),V("Y",sr),V("YY",Dt,ce),V("YYYY",Ya,za),V("YYYYY",er,Qn),V("YYYYYY",er,Qn),bt(["YYYYY","YYYYYY"],se),bt("YYYY",function(e,t){t[se]=e.length===2?E.parseTwoDigitYear(e):et(e)}),bt("YY",function(e,t){t[se]=E.parseTwoDigitYear(e)}),bt("Y",function(e,t){t[se]=parseInt(e,10)});function Wi(e){return Zn(e)?366:365}E.parseTwoDigitYear=function(e){return et(e)+(et(e)>68?1900:2e3)};var gh=Gs("FullYear",!0);function Tm(){return Zn(this.year())}function Am(e,t,s,i,n,r,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,s,i,n,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,s,i,n,r,a),o}function Hi(e){var t,s;return e<100&&e>=0?(s=Array.prototype.slice.call(arguments),s[0]=e+400,t=new Date(Date.UTC.apply(null,s)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ar(e,t,s){var i=7+t-s,n=(7+Hi(e,0,i).getUTCDay()-t)%7;return-n+i-1}function ph(e,t,s,i,n){var r=(7+s-i)%7,a=ar(e,i,n),o=1+7*(t-1)+r+a,l,c;return o<=0?(l=e-1,c=Wi(l)+o):o>Wi(e)?(l=e+1,c=o-Wi(e)):(l=e,c=o),{year:l,dayOfYear:c}}function Bi(e,t,s){var i=ar(e.year(),t,s),n=Math.floor((e.dayOfYear()-i-1)/7)+1,r,a;return n<1?(a=e.year()-1,r=n+Ze(a,t,s)):n>Ze(e.year(),t,s)?(r=n-Ze(e.year(),t,s),a=e.year()+1):(a=e.year(),r=n),{week:r,year:a}}function Ze(e,t,s){var i=ar(e,t,s),n=ar(e+1,t,s);return(Wi(e)-i+n)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),te("week","w"),te("isoWeek","W"),ee("week",5),ee("isoWeek",5),V("w",Dt),V("ww",Dt,ce),V("W",Dt),V("WW",Dt,ce),$i(["w","ww","W","WW"],function(e,t,s,i){t[i.substr(0,1)]=et(e)});function Lm(e){return Bi(e,this._week.dow,this._week.doy).week}var Rm={dow:0,doy:6};function Fm(){return this._week.dow}function Em(){return this._week.doy}function Im(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Nm(e){var t=Bi(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}B("d",0,"do","day"),B("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),B("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),B("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),te("day","d"),te("weekday","e"),te("isoWeekday","E"),ee("day",11),ee("weekday",11),ee("isoWeekday",11),V("d",Dt),V("e",Dt),V("E",Dt),V("dd",function(e,t){return t.weekdaysMinRegex(e)}),V("ddd",function(e,t){return t.weekdaysShortRegex(e)}),V("dddd",function(e,t){return t.weekdaysRegex(e)}),$i(["dd","ddd","dddd"],function(e,t,s,i){var n=s._locale.weekdaysParse(e,i,s._strict);n!=null?t.d=n:X(s).invalidWeekday=e}),$i(["d","e","E"],function(e,t,s,i){t[i]=et(e)});function zm(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Ym(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function $a(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Vm="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),mh="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$m="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Wm=Vi,Hm=Vi,Bm=Vi;function jm(e,t){var s=Me(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?$a(s,this._week.dow):e?s[e.day()]:s}function Um(e){return e===!0?$a(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Gm(e){return e===!0?$a(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function qm(e,t,s){var i,n,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=Ie([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return s?t==="dddd"?(n=Vt.call(this._weekdaysParse,a),n!==-1?n:null):t==="ddd"?(n=Vt.call(this._shortWeekdaysParse,a),n!==-1?n:null):(n=Vt.call(this._minWeekdaysParse,a),n!==-1?n:null):t==="dddd"?(n=Vt.call(this._weekdaysParse,a),n!==-1||(n=Vt.call(this._shortWeekdaysParse,a),n!==-1)?n:(n=Vt.call(this._minWeekdaysParse,a),n!==-1?n:null)):t==="ddd"?(n=Vt.call(this._shortWeekdaysParse,a),n!==-1||(n=Vt.call(this._weekdaysParse,a),n!==-1)?n:(n=Vt.call(this._minWeekdaysParse,a),n!==-1?n:null)):(n=Vt.call(this._minWeekdaysParse,a),n!==-1||(n=Vt.call(this._weekdaysParse,a),n!==-1)?n:(n=Vt.call(this._shortWeekdaysParse,a),n!==-1?n:null))}function Xm(e,t,s){var i,n,r;if(this._weekdaysParseExact)return qm.call(this,e,t,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(n=Ie([2e3,1]).day(i),s&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),s&&t==="dddd"&&this._fullWeekdaysParse[i].test(e))return i;if(s&&t==="ddd"&&this._shortWeekdaysParse[i].test(e))return i;if(s&&t==="dd"&&this._minWeekdaysParse[i].test(e))return i;if(!s&&this._weekdaysParse[i].test(e))return i}}function Km(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=zm(e,this.localeData()),this.add(e-t,"d")):t}function Zm(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Jm(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Ym(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Qm(e){return this._weekdaysParseExact?(ut(this,"_weekdaysRegex")||Wa.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ut(this,"_weekdaysRegex")||(this._weekdaysRegex=Wm),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function tb(e){return this._weekdaysParseExact?(ut(this,"_weekdaysRegex")||Wa.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ut(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Hm),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function eb(e){return this._weekdaysParseExact?(ut(this,"_weekdaysRegex")||Wa.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ut(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Bm),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Wa(){function e(h,u){return u.length-h.length}var t=[],s=[],i=[],n=[],r,a,o,l,c;for(r=0;r<7;r++)a=Ie([2e3,1]).day(r),o=he(this.weekdaysMin(a,"")),l=he(this.weekdaysShort(a,"")),c=he(this.weekdays(a,"")),t.push(o),s.push(l),i.push(c),n.push(o),n.push(l),n.push(c);t.sort(e),s.sort(e),i.sort(e),n.sort(e),this._weekdaysRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ha(){return this.hours()%12||12}function sb(){return this.hours()||24}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Ha),B("k",["kk",2],0,sb),B("hmm",0,0,function(){return""+Ha.apply(this)+ze(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Ha.apply(this)+ze(this.minutes(),2)+ze(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+ze(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+ze(this.minutes(),2)+ze(this.seconds(),2)});function bh(e,t){B(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}bh("a",!0),bh("A",!1),te("hour","h"),ee("hour",13);function _h(e,t){return t._meridiemParse}V("a",_h),V("A",_h),V("H",Dt),V("h",Dt),V("k",Dt),V("HH",Dt,ce),V("hh",Dt,ce),V("kk",Dt,ce),V("hmm",oh),V("hmmss",lh),V("Hmm",oh),V("Hmmss",lh),bt(["H","HH"],jt),bt(["k","kk"],function(e,t,s){var i=et(e);t[jt]=i===24?0:i}),bt(["a","A"],function(e,t,s){s._isPm=s._locale.isPM(e),s._meridiem=e}),bt(["h","hh"],function(e,t,s){t[jt]=et(e),X(s).bigHour=!0}),bt("hmm",function(e,t,s){var i=e.length-2;t[jt]=et(e.substr(0,i)),t[Ce]=et(e.substr(i)),X(s).bigHour=!0}),bt("hmmss",function(e,t,s){var i=e.length-4,n=e.length-2;t[jt]=et(e.substr(0,i)),t[Ce]=et(e.substr(i,2)),t[Ke]=et(e.substr(n)),X(s).bigHour=!0}),bt("Hmm",function(e,t,s){var i=e.length-2;t[jt]=et(e.substr(0,i)),t[Ce]=et(e.substr(i))}),bt("Hmmss",function(e,t,s){var i=e.length-4,n=e.length-2;t[jt]=et(e.substr(0,i)),t[Ce]=et(e.substr(i,2)),t[Ke]=et(e.substr(n))});function ib(e){return(e+"").toLowerCase().charAt(0)==="p"}var nb=/[ap]\.?m?\.?/i,rb=Gs("Hours",!0);function ab(e,t,s){return e>11?s?"pm":"PM":s?"am":"AM"}var yh={calendar:Xp,longDateFormat:Qp,invalidDate:em,ordinal:im,dayOfMonthOrdinalParse:nm,relativeTime:am,months:vm,monthsShort:ch,week:Rm,weekdays:Vm,weekdaysMin:$m,weekdaysShort:mh,meridiemParse:nb},Lt={},ji={},Ui;function ob(e,t){var s,i=Math.min(e.length,t.length);for(s=0;s<i;s+=1)if(e[s]!==t[s])return s;return i}function vh(e){return e&&e.toLowerCase().replace("_","-")}function lb(e){for(var t=0,s,i,n,r;t<e.length;){for(r=vh(e[t]).split("-"),s=r.length,i=vh(e[t+1]),i=i?i.split("-"):null;s>0;){if(n=or(r.slice(0,s).join("-")),n)return n;if(i&&i.length>=s&&ob(r,i)>=s-1)break;s--}t++}return Ui}function cb(e){return e.match("^[^/\\\\]*$")!=null}function or(e){var t=null,s;if(Lt[e]===void 0&&typeof module<"u"&&module&&module.exports&&cb(e))try{t=Ui._abbr,s=require,s("./locale/"+e),fs(t)}catch{Lt[e]=null}return Lt[e]}function fs(e,t){var s;return e&&(oe(t)?s=Je(e):s=Ba(e,t),s?Ui=s:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ui._abbr}function Ba(e,t){if(t!==null){var s,i=yh;if(t.abbr=e,Lt[e]!=null)eh("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Lt[e]._config;else if(t.parentLocale!=null)if(Lt[t.parentLocale]!=null)i=Lt[t.parentLocale]._config;else if(s=or(t.parentLocale),s!=null)i=s._config;else return ji[t.parentLocale]||(ji[t.parentLocale]=[]),ji[t.parentLocale].push({name:e,config:t}),null;return Lt[e]=new Ra(La(i,t)),ji[e]&&ji[e].forEach(function(n){Ba(n.name,n.config)}),fs(e),Lt[e]}else return delete Lt[e],null}function hb(e,t){if(t!=null){var s,i,n=yh;Lt[e]!=null&&Lt[e].parentLocale!=null?Lt[e].set(La(Lt[e]._config,t)):(i=or(e),i!=null&&(n=i._config),t=La(n,t),i==null&&(t.abbr=e),s=new Ra(t),s.parentLocale=Lt[e],Lt[e]=s),fs(e)}else Lt[e]!=null&&(Lt[e].parentLocale!=null?(Lt[e]=Lt[e].parentLocale,e===fs()&&fs(e)):Lt[e]!=null&&delete Lt[e]);return Lt[e]}function Je(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ui;if(!Me(e)){if(t=or(e),t)return t;e=[e]}return lb(e)}function ub(){return Fa(Lt)}function ja(e){var t,s=e._a;return s&&X(e).overflow===-2&&(t=s[Xe]<0||s[Xe]>11?Xe:s[Ye]<1||s[Ye]>rr(s[se],s[Xe])?Ye:s[jt]<0||s[jt]>24||s[jt]===24&&(s[Ce]!==0||s[Ke]!==0||s[As]!==0)?jt:s[Ce]<0||s[Ce]>59?Ce:s[Ke]<0||s[Ke]>59?Ke:s[As]<0||s[As]>999?As:-1,X(e)._overflowDayOfYear&&(t<se||t>Ye)&&(t=Ye),X(e)._overflowWeeks&&t===-1&&(t=bm),X(e)._overflowWeekday&&t===-1&&(t=_m),X(e).overflow=t),e}var db=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fb=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gb=/Z|[+-]\d\d(?::?\d\d)?/,lr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ua=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pb=/^\/?Date\((-?\d+)/i,mb=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,bb={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function xh(e){var t,s,i=e._i,n=db.exec(i)||fb.exec(i),r,a,o,l,c=lr.length,h=Ua.length;if(n){for(X(e).iso=!0,t=0,s=c;t<s;t++)if(lr[t][1].exec(n[1])){a=lr[t][0],r=lr[t][2]!==!1;break}if(a==null){e._isValid=!1;return}if(n[3]){for(t=0,s=h;t<s;t++)if(Ua[t][1].exec(n[3])){o=(n[2]||" ")+Ua[t][0];break}if(o==null){e._isValid=!1;return}}if(!r&&o!=null){e._isValid=!1;return}if(n[4])if(gb.exec(n[4]))l="Z";else{e._isValid=!1;return}e._f=a+(o||"")+(l||""),qa(e)}else e._isValid=!1}function _b(e,t,s,i,n,r){var a=[yb(e),ch.indexOf(t),parseInt(s,10),parseInt(i,10),parseInt(n,10)];return r&&a.push(parseInt(r,10)),a}function yb(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function vb(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function xb(e,t,s){if(e){var i=mh.indexOf(e),n=new Date(t[0],t[1],t[2]).getDay();if(i!==n)return X(s).weekdayMismatch=!0,s._isValid=!1,!1}return!0}function wb(e,t,s){if(e)return bb[e];if(t)return 0;var i=parseInt(s,10),n=i%100,r=(i-n)/100;return r*60+n}function wh(e){var t=mb.exec(vb(e._i)),s;if(t){if(s=_b(t[4],t[3],t[2],t[5],t[6],t[7]),!xb(t[1],s,e))return;e._a=s,e._tzm=wb(t[8],t[9],t[10]),e._d=Hi.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),X(e).rfc2822=!0}else e._isValid=!1}function Sb(e){var t=pb.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(xh(e),e._isValid===!1)delete e._isValid;else return;if(wh(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:E.createFromInputFallback(e)}E.createFromInputFallback=be("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Xs(e,t,s){return e!=null?e:t!=null?t:s}function kb(e){var t=new Date(E.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Ga(e){var t,s,i=[],n,r,a;if(!e._d){for(n=kb(e),e._w&&e._a[Ye]==null&&e._a[Xe]==null&&Mb(e),e._dayOfYear!=null&&(a=Xs(e._a[se],n[se]),(e._dayOfYear>Wi(a)||e._dayOfYear===0)&&(X(e)._overflowDayOfYear=!0),s=Hi(a,0,e._dayOfYear),e._a[Xe]=s.getUTCMonth(),e._a[Ye]=s.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=i[t]=n[t];for(;t<7;t++)e._a[t]=i[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[jt]===24&&e._a[Ce]===0&&e._a[Ke]===0&&e._a[As]===0&&(e._nextDay=!0,e._a[jt]=0),e._d=(e._useUTC?Hi:Am).apply(null,i),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[jt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==r&&(X(e).weekdayMismatch=!0)}}function Mb(e){var t,s,i,n,r,a,o,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(r=1,a=4,s=Xs(t.GG,e._a[se],Bi(Ct(),1,4).year),i=Xs(t.W,1),n=Xs(t.E,1),(n<1||n>7)&&(l=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,c=Bi(Ct(),r,a),s=Xs(t.gg,e._a[se],c.year),i=Xs(t.w,c.week),t.d!=null?(n=t.d,(n<0||n>6)&&(l=!0)):t.e!=null?(n=t.e+r,(t.e<0||t.e>6)&&(l=!0)):n=r),i<1||i>Ze(s,r,a)?X(e)._overflowWeeks=!0:l!=null?X(e)._overflowWeekday=!0:(o=ph(s,i,n,r,a),e._a[se]=o.year,e._dayOfYear=o.dayOfYear)}E.ISO_8601=function(){},E.RFC_2822=function(){};function qa(e){if(e._f===E.ISO_8601){xh(e);return}if(e._f===E.RFC_2822){wh(e);return}e._a=[],X(e).empty=!0;var t=""+e._i,s,i,n,r,a,o=t.length,l=0,c,h;for(n=sh(e._f,e._locale).match(Ea)||[],h=n.length,s=0;s<h;s++)r=n[s],i=(t.match(gm(r,e))||[])[0],i&&(a=t.substr(0,t.indexOf(i)),a.length>0&&X(e).unusedInput.push(a),t=t.slice(t.indexOf(i)+i.length),l+=i.length),Us[r]?(i?X(e).empty=!1:X(e).unusedTokens.push(r),mm(r,i,e)):e._strict&&!i&&X(e).unusedTokens.push(r);X(e).charsLeftOver=o-l,t.length>0&&X(e).unusedInput.push(t),e._a[jt]<=12&&X(e).bigHour===!0&&e._a[jt]>0&&(X(e).bigHour=void 0),X(e).parsedDateParts=e._a.slice(0),X(e).meridiem=e._meridiem,e._a[jt]=Db(e._locale,e._a[jt],e._meridiem),c=X(e).era,c!==null&&(e._a[se]=e._locale.erasConvertYear(c,e._a[se])),Ga(e),ja(e)}function Db(e,t,s){var i;return s==null?t:e.meridiemHour!=null?e.meridiemHour(t,s):(e.isPM!=null&&(i=e.isPM(s),i&&t<12&&(t+=12),!i&&t===12&&(t=0)),t)}function Cb(e){var t,s,i,n,r,a,o=!1,l=e._f.length;if(l===0){X(e).invalidFormat=!0,e._d=new Date(NaN);return}for(n=0;n<l;n++)r=0,a=!1,t=Aa({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[n],qa(t),Pa(t)&&(a=!0),r+=X(t).charsLeftOver,r+=X(t).unusedTokens.length*10,X(t).score=r,o?r<i&&(i=r,s=t):(i==null||r<i||a)&&(i=r,s=t,a&&(o=!0));ds(e,s||t)}function Ob(e){if(!e._d){var t=Na(e._i),s=t.day===void 0?t.date:t.day;e._a=Zc([t.year,t.month,s,t.hour,t.minute,t.second,t.millisecond],function(i){return i&&parseInt(i,10)}),Ga(e)}}function Pb(e){var t=new zi(ja(Sh(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Sh(e){var t=e._i,s=e._f;return e._locale=e._locale||Je(e._l),t===null||s===void 0&&t===""?qn({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),De(t)?new zi(ja(t)):(Ni(t)?e._d=t:Me(s)?Cb(e):s?qa(e):Tb(e),Pa(e)||(e._d=null),e))}function Tb(e){var t=e._i;oe(t)?e._d=new Date(E.now()):Ni(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Sb(e):Me(t)?(e._a=Zc(t.slice(0),function(s){return parseInt(s,10)}),Ga(e)):Ts(t)?Ob(e):qe(t)?e._d=new Date(t):E.createFromInputFallback(e)}function kh(e,t,s,i,n){var r={};return(t===!0||t===!1)&&(i=t,t=void 0),(s===!0||s===!1)&&(i=s,s=void 0),(Ts(e)&&Ca(e)||Me(e)&&e.length===0)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=n,r._l=s,r._i=e,r._f=t,r._strict=i,Pb(r)}function Ct(e,t,s,i){return kh(e,t,s,i,!1)}var Ab=be("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:qn()}),Lb=be("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:qn()});function Mh(e,t){var s,i;if(t.length===1&&Me(t[0])&&(t=t[0]),!t.length)return Ct();for(s=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][e](s))&&(s=t[i]);return s}function Rb(){var e=[].slice.call(arguments,0);return Mh("isBefore",e)}function Fb(){var e=[].slice.call(arguments,0);return Mh("isAfter",e)}var Eb=function(){return Date.now?Date.now():+new Date},Gi=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ib(e){var t,s=!1,i,n=Gi.length;for(t in e)if(ut(e,t)&&!(Vt.call(Gi,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(i=0;i<n;++i)if(e[Gi[i]]){if(s)return!1;parseFloat(e[Gi[i]])!==et(e[Gi[i]])&&(s=!0)}return!0}function Nb(){return this._isValid}function zb(){return Oe(NaN)}function cr(e){var t=Na(e),s=t.year||0,i=t.quarter||0,n=t.month||0,r=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,l=t.minute||0,c=t.second||0,h=t.millisecond||0;this._isValid=Ib(t),this._milliseconds=+h+c*1e3+l*6e4+o*1e3*60*60,this._days=+a+r*7,this._months=+n+i*3+s*12,this._data={},this._locale=Je(),this._bubble()}function hr(e){return e instanceof cr}function Xa(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Yb(e,t,s){var i=Math.min(e.length,t.length),n=Math.abs(e.length-t.length),r=0,a;for(a=0;a<i;a++)(s&&e[a]!==t[a]||!s&&et(e[a])!==et(t[a]))&&r++;return r+n}function Dh(e,t){B(e,0,0,function(){var s=this.utcOffset(),i="+";return s<0&&(s=-s,i="-"),i+ze(~~(s/60),2)+t+ze(~~s%60,2)})}Dh("Z",":"),Dh("ZZ",""),V("Z",ir),V("ZZ",ir),bt(["Z","ZZ"],function(e,t,s){s._useUTC=!0,s._tzm=Ka(ir,e)});var Vb=/([\+\-]|\d\d)/gi;function Ka(e,t){var s=(t||"").match(e),i,n,r;return s===null?null:(i=s[s.length-1]||[],n=(i+"").match(Vb)||["-",0,0],r=+(n[1]*60)+et(n[2]),r===0?0:n[0]==="+"?r:-r)}function Za(e,t){var s,i;return t._isUTC?(s=t.clone(),i=(De(e)||Ni(e)?e.valueOf():Ct(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),E.updateOffset(s,!1),s):Ct(e).local()}function Ja(e){return-Math.round(e._d.getTimezoneOffset())}E.updateOffset=function(){};function $b(e,t,s){var i=this._offset||0,n;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Ka(ir,e),e===null)return this}else Math.abs(e)<16&&!s&&(e=e*60);return!this._isUTC&&t&&(n=Ja(this)),this._offset=e,this._isUTC=!0,n!=null&&this.add(n,"m"),i!==e&&(!t||this._changeInProgress?Th(this,Oe(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,E.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:Ja(this)}function Wb(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Hb(e){return this.utcOffset(0,e)}function Bb(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ja(this),"m")),this}function jb(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Ka(dm,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Ub(e){return this.isValid()?(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function Gb(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function qb(){if(!oe(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Aa(e,this),e=Sh(e),e._a?(t=e._isUTC?Ie(e._a):Ct(e._a),this._isDSTShifted=this.isValid()&&Yb(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Xb(){return this.isValid()?!this._isUTC:!1}function Kb(){return this.isValid()?this._isUTC:!1}function Ch(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Zb=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Jb=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Oe(e,t){var s=e,i=null,n,r,a;return hr(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:qe(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(i=Zb.exec(e))?(n=i[1]==="-"?-1:1,s={y:0,d:et(i[Ye])*n,h:et(i[jt])*n,m:et(i[Ce])*n,s:et(i[Ke])*n,ms:et(Xa(i[As]*1e3))*n}):(i=Jb.exec(e))?(n=i[1]==="-"?-1:1,s={y:Ls(i[2],n),M:Ls(i[3],n),w:Ls(i[4],n),d:Ls(i[5],n),h:Ls(i[6],n),m:Ls(i[7],n),s:Ls(i[8],n)}):s==null?s={}:typeof s=="object"&&("from"in s||"to"in s)&&(a=Qb(Ct(s.from),Ct(s.to)),s={},s.ms=a.milliseconds,s.M=a.months),r=new cr(s),hr(e)&&ut(e,"_locale")&&(r._locale=e._locale),hr(e)&&ut(e,"_isValid")&&(r._isValid=e._isValid),r}Oe.fn=cr.prototype,Oe.invalid=zb;function Ls(e,t){var s=e&&parseFloat(e.replace(",","."));return(isNaN(s)?0:s)*t}function Oh(e,t){var s={};return s.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(s.months,"M").isAfter(t)&&--s.months,s.milliseconds=+t-+e.clone().add(s.months,"M"),s}function Qb(e,t){var s;return e.isValid()&&t.isValid()?(t=Za(t,e),e.isBefore(t)?s=Oh(e,t):(s=Oh(t,e),s.milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0}}function Ph(e,t){return function(s,i){var n,r;return i!==null&&!isNaN(+i)&&(eh(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=s,s=i,i=r),n=Oe(s,i),Th(this,n,e),this}}function Th(e,t,s,i){var n=t._milliseconds,r=Xa(t._days),a=Xa(t._months);e.isValid()&&(i=i==null?!0:i,a&&uh(e,Jn(e,"Month")+a*s),r&&nh(e,"Date",Jn(e,"Date")+r*s),n&&e._d.setTime(e._d.valueOf()+n*s),i&&E.updateOffset(e,r||a))}var t_=Ph(1,"add"),e_=Ph(-1,"subtract");function Ah(e){return typeof e=="string"||e instanceof String}function s_(e){return De(e)||Ni(e)||Ah(e)||qe(e)||n_(e)||i_(e)||e===null||e===void 0}function i_(e){var t=Ts(e)&&!Ca(e),s=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],n,r,a=i.length;for(n=0;n<a;n+=1)r=i[n],s=s||ut(e,r);return t&&s}function n_(e){var t=Me(e),s=!1;return t&&(s=e.filter(function(i){return!qe(i)&&Ah(e)}).length===0),t&&s}function r_(e){var t=Ts(e)&&!Ca(e),s=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],n,r;for(n=0;n<i.length;n+=1)r=i[n],s=s||ut(e,r);return t&&s}function a_(e,t){var s=e.diff(t,"days",!0);return s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse"}function o_(e,t){arguments.length===1&&(arguments[0]?s_(arguments[0])?(e=arguments[0],t=void 0):r_(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||Ct(),i=Za(s,this).startOf("day"),n=E.calendarFormat(this,i)||"sameElse",r=t&&(Ne(t[n])?t[n].call(this,s):t[n]);return this.format(r||this.localeData().calendar(n,this,Ct(s)))}function l_(){return new zi(this)}function c_(e,t){var s=De(e)?e:Ct(e);return this.isValid()&&s.isValid()?(t=_e(t)||"millisecond",t==="millisecond"?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(t).valueOf()):!1}function h_(e,t){var s=De(e)?e:Ct(e);return this.isValid()&&s.isValid()?(t=_e(t)||"millisecond",t==="millisecond"?this.valueOf()<s.valueOf():this.clone().endOf(t).valueOf()<s.valueOf()):!1}function u_(e,t,s,i){var n=De(e)?e:Ct(e),r=De(t)?t:Ct(t);return this.isValid()&&n.isValid()&&r.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(n,s):!this.isBefore(n,s))&&(i[1]===")"?this.isBefore(r,s):!this.isAfter(r,s))):!1}function d_(e,t){var s=De(e)?e:Ct(e),i;return this.isValid()&&s.isValid()?(t=_e(t)||"millisecond",t==="millisecond"?this.valueOf()===s.valueOf():(i=s.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf())):!1}function f_(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function g_(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function p_(e,t,s){var i,n,r;if(!this.isValid())return NaN;if(i=Za(e,this),!i.isValid())return NaN;switch(n=(i.utcOffset()-this.utcOffset())*6e4,t=_e(t),t){case"year":r=ur(this,i)/12;break;case"month":r=ur(this,i);break;case"quarter":r=ur(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-n)/864e5;break;case"week":r=(this-i-n)/6048e5;break;default:r=this-i}return s?r:ye(r)}function ur(e,t){if(e.date()<t.date())return-ur(t,e);var s=(t.year()-e.year())*12+(t.month()-e.month()),i=e.clone().add(s,"months"),n,r;return t-i<0?(n=e.clone().add(s-1,"months"),r=(t-i)/(i-n)):(n=e.clone().add(s+1,"months"),r=(t-i)/(n-i)),-(s+r)||0}E.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",E.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function m_(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function b_(e){if(!this.isValid())return null;var t=e!==!0,s=t?this.clone().utc():this;return s.year()<0||s.year()>9999?Kn(s,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ne(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Kn(s,"Z")):Kn(s,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function __(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",s,i,n,r;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),s="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=t+'[")]',this.format(s+i+n+r)}function y_(e){e||(e=this.isUtc()?E.defaultFormatUtc:E.defaultFormat);var t=Kn(this,e);return this.localeData().postformat(t)}function v_(e,t){return this.isValid()&&(De(e)&&e.isValid()||Ct(e).isValid())?Oe({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function x_(e){return this.from(Ct(),e)}function w_(e,t){return this.isValid()&&(De(e)&&e.isValid()||Ct(e).isValid())?Oe({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function S_(e){return this.to(Ct(),e)}function Lh(e){var t;return e===void 0?this._locale._abbr:(t=Je(e),t!=null&&(this._locale=t),this)}var Rh=be("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Fh(){return this._locale}var dr=1e3,Ks=60*dr,fr=60*Ks,Eh=(365*400+97)*24*fr;function Zs(e,t){return(e%t+t)%t}function Ih(e,t,s){return e<100&&e>=0?new Date(e+400,t,s)-Eh:new Date(e,t,s).valueOf()}function Nh(e,t,s){return e<100&&e>=0?Date.UTC(e+400,t,s)-Eh:Date.UTC(e,t,s)}function k_(e){var t,s;if(e=_e(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Nh:Ih,e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Zs(t+(this._isUTC?0:this.utcOffset()*Ks),fr);break;case"minute":t=this._d.valueOf(),t-=Zs(t,Ks);break;case"second":t=this._d.valueOf(),t-=Zs(t,dr);break}return this._d.setTime(t),E.updateOffset(this,!0),this}function M_(e){var t,s;if(e=_e(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Nh:Ih,e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=fr-Zs(t+(this._isUTC?0:this.utcOffset()*Ks),fr)-1;break;case"minute":t=this._d.valueOf(),t+=Ks-Zs(t,Ks)-1;break;case"second":t=this._d.valueOf(),t+=dr-Zs(t,dr)-1;break}return this._d.setTime(t),E.updateOffset(this,!0),this}function D_(){return this._d.valueOf()-(this._offset||0)*6e4}function C_(){return Math.floor(this.valueOf()/1e3)}function O_(){return new Date(this.valueOf())}function P_(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function T_(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function A_(){return this.isValid()?this.toISOString():null}function L_(){return Pa(this)}function R_(){return ds({},X(this))}function F_(){return X(this).overflow}function E_(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),V("N",Qa),V("NN",Qa),V("NNN",Qa),V("NNNN",U_),V("NNNNN",G_),bt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,s,i){var n=s._locale.erasParse(e,i,s._strict);n?X(s).era=n:X(s).invalidEra=e}),V("y",qs),V("yy",qs),V("yyy",qs),V("yyyy",qs),V("yo",q_),bt(["y","yy","yyy","yyyy"],se),bt(["yo"],function(e,t,s,i){var n;s._locale._eraYearOrdinalRegex&&(n=e.match(s._locale._eraYearOrdinalRegex)),s._locale.eraYearOrdinalParse?t[se]=s._locale.eraYearOrdinalParse(e,n):t[se]=parseInt(e,10)});function I_(e,t){var s,i,n,r=this._eras||Je("en")._eras;for(s=0,i=r.length;s<i;++s){switch(typeof r[s].since){case"string":n=E(r[s].since).startOf("day"),r[s].since=n.valueOf();break}switch(typeof r[s].until){case"undefined":r[s].until=1/0;break;case"string":n=E(r[s].until).startOf("day").valueOf(),r[s].until=n.valueOf();break}}return r}function N_(e,t,s){var i,n,r=this.eras(),a,o,l;for(e=e.toUpperCase(),i=0,n=r.length;i<n;++i)if(a=r[i].name.toUpperCase(),o=r[i].abbr.toUpperCase(),l=r[i].narrow.toUpperCase(),s)switch(t){case"N":case"NN":case"NNN":if(o===e)return r[i];break;case"NNNN":if(a===e)return r[i];break;case"NNNNN":if(l===e)return r[i];break}else if([a,o,l].indexOf(e)>=0)return r[i]}function z_(e,t){var s=e.since<=e.until?1:-1;return t===void 0?E(e.since).year():E(e.since).year()+(t-e.offset)*s}function Y_(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until||i[e].until<=s&&s<=i[e].since)return i[e].name;return""}function V_(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until||i[e].until<=s&&s<=i[e].since)return i[e].narrow;return""}function $_(){var e,t,s,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),i[e].since<=s&&s<=i[e].until||i[e].until<=s&&s<=i[e].since)return i[e].abbr;return""}function W_(){var e,t,s,i,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(s=n[e].since<=n[e].until?1:-1,i=this.clone().startOf("day").valueOf(),n[e].since<=i&&i<=n[e].until||n[e].until<=i&&i<=n[e].since)return(this.year()-E(n[e].since).year())*s+n[e].offset;return this.year()}function H_(e){return ut(this,"_erasNameRegex")||to.call(this),e?this._erasNameRegex:this._erasRegex}function B_(e){return ut(this,"_erasAbbrRegex")||to.call(this),e?this._erasAbbrRegex:this._erasRegex}function j_(e){return ut(this,"_erasNarrowRegex")||to.call(this),e?this._erasNarrowRegex:this._erasRegex}function Qa(e,t){return t.erasAbbrRegex(e)}function U_(e,t){return t.erasNameRegex(e)}function G_(e,t){return t.erasNarrowRegex(e)}function q_(e,t){return t._eraYearOrdinalRegex||qs}function to(){var e=[],t=[],s=[],i=[],n,r,a=this.eras();for(n=0,r=a.length;n<r;++n)t.push(he(a[n].name)),e.push(he(a[n].abbr)),s.push(he(a[n].narrow)),i.push(he(a[n].name)),i.push(he(a[n].abbr)),i.push(he(a[n].narrow));this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100});function gr(e,t){B(0,[e,e.length],0,t)}gr("gggg","weekYear"),gr("ggggg","weekYear"),gr("GGGG","isoWeekYear"),gr("GGGGG","isoWeekYear"),te("weekYear","gg"),te("isoWeekYear","GG"),ee("weekYear",1),ee("isoWeekYear",1),V("G",sr),V("g",sr),V("GG",Dt,ce),V("gg",Dt,ce),V("GGGG",Ya,za),V("gggg",Ya,za),V("GGGGG",er,Qn),V("ggggg",er,Qn),$i(["gggg","ggggg","GGGG","GGGGG"],function(e,t,s,i){t[i.substr(0,2)]=et(e)}),$i(["gg","GG"],function(e,t,s,i){t[i]=E.parseTwoDigitYear(e)});function X_(e){return zh.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function K_(e){return zh.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Z_(){return Ze(this.year(),1,4)}function J_(){return Ze(this.isoWeekYear(),1,4)}function Q_(){var e=this.localeData()._week;return Ze(this.year(),e.dow,e.doy)}function t0(){var e=this.localeData()._week;return Ze(this.weekYear(),e.dow,e.doy)}function zh(e,t,s,i,n){var r;return e==null?Bi(this,i,n).year:(r=Ze(e,i,n),t>r&&(t=r),e0.call(this,e,t,s,i,n))}function e0(e,t,s,i,n){var r=ph(e,t,s,i,n),a=Hi(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}B("Q",0,"Qo","quarter"),te("quarter","Q"),ee("quarter",7),V("Q",rh),bt("Q",function(e,t){t[Xe]=(et(e)-1)*3});function s0(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}B("D",["DD",2],"Do","date"),te("date","D"),ee("date",9),V("D",Dt),V("DD",Dt,ce),V("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),bt(["D","DD"],Ye),bt("Do",function(e,t){t[Ye]=et(e.match(Dt)[0])});var Yh=Gs("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),te("dayOfYear","DDD"),ee("dayOfYear",4),V("DDD",tr),V("DDDD",ah),bt(["DDD","DDDD"],function(e,t,s){s._dayOfYear=et(e)});function i0(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}B("m",["mm",2],0,"minute"),te("minute","m"),ee("minute",14),V("m",Dt),V("mm",Dt,ce),bt(["m","mm"],Ce);var n0=Gs("Minutes",!1);B("s",["ss",2],0,"second"),te("second","s"),ee("second",15),V("s",Dt),V("ss",Dt,ce),bt(["s","ss"],Ke);var r0=Gs("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return this.millisecond()*10}),B(0,["SSSSS",5],0,function(){return this.millisecond()*100}),B(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),B(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),B(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),B(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),te("millisecond","ms"),ee("millisecond",16),V("S",tr,rh),V("SS",tr,ce),V("SSS",tr,ah);var gs,Vh;for(gs="SSSS";gs.length<=9;gs+="S")V(gs,qs);function a0(e,t){t[As]=et(("0."+e)*1e3)}for(gs="S";gs.length<=9;gs+="S")bt(gs,a0);Vh=Gs("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");function o0(){return this._isUTC?"UTC":""}function l0(){return this._isUTC?"Coordinated Universal Time":""}var A=zi.prototype;A.add=t_,A.calendar=o_,A.clone=l_,A.diff=p_,A.endOf=M_,A.format=y_,A.from=v_,A.fromNow=x_,A.to=w_,A.toNow=S_,A.get=hm,A.invalidAt=F_,A.isAfter=c_,A.isBefore=h_,A.isBetween=u_,A.isSame=d_,A.isSameOrAfter=f_,A.isSameOrBefore=g_,A.isValid=L_,A.lang=Rh,A.locale=Lh,A.localeData=Fh,A.max=Lb,A.min=Ab,A.parsingFlags=R_,A.set=um,A.startOf=k_,A.subtract=e_,A.toArray=P_,A.toObject=T_,A.toDate=O_,A.toISOString=b_,A.inspect=__,typeof Symbol<"u"&&Symbol.for!=null&&(A[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),A.toJSON=A_,A.toString=m_,A.unix=C_,A.valueOf=D_,A.creationData=E_,A.eraName=Y_,A.eraNarrow=V_,A.eraAbbr=$_,A.eraYear=W_,A.year=gh,A.isLeapYear=Tm,A.weekYear=X_,A.isoWeekYear=K_,A.quarter=A.quarters=s0,A.month=dh,A.daysInMonth=Cm,A.week=A.weeks=Im,A.isoWeek=A.isoWeeks=Nm,A.weeksInYear=Q_,A.weeksInWeekYear=t0,A.isoWeeksInYear=Z_,A.isoWeeksInISOWeekYear=J_,A.date=Yh,A.day=A.days=Km,A.weekday=Zm,A.isoWeekday=Jm,A.dayOfYear=i0,A.hour=A.hours=rb,A.minute=A.minutes=n0,A.second=A.seconds=r0,A.millisecond=A.milliseconds=Vh,A.utcOffset=$b,A.utc=Hb,A.local=Bb,A.parseZone=jb,A.hasAlignedHourOffset=Ub,A.isDST=Gb,A.isLocal=Xb,A.isUtcOffset=Kb,A.isUtc=Ch,A.isUTC=Ch,A.zoneAbbr=o0,A.zoneName=l0,A.dates=be("dates accessor is deprecated. Use date instead.",Yh),A.months=be("months accessor is deprecated. Use month instead",dh),A.years=be("years accessor is deprecated. Use year instead",gh),A.zone=be("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Wb),A.isDSTShifted=be("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",qb);function c0(e){return Ct(e*1e3)}function h0(){return Ct.apply(null,arguments).parseZone()}function $h(e){return e}var dt=Ra.prototype;dt.calendar=Kp,dt.longDateFormat=tm,dt.invalidDate=sm,dt.ordinal=rm,dt.preparse=$h,dt.postformat=$h,dt.relativeTime=om,dt.pastFuture=lm,dt.set=qp,dt.eras=I_,dt.erasParse=N_,dt.erasConvertYear=z_,dt.erasAbbrRegex=B_,dt.erasNameRegex=H_,dt.erasNarrowRegex=j_,dt.months=Sm,dt.monthsShort=km,dt.monthsParse=Dm,dt.monthsRegex=Pm,dt.monthsShortRegex=Om,dt.week=Lm,dt.firstDayOfYear=Em,dt.firstDayOfWeek=Fm,dt.weekdays=jm,dt.weekdaysMin=Gm,dt.weekdaysShort=Um,dt.weekdaysParse=Xm,dt.weekdaysRegex=Qm,dt.weekdaysShortRegex=tb,dt.weekdaysMinRegex=eb,dt.isPM=ib,dt.meridiem=ab;function pr(e,t,s,i){var n=Je(),r=Ie().set(i,t);return n[s](r,e)}function Wh(e,t,s){if(qe(e)&&(t=e,e=void 0),e=e||"",t!=null)return pr(e,t,s,"month");var i,n=[];for(i=0;i<12;i++)n[i]=pr(e,i,s,"month");return n}function eo(e,t,s,i){typeof e=="boolean"?(qe(t)&&(s=t,t=void 0),t=t||""):(t=e,s=t,e=!1,qe(t)&&(s=t,t=void 0),t=t||"");var n=Je(),r=e?n._week.dow:0,a,o=[];if(s!=null)return pr(t,(s+r)%7,i,"day");for(a=0;a<7;a++)o[a]=pr(t,(a+r)%7,i,"day");return o}function u0(e,t){return Wh(e,t,"months")}function d0(e,t){return Wh(e,t,"monthsShort")}function f0(e,t,s){return eo(e,t,s,"weekdays")}function g0(e,t,s){return eo(e,t,s,"weekdaysShort")}function p0(e,t,s){return eo(e,t,s,"weekdaysMin")}fs("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,s=et(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+s}}),E.lang=be("moment.lang is deprecated. Use moment.locale instead.",fs),E.langData=be("moment.langData is deprecated. Use moment.localeData instead.",Je);var Qe=Math.abs;function m0(){var e=this._data;return this._milliseconds=Qe(this._milliseconds),this._days=Qe(this._days),this._months=Qe(this._months),e.milliseconds=Qe(e.milliseconds),e.seconds=Qe(e.seconds),e.minutes=Qe(e.minutes),e.hours=Qe(e.hours),e.months=Qe(e.months),e.years=Qe(e.years),this}function Hh(e,t,s,i){var n=Oe(t,s);return e._milliseconds+=i*n._milliseconds,e._days+=i*n._days,e._months+=i*n._months,e._bubble()}function b0(e,t){return Hh(this,e,t,1)}function _0(e,t){return Hh(this,e,t,-1)}function Bh(e){return e<0?Math.floor(e):Math.ceil(e)}function y0(){var e=this._milliseconds,t=this._days,s=this._months,i=this._data,n,r,a,o,l;return e>=0&&t>=0&&s>=0||e<=0&&t<=0&&s<=0||(e+=Bh(so(s)+t)*864e5,t=0,s=0),i.milliseconds=e%1e3,n=ye(e/1e3),i.seconds=n%60,r=ye(n/60),i.minutes=r%60,a=ye(r/60),i.hours=a%24,t+=ye(a/24),l=ye(jh(t)),s+=l,t-=Bh(so(l)),o=ye(s/12),s%=12,i.days=t,i.months=s,i.years=o,this}function jh(e){return e*4800/146097}function so(e){return e*146097/4800}function v0(e){if(!this.isValid())return NaN;var t,s,i=this._milliseconds;if(e=_e(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+i/864e5,s=this._months+jh(t),e){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(t=this._days+Math.round(so(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return t*24+i/36e5;case"minute":return t*1440+i/6e4;case"second":return t*86400+i/1e3;case"millisecond":return Math.floor(t*864e5)+i;default:throw new Error("Unknown unit "+e)}}function x0(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+et(this._months/12)*31536e6:NaN}function ts(e){return function(){return this.as(e)}}var w0=ts("ms"),S0=ts("s"),k0=ts("m"),M0=ts("h"),D0=ts("d"),C0=ts("w"),O0=ts("M"),P0=ts("Q"),T0=ts("y");function A0(){return Oe(this)}function L0(e){return e=_e(e),this.isValid()?this[e+"s"]():NaN}function Rs(e){return function(){return this.isValid()?this._data[e]:NaN}}var R0=Rs("milliseconds"),F0=Rs("seconds"),E0=Rs("minutes"),I0=Rs("hours"),N0=Rs("days"),z0=Rs("months"),Y0=Rs("years");function V0(){return ye(this.days()/7)}var es=Math.round,Js={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $0(e,t,s,i,n){return n.relativeTime(t||1,!!s,e,i)}function W0(e,t,s,i){var n=Oe(e).abs(),r=es(n.as("s")),a=es(n.as("m")),o=es(n.as("h")),l=es(n.as("d")),c=es(n.as("M")),h=es(n.as("w")),u=es(n.as("y")),f=r<=s.ss&&["s",r]||r<s.s&&["ss",r]||a<=1&&["m"]||a<s.m&&["mm",a]||o<=1&&["h"]||o<s.h&&["hh",o]||l<=1&&["d"]||l<s.d&&["dd",l];return s.w!=null&&(f=f||h<=1&&["w"]||h<s.w&&["ww",h]),f=f||c<=1&&["M"]||c<s.M&&["MM",c]||u<=1&&["y"]||["yy",u],f[2]=t,f[3]=+e>0,f[4]=i,$0.apply(null,f)}function H0(e){return e===void 0?es:typeof e=="function"?(es=e,!0):!1}function B0(e,t){return Js[e]===void 0?!1:t===void 0?Js[e]:(Js[e]=t,e==="s"&&(Js.ss=t-1),!0)}function j0(e,t){if(!this.isValid())return this.localeData().invalidDate();var s=!1,i=Js,n,r;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(s=e),typeof t=="object"&&(i=Object.assign({},Js,t),t.s!=null&&t.ss==null&&(i.ss=t.s-1)),n=this.localeData(),r=W0(this,!s,i,n),s&&(r=n.pastFuture(+this,r)),n.postformat(r)}var io=Math.abs;function Qs(e){return(e>0)-(e<0)||+e}function mr(){if(!this.isValid())return this.localeData().invalidDate();var e=io(this._milliseconds)/1e3,t=io(this._days),s=io(this._months),i,n,r,a,o=this.asSeconds(),l,c,h,u;return o?(i=ye(e/60),n=ye(i/60),e%=60,i%=60,r=ye(s/12),s%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",c=Qs(this._months)!==Qs(o)?"-":"",h=Qs(this._days)!==Qs(o)?"-":"",u=Qs(this._milliseconds)!==Qs(o)?"-":"",l+"P"+(r?c+r+"Y":"")+(s?c+s+"M":"")+(t?h+t+"D":"")+(n||i||e?"T":"")+(n?u+n+"H":"")+(i?u+i+"M":"")+(e?u+a+"S":"")):"P0D"}var lt=cr.prototype;lt.isValid=Nb,lt.abs=m0,lt.add=b0,lt.subtract=_0,lt.as=v0,lt.asMilliseconds=w0,lt.asSeconds=S0,lt.asMinutes=k0,lt.asHours=M0,lt.asDays=D0,lt.asWeeks=C0,lt.asMonths=O0,lt.asQuarters=P0,lt.asYears=T0,lt.valueOf=x0,lt._bubble=y0,lt.clone=A0,lt.get=L0,lt.milliseconds=R0,lt.seconds=F0,lt.minutes=E0,lt.hours=I0,lt.days=N0,lt.weeks=V0,lt.months=z0,lt.years=Y0,lt.humanize=j0,lt.toISOString=mr,lt.toString=mr,lt.toJSON=mr,lt.locale=Lh,lt.localeData=Fh,lt.toIsoString=be("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",mr),lt.lang=Rh,B("X",0,0,"unix"),B("x",0,0,"valueOf"),V("x",sr),V("X",fm),bt("X",function(e,t,s){s._d=new Date(parseFloat(e)*1e3)}),bt("x",function(e,t,s){s._d=new Date(et(e))});//! moment.js
E.version="2.29.4",Up(Ct),E.fn=A,E.min=Rb,E.max=Fb,E.now=Eb,E.utc=Ie,E.unix=c0,E.months=u0,E.isDate=Ni,E.locale=fs,E.invalid=qn,E.duration=Oe,E.isMoment=De,E.weekdays=f0,E.parseZone=h0,E.localeData=Je,E.isDuration=hr,E.monthsShort=d0,E.weekdaysMin=p0,E.defineLocale=Ba,E.updateLocale=hb,E.locales=ub,E.weekdaysShort=g0,E.normalizeUnits=_e,E.relativeTimeRounding=H0,E.relativeTimeThreshold=B0,E.calendarFormat=a_,E.prototype=A,E.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};/*!
* chartjs-adapter-moment v1.0.1
* https://www.chartjs.org
* (c) 2022 chartjs-adapter-moment Contributors
* Released under the MIT license
*/const U0={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Kl._date.override(typeof E=="function"?{_id:"moment",formats:function(){return U0},parse:function(e,t){return typeof e=="string"&&typeof t=="string"?e=E(e,t):e instanceof E||(e=E(e)),e.isValid()?e.valueOf():null},format:function(e,t){return E(e).format(t)},add:function(e,t,s){return E(e).add(t,s).valueOf()},diff:function(e,t,s){return E(e).diff(E(t),s)},startOf:function(e,t,s){return e=E(e),t==="isoWeek"?(s=Math.trunc(Math.min(Math.max(0,s),6)),e.isoWeekday(s).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return E(e).endOf(t).valueOf()}}:{});var qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function G0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var no={exports:{}};(function(e,t){var s=200,i="__lodash_hash_undefined__",n=800,r=16,a=9007199254740991,o="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",u="[object Date]",f="[object Error]",g="[object Function]",m="[object GeneratorFunction]",v="[object Map]",x="[object Number]",k="[object Null]",D="[object Object]",P="[object Proxy]",T="[object RegExp]",O="[object Set]",N="[object String]",I="[object Undefined]",j="[object WeakMap]",H="[object ArrayBuffer]",nt="[object DataView]",Z="[object Float32Array]",J="[object Float64Array]",Rt="[object Int8Array]",Ut="[object Int16Array]",G="[object Int32Array]",Ot="[object Uint8Array]",_t="[object Uint8ClampedArray]",qt="[object Uint16Array]",Fs="[object Uint32Array]",Ve=/[\\^$.*+?()[\]{}|]/g,ps=/^\[object .+?Constructor\]$/,$e=/^(?:0|[1-9]\d*)$/,ht={};ht[Z]=ht[J]=ht[Rt]=ht[Ut]=ht[G]=ht[Ot]=ht[_t]=ht[qt]=ht[Fs]=!0,ht[o]=ht[l]=ht[H]=ht[h]=ht[nt]=ht[u]=ht[f]=ht[g]=ht[v]=ht[x]=ht[D]=ht[T]=ht[O]=ht[N]=ht[j]=!1;var ms=typeof qi=="object"&&qi&&qi.Object===Object&&qi,Es=typeof self=="object"&&self&&self.Object===Object&&self,Pe=ms||Es||Function("return this")(),yr=t&&!t.nodeType&&t,Is=yr&&!0&&e&&!e.nodeType&&e,vr=Is&&Is.exports===yr,ti=vr&&ms.process,xr=function(){try{var p=Is&&Is.require&&Is.require("util").types;return p||ti&&ti.binding&&ti.binding("util")}catch{}}(),wr=xr&&xr.isTypedArray;function oo(p,y,M){switch(M.length){case 0:return p.call(y);case 1:return p.call(y,M[0]);case 2:return p.call(y,M[0],M[1]);case 3:return p.call(y,M[0],M[1],M[2])}return p.apply(y,M)}function lo(p,y){for(var M=-1,W=Array(p);++M<p;)W[M]=y(M);return W}function co(p){return function(y){return p(y)}}function ho(p,y){return p==null?void 0:p[y]}function uo(p,y){return function(M){return p(y(M))}}var fo=Array.prototype,go=Function.prototype,ei=Object.prototype,Xi=Pe["__core-js_shared__"],si=go.toString,ve=ei.hasOwnProperty,Sr=function(){var p=/[^.]+$/.exec(Xi&&Xi.keys&&Xi.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),Ki=ei.toString,po=si.call(Object),_=RegExp("^"+si.call(ve).replace(Ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),d=vr?Pe.Buffer:void 0,L=Pe.Symbol,z=Pe.Uint8Array,Y=d?d.allocUnsafe:void 0,Q=uo(Object.getPrototypeOf,Object),K=Object.create,Pt=ei.propertyIsEnumerable,tt=fo.splice,It=L?L.toStringTag:void 0,ie=function(){try{var p=ci(Object,"defineProperty");return p({},"",{}),p}catch{}}(),$t=d?d.isBuffer:void 0,at=Math.max,Te=Date.now,Tt=ci(Pe,"Map"),Ht=ci(Object,"create"),Zi=function(){function p(){}return function(y){if(!st(y))return{};if(K)return K(y);p.prototype=y;var M=new p;return p.prototype=void 0,M}}();function Kt(p){var y=-1,M=p==null?0:p.length;for(this.clear();++y<M;){var W=p[y];this.set(W[0],W[1])}}function bs(){this.__data__=Ht?Ht(null):{},this.size=0}function ii(p){var y=this.has(p)&&delete this.__data__[p];return this.size-=y?1:0,y}function ni(p){var y=this.__data__;if(Ht){var M=y[p];return M===i?void 0:M}return ve.call(y,p)?y[p]:void 0}function mo(p){var y=this.__data__;return Ht?y[p]!==void 0:ve.call(y,p)}function Ae(p,y){var M=this.__data__;return this.size+=this.has(p)?0:1,M[p]=Ht&&y===void 0?i:y,this}Kt.prototype.clear=bs,Kt.prototype.delete=ii,Kt.prototype.get=ni,Kt.prototype.has=mo,Kt.prototype.set=Ae;function Le(p){var y=-1,M=p==null?0:p.length;for(this.clear();++y<M;){var W=p[y];this.set(W[0],W[1])}}function kr(){this.__data__=[],this.size=0}function bo(p){var y=this.__data__,M=ai(y,p);if(M<0)return!1;var W=y.length-1;return M==W?y.pop():tt.call(y,M,1),--this.size,!0}function _o(p){var y=this.__data__,M=ai(y,p);return M<0?void 0:y[M][1]}function yo(p){return ai(this.__data__,p)>-1}function Mr(p,y){var M=this.__data__,W=ai(M,p);return W<0?(++this.size,M.push([p,y])):M[W][1]=y,this}Le.prototype.clear=kr,Le.prototype.delete=bo,Le.prototype.get=_o,Le.prototype.has=yo,Le.prototype.set=Mr;function We(p){var y=-1,M=p==null?0:p.length;for(this.clear();++y<M;){var W=p[y];this.set(W[0],W[1])}}function Ji(){this.size=0,this.__data__={hash:new Kt,map:new(Tt||Le),string:new Kt}}function Dr(p){var y=zs(this,p).delete(p);return this.size-=y?1:0,y}function vo(p){return zs(this,p).get(p)}function xo(p){return zs(this,p).has(p)}function Cr(p,y){var M=zs(this,p),W=M.size;return M.set(p,y),this.size+=M.size==W?0:1,this}We.prototype.clear=Ji,We.prototype.delete=Dr,We.prototype.get=vo,We.prototype.has=xo,We.prototype.set=Cr;function _s(p){var y=this.__data__=new Le(p);this.size=y.size}function wo(){this.__data__=new Le,this.size=0}function Qi(p){var y=this.__data__,M=y.delete(p);return this.size=y.size,M}function tn(p){return this.__data__.get(p)}function Or(p){return this.__data__.has(p)}function ss(p,y){var M=this.__data__;if(M instanceof Le){var W=M.__data__;if(!Tt||W.length<s-1)return W.push([p,y]),this.size=++M.size,this;M=this.__data__=new We(W)}return M.set(p,y),this.size=M.size,this}_s.prototype.clear=wo,_s.prototype.delete=Qi,_s.prototype.get=tn,_s.prototype.has=Or,_s.prototype.set=ss;function So(p,y){var M=U(p),W=!M&&F(p),ct=!M&&!W&>(p),xt=!M&&!W&&!ct&&Wt(p),Ft=M||W||ct||xt,ot=Ft?lo(p.length,String):[],Et=ot.length;for(var xe in p)(y||ve.call(p,xe))&&!(Ft&&(xe=="length"||ct&&(xe=="offset"||xe=="parent")||xt&&(xe=="buffer"||xe=="byteLength"||xe=="byteOffset")||Lr(xe,Et)))&&ot.push(xe);return ot}function ri(p,y,M){(M!==void 0&&!R(p[y],M)||M===void 0&&!(y in p))&&en(p,y,M)}function ko(p,y,M){var W=p[y];(!(ve.call(p,y)&&R(W,M))||M===void 0&&!(y in p))&&en(p,y,M)}function ai(p,y){for(var M=p.length;M--;)if(R(p[M][0],y))return M;return-1}function en(p,y,M){y=="__proto__"&&ie?ie(p,y,{configurable:!0,enumerable:!0,value:M,writable:!0}):p[y]=M}var sn=is();function ys(p){return p==null?p===void 0?I:k:It&&It in Object(p)?hi(p):Ro(p)}function Pr(p){return Mt(p)&&ys(p)==o}function Mo(p){if(!st(p)||Fr(p))return!1;var y=vt(p)?_:ps;return y.test(C(p))}function Do(p){return Mt(p)&&kt(p.length)&&!!ht[ys(p)]}function Co(p){if(!st(p))return Lo(p);var y=Er(p),M=[];for(var W in p)W=="constructor"&&(y||!ve.call(p,W))||M.push(W);return M}function oi(p,y,M,W,ct){p!==y&&sn(y,function(xt,Ft){if(ct||(ct=new _s),st(xt))Oo(p,y,Ft,M,oi,W,ct);else{var ot=W?W(b(p,Ft),xt,Ft+"",p,y,ct):void 0;ot===void 0&&(ot=xt),ri(p,Ft,ot)}},di)}function Oo(p,y,M,W,ct,xt,Ft){var ot=b(p,M),Et=b(y,M),xe=Ft.get(Et);if(xe){ri(p,M,xe);return}var ue=xt?xt(ot,Et,M+"",p,y,Ft):void 0,hn=ue===void 0;if(hn){var Fo=U(Et),Eo=!Fo&>(Et),Gh=!Fo&&!Eo&&Wt(Et);ue=Et,Fo||Eo||Gh?U(ot)?ue=ot:yt(ot)?ue=Ar(ot):Eo?(hn=!1,ue=li(Et,!0)):Gh?(hn=!1,ue=Tr(Et,!0)):ue=[]:Xt(Et)||F(Et)?(ue=ot,F(ot)?ue=Gt(ot):(!st(ot)||vt(ot))&&(ue=To(Et))):hn=!1}hn&&(Ft.set(Et,ue),ct(ue,Et,W,xt,Ft),Ft.delete(Et)),ri(p,M,ue)}function Ns(p,y){return w(ui(p,y,ln),p+"")}var Nt=ie?function(p,y){return ie(p,"toString",{configurable:!0,enumerable:!1,value:on(y),writable:!0})}:ln;function li(p,y){if(y)return p.slice();var M=p.length,W=Y?Y(M):new p.constructor(M);return p.copy(W),W}function nn(p){var y=new p.constructor(p.byteLength);return new z(y).set(new z(p)),y}function Tr(p,y){var M=y?nn(p.buffer):p.buffer;return new p.constructor(M,p.byteOffset,p.length)}function Ar(p,y){var M=-1,W=p.length;for(y||(y=Array(W));++M<W;)y[M]=p[M];return y}function Po(p,y,M,W){var ct=!M;M||(M={});for(var xt=-1,Ft=y.length;++xt<Ft;){var ot=y[xt],Et=W?W(M[ot],p[ot],ot,M,p):void 0;Et===void 0&&(Et=p[ot]),ct?en(M,ot,Et):ko(M,ot,Et)}return M}function rn(p){return Ns(function(y,M){var W=-1,ct=M.length,xt=ct>1?M[ct-1]:void 0,Ft=ct>2?M[2]:void 0;for(xt=p.length>3&&typeof xt=="function"?(ct--,xt):void 0,Ft&&Rr(M[0],M[1],Ft)&&(xt=ct<3?void 0:xt,ct=1),y=Object(y);++W<ct;){var ot=M[W];ot&&p(y,ot,W,xt)}return y})}function is(p){return function(y,M,W){for(var ct=-1,xt=Object(y),Ft=W(y),ot=Ft.length;ot--;){var Et=Ft[p?ot:++ct];if(M(xt[Et],Et,xt)===!1)break}return y}}function zs(p,y){var M=p.__data__;return Ao(y)?M[typeof y=="string"?"string":"hash"]:M.map}function ci(p,y){var M=ho(p,y);return Mo(M)?M:void 0}function hi(p){var y=ve.call(p,It),M=p[It];try{p[It]=void 0;var W=!0}catch{}var ct=Ki.call(p);return W&&(y?p[It]=M:delete p[It]),ct}function To(p){return typeof p.constructor=="function"&&!Er(p)?Zi(Q(p)):{}}function Lr(p,y){var M=typeof p;return y=y==null?a:y,!!y&&(M=="number"||M!="symbol"&&$e.test(p))&&p>-1&&p%1==0&&p<y}function Rr(p,y,M){if(!st(M))return!1;var W=typeof y;return(W=="number"?$(M)&&Lr(y,M.length):W=="string"&&y in M)?R(M[y],p):!1}function Ao(p){var y=typeof p;return y=="string"||y=="number"||y=="symbol"||y=="boolean"?p!=="__proto__":p===null}function Fr(p){return!!Sr&&Sr in p}function Er(p){var y=p&&p.constructor,M=typeof y=="function"&&y.prototype||ei;return p===M}function Lo(p){var y=[];if(p!=null)for(var M in Object(p))y.push(M);return y}function Ro(p){return Ki.call(p)}function ui(p,y,M){return y=at(y===void 0?p.length-1:y,0),function(){for(var W=arguments,ct=-1,xt=at(W.length-y,0),Ft=Array(xt);++ct<xt;)Ft[ct]=W[y+ct];ct=-1;for(var ot=Array(y+1);++ct<y;)ot[ct]=W[ct];return ot[y]=M(Ft),oo(p,this,ot)}}function b(p,y){if(!(y==="constructor"&&typeof p[y]=="function")&&y!="__proto__")return p[y]}var w=S(Nt);function S(p){var y=0,M=0;return function(){var W=Te(),ct=r-(W-M);if(M=W,ct>0){if(++y>=n)return arguments[0]}else y=0;return p.apply(void 0,arguments)}}function C(p){if(p!=null){try{return si.call(p)}catch{}try{return p+""}catch{}}return""}function R(p,y){return p===y||p!==p&&y!==y}var F=Pr(function(){return arguments}())?Pr:function(p){return Mt(p)&&ve.call(p,"callee")&&!Pt.call(p,"callee")},U=Array.isArray;function $(p){return p!=null&&kt(p.length)&&!vt(p)}function yt(p){return Mt(p)&&$(p)}var gt=$t||cn;function vt(p){if(!st(p))return!1;var y=ys(p);return y==g||y==m||y==c||y==P}function kt(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=a}function st(p){var y=typeof p;return p!=null&&(y=="object"||y=="function")}function Mt(p){return p!=null&&typeof p=="object"}function Xt(p){if(!Mt(p)||ys(p)!=D)return!1;var y=Q(p);if(y===null)return!0;var M=ve.call(y,"constructor")&&y.constructor;return typeof M=="function"&&M instanceof M&&si.call(M)==po}var Wt=wr?co(wr):Do;function Gt(p){return Po(p,di(p))}function di(p){return $(p)?So(p,!0):Co(p)}var an=rn(function(p,y,M){oi(p,y,M)});function on(p){return function(){return p}}function ln(p){return p}function cn(){return!1}e.exports=an})(no,no.exports);const q0=no.exports,uv="";Fi.register(lp,mp,ap,hs,ka,$n,zn,Ii,ip,Yn,Nn);const X0={name:"AreaChart",components:{LineChart:Bp,BarChart:Hp,PieChart:jp},inheritAttrs:!1,props:{type:{type:String,default:"Line",validator:e=>["Line","Bar","Pie"].includes(e)},chartData:{type:Array,default:()=>[]},chartOptions:{type:Object,default(){return{}}},chartLabels:{type:Array,default(){return[]}},label:{type:String,default:""},headerSize:{type:String,default:"medium"},xTitle:{type:String|null,default:null},yTitle:{type:String|null,default:null},download:{type:String|Boolean,default:!1},width:{type:Number,default:null},height:{type:Number,default:null},autoColorize:{type:Boolean,default:!1},autoGreyize:{type:Boolean,default:!1},showLegend:{type:Boolean,default:!0},fill:{type:Boolean|String,default:!0},xTimeAxis:{type:Boolean,default:!1},yVisitsAxis:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1}},computed:{isEmpty(){return!this.chartData||this.chartData.length<1},hasDataForCurrentPeriod(){var e;return!this.isEmpty&&((e=this.chartData)==null?void 0:e.some(t=>t.data&&t.data.length>=1))},fileDownloadStr(){var t;const e=new Date;return String((t=this.download)!=null?t:"MyChart.png").replace(".png","-"+e.getFullYear()+"-"+Number(e.getMonth()+1).toString().padStart(2,"0")+"-"+Number(e.getDate()).toString().padStart(2,"0")+".png")},fullChartOptions(){var e,t;return q0({},this.chartOptions,{animation:{onComplete:this.generateDownloadLink},barPercentage:.5,width:this.width,height:this.height,maintainAspectRatio:!1,borderColor:"#000",borderWidth:1,datasets:{line:{borderWidth:0,pointRadius:0,pointHitRadius:3,pointHoverRadius:3}},plugins:{legend:{maxHeight:75},filler:{propagate:!0},interaction:{},tooltip:{filter:function(s,i,n,r){return!(r.datasets.length>5&&s.raw===0)}}}},this.type==="Pie"?{}:{scales:{xAxis:{afterSetDimensions:s=>{s.maxHeight=25}}}},this.fill?{fill:!0,backgroundColor:typeof this.fill=="string"?this.fill:"#313740"}:{},this.xTimeAxis?{scales:{xAxis:{title:{display:!1,text:(e=this.xTitle)!=null?e:this.$t("simplestats.charts.time","Time")},type:"time",time:{unit:"month",displayFormats:{month:"MMM YYYY"}}}}}:{},this.yVisitsAxis?{scales:{yAxis:{title:{display:!0,text:(t=this.yTitle)!=null?t:this.$t("simplestats.charts.visits","Visits")},beginAtZero:!0}}}:{},this.stacked?{scales:{yAxis:{stacked:!0}}}:{},this.showLegend===!1?{plugins:{legend:{display:!1,title:{display:!1}}},scales:{xAxis:{display:!1,title:{display:!1}},yAxis:{tickLength:5}}}:{})},fullChartData(){const e=this,t=this.chartData.map((s,i)=>{var n;return(n=s.ss_uid)!=null?n:i});return{labels:this.chartLabels,datasets:this.chartData.map(function(s,i){if((e.autoColorize||e.autoGreyize)===!0&&!s.backgroundColor){let n=.3,r=.4;if(e.type==="Pie"){s.backgroundColor=[];const u=e.chartLabels.length>1?e.chartLabels.length:1;let f=0;for(let g of e.chartLabels)s.backgroundColor.push(e.autoColorize?"hsl("+Number(360/u*f).toFixed(0)+","+Number(n*100).toFixed(0)+"%,"+Number(r*100).toFixed(0)+"%)":"hsl(0,0%,"+Number(40+40/u*f).toFixed(0)+"%)"),f++;return s}const a=s.ss_uid?s.ss_uid.split("/"):[""+i];let o=0,l=0,c=1,h=null;a.forEach((u,f)=>{s.ss_uid?f===0?h=t.filter(v=>String(v).includes("/")===!1):h=t.filter(function(v){const x=a.slice(0,f).join("/");return String(v).startsWith(x)}):h=e.chartData.map((v,x)=>x);const g=h.indexOf(s.ss_uid?a.slice(0,f+1).join("/"):i),m=h.length>1?h.length:1;e.autoColorize?f===0?o=1/m*g:(c/=m,l+=c*.8*g,f>1&&(n-=10)):(c/=m,l+=c*g)}),s.backgroundColor="hsl("+Number(o*360).toFixed(0)+", "+Number(n*100*(e.autoGreyize?0:1)).toFixed(0)+"%, "+Number(r*100+l*50).toFixed(0)+"%)"}return s})}}},data(){return{base64image:""}},methods:{generateDownloadLink(){var e;this.download!==!1&&((e=this.$refs.linechart)!=null&&e._data._chart?this.$refs.linechart._data._chart.canvas&&(this.base64image=this.$refs.linechart._data._chart.toBase64Image("image/png")):this.base64image="")}}};var K0=function(){var t=this,s=t._self._c;return s("div",[t.label.length>0?s("k-headline",{attrs:{size:t.headerSize}},[t._v(t._s(t.label))]):t._e(),s("div",{class:"ss-chart ss-"+t.type.toLowerCase()+"-chart"},[t.download!==!1&&t.base64image.length?s("div",{staticClass:"ss-download-link"},[s("a",{attrs:{href:t.base64image,download:t.fileDownloadStr}},[s("k-button",{attrs:{text:"Download",tooltip:"Exports the chart as a PNG file that you can archive or share.",icon:"download"}})],1)]):t._e(),t.hasDataForCurrentPeriod?s("div",{staticClass:"ss-chart-wrapper"},[s(t.type+"Chart",{ref:"linechart",tag:"component",attrs:{"chart-data":t.fullChartData,"chart-options":t.fullChartOptions,height:t.height,width:t.width}})],1):t.isEmpty?s("k-empty",{staticClass:"emptyChart",attrs:{layout:"block"}},[t._v(t._s(t.$t("simplestats.nodatayet","No data yet")))]):s("k-empty",{staticClass:"emptyChart",attrs:{layout:"block"}},[t._v(t._s(t.$t("simplestats.nodatafortimerange","There is no data for the selected time range.")))])],1)],1)},Z0=[],J0=ne(X0,K0,Z0,!1,null,null,null,null);const br=J0.exports,dv="",Q0={extends:Ys,components:{SearchableTable:un,AreaChart:br},data(){return{rows:[],columns:{},chartPeriodLabels:[],visitsOverTimeData:[],pageVisitsOverTimeData:[],languagesOverTimeData:[],globalLanguagesData:[],languagesAreEnabled:!1,userLocale:"en",chartOptions:{animation:{onComplete:this.generateDownloadLink}}}},props:{},computed:{pageVisitsOverTimeDataSorted(){var e;return(e=this.pageVisitsOverTimeData)==null?void 0:e.sort((t,s)=>t.ss_uid<s.ss_uid?-1:t.ss_uid>s.ss_uid?1:0)}},methods:{loadData(e){this.columns=e.pagestatslabels,this.rows=e.pagestatsdata,this.chartPeriodLabels=e.chartperiodlabels,this.visitsOverTimeData=e.visitsovertimedata,this.pageVisitsOverTimeData=e.pagevisitsovertimedata,this.globalLanguagesData=e.globallanguagesdata,this.chartLanguagesLabels=e.chartlanguageslabels,this.languagesOverTimeData=e.languagesovertimedata,this.languagesAreEnabled=e.languagesAreEnabled,this.userLocale=window.panel.$language?window.panel.$language.locale:this.$store.state.i18n?this.$store.state.i18n.locale:""}}};var ty=function(){var t=this,s=t._self._c;return s("k-grid",{attrs:{gutter:"medium"}},[s("k-column",[s("k-headline",{attrs:{size:"medium"}},[t._v(t._s(t.$t("simplestats.visits.visitsovertime","Visits over time")))]),s("area-chart",{attrs:{type:"Bar","chart-data":t.visitsOverTimeData,"chart-options":t.chartOptions,"chart-labels":t.chartPeriodLabels,download:"Site_Visits.png","x-title":t.$t("simplestats.charts.time","Time"),"y-title":t.$t("simplestats.charts.visits","Visits"),height:100,"x-time-axis":!0,"y-visits-axis":!0,"show-legend":!1,fill:!0}})],1),s("k-column",[s("k-headline",{attrs:{size:"medium"}},[t._v(t._s(t.$t("simplestats.visits.pagevisitsovertime")))]),s("area-chart",{attrs:{"chart-data":t.pageVisitsOverTimeDataSorted,"chart-labels":t.chartPeriodLabels,"chart-options":t.chartOptions,download:"Site_PageVisits.png","x-title":t.$t("simplestats.charts.time"),"y-title":t.$t("simplestats.charts.visits"),height:450,stacked:!0,"auto-colorize":!0,"x-time-axis":!0,"y-visits-axis":!0,fill:!0}})],1),t.languagesAreEnabled?s("k-column",{attrs:{width:"3/4"}},[s("area-chart",{attrs:{"chart-data":t.languagesOverTimeData,"chart-labels":t.chartPeriodLabels,"chart-options":t.chartOptions,download:"Site_LanguagesOverTime.png","x-title":t.$t("simplestats.charts.time"),"y-title":t.$t("simplestats.charts.visits"),height:250,stacked:!0,"auto-colorize":!0,fill:!0,"x-time-axis":!0,"y-visits-axis":!0,label:t.$t("simplestats.visits.languagesovertime")}})],1):t._e(),t.languagesAreEnabled?s("k-column",{attrs:{width:"1/4"}},[s("k-headline",[t._v(t._s(t.$t("simplestats.visits.globallanguages")))]),t.globalLanguagesData.length>0?s("area-chart",{attrs:{type:"Pie",download:"Site_LanguagePopularity.png","chart-data":t.globalLanguagesData,"chart-labels":t.chartLanguagesLabels,"chart-options":t.chartOptions,"auto-colorize":!0,height:200,fill:!0}}):t._e()],1):t._e(),s("k-column",[s("searchable-table",{attrs:{columns:t.columns,rows:t.rows,layout:"table",label:t.$t("simplestats.visits.visitedpages")}})],1)],1)},ey=[],sy=ne(Q0,ty,ey,!1,null,null,null,null);const iy=sy.exports,fv="",ny={extends:Ys,components:{AreaChart:br},data(){return{devicesData:[],devicesLabels:[],devicesOverTimeData:[],chartPeriodLabels:[],browsersData:[],browsersLabels:[],systemsData:[],systemsLabels:[]}},methods:{loadData(e){this.devicesData=e.devicesdata,this.devicesLabels=e.deviceslabels,this.browsersData=e.enginesdata,this.browsersLabels=e.engineslabels,this.devicesOverTimeData=e.devicesovertime,this.chartPeriodLabels=e.chartperiodlabels,this.systemsData=e.systemsdata,this.systemsLabels=e.systemslabels}}};var ry=function(){var t=this,s=t._self._c;return s("k-grid",{attrs:{gutter:"medium"}},[s("k-column",{attrs:{width:"1/3"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.devicesData,"chart-labels":t.devicesLabels,download:"Site_Devices.png",label:t.$t("simplestats.devices.graph.devices"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/3"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.browsersData,"chart-labels":t.browsersLabels,download:"Site_BrowserEngines.png",label:t.$t("simplestats.devices.graph.engines"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/3"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.systemsData,"chart-labels":t.systemsLabels,download:"Site_OperatingSystems.png",label:t.$t("simplestats.devices.graph.oses"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/1"}},[s("area-chart",{attrs:{type:"Line","chart-data":t.devicesOverTimeData,"chart-labels":t.chartPeriodLabels,download:"Site_DevicesEvolution.png",label:t.$t("simplestats.devices.graph.devicehistory"),"header-size":"large","x-title":t.$t("simplestats.charts.time"),"y-title":t.$t("simplestats.devices.graph.devicehistory.y"),stacked:!0,fill:!0,"auto-colorize":!0,"x-time-axis":!0,"y-visits-axis":!0,height:300}})],1)],1)},ay=[],oy=ne(ny,ry,ay,!1,null,null,null,null);const ly=oy.exports,gv="",cy={extends:Ys,components:{AreaChart:br,SearchableTable:un},props:{dateFrom:{type:String,required:!0},dateTo:{type:String,required:!0}},data(){return{chartPeriodLabels:[],refererDomainsData:[],refererDomainsLabels:[],refererMediumData:[],refererMediumLabels:[],refererTableData:[],refererTableLabels:{},referersByMediumOverTimeData:[],userLocale:"en",timeOptions:{layout:{padding:{left:5,right:15,top:5,bottom:10}},scales:{xAxes:[{type:"time",time:{unit:"month",displayFormats:{month:"MMM YYYY"}}}],yAxes:[{stacked:!0}]}}}},methods:{loadData(e){this.chartPeriodLabels=e.chartperiodlabels,this.refererDomainsData=e.referersbydomaindata,this.refererDomainsLabels=e.referersbydomainlabels,this.refererMediumData=e.referersbymediumdata,this.refererMediumLabels=e.referersbymediumlabels,this.refererTableData=e.refererstabledata,this.refererTableLabels=e.refererstablelabels,this.referersByMediumOverTimeData=e.referersbymediumovertimedata,this.userLocale=window.panel.$language?window.panel.$language.code:""}}};var hy=function(){var t=this,s=t._self._c;return s("k-grid",{attrs:{gutter:"medium"}},[s("k-column",{attrs:{width:"1/2"}},[t.refererMediumData.length>0?s("area-chart",{attrs:{type:"Pie","chart-data":t.refererMediumData,"chart-labels":t.refererMediumLabels,download:"Site_ReferrersByMedium.png",label:t.$t("simplestats.referers.referersbymedium","Referers by medium"),fill:!0,"auto-colorize":!0,height:200}}):t._e()],1),s("k-column",{attrs:{width:"1/2"}},[s("area-chart",{attrs:{type:"Pie","chart-data":t.refererDomainsData,"chart-labels":t.refererDomainsLabels,download:"Site_ReferrersByDomain.png",label:t.$t("simplestats.referers.referersbydomain","Referers by domain"),fill:!0,"auto-colorize":!0,height:200}})],1),s("k-column",{attrs:{width:"1/1"}},[s("area-chart",{attrs:{type:"Line","chart-data":t.referersByMediumOverTimeData,"chart-labels":t.chartPeriodLabels,download:"Site_ReferersEvolution.png",label:t.$t("simplestats.referers.referersovertime"),"y-title":t.$t("simplestats.charts.hitspermedium","Hits per medium"),stacked:!0,fill:!0,"auto-colorize":!0,"x-time-axis":!0,"y-visits-axis":!0,height:300}})],1),s("k-column",{attrs:{width:"1/1"}},[s("k-line-field")],1),s("k-column",{attrs:{width:"1/1"}},[s("searchable-table",{attrs:{rows:t.refererTableData,columns:t.refererTableLabels,label:t.$t("simplestats.referers.allreferers")}})],1)],1)},uy=[],dy=ne(cy,hy,uy,!1,null,null,null,null);const fy=dy.exports,pv="",gy={extends:"k-pages-section",data(){return{dbHistory:[],dbHistoryLabels:{},upgradeRequired:!1,softwareDbVersion:"unknown",dbVersion:"undefined",dbRequirements:"unknown",dbRequirementsPassed:!0,unlockUpgrade:!1,isUpdatingDb:!1,updateMessage:null,updateMessageTheme:"",databaseLocation:"",databaseSize:""}},components:{SearchableTable:un},filters:{prettyBytes:function(e){if(e=Number(e),typeof e!="number"||isNaN(e))return"?? kb";var t,s,i=e<0,n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"];return i&&(e=-e),e<1?(i?"-":"")+e+" B":(t=Math.min(Math.floor(Math.log(e)/Math.log(1e3)),n.length-1),e=(e/Math.pow(1e3,t)).toFixed(2)*1,s=n[t],(i?"-":"")+e+" "+s)}},created(){this.load()},methods:{load(){this.updateMessage=null,this.$api.get("simplestats/listdbinfo").then(e=>{this.isLoading=!1,this.dbHistoryLabels=e.dbHistoryLabels,this.dbHistory=e.dbHistory,this.upgradeRequired=e.upgradeRequired,this.softwareDbVersion=e.softwareDbVersion,this.dbVersion=e.dbVersion,this.databaseLocation=e.databaseLocation,this.databaseSize=e.databaseSize,this.updateMessage=null}).catch(e=>{this.isLoading=!1,this.updateMessage=e.message,this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3})}),this.$api.get("simplestats/checkrequirements").then(e=>{this.isLoading=!1,this.dbRequirements=e.dbRequirements,this.dbRequirementsPassed=e.dbRequirementsPassed}).catch(e=>{this.isLoading=!1,this.dbRequirements=e.message,this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3})})},acceptUpgrade(e){this.unlockUpgrade=e},requestUpgrade(e){e.stopPropagation(),this.unlockUpgrade?(this.isUpdatingDb=!0,this.updateMessage=null,this.$api.get("simplestats/dbupgrade").then(t=>{this.isUpdatingDb=!1,this.updateMessage=t.message,this.updateMessageTheme=t.status?"positive":"negative"}).catch(t=>{this.isUpdatingDb=!1,this.error=t.message,this.$store.dispatch("notification/open",{type:"error",message:t.message,timeout:5e3})})):this.$store.dispatch("notification/open",{type:"error",message:"Before hitting that button, please ensure to backup your database file !",timeout:5e3})}}};var py=function(){var t=this,s=t._self._c;return s("div",{staticClass:"dbinformation"},[s("k-headline",{attrs:{size:"large"}},[t._v(t._s(t.$t("simplestats.info.title")))]),s("k-headline",[t._v(t._s(t.$t("simplestats.info.db.title")))]),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.file"),value:t.databaseLocation,icon:"file-zip"}}),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.size"),value:t._f("prettyBytes")(t.databaseSize),icon:"download"}}),s("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.dbversion"),value:t.dbVersion,icon:"bolt"}}),s("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.softwareversion"),value:t.softwareDbVersion,icon:"bolt"}}),s("br"),s("br"),s("searchable-table",{attrs:{rows:t.dbHistory,columns:t.dbHistoryLabels,label:t.$t("simplestats.info.db.versionhistory")}}),s("k-line-field"),s("k-headline",[t._v(t._s(t.$t("simplestats.info.dbreqs.title")))]),t.dbRequirementsPassed?s("div",[s("k-info-field",{attrs:{theme:"positive",text:t.$t("simplestats.info.dbreqs.positive")}})],1):s("div",[s("k-info-field",{attrs:{theme:"negative",text:t.$t("simplestats.info.dbreqs.negative")}}),s("hr"),t._v(" "+t._s(t.dbRequirements)+" ")],1),s("br"),s("div",{staticClass:"upgrade"},[s("br"),s("br"),t.upgradeRequired?s("div",[t.updateMessage?s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.info.dbupdate.result"),text:t.updateMessage,theme:t.updateMessageTheme}}),s("k-button",{attrs:{theme:"neutral"},on:{click:t.load}},[t._v(t._s(t.$t("simplestats.info.dbupdate.refresh")))])],1):s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.info.dbupdate.required"),theme:"negative",text:t.$t("simplestats.info.dbupdate.requiredmsg")}}),s("br"),s("k-checkbox-input",{attrs:{value:t.unlockUpgrade,label:t.$t("simplestats.info.dbupdate.isbackedup")},on:{input:t.acceptUpgrade}}),s("br"),s("k-button",{attrs:{icon:"bolt"},on:{click:t.requestUpgrade}},[t._v(t._s(t.$t("simplestats.info.dbupdate.go")))]),t.isUpdatingDb?s("k-label",[t._v(t._s(t.$t("simplestats.loading")))]):t._e()],1)]):t.updateMessage==null?s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.info.dbupdate.title"),text:t.$t("simplestats.info.dbupdate.isuptodate"),theme:"positive"}})],1):t.updateMessage!==null?s("div",[s("k-info-field",{attrs:{label:t.$t("simplestats.loaderror"),text:t.updateMessage,theme:"negative"}})],1):t._e()])],1)},my=[],by=ne(gy,py,my,!1,null,null,null,null);const _y=by.exports,mv="",yy={extends:Ys,data(){return{saltIsSet:!1,trackingPeriodName:"",trackingSince:"",uniqueSeconds:"",enableReferers:!1,enableDevices:!1,enableVisits:!1,enableVisitLanguages:!1,ignoredRoles:[],ignoredPages:[],ignoredTemplates:[],logFile:"",logLevels:[]}},computed:{trackingFeatures(){var e=[];return this.enableReferers&&e.push(this.$t("simplestats.info.config.tracking.referrers","Referers")),this.enableDevices&&e.push(this.$t("simplestats.info.config.tracking.devices","Devices")),this.enableVisits&&e.push(this.$t("simplestats.info.config.tracking.visits","Page Visits")),this.enableVisitLanguages&&e.push(this.$t("simplestats.info.config.tracking.languages","Page Visitors")),e}},methods:{loadData(e){this.saltIsSet=e.saltIsSet,this.trackingPeriodName=e.trackingPeriodName,this.trackingSince=e.trackingSince,this.uniqueSeconds=e.uniqueSeconds,this.enableReferers=e.enableReferers,this.enableDevices=e.enableDevices,this.enableVisits=e.enableVisits,this.enableVisitLanguages=e.enableVisitLanguages,this.ignoredRoles=e.ignoredRoles,this.ignoredPages=e.ignoredPages,this.logFile=e.logFile,this.logLevels=e.logLevels,this.ignoredTemplates=e.ignoredTemplates}}};var vy=function(){var t=this,s=t._self._c;return s("div",{staticClass:"configuration"},[s("k-headline",{attrs:{size:"large"}},[t._v(t._s(t.$t("simplestats.info.config.title")))]),s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.config.tracking")))]),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.periodname"),value:t.trackingPeriodName,icon:"clock"}}),s("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.periodsecs"),value:t.uniqueSeconds,after:t.$t("simplestats.charts.seconds"),icon:"clock"}}),s("k-toggle-field",{attrs:{name:"",disabled:!0,label:t.$t("simplestats.info.config.tracking.salted"),value:t.saltIsSet,icon:"key"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.features"),value:t.trackingFeatures,icon:"globe"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.ignore.roles"),value:t.ignoredRoles,icon:"users"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.ignore.ids"),value:t.ignoredPages,icon:"page"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.tracking.ignore.templates"),value:t.ignoredTemplates,icon:"page"}}),s("br"),s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.config.log.title")))]),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.log.file"),value:t.logFile,icon:"file-code"}}),s("k-tags-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.config.log.level"),value:t.logLevels,icon:"bug"}}),s("br"),!t.isLoading&&!t.saltIsSet?s("k-info-field",{attrs:{label:t.$t("simplestats.info.config.tracking.unsalted"),theme:"negative",text:t.$t("simplestats.info.config.tracking.unsaltedwarn")}}):t._e()],1)},xy=[],wy=ne(yy,vy,xy,!1,null,null,null,null);const Sy=wy.exports,bv="",ky={name:"list-viewer",props:{arrayData:{type:Array,default:[]},depth:{type:Number,default:0}},methods:{}};var My=function(){var t=this,s=t._self._c;return s("div",[t.arrayData?s("ul",{style:{paddingLeft:20*t.depth+"px"}},t._l(t.arrayData,function(i,n,r){return s("li",t._b({key:n,class:{isChild:t.subpage,"text-danger":t.hasError}},"li",t.arrayData.status,!1),[typeof i=="Array"||typeof i=="object"?s("div",[s("span",[t._v(" "+t._s(n)+" = ")]),(typeof i=="Array"||typeof i=="object")&&t.depth<10?s("list-viewer",{attrs:{"array-data":i,depth:t.depth+1}}):t._e()],1):s("div",[s("span",[t._v(" "+t._s(n)+" = "+t._s(i)+" ")])])])}),0):t._e()])},Dy=[],Cy=ne(ky,My,Dy,!1,null,null,null,null);const Oy=Cy.exports,_v="",Py={name:"TrackingTester",components:{ListViewer:Oy},data(){let e=new Date,t=new Date;return t.setDate(e.getDate()-30),{isLoading:!0,error:"",currentDevice:"",currentUserAgent:this.currentUserAgentJS,customDevice:"",customUserAgent:"",referrerField:"",referrerResponse:null,unlockGenerator:!1,generatorMode:"randommulti",generatorTo:e.toString(),generatorFrom:t.toString(),generatorResponse:null}},created(){this.load()},computed:{currentUserAgentJS(){return navigator.userAgent},formattedCurrentUA(){return this.currentDevice&&this.currentDevice!==""?this.currentDevice.device+" - "+this.currentDevice.system+" - "+this.currentDevice.engine:"-"},formattedCustomUA(){return this.customDevice&&this.customDevice!==""?this.customDevice.device+" - "+this.customDevice.system+" - "+this.customDevice.engine:"-"},formattedReferrer(){return this.referrerResponse?this.referrerResponse.medium?this.referrerResponse.host+" - - "+this.referrerResponse.source+" - "+this.referrerResponse.url+" ("+this.referrerResponse.medium+")":this.referrerResponse.error?this.referrerResponse.error:"Error...":"-"},formattedReferrerUrl(){if(this.referrerResponse){if(this.referrerResponse.url)return this.referrerResponse.url;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"},formattedReferrerSource(){if(this.referrerResponse){if(this.referrerResponse.source)return this.referrerResponse.source;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"},formattedReferrerHost(){if(this.referrerResponse){if(this.referrerResponse.host)return this.referrerResponse.host;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"},formattedReferrerMedium(){if(this.referrerResponse){if(this.referrerResponse.medium)return this.referrerResponse.medium;if(this.referrerResponse.error)return this.referrerResponse.error}return"-none-"}},methods:{load(){this.$api.get("simplestats/trackingtester").then(e=>{this.isLoading=!1,this.currentDevice=e.currentDeviceInfo,this.currentUserAgent=e.currentUserAgent}).catch(e=>{this.isLoading=!1,this.error=e.message,this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3})})},testReferrer(){this.$api.get("simplestats/trackingtester/referrer?referrer="+encodeURIComponent(this.referrerField)).then(e=>{e&&typeof e.referrerInfo=="string"?this.referrerResponse={error:e.referrerInfo}:e&&typeof e.referrerInfo=="object"?this.referrerResponse=e.referrerInfo:this.referrerResponse={error:"Data format error !"}}).catch(e=>{e&&e.message?this.referrerResponse=e.message:this.referrerResponse="Loading error !"})},testUserAgent(){this.$api.get("simplestats/trackingtester/ua?ua="+encodeURIComponent(this.customUserAgent)).then(e=>{typeof e=="string"?this.customDevice={error:e}:typeof e=="object"?this.customDevice=e:this.customDevice={error:"Data format error !"}}).catch(e=>{e&&e.message?this.customDevice=e.message:this.customDevice="Loading Error !"})},acceptGenerate(e){this.unlockGenerator=e},generateStats(){this.$api.get("simplestats/trackingtester/generatestats?proceed="+(this.unlockGenerator?"yes":"no")+"&from="+new Date(this.generatorFrom).getTime()*.001+"&to="+new Date(this.generatorTo).getTime()*.001+"&mode="+this.generatorMode).then(e=>{this.generatorResponse=e}).catch(e=>{this.generatorResponse={status:"false",error:"Loading Error = "+e.message}})}}};var Ty=function(){var t=this,s=t._self._c;return s("k-grid",{staticClass:"trackingtester",attrs:{gutter:"large"}},[s("k-column",{attrs:{width:"1/1"}},[s("k-headline",{attrs:{size:"large"}},[t._v(t._s(t.$t("simplestats.info.tester.title")))])],1),s("k-column",{attrs:{width:"1/2"}},[s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.tester.device")))]),s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.device.currentua"),value:t.currentUserAgent,icon:"display"}}),s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.device.currentdetected"),value:t.formattedCurrentUA,icon:"display"}}),s("k-form",{on:{submit:t.testUserAgent}},[s("k-text-field",{staticClass:"field-with-btn",attrs:{counter:!1,disabled:!1,label:t.$t("simplestats.info.tester.device.customua"),icon:"display"},model:{value:t.customUserAgent,callback:function(i){t.customUserAgent=i},expression:"customUserAgent"}}),s("k-button",{staticClass:"floating-btn",on:{click:t.testUserAgent}},[t._v("Go!")]),this.customDevice?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.device.customdetected"),value:t.formattedCustomUA,icon:"display"}}):t._e()],1),this.customDevice?s("k-box",{attrs:{theme:"info",text:t.$t("simplestats.info.tester.device.note")}}):t._e()],1),s("k-column",{attrs:{width:"1/2"}},[s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.tester.generator")))]),s("k-form",{on:{submit:t.generateStats}},[s("k-select-field",{attrs:{label:t.$t("simplestats.info.tester.generator.generatorMode"),options:[{value:"all",text:"Static : all pages"},{value:"randomsingle",text:"Single random page"},{value:"randommulti",text:"Multiple random pages"}]},model:{value:t.generatorMode,callback:function(i){t.generatorMode=i},expression:"generatorMode"}}),s("k-date-field",{attrs:{label:t.$t("simplestats.info.tester.generator.datefrom"),time:!1},model:{value:t.generatorFrom,callback:function(i){t.generatorFrom=i},expression:"generatorFrom"}}),s("k-date-field",{attrs:{label:t.$t("simplestats.info.tester.generator.dateto"),time:!1},model:{value:t.generatorTo,callback:function(i){t.generatorTo=i},expression:"generatorTo"}}),s("k-field",{attrs:{translate:!1,label:t.$t("simplestats.info.tester.generator.unlockgenerator")}},[s("k-checkbox-input",{style:{padding:".5em"},attrs:{value:t.unlockGenerator,theme:"field",novalidate:!0},on:{input:t.acceptGenerate}}),s("k-button",{style:{border:"1px solid black",padding:"0 1em",borderRadius:"3px"},on:{click:t.generateStats}},[t._v("Go!")])],1),t.generatorResponse&&t.generatorResponse.data?s("k-field",{attrs:{translate:!1,label:"Result"}},[s("list-viewer",{staticClass:"k-input",style:{padding:"1em"},attrs:{"array-data":t.generatorResponse.data,"data-theme":"field"}})],1):t._e(),t.generatorResponse&&t.generatorResponse.error?s("k-textarea-field",{attrs:{label:"Error!",buttons:!1,disabled:!0},model:{value:t.generatorResponse.error,callback:function(i){t.$set(t.generatorResponse,"error",i)},expression:"generatorResponse.error"}}):t._e()],1)],1),s("k-column",{attrs:{width:"1/2"}},[s("k-headline",{staticClass:"rightColumnAlign"},[t._v(t._s(t.$t("simplestats.info.tester.referrer")))]),s("k-form",{on:{submit:t.testReferrer}},[s("k-text-field",{staticClass:"field-with-btn",attrs:{counter:!1,disabled:!1,label:t.$t("simplestats.info.tester.referrer.field"),icon:"globe"},model:{value:t.referrerField,callback:function(i){t.referrerField=i},expression:"referrerField"}}),s("k-button",{staticClass:"floating-btn",attrs:{name:"btn"},on:{click:t.testReferrer}},[t._v("Go!")]),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.host"),value:t.formattedReferrerHost,icon:"globe"}}):t._e(),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.source"),value:t.formattedReferrerSource,icon:"globe"}}):t._e(),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.medium"),value:t.formattedReferrerMedium,icon:"globe"}}):t._e(),this.referrerResponse?s("k-text-field",{attrs:{counter:!1,disabled:!0,label:t.$t("simplestats.info.tester.referrer.response.url"),value:t.formattedReferrerUrl,icon:"globe"}}):t._e()],1)],1)],1)},Ay=[],Ly=ne(Py,Ty,Ay,!1,null,null,null,null);const Ry=Ly.exports;var ro={exports:{}};(function(e,t){(function(s,i){i(t)})(qi,function(s){s.PipsMode=void 0,function(_){_.Range="range",_.Steps="steps",_.Positions="positions",_.Count="count",_.Values="values"}(s.PipsMode||(s.PipsMode={})),s.PipsType=void 0,function(_){_[_.None=-1]="None",_[_.NoValue=0]="NoValue",_[_.LargeValue=1]="LargeValue",_[_.SmallValue=2]="SmallValue"}(s.PipsType||(s.PipsType={}));function i(_){return n(_)&&typeof _.from=="function"}function n(_){return typeof _=="object"&&typeof _.to=="function"}function r(_){_.parentElement.removeChild(_)}function a(_){return _!=null}function o(_){_.preventDefault()}function l(_){return _.filter(function(d){return this[d]?!1:this[d]=!0},{})}function c(_,d){return Math.round(_/d)*d}function h(_,d){var L=_.getBoundingClientRect(),z=_.ownerDocument,Y=z.documentElement,Q=P(z);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(Q.x=0),d?L.top+Q.y-Y.clientTop:L.left+Q.x-Y.clientLeft}function u(_){return typeof _=="number"&&!isNaN(_)&&isFinite(_)}function f(_,d,L){L>0&&(x(_,d),setTimeout(function(){k(_,d)},L))}function g(_){return Math.max(Math.min(_,100),0)}function m(_){return Array.isArray(_)?_:[_]}function v(_){_=String(_);var d=_.split(".");return d.length>1?d[1].length:0}function x(_,d){_.classList&&!/\s/.test(d)?_.classList.add(d):_.className+=" "+d}function k(_,d){_.classList&&!/\s/.test(d)?_.classList.remove(d):_.className=_.className.replace(new RegExp("(^|\\b)"+d.split(" ").join("|")+"(\\b|$)","gi")," ")}function D(_,d){return _.classList?_.classList.contains(d):new RegExp("\\b"+d+"\\b").test(_.className)}function P(_){var d=window.pageXOffset!==void 0,L=(_.compatMode||"")==="CSS1Compat",z=d?window.pageXOffset:L?_.documentElement.scrollLeft:_.body.scrollLeft,Y=d?window.pageYOffset:L?_.documentElement.scrollTop:_.body.scrollTop;return{x:z,y:Y}}function T(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function O(){var _=!1;try{var d=Object.defineProperty({},"passive",{get:function(){_=!0}});window.addEventListener("test",null,d)}catch{}return _}function N(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function I(_,d){return 100/(d-_)}function j(_,d,L){return d*100/(_[L+1]-_[L])}function H(_,d){return j(_,_[0]<0?d+Math.abs(_[0]):d-_[0],0)}function nt(_,d){return d*(_[1]-_[0])/100+_[0]}function Z(_,d){for(var L=1;_>=d[L];)L+=1;return L}function J(_,d,L){if(L>=_.slice(-1)[0])return 100;var z=Z(L,_),Y=_[z-1],Q=_[z],K=d[z-1],Pt=d[z];return K+H([Y,Q],L)/I(K,Pt)}function Rt(_,d,L){if(L>=100)return _.slice(-1)[0];var z=Z(L,d),Y=_[z-1],Q=_[z],K=d[z-1],Pt=d[z];return nt([Y,Q],(L-K)*I(K,Pt))}function Ut(_,d,L,z){if(z===100)return z;var Y=Z(z,_),Q=_[Y-1],K=_[Y];return L?z-Q>(K-Q)/2?K:Q:d[Y-1]?_[Y-1]+c(z-_[Y-1],d[Y-1]):z}var G=function(){function _(d,L,z){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[z||!1],this.xNumSteps=[!1],this.snap=L;var Y,Q=[];for(Object.keys(d).forEach(function(K){Q.push([m(d[K]),K])}),Q.sort(function(K,Pt){return K[0][0]-Pt[0][0]}),Y=0;Y<Q.length;Y++)this.handleEntryPoint(Q[Y][1],Q[Y][0]);for(this.xNumSteps=this.xSteps.slice(0),Y=0;Y<this.xNumSteps.length;Y++)this.handleStepPoint(Y,this.xNumSteps[Y])}return _.prototype.getDistance=function(d){for(var L=[],z=0;z<this.xNumSteps.length-1;z++)L[z]=j(this.xVal,d,z);return L},_.prototype.getAbsoluteDistance=function(d,L,z){var Y=0;if(d<this.xPct[this.xPct.length-1])for(;d>this.xPct[Y+1];)Y++;else d===this.xPct[this.xPct.length-1]&&(Y=this.xPct.length-2);!z&&d===this.xPct[Y+1]&&Y++,L===null&&(L=[]);var Q,K=1,Pt=L[Y],tt=0,It=0,ie=0,$t=0;for(z?Q=(d-this.xPct[Y])/(this.xPct[Y+1]-this.xPct[Y]):Q=(this.xPct[Y+1]-d)/(this.xPct[Y+1]-this.xPct[Y]);Pt>0;)tt=this.xPct[Y+1+$t]-this.xPct[Y+$t],L[Y+$t]*K+100-Q*100>100?(It=tt*Q,K=(Pt-100*Q)/L[Y+$t],Q=1):(It=L[Y+$t]*tt/100*K,K=0),z?(ie=ie-It,this.xPct.length+$t>=1&&$t--):(ie=ie+It,this.xPct.length-$t>=1&&$t++),Pt=L[Y+$t]*K;return d+ie},_.prototype.toStepping=function(d){return d=J(this.xVal,this.xPct,d),d},_.prototype.fromStepping=function(d){return Rt(this.xVal,this.xPct,d)},_.prototype.getStep=function(d){return d=Ut(this.xPct,this.xSteps,this.snap,d),d},_.prototype.getDefaultStep=function(d,L,z){var Y=Z(d,this.xPct);return(d===100||L&&d===this.xPct[Y-1])&&(Y=Math.max(Y-1,1)),(this.xVal[Y]-this.xVal[Y-1])/z},_.prototype.getNearbySteps=function(d){var L=Z(d,this.xPct);return{stepBefore:{startValue:this.xVal[L-2],step:this.xNumSteps[L-2],highestStep:this.xHighestCompleteStep[L-2]},thisStep:{startValue:this.xVal[L-1],step:this.xNumSteps[L-1],highestStep:this.xHighestCompleteStep[L-1]},stepAfter:{startValue:this.xVal[L],step:this.xNumSteps[L],highestStep:this.xHighestCompleteStep[L]}}},_.prototype.countStepDecimals=function(){var d=this.xNumSteps.map(v);return Math.max.apply(null,d)},_.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},_.prototype.convert=function(d){return this.getStep(this.toStepping(d))},_.prototype.handleEntryPoint=function(d,L){var z;if(d==="min"?z=0:d==="max"?z=100:z=parseFloat(d),!u(z)||!u(L[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(z),this.xVal.push(L[0]);var Y=Number(L[1]);z?this.xSteps.push(isNaN(Y)?!1:Y):isNaN(Y)||(this.xSteps[0]=Y),this.xHighestCompleteStep.push(0)},_.prototype.handleStepPoint=function(d,L){if(L){if(this.xVal[d]===this.xVal[d+1]){this.xSteps[d]=this.xHighestCompleteStep[d]=this.xVal[d];return}this.xSteps[d]=j([this.xVal[d],this.xVal[d+1]],L,0)/I(this.xPct[d],this.xPct[d+1]);var z=(this.xVal[d+1]-this.xVal[d])/this.xNumSteps[d],Y=Math.ceil(Number(z.toFixed(3))-1),Q=this.xVal[d]+this.xNumSteps[d]*Y;this.xHighestCompleteStep[d]=Q}},_}(),Ot={to:function(_){return _===void 0?"":_.toFixed(2)},from:Number},_t={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},qt={tooltips:".__tooltips",aria:".__aria"};function Fs(_,d){if(!u(d))throw new Error("noUiSlider: 'step' is not numeric.");_.singleStep=d}function Ve(_,d){if(!u(d))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");_.keyboardPageMultiplier=d}function ps(_,d){if(!u(d))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");_.keyboardMultiplier=d}function $e(_,d){if(!u(d))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");_.keyboardDefaultStep=d}function ht(_,d){if(typeof d!="object"||Array.isArray(d))throw new Error("noUiSlider: 'range' is not an object.");if(d.min===void 0||d.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");_.spectrum=new G(d,_.snap||!1,_.singleStep)}function ms(_,d){if(d=m(d),!Array.isArray(d)||!d.length)throw new Error("noUiSlider: 'start' option is incorrect.");_.handles=d.length,_.start=d}function Es(_,d){if(typeof d!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");_.snap=d}function Pe(_,d){if(typeof d!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");_.animate=d}function yr(_,d){if(typeof d!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");_.animationDuration=d}function Is(_,d){var L=[!1],z;if(d==="lower"?d=[!0,!1]:d==="upper"&&(d=[!1,!0]),d===!0||d===!1){for(z=1;z<_.handles;z++)L.push(d);L.push(!1)}else{if(!Array.isArray(d)||!d.length||d.length!==_.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");L=d}_.connect=L}function vr(_,d){switch(d){case"horizontal":_.ort=0;break;case"vertical":_.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function ti(_,d){if(!u(d))throw new Error("noUiSlider: 'margin' option must be numeric.");d!==0&&(_.margin=_.spectrum.getDistance(d))}function xr(_,d){if(!u(d))throw new Error("noUiSlider: 'limit' option must be numeric.");if(_.limit=_.spectrum.getDistance(d),!_.limit||_.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function wr(_,d){var L;if(!u(d)&&!Array.isArray(d))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(d)&&!(d.length===2||u(d[0])||u(d[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(d!==0){for(Array.isArray(d)||(d=[d,d]),_.padding=[_.spectrum.getDistance(d[0]),_.spectrum.getDistance(d[1])],L=0;L<_.spectrum.xNumSteps.length-1;L++)if(_.padding[0][L]<0||_.padding[1][L]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var z=d[0]+d[1],Y=_.spectrum.xVal[0],Q=_.spectrum.xVal[_.spectrum.xVal.length-1];if(z/(Q-Y)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function oo(_,d){switch(d){case"ltr":_.dir=0;break;case"rtl":_.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function lo(_,d){if(typeof d!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var L=d.indexOf("tap")>=0,z=d.indexOf("drag")>=0,Y=d.indexOf("fixed")>=0,Q=d.indexOf("snap")>=0,K=d.indexOf("hover")>=0,Pt=d.indexOf("unconstrained")>=0,tt=d.indexOf("drag-all")>=0,It=d.indexOf("smooth-steps")>=0;if(Y){if(_.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");ti(_,_.start[1]-_.start[0])}if(Pt&&(_.margin||_.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");_.events={tap:L||Q,drag:z,dragAll:tt,smoothSteps:It,fixed:Y,snap:Q,hover:K,unconstrained:Pt}}function co(_,d){if(d!==!1)if(d===!0||n(d)){_.tooltips=[];for(var L=0;L<_.handles;L++)_.tooltips.push(d)}else{if(d=m(d),d.length!==_.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");d.forEach(function(z){if(typeof z!="boolean"&&!n(z))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),_.tooltips=d}}function ho(_,d){if(d.length!==_.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");_.handleAttributes=d}function uo(_,d){if(!n(d))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");_.ariaFormat=d}function fo(_,d){if(!i(d))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");_.format=d}function go(_,d){if(typeof d!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");_.keyboardSupport=d}function ei(_,d){_.documentElement=d}function Xi(_,d){if(typeof d!="string"&&d!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");_.cssPrefix=d}function si(_,d){if(typeof d!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof _.cssPrefix=="string"?(_.cssClasses={},Object.keys(d).forEach(function(L){_.cssClasses[L]=_.cssPrefix+d[L]})):_.cssClasses=d}function ve(_){var d={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Ot,format:Ot},L={step:{r:!1,t:Fs},keyboardPageMultiplier:{r:!1,t:Ve},keyboardMultiplier:{r:!1,t:ps},keyboardDefaultStep:{r:!1,t:$e},start:{r:!0,t:ms},connect:{r:!0,t:Is},direction:{r:!0,t:oo},snap:{r:!1,t:Es},animate:{r:!1,t:Pe},animationDuration:{r:!1,t:yr},range:{r:!0,t:ht},orientation:{r:!1,t:vr},margin:{r:!1,t:ti},limit:{r:!1,t:xr},padding:{r:!1,t:wr},behaviour:{r:!0,t:lo},ariaFormat:{r:!1,t:uo},format:{r:!1,t:fo},tooltips:{r:!1,t:co},keyboardSupport:{r:!0,t:go},documentElement:{r:!1,t:ei},cssPrefix:{r:!0,t:Xi},cssClasses:{r:!0,t:si},handleAttributes:{r:!1,t:ho}},z={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:_t,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};_.format&&!_.ariaFormat&&(_.ariaFormat=_.format),Object.keys(L).forEach(function(tt){if(!a(_[tt])&&z[tt]===void 0){if(L[tt].r)throw new Error("noUiSlider: '"+tt+"' is required.");return}L[tt].t(d,a(_[tt])?_[tt]:z[tt])}),d.pips=_.pips;var Y=document.createElement("div"),Q=Y.style.msTransform!==void 0,K=Y.style.transform!==void 0;d.transformRule=K?"transform":Q?"msTransform":"webkitTransform";var Pt=[["left","top"],["right","bottom"]];return d.style=Pt[d.dir][d.ort],d}function Sr(_,d,L){var z=T(),Y=N(),Q=Y&&O(),K=_,Pt,tt,It,ie,$t,at=d.spectrum,Te=[],Tt=[],Ht=[],Zi=0,Kt={},bs=_.ownerDocument,ii=d.documentElement||bs.documentElement,ni=bs.body,mo=bs.dir==="rtl"||d.ort===1?0:100;function Ae(b,w){var S=bs.createElement("div");return w&&x(S,w),b.appendChild(S),S}function Le(b,w){var S=Ae(b,d.cssClasses.origin),C=Ae(S,d.cssClasses.handle);if(Ae(C,d.cssClasses.touchArea),C.setAttribute("data-handle",String(w)),d.keyboardSupport&&(C.setAttribute("tabindex","0"),C.addEventListener("keydown",function(F){return Do(F,w)})),d.handleAttributes!==void 0){var R=d.handleAttributes[w];Object.keys(R).forEach(function(F){C.setAttribute(F,R[F])})}return C.setAttribute("role","slider"),C.setAttribute("aria-orientation",d.ort?"vertical":"horizontal"),w===0?x(C,d.cssClasses.handleLower):w===d.handles-1&&x(C,d.cssClasses.handleUpper),S}function kr(b,w){return w?Ae(b,d.cssClasses.connect):!1}function bo(b,w){var S=Ae(w,d.cssClasses.connects);tt=[],It=[],It.push(kr(S,b[0]));for(var C=0;C<d.handles;C++)tt.push(Le(w,C)),Ht[C]=C,It.push(kr(S,b[C+1]))}function _o(b){x(b,d.cssClasses.target),d.dir===0?x(b,d.cssClasses.ltr):x(b,d.cssClasses.rtl),d.ort===0?x(b,d.cssClasses.horizontal):x(b,d.cssClasses.vertical);var w=getComputedStyle(b).direction;return w==="rtl"?x(b,d.cssClasses.textDirectionRtl):x(b,d.cssClasses.textDirectionLtr),Ae(b,d.cssClasses.base)}function yo(b,w){return!d.tooltips||!d.tooltips[w]?!1:Ae(b.firstChild,d.cssClasses.tooltip)}function Mr(){return K.hasAttribute("disabled")}function We(b){var w=tt[b];return w.hasAttribute("disabled")}function Ji(){$t&&(Ns("update"+qt.tooltips),$t.forEach(function(b){b&&r(b)}),$t=null)}function Dr(){Ji(),$t=tt.map(yo),oi("update"+qt.tooltips,function(b,w,S){if(!(!$t||!d.tooltips)&&$t[w]!==!1){var C=b[w];d.tooltips[w]!==!0&&(C=d.tooltips[w].to(S[w])),$t[w].innerHTML=C}})}function vo(){Ns("update"+qt.aria),oi("update"+qt.aria,function(b,w,S,C,R){Ht.forEach(function(F){var U=tt[F],$=li(Tt,F,0,!0,!0,!0),yt=li(Tt,F,100,!0,!0,!0),gt=R[F],vt=String(d.ariaFormat.to(S[F]));$=at.fromStepping($).toFixed(1),yt=at.fromStepping(yt).toFixed(1),gt=at.fromStepping(gt).toFixed(1),U.children[0].setAttribute("aria-valuemin",$),U.children[0].setAttribute("aria-valuemax",yt),U.children[0].setAttribute("aria-valuenow",gt),U.children[0].setAttribute("aria-valuetext",vt)})})}function xo(b){if(b.mode===s.PipsMode.Range||b.mode===s.PipsMode.Steps)return at.xVal;if(b.mode===s.PipsMode.Count){if(b.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var w=b.values-1,S=100/w,C=[];w--;)C[w]=w*S;return C.push(100),Cr(C,b.stepped)}return b.mode===s.PipsMode.Positions?Cr(b.values,b.stepped):b.mode===s.PipsMode.Values?b.stepped?b.values.map(function(R){return at.fromStepping(at.getStep(at.toStepping(R)))}):b.values:[]}function Cr(b,w){return b.map(function(S){return at.fromStepping(w?at.getStep(S):S)})}function _s(b){function w(gt,vt){return Number((gt+vt).toFixed(7))}var S=xo(b),C={},R=at.xVal[0],F=at.xVal[at.xVal.length-1],U=!1,$=!1,yt=0;return S=l(S.slice().sort(function(gt,vt){return gt-vt})),S[0]!==R&&(S.unshift(R),U=!0),S[S.length-1]!==F&&(S.push(F),$=!0),S.forEach(function(gt,vt){var kt,st,Mt,Xt=gt,Wt=S[vt+1],Gt,di,an,on,ln,cn,p,y=b.mode===s.PipsMode.Steps;for(y&&(kt=at.xNumSteps[vt]),kt||(kt=Wt-Xt),Wt===void 0&&(Wt=Xt),kt=Math.max(kt,1e-7),st=Xt;st<=Wt;st=w(st,kt)){for(Gt=at.toStepping(st),di=Gt-yt,ln=di/(b.density||1),cn=Math.round(ln),p=di/cn,Mt=1;Mt<=cn;Mt+=1)an=yt+Mt*p,C[an.toFixed(5)]=[at.fromStepping(an),0];on=S.indexOf(st)>-1?s.PipsType.LargeValue:y?s.PipsType.SmallValue:s.PipsType.NoValue,!vt&&U&&st!==Wt&&(on=0),st===Wt&&$||(C[Gt.toFixed(5)]=[st,on]),yt=Gt}}),C}function wo(b,w,S){var C,R,F=bs.createElement("div"),U=(C={},C[s.PipsType.None]="",C[s.PipsType.NoValue]=d.cssClasses.valueNormal,C[s.PipsType.LargeValue]=d.cssClasses.valueLarge,C[s.PipsType.SmallValue]=d.cssClasses.valueSub,C),$=(R={},R[s.PipsType.None]="",R[s.PipsType.NoValue]=d.cssClasses.markerNormal,R[s.PipsType.LargeValue]=d.cssClasses.markerLarge,R[s.PipsType.SmallValue]=d.cssClasses.markerSub,R),yt=[d.cssClasses.valueHorizontal,d.cssClasses.valueVertical],gt=[d.cssClasses.markerHorizontal,d.cssClasses.markerVertical];x(F,d.cssClasses.pips),x(F,d.ort===0?d.cssClasses.pipsHorizontal:d.cssClasses.pipsVertical);function vt(st,Mt){var Xt=Mt===d.cssClasses.value,Wt=Xt?yt:gt,Gt=Xt?U:$;return Mt+" "+Wt[d.ort]+" "+Gt[st]}function kt(st,Mt,Xt){if(Xt=w?w(Mt,Xt):Xt,Xt!==s.PipsType.None){var Wt=Ae(F,!1);Wt.className=vt(Xt,d.cssClasses.marker),Wt.style[d.style]=st+"%",Xt>s.PipsType.NoValue&&(Wt=Ae(F,!1),Wt.className=vt(Xt,d.cssClasses.value),Wt.setAttribute("data-value",String(Mt)),Wt.style[d.style]=st+"%",Wt.innerHTML=String(S.to(Mt)))}}return Object.keys(b).forEach(function(st){kt(st,b[st][0],b[st][1])}),F}function Qi(){ie&&(r(ie),ie=null)}function tn(b){Qi();var w=_s(b),S=b.filter,C=b.format||{to:function(R){return String(Math.round(R))}};return ie=K.appendChild(wo(w,S,C)),ie}function Or(){var b=Pt.getBoundingClientRect(),w="offset"+["Width","Height"][d.ort];return d.ort===0?b.width||Pt[w]:b.height||Pt[w]}function ss(b,w,S,C){var R=function(U){var $=So(U,C.pageOffset,C.target||w);if(!$||Mr()&&!C.doNotReject||D(K,d.cssClasses.tap)&&!C.doNotReject||b===z.start&&$.buttons!==void 0&&$.buttons>1||C.hover&&$.buttons)return!1;Q||$.preventDefault(),$.calcPoint=$.points[d.ort],S($,C)},F=[];return b.split(" ").forEach(function(U){w.addEventListener(U,R,Q?{passive:!0}:!1),F.push([U,R])}),F}function So(b,w,S){var C=b.type.indexOf("touch")===0,R=b.type.indexOf("mouse")===0,F=b.type.indexOf("pointer")===0,U=0,$=0;if(b.type.indexOf("MSPointer")===0&&(F=!0),b.type==="mousedown"&&!b.buttons&&!b.touches)return!1;if(C){var yt=function(kt){var st=kt.target;return st===S||S.contains(st)||b.composed&&b.composedPath().shift()===S};if(b.type==="touchstart"){var gt=Array.prototype.filter.call(b.touches,yt);if(gt.length>1)return!1;U=gt[0].pageX,$=gt[0].pageY}else{var vt=Array.prototype.find.call(b.changedTouches,yt);if(!vt)return!1;U=vt.pageX,$=vt.pageY}}return w=w||P(bs),(R||F)&&(U=b.clientX+w.x,$=b.clientY+w.y),b.pageOffset=w,b.points=[U,$],b.cursor=R||F,b}function ri(b){var w=b-h(Pt,d.ort),S=w*100/Or();return S=g(S),d.dir?100-S:S}function ko(b){var w=100,S=!1;return tt.forEach(function(C,R){if(!We(R)){var F=Tt[R],U=Math.abs(F-b),$=U===100&&w===100,yt=U<w,gt=U<=w&&b>F;(yt||gt||$)&&(S=R,w=U)}}),S}function ai(b,w){b.type==="mouseout"&&b.target.nodeName==="HTML"&&b.relatedTarget===null&&sn(b,w)}function en(b,w){if(navigator.appVersion.indexOf("MSIE 9")===-1&&b.buttons===0&&w.buttonsProperty!==0)return sn(b,w);var S=(d.dir?-1:1)*(b.calcPoint-w.startCalcPoint),C=S*100/w.baseSize;Tr(S>0,C,w.locations,w.handleNumbers,w.connect)}function sn(b,w){w.handle&&(k(w.handle,d.cssClasses.active),Zi-=1),w.listeners.forEach(function(S){ii.removeEventListener(S[0],S[1])}),Zi===0&&(k(K,d.cssClasses.drag),rn(),b.cursor&&(ni.style.cursor="",ni.removeEventListener("selectstart",o))),d.events.smoothSteps&&(w.handleNumbers.forEach(function(S){is(S,Tt[S],!0,!0,!1,!1)}),w.handleNumbers.forEach(function(S){Nt("update",S)})),w.handleNumbers.forEach(function(S){Nt("change",S),Nt("set",S),Nt("end",S)})}function ys(b,w){if(!w.handleNumbers.some(We)){var S;if(w.handleNumbers.length===1){var C=tt[w.handleNumbers[0]];S=C.children[0],Zi+=1,x(S,d.cssClasses.active)}b.stopPropagation();var R=[],F=ss(z.move,ii,en,{target:b.target,handle:S,connect:w.connect,listeners:R,startCalcPoint:b.calcPoint,baseSize:Or(),pageOffset:b.pageOffset,handleNumbers:w.handleNumbers,buttonsProperty:b.buttons,locations:Tt.slice()}),U=ss(z.end,ii,sn,{target:b.target,handle:S,listeners:R,doNotReject:!0,handleNumbers:w.handleNumbers}),$=ss("mouseout",ii,ai,{target:b.target,handle:S,listeners:R,doNotReject:!0,handleNumbers:w.handleNumbers});R.push.apply(R,F.concat(U,$)),b.cursor&&(ni.style.cursor=getComputedStyle(b.target).cursor,tt.length>1&&x(K,d.cssClasses.drag),ni.addEventListener("selectstart",o,!1)),w.handleNumbers.forEach(function(yt){Nt("start",yt)})}}function Pr(b){b.stopPropagation();var w=ri(b.calcPoint),S=ko(w);S!==!1&&(d.events.snap||f(K,d.cssClasses.tap,d.animationDuration),is(S,w,!0,!0),rn(),Nt("slide",S,!0),Nt("update",S,!0),d.events.snap?ys(b,{handleNumbers:[S]}):(Nt("change",S,!0),Nt("set",S,!0)))}function Mo(b){var w=ri(b.calcPoint),S=at.getStep(w),C=at.fromStepping(S);Object.keys(Kt).forEach(function(R){R.split(".")[0]==="hover"&&Kt[R].forEach(function(F){F.call(ui,C)})})}function Do(b,w){if(Mr()||We(w))return!1;var S=["Left","Right"],C=["Down","Up"],R=["PageDown","PageUp"],F=["Home","End"];d.dir&&!d.ort?S.reverse():d.ort&&!d.dir&&(C.reverse(),R.reverse());var U=b.key.replace("Arrow",""),$=U===R[0],yt=U===R[1],gt=U===C[0]||U===S[0]||$,vt=U===C[1]||U===S[1]||yt,kt=U===F[0],st=U===F[1];if(!gt&&!vt&&!kt&&!st)return!0;b.preventDefault();var Mt;if(vt||gt){var Xt=gt?0:1,Wt=Fr(w),Gt=Wt[Xt];if(Gt===null)return!1;Gt===!1&&(Gt=at.getDefaultStep(Tt[w],gt,d.keyboardDefaultStep)),yt||$?Gt*=d.keyboardPageMultiplier:Gt*=d.keyboardMultiplier,Gt=Math.max(Gt,1e-7),Gt=(gt?-1:1)*Gt,Mt=Te[w]+Gt}else st?Mt=d.spectrum.xVal[d.spectrum.xVal.length-1]:Mt=d.spectrum.xVal[0];return is(w,at.toStepping(Mt),!0,!0),Nt("slide",w),Nt("update",w),Nt("change",w),Nt("set",w),!1}function Co(b){b.fixed||tt.forEach(function(w,S){ss(z.start,w.children[0],ys,{handleNumbers:[S]})}),b.tap&&ss(z.start,Pt,Pr,{}),b.hover&&ss(z.move,Pt,Mo,{hover:!0}),b.drag&&It.forEach(function(w,S){if(!(w===!1||S===0||S===It.length-1)){var C=tt[S-1],R=tt[S],F=[w],U=[C,R],$=[S-1,S];x(w,d.cssClasses.draggable),b.fixed&&(F.push(C.children[0]),F.push(R.children[0])),b.dragAll&&(U=tt,$=Ht),F.forEach(function(yt){ss(z.start,yt,ys,{handles:U,handleNumbers:$,connect:w})})}})}function oi(b,w){Kt[b]=Kt[b]||[],Kt[b].push(w),b.split(".")[0]==="update"&&tt.forEach(function(S,C){Nt("update",C)})}function Oo(b){return b===qt.aria||b===qt.tooltips}function Ns(b){var w=b&&b.split(".")[0],S=w?b.substring(w.length):b;Object.keys(Kt).forEach(function(C){var R=C.split(".")[0],F=C.substring(R.length);(!w||w===R)&&(!S||S===F)&&(!Oo(F)||S===F)&&delete Kt[C]})}function Nt(b,w,S){Object.keys(Kt).forEach(function(C){var R=C.split(".")[0];b===R&&Kt[C].forEach(function(F){F.call(ui,Te.map(d.format.to),w,Te.slice(),S||!1,Tt.slice(),ui)})})}function li(b,w,S,C,R,F,U){var $;return tt.length>1&&!d.events.unconstrained&&(C&&w>0&&($=at.getAbsoluteDistance(b[w-1],d.margin,!1),S=Math.max(S,$)),R&&w<tt.length-1&&($=at.getAbsoluteDistance(b[w+1],d.margin,!0),S=Math.min(S,$))),tt.length>1&&d.limit&&(C&&w>0&&($=at.getAbsoluteDistance(b[w-1],d.limit,!1),S=Math.min(S,$)),R&&w<tt.length-1&&($=at.getAbsoluteDistance(b[w+1],d.limit,!0),S=Math.max(S,$))),d.padding&&(w===0&&($=at.getAbsoluteDistance(0,d.padding[0],!1),S=Math.max(S,$)),w===tt.length-1&&($=at.getAbsoluteDistance(100,d.padding[1],!0),S=Math.min(S,$))),U||(S=at.getStep(S)),S=g(S),S===b[w]&&!F?!1:S}function nn(b,w){var S=d.ort;return(S?w:b)+", "+(S?b:w)}function Tr(b,w,S,C,R){var F=S.slice(),U=C[0],$=d.events.smoothSteps,yt=[!b,b],gt=[b,!b];C=C.slice(),b&&C.reverse(),C.length>1?C.forEach(function(kt,st){var Mt=li(F,kt,F[kt]+w,yt[st],gt[st],!1,$);Mt===!1?w=0:(w=Mt-F[kt],F[kt]=Mt)}):yt=gt=[!0];var vt=!1;C.forEach(function(kt,st){vt=is(kt,S[kt]+w,yt[st],gt[st],!1,$)||vt}),vt&&(C.forEach(function(kt){Nt("update",kt),Nt("slide",kt)}),R!=null&&Nt("drag",U))}function Ar(b,w){return d.dir?100-b-w:b}function Po(b,w){Tt[b]=w,Te[b]=at.fromStepping(w);var S=Ar(w,0)-mo,C="translate("+nn(S+"%","0")+")";tt[b].style[d.transformRule]=C,zs(b),zs(b+1)}function rn(){Ht.forEach(function(b){var w=Tt[b]>50?-1:1,S=3+(tt.length+w*b);tt[b].style.zIndex=String(S)})}function is(b,w,S,C,R,F){return R||(w=li(Tt,b,w,S,C,!1,F)),w===!1?!1:(Po(b,w),!0)}function zs(b){if(It[b]){var w=0,S=100;b!==0&&(w=Tt[b-1]),b!==It.length-1&&(S=Tt[b]);var C=S-w,R="translate("+nn(Ar(w,C)+"%","0")+")",F="scale("+nn(C/100,"1")+")";It[b].style[d.transformRule]=R+" "+F}}function ci(b,w){return b===null||b===!1||b===void 0||(typeof b=="number"&&(b=String(b)),b=d.format.from(b),b!==!1&&(b=at.toStepping(b)),b===!1||isNaN(b))?Tt[w]:b}function hi(b,w,S){var C=m(b),R=Tt[0]===void 0;w=w===void 0?!0:w,d.animate&&!R&&f(K,d.cssClasses.tap,d.animationDuration),Ht.forEach(function($){is($,ci(C[$],$),!0,!1,S)});var F=Ht.length===1?0:1;if(R&&at.hasNoSize()&&(S=!0,Tt[0]=0,Ht.length>1)){var U=100/(Ht.length-1);Ht.forEach(function($){Tt[$]=$*U})}for(;F<Ht.length;++F)Ht.forEach(function($){is($,Tt[$],!0,!0,S)});rn(),Ht.forEach(function($){Nt("update",$),C[$]!==null&&w&&Nt("set",$)})}function To(b){hi(d.start,b)}function Lr(b,w,S,C){if(b=Number(b),!(b>=0&&b<Ht.length))throw new Error("noUiSlider: invalid handle number, got: "+b);is(b,ci(w,b),!0,!0,C),Nt("update",b),S&&Nt("set",b)}function Rr(b){if(b===void 0&&(b=!1),b)return Te.length===1?Te[0]:Te.slice(0);var w=Te.map(d.format.to);return w.length===1?w[0]:w}function Ao(){for(Ns(qt.aria),Ns(qt.tooltips),Object.keys(d.cssClasses).forEach(function(b){k(K,d.cssClasses[b])});K.firstChild;)K.removeChild(K.firstChild);delete K.noUiSlider}function Fr(b){var w=Tt[b],S=at.getNearbySteps(w),C=Te[b],R=S.thisStep.step,F=null;if(d.snap)return[C-S.stepBefore.startValue||null,S.stepAfter.startValue-C||null];R!==!1&&C+R>S.stepAfter.startValue&&(R=S.stepAfter.startValue-C),C>S.thisStep.startValue?F=S.thisStep.step:S.stepBefore.step===!1?F=!1:F=C-S.stepBefore.highestStep,w===100?R=null:w===0&&(F=null);var U=at.countStepDecimals();return R!==null&&R!==!1&&(R=Number(R.toFixed(U))),F!==null&&F!==!1&&(F=Number(F.toFixed(U))),[F,R]}function Er(){return Ht.map(Fr)}function Lo(b,w){var S=Rr(),C=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];C.forEach(function(F){b[F]!==void 0&&(L[F]=b[F])});var R=ve(L);C.forEach(function(F){b[F]!==void 0&&(d[F]=R[F])}),at=R.spectrum,d.margin=R.margin,d.limit=R.limit,d.padding=R.padding,d.pips?tn(d.pips):Qi(),d.tooltips?Dr():Ji(),Tt=[],hi(a(b.start)?b.start:S,w)}function Ro(){Pt=_o(K),bo(d.connect,Pt),Co(d.events),hi(d.start),d.pips&&tn(d.pips),d.tooltips&&Dr(),vo()}Ro();var ui={destroy:Ao,steps:Er,on:oi,off:Ns,get:Rr,set:hi,setHandle:Lr,reset:To,__moveHandles:function(b,w,S){Tr(b,w,Tt,S)},options:L,updateOptions:Lo,target:K,removePips:Qi,removeTooltips:Ji,getPositions:function(){return Tt.slice()},getTooltips:function(){return $t},getOrigins:function(){return tt},pips:tn};return ui}function Ki(_,d){if(!_||!_.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+_);if(_.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var L=ve(d),z=Sr(_,L,d);return _.noUiSlider=z,z}var po={__spectrum:G,cssClasses:_t,create:Ki};s.create=Ki,s.cssClasses=_t,s.default=po,Object.defineProperty(s,"__esModule",{value:!0})})})(ro,ro.exports);const Fy=G0(ro.exports);var Ey=["start","slide","update","change","set","end"],Uh={name:"veeno",props:{inputClass:{type:String,default:"custom-slider-input"},inputName:{type:String,default:"custom-slider-value"},options:{type:Object,default:function(){return{start:[20,80],connect:!0,range:{min:0,max:100}}}},vertical:{type:Boolean,default:!1},handles:{type:[Number,Array],default:null},connect:{type:[Boolean,Array,String],default:!1},tooltips:{type:[Boolean,Array],default:!1},step:{type:Number,default:0},range:{type:Object,required:!0,validator:function(e){return!Array.isArray(e)&&typeof e=="object"}},pipsy:{type:[Boolean,Object],default:function(){return!1},validator:function(e){return typeof e=="boolean"||!Array.isArray(e)&&typeof e=="object"}},rtl:{type:Boolean,default:!1},keyboardSupport:{type:Boolean,default:!0},keyboardDefaultStep:{type:Number,default:10},keyboardPageMultiplier:{type:Number,default:5},keyboardMultiplier:{type:Number,default:1},documentElementId:{type:[String,null],default:null},format:{type:Object,default:null},set:{type:[Number,Array],default:null,validator:function(e){return typeof e=="number"||Array.isArray(e)}},behaviour:{type:String,default:"tap",validator:function(e){return["drag","tap","fixed","snap","none"].indexOf(e!==-1)}},getset:{type:Function,default:function(){return function(){return""}}}},created:function(){this.optionz=Object.assign({},this.options,this.$props,this.vertical&&(this.options.orientation="vertical"),this.handles&&(this.options.start=this.handles),this.rtl&&(this.options.direction="rtl"),this.pipsy&&!Object.keys(this.pipsy).length?this.options.pips={mode:"range",density:5}:this.options.pips=this.pipsy)},mounted:function(){var t=this,s=document.getElementById(this.documentElementId);this.optionz.documentElement=s||null;var i=this.$el;this.options.orientation==="vertical"&&(i.style.height="100%"),Fy.create(i,this.optionz),Ey.forEach(function(n){i.noUiSlider.on(n,function(r,a,o,l,c){t.$emit(n,{values:r,handle:a,unencoded:o,tap:l,positions:c}),n==="update"&&t.$emit("input",r)})}),this.getset(i)},render:function(t){var s=t("input",{attrs:{type:"hidden",name:this.name},class:this.inputClass}),i=t("span",Ny,this.$slots.default);return t("div",Iy,[s,i])},data:function(){return{optionz:Object,latestHandleValue:null}},watch:{set:function(t){this.$el.noUiSlider.set(t)}}},Iy={style:{position:"relative"},class:{veeno:!0},attrs:{name:"custom-slider"}},Ny={style:{position:"absolute",top:"-2.5rem"},class:{"veeno-span":!0}};function ao(e){ao.installed||(ao.installed=!0,e.component("veeno",Uh))}var zy={install:ao},_r=null;typeof window<"u"?_r=window.Vue:typeof global<"u"&&(_r=global.Vue),_r&&_r.use(zy);const yv="",Yy={components:{"slider-fixed":{extends:Uh,props:{fixedpips:{type:Array|Boolean,default:!1},tooltips:{type:Boolean|Array|Object,default:!0}},mounted(){var e,t;this.$props.fixedpips&&((t=(e=this.$el)==null?void 0:e.noUiSlider)==null||t.updateOptions({pips:this.$props.fixedpips},!1))}}},mounted(){const e=this.sliderRange;this.dateFrom=this.dateChoices[e.min],this.dateTo=this.dateChoices[e.max],this.updateDateFields(this.timeFrame)},data(){const e=this;let t=null,s=null,i=null,n=null;return{dateFrom:"",dateTo:"",sliderDisplayFormat:"YYYY-MM-DD",staticDateFieldProps:{class:"ss-header-date",calendar:!0,time:!1,times:!1,required:!1,invalid:!1,display:"YYYY-MM-DD"},sliderDateFormatter:{to:function(r){return""+e.dateChoices[Number(r).toFixed(0)]},from:function(r){let a=Number(e.dateChoices.indexOf(r));if(a<0){let o=Number(r.replaceAll("-","")).toFixed(0),l=null;a=0,e.dateChoices.forEach(function(c,h){const u=Number(c.replaceAll("-","")).toFixed(0);(l===null||Math.abs(u-o)<Math.abs(l-o))&&(l=u,a=h)})}return a}},sliderStepSettings:{mode:"steps",density:5,filter:function(r,a){if(a===1||a===2){let o=""+e.dateChoices[Number(r).toFixed(0)],l=o.split("-")[0],c=o.split("-")[1];return l&&l!==i?(n=c,i=l,1):n!==c?(i=l,n=c,2):0}return a},format:{to:function(r){let a=e.dateChoices[Number(r).toFixed(0)],o=e.$library.dayjs(a),l=o.$y,c=o.$M;return l&&l!==t?(t=l,s=c,l):c&&s!=c?(s=c,t=l,e.monthnames[c].substring(0,3)):""},from:function(r){return Number(e.dateChoices.indexOf(r))}}},sliderDateTooltipsFunc:[{to:function(r){const a=e.dateChoices.indexOf(e.dateTo);return""+e.dateChoices[Number(r).toFixed(0)]+(a>0?"<br/>("+Number(Math.abs(r-a)).toFixed(0)+" timeframes)":"")},from:function(r){return 0}},{to:function(r){const a=e.dateChoices.indexOf(e.dateFrom);return""+e.dateChoices[Number(r).toFixed(0)]+(a>0?"<br/>("+Number(Math.abs(r-a)).toFixed(0)+" timeframes)":"")},from:function(r){return 0}}],monthnames:["january","february","march","april","may","june","july","august","september","october","november","december"].map(r=>this.$t("months."+r))}},props:{dateChoices:{type:Array,default(){return[]}}},computed:{sliderRange(){return{min:0,max:this.dateChoices.length-1}},timeFrame(){return[this.dateFrom,this.dateTo]},minDate(){return this.dateChoices.reduce((e,t)=>e<t?e:t)},maxDate(){return this.dateChoices.reduce((e,t)=>e>t?e:t)}},methods:{onSliderSet(e){e&&(this.dateFrom=e.values[0],this.dateTo=e.values[1])},updateDateFields(e){var t,s,i,n;if(!(!Array.isArray(e)||e.length!==2))for(let r=0;r<2;r++){const a=r===0?"dateFrom":"dateTo",o=e[r];if(!o||!o.length)continue;let l=o.split(" ");if(l.length>1&&(this[a]=l[0]),this[a].length&&this.dateChoices){let c=Number(o.replaceAll("-","")).toFixed(0),h=r*(this.dateChoices.length-1),u={i:h,num:Number(this.dateChoices[h].replaceAll("-","")).toFixed(0)};this.dateChoices.forEach(function(m,v){let x=Number(m.replaceAll("-","")).toFixed(0);r===0&&x>c||r===1&&x<c||(r===0&&x>=u.num||r===1&&x<=u.num)&&(u.i=v,u.num=x)}),this[a]=this.dateChoices[u.i];const f=this.$library.dayjs(this[a]);let g=this.$refs[r===0?"calendarFrom":"calendarTo"];g&&(g.data.dt=f),(t=this.$refs[r===0?"calendarFromDrawer":"calendarToDrawer"])==null||t.close()}(n=(i=(s=this.$refs.slider)==null?void 0:s.$el)==null?void 0:i.noUiSlider)==null||n.set([e[0]?this.dateFrom:null,e[1]?this.dateTo:null],!1,!1)}},onUpdateKirbyDateTo(e){this.updateDateFields([null,e])},onUpdateKirbyDateFrom(e){this.updateDateFields([e,null])}}};var Vy=function(){var t=this,s=t._self._c;return s("k-grid",{staticClass:"ss-timeframe-input",attrs:{gutter:"medium"}},[s("k-column",{attrs:{width:"3/12"}},[s("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("div",{staticClass:"k-date-field-body",attrs:{"data-theme":"field"}},[s("k-input",{ref:"fromDateField",attrs:{autofocus:!1,display:t.staticDateFieldProps.display,min:t.minDate,max:t.maxDate,required:!0,theme:"field",type:"date",icon:"calendar",before:t.$t("simplestats.timeframe.date.from","From")},scopedSlots:t._u([{key:"icon",fn:function(){return[s("k-dropdown",[s("k-button",{staticClass:"k-input-icon-button",attrs:{icon:"calendar",tooltip:t.$t("date.select")},on:{click:function(i){return t.$refs.calendarFromDrawer.toggle()}}}),s("k-dropdown-content",{ref:"calendarFromDrawer",attrs:{align:"right"}},[s("k-calendar",{ref:"calendarFrom",attrs:{value:t.dateFrom+" 00:00:00",min:t.minDate,max:t.maxDate},on:{input:t.onUpdateKirbyDateFrom}})],1)],1)]},proxy:!0}]),model:{value:t.dateFrom,callback:function(i){t.dateFrom=i},expression:"dateFrom"}})],1)])],1),s("k-column",{attrs:{width:"6/12"}},[s("div",{staticClass:"k-range-input ss-timeframe-range"},[s("slider-fixed",{ref:"slider",attrs:{handles:t.timeFrame,set:t.timeFrame,range:t.sliderRange,behaviour:"drag",connect:"",step:1,tooltips:t.sliderDateTooltipsFunc,format:t.sliderDateFormatter,fixedpips:t.sliderStepSettings},on:{update:t.onSliderUpdate,change:t.onSliderChange,set:t.onSliderSet}})],1)]),s("k-column",{attrs:{width:"3/12"}},[s("k-field",t._b({staticClass:"k-date-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[s("div",{staticClass:"k-date-field-body",attrs:{"data-theme":"field"}},[s("k-input",{ref:"toDateField",attrs:{autofocus:!1,display:t.staticDateFieldProps.display,min:t.minDate,max:t.maxDate,required:!0,theme:"field",type:"date",icon:"calendar",before:t.$t("simplestats.timeframe.date.to","To")},scopedSlots:t._u([{key:"icon",fn:function(){return[s("k-dropdown",[s("k-button",{staticClass:"k-input-icon-button",attrs:{icon:"calendar",tooltip:t.$t("date.select")},on:{click:function(i){return t.$refs.calendarToDrawer.toggle()}}}),s("k-dropdown-content",{ref:"calendarToDrawer",attrs:{align:"right"}},[s("k-calendar",{ref:"calendarTo",attrs:{value:t.dateTo+" 00:00:00",min:t.minDate,max:t.maxDate},on:{input:t.onUpdateKirbyDateTo}})],1)],1)]},proxy:!0}]),model:{value:t.dateTo,callback:function(i){t.dateTo=i},expression:"dateTo"}})],1)])],1)],1)},$y=[],Wy=ne(Yy,Vy,$y,!1,null,null,null,null);const Hy=Wy.exports,vv="",By={components:{Visitors:iu,PageStats:iy,Devices:ly,Referers:fy,DbInformation:_y,Configuration:Sy,TrackingTester:Ry,TimeFrameInput:Hy},data(){return{tab:"",dismissDisclaimer:!1,isLoading:!0}},props:{label:{type:String,default:"Simple Stats"},initialtab:{type:String,default:"pagevisits"},tabs:{type:Array,default:[]},globaltimespan:{type:Array,default:[]},timeframes:{type:Array,default:[]}},watch:{initialtab(e){e&&(this.tab=e)}},mounted(){this.onTab()},methods:{getTabFromLocalStorage(){try{return window.localStorage.getItem("ss-tabs-menu")}catch{}return null},writeTabToLocalStorage(){if(!this.tab||this.length<1)return!1;try{return window.localStorage.setItem("ss-tabs-menu",this.tab),!0}catch{}return!1},onTab(e){var s,i;let t=e;(!e||e.length<1)&&(t=this.getTabFromLocalStorage()),(!t||t.length<1&&this.initialtab)&&(t=this.initialtab),this.tabs.some(n=>n.name===t)||(t=this.tabs[0].name),this.tab=t,this.$root.$view.breadcrumb[0].label=(i=(s=this.tabs.find(n=>n.name===e))==null?void 0:s.label)!=null?i:t,this.$root.$view.breadcrumb[0].link=null,this.writeTabToLocalStorage()}}};var jy=function(){var t=this,s=t._self._c;return s("k-inside",[s("k-view",{staticClass:"k-simplestats-view"},[!t.isLoading&&!t.dismissDisclaimer?s("k-grid",[s("k-column",[s("k-headline",{attrs:{size:"medium",align:"center"}},[t._v(t._s(t.$t("simplestats.disclaimer.title")))]),s("k-text",{attrs:{size:"small",align:"center"}},[s("span",{domProps:{innerHTML:t._s(t.$t("simplestats.disclaimer.text"))}}),s("span",{staticClass:"hover-to-help"},[s("k-icon",{attrs:{type:"question"}}),s("div",{staticClass:"help"},[s("k-text",{attrs:{theme:"help",size:"small",align:"center"}},[t._v(t._s(t.$t("simplestats.disclaimer.dismiss")))])],1)],1),s("br")]),s("br"),s("br")],1)],1):t._e(),s("k-header",{attrs:{tabs:t.tabs,tab:t.tab},on:{tabChange:t.onTab}},[s("template",{slot:"default"},[t._v(" "+t._s(t.label)+" ")]),s("template",{slot:"right"},[s("time-frame-input",{ref:"timeFrame",attrs:{dateChoices:t.timeframes}})],1)],2),t.tab==t.tabs[0].name?s("div",[s("page-stats",{attrs:{dateFrom:t.$refs.timeFrame.dateFrom,dateTo:t.$refs.timeFrame.dateTo,"section-name":"pagestats"}})],1):t.tab==t.tabs[1].name?s("div",[s("devices",{attrs:{dateFrom:t.$refs.timeFrame.dateFrom,dateTo:t.$refs.timeFrame.dateTo,"section-name":"devicestats"}})],1):t.tab==t.tabs[2].name?s("div",[s("referers",{attrs:{dateFrom:t.$refs.timeFrame.dateFrom,dateTo:t.$refs.timeFrame.dateTo,"section-name":"refererstats"}})],1):t.tab==t.tabs[3].name?s("div",[s("k-grid",{attrs:{gutter:"large"}},[s("k-column",{attrs:{width:"1/2"}},[s("configuration",{attrs:{"section-name":"configinfo"}})],1),s("k-column",{attrs:{width:"1/2"}},[s("DbInformation",{attrs:{"section-name":"listdbinfo"}})],1),s("k-column",{attrs:{width:"1/1"}},[s("k-line-field"),s("tracking-tester")],1),s("k-column",{attrs:{width:"1/1"}},[s("k-line-field"),s("visitors",{attrs:{"section-name":"listvisitors"}})],1)],1)],1):s("div",[s("k-empty",[t._v(t._s(t.$t("simplestats.taberror")))])],1)],1)],1)},Uy=[],Gy=ne(By,jy,Uy,!1,null,null,null,null);const qy=Gy.exports,xv="",Xy={extends:Ys,components:{AreaChart:br},data(){return{headline:null,showFullInfo:!1,showTotals:!1,showTimeline:!1,showLanguages:!1,size:"medium",statsdata:null,isLoading:!1,error:"",languagesOverTime:[],visitsOverTimeData:[],languageTotalHits:[],trackedSince:"[unknown]",totalHits:0,averageHits:!1,timespanUnitName:"[unknown]",trackingPeriods:!1,label:"",chartPeriodLabels:[],chartLanguagesLabels:[]}},props:{sectionName:"OnePageStats"},computed:{languagesAreEnabled(){return this.chartLanguagesLabels&&this.chartLanguagesLabels.length>1},sectionSize(){return this.size=="small"||this.size=="compact"?"small":this.size=="medium"||this.size=="normal"?"medium":this.size=="large"||this.size=="huge"?"large":this.size=="tiny"?"tiny":"medium"},chartOptions(){return{animation:{onComplete:this.generateDownloadLink}}}},created(){this.load().then(e=>{var t;this.label=(t=e.label)!=null?t:e.headline,this.showFullInfo=e.showFullInfo,this.showTotals=e.showTotals,this.showTimeline=e.showTimeline,this.showLanguages=e.showLanguages,this.size=e.size,this.statsdata=e.statsdata,this.languagesOverTime=e.statsdata.languagesOverTime,this.visitsOverTimeData=e.statsdata.visitsovertimedata,this.chartPeriodLabels=e.statsdata.chartperiodlabels,this.chartLanguagesLabels=e.statsdata.chartlanguageslabels,this.languageTotalHits=e.statsdata.languageTotalHits,this.trackedSince=e.statsdata.firstVisited,this.lastVisited=e.statsdata.lastVisited,this.averageHits=e.statsdata.averageHits,this.totalHits=e.statsdata.totalHits,this.timespanUnitName=e.statsdata.timespanUnitName,this.trackingPeriods=e.statsdata.trackingPeriods})},mounted(){},methods:{graphFooter(e,t){let s=0,i=0;return e.forEach(function(n){s+=parseInt(n.value),i++}),i<=1?"":"Total: "+s},pieLabel(e,t){var s=t.datasets[e.datasetIndex],i=s.data.reduce(function(a,o,l,c){return a+o}),n=s.data[e.index],r=Math.floor(n/i*100+.5);return t.labels[e.index]+": "+n+" ("+r+"%)"}}};var Ky=function(){var t=this,s=t._self._c;return s("div",{class:{simplestatsonepagedetailssection:!0,small:t.sectionSize=="small",medium:t.sectionSize=="medium",large:t.sectionSize=="large"}},[t.label?s("div",[s("k-headline",{attrs:{size:"medium"}},[s("k-icon",{staticStyle:{display:"inline-block","padding-right":"0.5rem"},attrs:{type:"chart",size:"tiny"}}),t._v(" "+t._s(t.label))],1),s("br")],1):t._e(),t.showFullInfo&&t.showTotals?s("p",[t._v(" This page has been "),s("strong",[t._v("visited "+t._s(t.totalHits)+" times")]),t._v(" since "+t._s(t.trackedSince)+" and was last visited on "+t._s(t.lastVisited)+" which averages to "),s("strong",[t._v(t._s(Math.round(t.averageHits))+" visits per "+t._s(t.timespanUnitName))]),t._v(" using "+t._s(t.trackingPeriods)+" samples. ")]):t.showTotals?s("p",[t._v(" Total hits: "),s("strong",[t._v(t._s(t.totalHits))]),t._v(" ("),s("strong",[t._v(t._s(Math.round(t.averageHits)))]),t._v(" per "+t._s(t.timespanUnitName)+") ")]):t._e(),t.showTotals?s("k-line-field"):t._e(),t.showTimeline?s("div",{staticClass:"detailcolumn visitsovertime"},[s("k-headline",{attrs:{size:"medium"}},[t._v(t._s(t.$t("simplestats.visits.visitsovertime")))]),s("area-chart",{attrs:{"chart-data":t.languagesOverTime,"chart-labels":t.chartPeriodLabels,download:"PageVisitsOverTime.png","x-time-axis":!0,"y-visits-axis":!0,height:this.sectionSize=="small"?240:this.sectionSize=="large"?280:this.sectionSize=="tiny"?120:260,stacked:t.languagesAreEnabled,"chart-options":t.chartOptions,"auto-colorize":!0,"show-legend":t.languagesAreEnabled}}),s("br")],1):t._e(),t.languagesAreEnabled&&t.showLanguages?s("div",{staticClass:"detailcolumn globallanguages"},[s("k-headline",[t._v(t._s(t.$t("simplestats.visits.globallanguages")))]),s("area-chart",{attrs:{type:"Pie",download:"PageGlobalLanguageVisits.png","chart-data":t.languageTotalHits,"chart-labels":t.chartLanguagesLabels,"chart-options":t.chartOptions,"auto-colorize":!0,height:this.sectionSize=="small"?185:this.sectionSize=="large"?225:this.sectionSize=="tiny"?80:205,fill:!0,"show-legend":t.languagesAreEnabled}})],1):t._e()],1)},Zy=[],Jy=ne(Xy,Ky,Zy,!1,null,null,null,null);const Qy=Jy.exports,wv="",tv={props:{value:String|Number,column:Object,field:Object},computed:{percentage(){return Number(this.value*100).toFixed()}}};var ev=function(){var t=this,s=t._self._c;return s("p",{staticClass:"ss-percentage-field-preview"},[s("span",{staticClass:"ss-progress",style:"width: "+t.percentage+"%;"},[t._v(t._s(t.percentage)+"%")])])},sv=[],iv=ne(tv,ev,sv,!1,null,null,null,null);const nv=iv.exports;panel.plugin("daandelange/simplestats",{components:{"k-simplestats-view":qy,"k-tabs":{extends:"k-tabs",mounted(){this.bindTabClicks()},emits:["tabChange"],methods:{bindTabClicks(){const e=this;for(const t of this.$children)t.$el.classList.contains("k-tab-button")&&t.$el.addEventListener("click",function(){e.onClick(t.$vnode.key)})},onClick(e){this.tab!==e&&this.$parent.$emit("tabChange",e)}}},"k-percentage-field-preview":nv},sections:{pagestats:Qy},use:[],devtool:"source-map"})})();