-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.js
More file actions
32 lines (32 loc) · 346 KB
/
Copy pathindex.js
File metadata and controls
32 lines (32 loc) · 346 KB
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 W=window.Vue;function Be(){return window.panel}function Vh(){return Be().api}W.computed,W.customRef,W.defineAsyncComponent,W.defineComponent,W.effectScope,W.getCurrentInstance,W.getCurrentScope,W.h,W.inject,W.isProxy,W.isReactive,W.isReadonly,W.isRef,W.isShallow,W.markRaw,W.nextTick,W.onActivated,W.onBeforeMount,W.onBeforeUnmount,W.onBeforeUpdate,W.onDeactivated,W.onErrorCaptured,W.onMounted,W.onRenderTracked,W.onRenderTriggered,W.onScopeDispose,W.onServerPrefetch,W.onUnmounted,W.onUpdated,W.provide,W.proxyRefs,W.reactive,W.readonly,W.ref,W.shallowReactive,W.shallowReadonly,W.shallowRef,W.toRaw,W.toRef,W.toRefs,W.triggerRef,W.unref,W.useAttrs,W.useCssModule,W.useCssVars,W.useListeners,W.useSlots,W.watch,W.watchEffect,W.watchPostEffect,W.watchSyncEffect;const px="";function $t(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(d){d=d||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!d&&typeof __VUE_SSR_CONTEXT__<"u"&&(d=__VUE_SSR_CONTEXT__),n&&n.call(this,d),d&&d._registeredComponents&&d._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(f,g){return c.call(g),h(f,g)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:l}}var $h=$t({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(){},destroyed(){},mounted(){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 i=await Vh().get("simplestats/"+this.sectionName+this.dateQueryString());this.loadData(i)}catch(s){this.error=s.message,(t=this.$store)!=null&&t.dispatch?this.$store.dispatch("notification/error",s.message??"Unknown error"):Be().error(s.message??"Unknown error",!0)}finally{this.isLoading=!1,this.isProcessing=!1}},loadData(e){}}},null,null,!1,null,null,null,null);const Cs=$h.exports,yx="",Wh={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 Hh=function(){var t=this,s=t._self._c;return s("div",{staticClass:"ss-table"},[s("header",{staticClass:"k-section-header"},[s("k-headline",{staticClass:"h3 k-section-header"},[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 …"),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)},Bh=[],jh=$t(Wh,Hh,Bh,!1,null,null,null,null);const $i=jh.exports,vx="",Uh={extends:Cs,data(){return{rows:[],columns:{}}},components:{SearchableTable:$i},methods:{loadData(e){this.columns=e.columns,this.rows=e.rows}}};var Gh=function(){var t=this,s=t._self._c;return s("k-grid",[s("k-column",[s("k-headline",{staticClass:"h3 k-section-header"},[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)},qh=[],Xh=$t(Uh,Gh,qh,!1,null,null,null,null);const Kh=Xh.exports;/*!
* Chart.js v3.9.1
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/function Pe(){}const Zh=(function(){let e=0;return function(){return e++}})();function at(e){return e===null||typeof e>"u"}function gt(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 q(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}const Ot=e=>(typeof e=="number"||e instanceof Number)&&isFinite(+e);function Jt(e,t){return Ot(e)?e:t}function B(e,t){return typeof e>"u"?t:e}const Jh=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:e/t,ao=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function pt(e,t,s){if(e&&typeof e.call=="function")return e.apply(s,t)}function lt(e,t,s,i){let n,r,a;if(gt(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(q(e))for(a=Object.keys(e),r=a.length,n=0;n<r;n++)t.call(s,e[a[n]],a[n])}function Wi(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 Hi(e){if(gt(e))return e.map(Hi);if(q(e)){const t=Object.create(null),s=Object.keys(e),i=s.length;let n=0;for(;n<i;++n)t[s[n]]=Hi(e[s[n]]);return t}return e}function oo(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function Qh(e,t,s,i){if(!oo(e))return;const n=t[e],r=s[e];q(n)&&q(r)?qs(n,r,i):t[e]=Hi(r)}function qs(e,t,s){const i=gt(t)?t:[t],n=i.length;if(!q(e))return e;s=s||{};const r=s.merger||Qh;for(let a=0;a<n;++a){if(t=i[a],!q(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 Xs(e,t){return qs(e,t,{merger:tu})}function tu(e,t,s){if(!oo(e))return;const i=t[e],n=s[e];q(i)&&q(n)?Xs(i,n):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Hi(n))}const lo={"":e=>e,x:e=>e.x,y:e=>e.y};function je(e,t){return(lo[t]||(lo[t]=eu(t)))(e)}function eu(e){const t=su(e);return s=>{for(const i of t){if(i==="")break;s=s&&s[i]}return s}}function su(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 gr(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Qt=e=>typeof e<"u",Ue=e=>typeof e=="function",co=(e,t)=>{if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0};function iu(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const vt=Math.PI,ut=2*vt,nu=ut+vt,Bi=Number.POSITIVE_INFINITY,ru=vt/180,Dt=vt/2,Ks=vt/4,ho=vt*2/3,te=Math.log10,be=Math.sign;function uo(e){const t=Math.round(e);e=Zs(e,t,e/1e3)?t:e;const s=Math.pow(10,Math.floor(te(e))),i=e/s;return(i<=1?1:i<=2?2:i<=5?5:10)*s}function au(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 Os(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Zs(e,t,s){return Math.abs(e-t)<s}function ou(e,t){const s=Math.round(e);return s-t<=e&&s+t>=e}function fo(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 le(e){return e*(vt/180)}function pr(e){return e*(180/vt)}function go(e){if(!Ot(e))return;let t=1,s=0;for(;Math.round(e*t)/t!==e;)t*=10,s++;return s}function po(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*vt&&(r+=ut),{angle:r,distance:n}}function mr(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function lu(e,t){return(e-t+nu)%ut-vt}function Ut(e){return(e%ut+ut)%ut}function Js(e,t,s,i){const n=Ut(e),r=Ut(t),a=Ut(s),o=Ut(r-n),l=Ut(a-n),c=Ut(n-r),h=Ut(n-a);return n===r||n===a||i&&r===a||o>l&&c<h}function It(e,t,s){return Math.max(t,Math.min(s,e))}function cu(e){return It(e,-32768,32767)}function Te(e,t,s,i=1e-6){return e>=Math.min(t,s)-i&&e<=Math.max(t,s)+i}function br(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 cs=(e,t,s,i)=>br(e,s,i?n=>e[n][t]<=s:n=>e[n][t]<s),hu=(e,t,s)=>br(e,s,i=>e[i][t]>=s);function uu(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 mo=["push","pop","shift","splice","unshift"];function du(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),mo.forEach(s=>{const i="_onData"+gr(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 bo(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)&&(mo.forEach(r=>{delete e[r]}),delete e._chartjs)}function _o(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 yo=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function vo(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,yo.call(window,()=>{n=!1,e.apply(t,r)}))}}function fu(e,t){let s;return function(...i){return t?(clearTimeout(s),s=setTimeout(e,t,i)):e.apply(this,i),t}}const _r=e=>e==="start"?"left":e==="end"?"right":"center",Nt=(e,t,s)=>e==="start"?t:e==="end"?s:(t+s)/2,gu=(e,t,s,i)=>e===(i?"left":"right")?s:e==="center"?(t+s)/2:t;function xo(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:d}=a.getUserBounds();u&&(n=It(Math.min(cs(o,a.axis,c).lo,s?i:cs(t,l,a.getPixelForValue(c)).lo),0,i-1)),d?r=It(Math.max(cs(o,a.axis,h,!0).hi+1,s?0:cs(t,l,a.getPixelForValue(h),!0).hi+1),n,i)-n:r=i-n}return{start:n,count:r}}function wo(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 ji=e=>e===0||e===1,So=(e,t,s)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*ut/s)),ko=(e,t,s)=>Math.pow(2,-10*e)*Math.sin((e-t)*ut/s)+1,Qs={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*Dt)+1,easeOutSine:e=>Math.sin(e*Dt),easeInOutSine:e=>-.5*(Math.cos(vt*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=>ji(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=>ji(e)?e:So(e,.075,.3),easeOutElastic:e=>ji(e)?e:ko(e,.075,.3),easeInOutElastic(e){return ji(e)?e:e<.5?.5*So(e*2,.1125,.45):.5+.5*ko(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-Qs.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?Qs.easeInBounce(e*2)*.5:Qs.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 ti(e){return e+.5|0}const Ge=(e,t,s)=>Math.max(Math.min(e,s),t);function ei(e){return Ge(ti(e*2.55),0,255)}function qe(e){return Ge(ti(e*255),0,255)}function Ae(e){return Ge(ti(e/2.55)/100,0,1)}function Mo(e){return Ge(ti(e*100),0,100)}const ee={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},yr=[..."0123456789ABCDEF"],pu=e=>yr[e&15],mu=e=>yr[(e&240)>>4]+yr[e&15],Ui=e=>(e&240)>>4===(e&15),bu=e=>Ui(e.r)&&Ui(e.g)&&Ui(e.b)&&Ui(e.a);function _u(e){var t=e.length,s;return e[0]==="#"&&(t===4||t===5?s={r:255&ee[e[1]]*17,g:255&ee[e[2]]*17,b:255&ee[e[3]]*17,a:t===5?ee[e[4]]*17:255}:(t===7||t===9)&&(s={r:ee[e[1]]<<4|ee[e[2]],g:ee[e[3]]<<4|ee[e[4]],b:ee[e[5]]<<4|ee[e[6]],a:t===9?ee[e[7]]<<4|ee[e[8]]:255})),s}const yu=(e,t)=>e<255?t(e):"";function vu(e){var t=bu(e)?pu:mu;return e?"#"+t(e.r)+t(e.g)+t(e.b)+yu(e.a,t):void 0}const xu=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Do(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 wu(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 Su(e,t,s){const i=Do(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 ku(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 vr(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=ku(s,i,n,h,r),l=l*60+.5),[l|0,c||0,o]}function xr(e,t,s,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,s,i)).map(qe)}function wr(e,t,s){return xr(Do,e,t,s)}function Mu(e,t,s){return xr(Su,e,t,s)}function Du(e,t,s){return xr(wu,e,t,s)}function Co(e){return(e%360+360)%360}function Cu(e){const t=xu.exec(e);let s=255,i;if(!t)return;t[5]!==i&&(s=t[6]?ei(+t[5]):qe(+t[5]));const n=Co(+t[2]),r=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?i=Mu(n,r,a):t[1]==="hsv"?i=Du(n,r,a):i=wr(n,r,a),{r:i[0],g:i[1],b:i[2],a:s}}function Ou(e,t){var s=vr(e);s[0]=Co(s[0]+t),s=wr(s),e.r=s[0],e.g=s[1],e.b=s[2]}function Pu(e){if(!e)return;const t=vr(e),s=t[0],i=Mo(t[1]),n=Mo(t[2]);return e.a<255?`hsla(${s}, ${i}%, ${n}%, ${Ae(e.a)})`:`hsl(${s}, ${i}%, ${n}%)`}const Oo={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"},Po={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 Tu(){const e={},t=Object.keys(Po),s=Object.keys(Oo);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,Oo[r]);r=parseInt(Po[a],16),e[o]=[r>>16&255,r>>8&255,r&255]}return e}let Gi;function Au(e){Gi||(Gi=Tu(),Gi.transparent=[0,0,0,0]);const t=Gi[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Ru=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Lu(e){const t=Ru.exec(e);let s=255,i,n,r;if(t){if(t[7]!==i){const a=+t[7];s=t[8]?ei(a):Ge(a*255,0,255)}return i=+t[1],n=+t[3],r=+t[5],i=255&(t[2]?ei(i):Ge(i,0,255)),n=255&(t[4]?ei(n):Ge(n,0,255)),r=255&(t[6]?ei(r):Ge(r,0,255)),{r:i,g:n,b:r,a:s}}}function Fu(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ae(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Sr=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Ps=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Eu(e,t,s){const i=Ps(Ae(e.r)),n=Ps(Ae(e.g)),r=Ps(Ae(e.b));return{r:qe(Sr(i+s*(Ps(Ae(t.r))-i))),g:qe(Sr(n+s*(Ps(Ae(t.g))-n))),b:qe(Sr(r+s*(Ps(Ae(t.b))-r))),a:e.a+s*(t.a-e.a)}}function qi(e,t,s){if(e){let i=vr(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*s,t===0?360:1)),i=wr(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function To(e,t){return e&&Object.assign(t||{},e)}function Ao(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=qe(e[3]))):(t=To(e,{r:0,g:0,b:0,a:1}),t.a=qe(t.a)),t}function Iu(e){return e.charAt(0)==="r"?Lu(e):Cu(e)}class Xi{constructor(t){if(t instanceof Xi)return t;const s=typeof t;let i;s==="object"?i=Ao(t):s==="string"&&(i=_u(t)||Au(t)||Iu(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=To(this._rgb);return t&&(t.a=Ae(t.a)),t}set rgb(t){this._rgb=Ao(t)}rgbString(){return this._valid?Fu(this._rgb):void 0}hexString(){return this._valid?vu(this._rgb):void 0}hslString(){return this._valid?Pu(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=Eu(this._rgb,t._rgb,s)),this}clone(){return new Xi(this.rgb)}alpha(t){return this._rgb.a=qe(t),this}clearer(t){const s=this._rgb;return s.a*=1-t,this}greyscale(){const t=this._rgb,s=ti(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 qi(this._rgb,2,t),this}darken(t){return qi(this._rgb,2,-t),this}saturate(t){return qi(this._rgb,1,t),this}desaturate(t){return qi(this._rgb,1,-t),this}rotate(t){return Ou(this._rgb,t),this}}function Ro(e){return new Xi(e)}function Lo(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Fo(e){return Lo(e)?e:Ro(e)}function kr(e){return Lo(e)?e:Ro(e).saturate(.5).darken(.1).hexString()}const hs=Object.create(null),Mr=Object.create(null);function si(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 Dr(e,t,s){return typeof t=="string"?qs(si(e,t),s):qs(si(e,""),t)}class Nu{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)=>kr(i.backgroundColor),this.hoverBorderColor=(s,i)=>kr(i.borderColor),this.hoverColor=(s,i)=>kr(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 Dr(this,t,s)}get(t){return si(this,t)}describe(t,s){return Dr(Mr,t,s)}override(t,s){return Dr(hs,t,s)}route(t,s,i,n){const r=si(this,t),a=si(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 q(l)?Object.assign({},c,l):B(l,c)},set(l){this[o]=l}}})}}var K=new Nu({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Yu(e){return!e||at(e.size)||at(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Ki(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 zu(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,d;for(l=0;l<o;l++)if(u=s[l],u!=null&>(u)!==!0)a=Ki(e,n,r,a,u);else if(gt(u))for(c=0,h=u.length;c<h;c++)d=u[c],d!=null&&!gt(d)&&(a=Ki(e,n,r,a,d));e.restore();const f=r.length/2;if(f>s.length){for(l=0;l<f;l++)delete n[r[l]];r.splice(0,f)}return a}function us(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 Eo(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function Cr(e,t,s,i){Io(e,t,s,i,null)}function Io(e,t,s,i,n){let r,a,o,l,c,h;const u=t.pointStyle,d=t.rotation,f=t.radius;let g=(d||0)*ru;if(u&&typeof u=="object"&&(r=u.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){e.save(),e.translate(s,i),e.rotate(g),e.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),e.restore();return}if(!(isNaN(f)||f<=0)){switch(e.beginPath(),u){default:n?e.ellipse(s,i,n/2,f,0,0,ut):e.arc(s,i,f,0,ut),e.closePath();break;case"triangle":e.moveTo(s+Math.sin(g)*f,i-Math.cos(g)*f),g+=ho,e.lineTo(s+Math.sin(g)*f,i-Math.cos(g)*f),g+=ho,e.lineTo(s+Math.sin(g)*f,i-Math.cos(g)*f),e.closePath();break;case"rectRounded":c=f*.516,l=f-c,a=Math.cos(g+Ks)*l,o=Math.sin(g+Ks)*l,e.arc(s-a,i-o,c,g-vt,g-Dt),e.arc(s+o,i-a,c,g-Dt,g),e.arc(s+a,i+o,c,g,g+Dt),e.arc(s-o,i+a,c,g+Dt,g+vt),e.closePath();break;case"rect":if(!d){l=Math.SQRT1_2*f,h=n?n/2:l,e.rect(s-h,i-l,2*h,2*l);break}g+=Ks;case"rectRot":a=Math.cos(g)*f,o=Math.sin(g)*f,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":g+=Ks;case"cross":a=Math.cos(g)*f,o=Math.sin(g)*f,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(g)*f,o=Math.sin(g)*f,e.moveTo(s-a,i-o),e.lineTo(s+a,i+o),e.moveTo(s+o,i-a),e.lineTo(s-o,i+a),g+=Ks,a=Math.cos(g)*f,o=Math.sin(g)*f,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(g)*f,o=Math.sin(g)*f,e.moveTo(s-a,i-o),e.lineTo(s+a,i+o);break;case"dash":e.moveTo(s,i),e.lineTo(s+Math.cos(g)*f,i+Math.sin(g)*f);break}e.fill(),t.borderWidth>0&&e.stroke()}}function ii(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 Zi(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Ji(e){e.restore()}function Vu(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 $u(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 ds(e,t,s,i,n,r={}){const a=gt(t)?t:[t],o=r.strokeWidth>0&&r.strokeColor!=="";let l,c;for(e.save(),e.font=n.string,Wu(e,r),l=0;l<a.length;++l)c=a[l],o&&(r.strokeColor&&(e.strokeStyle=r.strokeColor),at(r.strokeWidth)||(e.lineWidth=r.strokeWidth),e.strokeText(c,s,i,r.maxWidth)),e.fillText(c,s,i,r.maxWidth),Hu(e,s,i,c,r),i+=n.lineHeight;e.restore()}function Wu(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),at(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 Hu(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 ni(e,t){const{x:s,y:i,w:n,h:r,radius:a}=t;e.arc(s+a.topLeft,i+a.topLeft,a.topLeft,-Dt,vt,!0),e.lineTo(s,i+r-a.bottomLeft),e.arc(s+a.bottomLeft,i+r-a.bottomLeft,a.bottomLeft,vt,Dt,!0),e.lineTo(s+n-a.bottomRight,i+r),e.arc(s+n-a.bottomRight,i+r-a.bottomRight,a.bottomRight,Dt,0,!0),e.lineTo(s+n,i+a.topRight),e.arc(s+n-a.topRight,i+a.topRight,a.topRight,0,-Dt,!0),e.lineTo(s+a.topLeft,i)}const Bu=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),ju=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Uu(e,t){const s=(""+e).match(Bu);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 Gu=e=>+e||0;function Or(e,t){const s={},i=q(t),n=i?Object.keys(t):t,r=q(e)?i?a=>B(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of n)s[a]=Gu(r(a));return s}function No(e){return Or(e,{top:"y",right:"x",bottom:"y",left:"x"})}function fs(e){return Or(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Yt(e){const t=No(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Rt(e,t){e=e||{},t=t||K.font;let s=B(e.size,t.size);typeof s=="string"&&(s=parseInt(s,10));let i=B(e.style,t.style);i&&!(""+i).match(ju)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const n={family:B(e.family,t.family),lineHeight:Uu(B(e.lineHeight,t.lineHeight),s),size:s,style:i,weight:B(e.weight,t.weight),string:""};return n.string=Yu(n),n}function Qi(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&>(o)&&(o=o[s%o.length],n=!1),o!==void 0))return i&&!n&&(i.cacheable=!1),o}function qu(e,t,s){const{min:i,max:n}=e,r=ao(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 Xe(e,t){return Object.assign(Object.create(e),t)}function Pr(e,t=[""],s=e,i,n=()=>e[0]){Qt(i)||(i=Wo("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:i,_getTarget:n,override:a=>Pr([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 zo(a,o,()=>sd(o,t,e,a))},getOwnPropertyDescriptor(a,o){return Reflect.getOwnPropertyDescriptor(a._scopes[0],o)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,o){return Ho(a).includes(o)},ownKeys(a){return Ho(a)},set(a,o,l){const c=a._storage||(a._storage=n());return a[o]=c[o]=l,delete a._keys,!0}})}function Ts(e,t,s,i){const n={_cacheable:!1,_proxy:e,_context:t,_subProxy:s,_stack:new Set,_descriptors:Yo(e,i),setContext:r=>Ts(e,r,s,i),override:r=>Ts(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 zo(r,a,()=>Ku(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 Yo(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:Ue(s)?s:()=>s,isIndexable:Ue(i)?i:()=>i}}const Xu=(e,t)=>e?e+gr(t):t,Tr=(e,t)=>q(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function zo(e,t,s){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const i=s();return e[t]=i,i}function Ku(e,t,s){const{_proxy:i,_context:n,_subProxy:r,_descriptors:a}=e;let o=i[t];return Ue(o)&&a.isScriptable(t)&&(o=Zu(t,o,e,s)),gt(o)&&o.length&&(o=Ju(t,o,e,a.isIndexable)),Tr(t,o)&&(o=Ts(o,n,r&&r[t],a)),o}function Zu(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),Tr(e,t)&&(t=Ar(n._scopes,n,e,t)),t}function Ju(e,t,s,i){const{_proxy:n,_context:r,_subProxy:a,_descriptors:o}=s;if(Qt(r.index)&&i(e))t=t[r.index%t.length];else if(q(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const u=Ar(c,n,e,h);t.push(Ts(u,r,a&&a[e],o))}}return t}function Vo(e,t,s){return Ue(e)?e(t,s):e}const Qu=(e,t)=>e===!0?t:typeof e=="string"?je(t,e):void 0;function td(e,t,s,i,n){for(const r of t){const a=Qu(s,r);if(a){e.add(a);const o=Vo(a._fallback,s,n);if(Qt(o)&&o!==s&&o!==i)return o}else if(a===!1&&Qt(i)&&s!==i)return null}return!1}function Ar(e,t,s,i){const n=t._rootScopes,r=Vo(t._fallback,s,i),a=[...e,...n],o=new Set;o.add(i);let l=$o(o,a,s,r||s,i);return l===null||Qt(r)&&r!==s&&(l=$o(o,a,r,l,i),l===null)?!1:Pr(Array.from(o),[""],n,r,()=>ed(t,s,i))}function $o(e,t,s,i,n){for(;s;)s=td(e,t,s,i,n);return s}function ed(e,t,s){const i=e._getTarget();t in i||(i[t]={});const n=i[t];return gt(n)&&q(s)?s:n}function sd(e,t,s,i){let n;for(const r of t)if(n=Wo(Xu(r,e),s),Qt(n))return Tr(e,n)?Ar(s,i,e,n):n}function Wo(e,t){for(const s of t){if(!s)continue;const i=s[e];if(Qt(i))return i}}function Ho(e){let t=e._keys;return t||(t=e._keys=id(e._scopes)),t}function id(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 Bo(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(je(h,r),c)};return a}const nd=Number.EPSILON||1e-14,As=(e,t)=>t<e.length&&!e[t].skip&&e[t],jo=e=>e==="x"?"y":"x";function rd(e,t,s,i){const n=e.skip?t:e,r=t,a=s.skip?t:s,o=mr(r,n),l=mr(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,d=i*h;return{previous:{x:r.x-u*(a.x-n.x),y:r.y-u*(a.y-n.y)},next:{x:r.x+d*(a.x-n.x),y:r.y+d*(a.y-n.y)}}}function ad(e,t,s){const i=e.length;let n,r,a,o,l,c=As(e,0);for(let h=0;h<i-1;++h)if(l=c,c=As(e,h+1),!(!l||!c)){if(Zs(t[h],0,nd)){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 od(e,t,s="x"){const i=jo(s),n=e.length;let r,a,o,l=As(e,0);for(let c=0;c<n;++c){if(a=o,o=l,l=As(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 ld(e,t="x"){const s=jo(t),i=e.length,n=Array(i).fill(0),r=Array(i);let a,o,l,c=As(e,0);for(a=0;a<i;++a)if(o=l,l=c,c=As(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?be(n[a-1])!==be(n[a])?0:(n[a-1]+n[a])/2:n[a-1]:n[a]}ad(e,n,r),od(e,r,t)}function tn(e,t,s){return Math.max(Math.min(e,s),t)}function cd(e,t){let s,i,n,r,a,o=ii(e[0],t);for(s=0,i=e.length;s<i;++s)a=r,r=o,o=s<i-1&&ii(e[s+1],t),r&&(n=e[s],a&&(n.cp1x=tn(n.cp1x,t.left,t.right),n.cp1y=tn(n.cp1y,t.top,t.bottom)),o&&(n.cp2x=tn(n.cp2x,t.left,t.right),n.cp2y=tn(n.cp2y,t.top,t.bottom)))}function hd(e,t,s,i,n){let r,a,o,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")ld(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=rd(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&&cd(e,s)}function Uo(){return typeof window<"u"&&typeof document<"u"}function Rr(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function en(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 sn=e=>window.getComputedStyle(e,null);function ud(e,t){return sn(e).getPropertyValue(t)}const dd=["top","right","bottom","left"];function gs(e,t,s){const i={};s=s?"-"+s:"";for(let n=0;n<4;n++){const r=dd[n];i[r]=parseFloat(e[t+"-"+r+s])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const fd=(e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot);function gd(e,t){const s=e.touches,i=s&&s.length?s[0]:e,{offsetX:n,offsetY:r}=i;let a=!1,o,l;if(fd(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 ps(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:i}=t,n=sn(s),r=n.boxSizing==="border-box",a=gs(n,"padding"),o=gs(n,"border","width"),{x:l,y:c,box:h}=gd(e,s),u=a.left+(h&&o.left),d=a.top+(h&&o.top);let{width:f,height:g}=t;return r&&(f-=a.width+o.width,g-=a.height+o.height),{x:Math.round((l-u)/f*s.width/i),y:Math.round((c-d)/g*s.height/i)}}function pd(e,t,s){let i,n;if(t===void 0||s===void 0){const r=Rr(e);if(!r)t=e.clientWidth,s=e.clientHeight;else{const a=r.getBoundingClientRect(),o=sn(r),l=gs(o,"border","width"),c=gs(o,"padding");t=a.width-c.width-l.width,s=a.height-c.height-l.height,i=en(o.maxWidth,r,"clientWidth"),n=en(o.maxHeight,r,"clientHeight")}}return{width:t,height:s,maxWidth:i||Bi,maxHeight:n||Bi}}const Lr=e=>Math.round(e*10)/10;function md(e,t,s,i){const n=sn(e),r=gs(n,"margin"),a=en(n.maxWidth,e,"clientWidth")||Bi,o=en(n.maxHeight,e,"clientHeight")||Bi,l=pd(e,t,s);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=gs(n,"border","width"),d=gs(n,"padding");c-=d.width+u.width,h-=d.height+u.height}return c=Math.max(0,c-r.width),h=Math.max(0,i?Math.floor(c/i):h-r.height),c=Lr(Math.min(c,a,l.maxWidth)),h=Lr(Math.min(h,o,l.maxHeight)),c&&!h&&(h=Lr(c/2)),{width:c,height:h}}function Go(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 bd=(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 qo(e,t){const s=ud(e,t),i=s&&s.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function ms(e,t,s,i){return{x:e.x+s*(t.x-e.x),y:e.y+s*(t.y-e.y)}}function _d(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 yd(e,t,s,i){const n={x:e.cp2x,y:e.cp2y},r={x:t.cp1x,y:t.cp1y},a=ms(e,n,s),o=ms(n,r,s),l=ms(r,t,s),c=ms(a,o,s),h=ms(o,l,s);return ms(c,h,s)}const Xo=new Map;function vd(e,t){t=t||{};const s=e+JSON.stringify(t);let i=Xo.get(s);return i||(i=new Intl.NumberFormat(e,t),Xo.set(s,i)),i}function ri(e,t,s){return vd(t,s).format(e)}const xd=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}}},wd=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Rs(e,t,s){return e?xd(t,s):wd()}function Ko(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 Zo(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Jo(e){return e==="angle"?{between:Js,compare:lu,normalize:Ut}:{between:Te,compare:(t,s)=>t-s,normalize:t=>t}}function Qo({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 Sd(e,t,s){const{property:i,start:n,end:r}=s,{between:a,normalize:o}=Jo(i),l=t.length;let{start:c,end:h,loop:u}=e,d,f;if(u){for(c+=l,h+=l,d=0,f=l;d<f&&a(o(t[c%l][i]),n,r);++d)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:u,style:e.style}}function tl(e,t,s){if(!s)return[e];const{property:i,start:n,end:r}=s,a=t.length,{compare:o,between:l,normalize:c}=Jo(i),{start:h,end:u,loop:d,style:f}=Sd(e,t,s),g=[];let b=!1,v=null,w,k,C;const D=()=>l(n,C,w)&&o(n,C)!==0,M=()=>o(r,w)===0||l(r,C,w),L=()=>b||D(),F=()=>!b||M();for(let Y=h,z=h;Y<=u;++Y)k=t[Y%a],!k.skip&&(w=c(k[i]),w!==C&&(b=l(w,n,r),v===null&&L()&&(v=o(w,n)===0?Y:z),v!==null&&F()&&(g.push(Qo({start:v,end:Y,loop:d,count:a,style:f})),v=null),z=Y,C=w));return v!==null&&g.push(Qo({start:v,end:u,loop:d,count:a,style:f})),g}function el(e,t){const s=[],i=e.segments;for(let n=0;n<i.length;n++){const r=tl(i[n],e.points,t);r.length&&s.push(...r)}return s}function kd(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 Md(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 Dd(e,t){const s=e.points,i=e.options.spanGaps,n=s.length;if(!n)return[];const r=!!e._loop,{start:a,end:o}=kd(s,n,r,i);if(i===!0)return sl(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 sl(e,Md(s,a,l,c),s,t)}function sl(e,t,s,i){return!i||!i.setContext||!s?t:Cd(e,t,s,i)}function Cd(e,t,s,i){const n=e._chart.getContext(),r=il(e.options),{_datasetIndex:a,options:{spanGaps:o}}=e,l=s.length,c=[];let h=r,u=t[0].start,d=u;function f(g,b,v,w){const k=o?-1:1;if(g!==b){for(g+=l;s[g%l].skip;)g-=k;for(;s[b%l].skip;)b+=k;g%l!==b%l&&(c.push({start:g%l,end:b%l,loop:v,style:w}),h=w,u=b%l)}}for(const g of t){u=o?u:g.start;let b=s[u%l],v;for(d=u+1;d<=g.end;d++){const w=s[d%l];v=il(i.setContext(Xe(n,{type:"segment",p0:b,p1:w,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:a}))),Od(v,h)&&f(u,d-1,g.loop,h),b=w,h=v}u<d-1&&f(u,d-1,g.loop,h)}return c}function il(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Od(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 Pd{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=yo.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 Re=new Pd;const nl="transparent",Td={boolean(e,t,s){return s>.5?t:e},color(e,t,s){const i=Fo(e||nl),n=i.valid&&Fo(t||nl);return n&&n.valid?n.mix(i,s).hexString():t},number(e,t,s){return e+(t-e)*s}};class Ad{constructor(t,s,i,n){const r=s[i];n=Qi([t.to,n,r,t.from]);const a=Qi([t.from,r,n]);this._active=!0,this._fn=t.fn||Td[t.type||typeof a],this._easing=Qs[t.easing]||Qs.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=Qi([t.to,s,n,t.from]),this._from=Qi([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 Rd=["x","y","borderWidth","radius","tension"],Ld=["color","borderColor","backgroundColor"];K.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 Fd=Object.keys(K.animation);K.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),K.set("animations",{colors:{type:"color",properties:Ld},numbers:{type:"number",properties:Rd}}),K.describe("animations",{_fallback:"animation"}),K.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 rl{constructor(t,s){this._chart=t,this._properties=new Map,this.configure(s)}configure(t){if(!q(t))return;const s=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!q(n))return;const r={};for(const a of Fd)r[a]=n[a];(gt(n.properties)&&n.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,s){const i=s.options,n=Id(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&Ed(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 d=i.get(c);if(u)if(d&&u.active()){u.update(d,h,o);continue}else u.cancel();if(!d||!d.duration){t[c]=h;continue}r[c]=u=new Ad(d,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 Re.add(this._chart,i),!0}}function Ed(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 Id(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 al(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 Nd(e,t,s){if(s===!1)return!1;const i=al(e,s),n=al(t,s);return{top:n.end,right:i.end,bottom:n.start,left:i.start}}function Yd(e){let t,s,i,n;return q(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 ol(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 ll(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],Ot(c)&&(r||t===0||be(t)===be(c))&&(t+=c)}return t}}function zd(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 cl(e,t){const s=e&&e.options.stacked;return s||s===void 0&&t.stack!==void 0}function Vd(e,t,s){return`${e.id}.${t.id}.${s.stack||s.type}`}function $d(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 Wd(e,t,s){const i=e[t]||(e[t]={});return i[s]||(i[s]={})}function hl(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 ul(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=Vd(r,a,i),u=t.length;let d;for(let f=0;f<u;++f){const g=t[f],{[l]:b,[c]:v}=g,w=g._stacks||(g._stacks={});d=w[c]=Wd(n,h,b),d[o]=v,d._top=hl(d,a,!0,i.type),d._bottom=hl(d,a,!1,i.type)}}function Fr(e,t){const s=e.scales;return Object.keys(s).filter(i=>s[i].axis===t).shift()}function Hd(e,t){return Xe(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Bd(e,t,s){return Xe(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:s,index:t,mode:"default",type:"data"})}function ai(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 Er=e=>e==="reset"||e==="none",dl=(e,t)=>t?e:Object.assign({},e),jd=(e,t,s)=>e&&!t.hidden&&t._stacked&&{keys:ol(s,!0),values:null};class ce{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=cl(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ai(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,s=this._cachedMeta,i=this.getDataset(),n=(u,d,f,g)=>u==="x"?d:u==="r"?g:f,r=s.xAxisID=B(i.xAxisID,Fr(t,"x")),a=s.yAxisID=B(i.yAxisID,Fr(t,"y")),o=s.rAxisID=B(i.rAxisID,Fr(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&&bo(this._data,this),t._stacked&&ai(t)}_dataCheck(){const t=this.getDataset(),s=t.data||(t.data=[]),i=this._data;if(q(s))this._data=zd(s);else if(i!==s){if(i){bo(i,this);const n=this._cachedMeta;ai(n),n._parsed=[]}s&&Object.isExtensible(s)&&du(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=cl(s.vScale,s),s.stack!==i.stack&&(n=!0,ai(s),s.stack=i.stack),this._resyncElements(t),(n||r!==s._stacked)&&ul(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,d;if(this._parsing===!1)i._parsed=n,i._sorted=!0,d=n;else{gt(n[t])?d=this.parseArrayData(i,n,t,s):q(n[t])?d=this.parseObjectData(i,n,t,s):d=this.parsePrimitiveData(i,n,t,s);const f=()=>u[o]===null||c&&u[o]<c[o];for(h=0;h<s;++h)i._parsed[h+t]=u=d[h],l&&(f()&&(l=!1),c=u);i._sorted=l}a&&ul(this,d)}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 d,f,g;for(d=0,f=n;d<f;++d)g=d+i,u[d]={[o]:h||r.parse(c[g],g),[l]:a.parse(s[g],g)};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,d,f;for(h=0,u=n;h<u;++h)d=h+i,f=s[d],c[h]={x:r.parse(je(f,o),d),y:a.parse(je(f,l),d)};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:ol(n,!0),values:s._stacks[t.axis]};return ll(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=ll(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}=$d(o);let d,f;function g(){f=n[d];const b=f[o.axis];return!Ot(f[t.axis])||h>b||u<b}for(d=0;d<a&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),r));++d);if(r){for(d=a-1;d>=0;--d)if(!g()){this.updateRangeFromParsed(c,t,f,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],Ot(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=Yd(B(this.options.clip,Nd(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=Bd(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=Hd(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&&Qt(i);if(o)return dl(o,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),u=n?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(this.getDataset(),h),f=Object.keys(K.elements[t]),g=()=>this.getContext(i,n),b=c.resolveNamedOptions(d,f,g,u);return b.$shared&&(b.$shared=l,r[a]=Object.freeze(dl(b,l))),b}_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),d=h.getOptionScopes(this.getDataset(),u);l=h.createResolver(d,this.getContext(t,i,s))}const c=new rl(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||Er(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){Er(n)?Object.assign(t,i):this._resolveAnimations(s,n).update(t,i)}updateSharedOptions(t,s,i){t&&!Er(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&&ai(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])}}ce.defaults={},ce.prototype.datasetElementType=null,ce.prototype.dataElementType=null;function Ud(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=_o(i.sort((n,r)=>n-r))}return e._cache.$bar}function Gd(e){const t=e.iScale,s=Ud(t,e.type);let i=t._length,n,r,a,o;const l=()=>{a===32767||a===-32768||(Qt(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 qd(e,t,s,i){const n=s.barThickness;let r,a;return at(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 Xd(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 Kd(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 fl(e,t,s,i){return gt(e)?Kd(e,t,s,i):t[s.axis]=s.parse(e,i),t}function gl(e,t,s,i){const n=e.iScale,r=e.vScale,a=n.getLabels(),o=n===r,l=[];let c,h,u,d;for(c=s,h=s+i;c<h;++c)d=t[c],u={},u[n.axis]=o||n.parse(a[c],c),l.push(fl(d,u,r,c));return l}function Ir(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Zd(e,t,s){return e!==0?be(e):(t.isHorizontal()?1:-1)*(t.min>=s?1:-1)}function Jd(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 Qd(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}=Jd(e);n==="middle"&&s&&(e.enableBorderRadius=!0,(s._top||0)===i?n=c:(s._bottom||0)===i?n=h:(r[pl(h,a,o,l)]=!0,n=c)),r[pl(n,a,o,l)]=!0,e.borderSkipped=r}function pl(e,t,s,i){return i?(e=tf(e,t,s),e=ml(e,s,t)):e=ml(e,t,s),e}function tf(e,t,s){return e===t?s:e===s?t:e}function ml(e,t,s){return e==="start"?t:e==="end"?s:e}function ef(e,{inflateAmount:t},s){e.inflateAmount=t==="auto"?s===1?.33:0:t}class nn extends ce{parsePrimitiveData(t,s,i,n){return gl(t,s,i,n)}parseArrayData(t,s,i,n){return gl(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 d,f,g,b;for(d=i,f=i+n;d<f;++d)b=s[d],g={},g[r.axis]=r.parse(je(b,c),d),u.push(fl(je(b,h),g,a,d));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=Ir(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:d}=this._getSharedOptions(s,n);for(let f=s;f<s+i;f++){const g=this.getParsed(f),b=r||at(g[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),v=this._calculateBarIndexPixels(f,h),w=(g._stacks||{})[o.axis],k={horizontal:c,base:b.base,enableBorderRadius:!w||Ir(g._custom)||a===w._top||a===w._bottom,x:c?b.head:v.center,y:c?v.center:b.head,height:c?v.size:Math.abs(b.size),width:c?Math.abs(b.size):v.size};d&&(k.options=u||this.resolveDataElementOptions(f,t[f].active?"active":n));const C=k.options||t[f].options;Qd(k,C,w,a),ef(k,C,h.ratio),this.updateElement(t[f],f,k,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(at(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||Gd(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=Ir(l);let h=o[s.axis],u=0,d=i?this.applyStack(s,o,i):h,f,g;d!==h&&(u=d-h,d=h),c&&(h=l.barStart,d=l.barEnd-l.barStart,h!==0&&be(h)!==be(l.barEnd)&&(u=0),u+=h);const b=!at(n)&&!c?n:u;let v=s.getPixelForValue(b);if(this.chart.getDataVisibility(t)?f=s.getPixelForValue(u+d):f=v,g=f-v,Math.abs(g)<r){g=Zd(g,s,a)*r,h===a&&(v-=g/2);const w=s.getPixelForDecimal(0),k=s.getPixelForDecimal(1),C=Math.min(w,k),D=Math.max(w,k);v=Math.max(Math.min(v,D),C),f=v+g}if(v===s.getPixelForValue(a)){const w=be(g)*s.getLineWidthForValue(a)/2;v+=w,g-=w}return{size:g,base:v,head:f,center:f+g/2}}_calculateBarIndexPixels(t,s){const i=s.scale,n=this.options,r=n.skipNull,a=B(n.maxBarThickness,1/0);let o,l;if(s.grouped){const c=r?this._getStackCount(t):s.stackCount,h=n.barThickness==="flex"?Xd(t,s,n,c):qd(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)}}nn.id="bar",nn.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},nn.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Nr extends ce{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=B(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=B(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 d=s;d<s+i;d++){const f=t[d],g=!r&&this.getParsed(d),b={},v=b[h]=r?a.getPixelForDecimal(.5):a.getPixelForValue(g[h]),w=b[u]=r?o.getBasePixel():o.getPixelForValue(g[u]);b.skip=isNaN(v)||isNaN(w),c&&(b.options=l||this.resolveDataElementOptions(d,f.active?"active":n),r&&(b.options.radius=0)),this.updateElement(f,d,b,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+=B(i&&i._custom,r),n}}Nr.id="bubble",Nr.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Nr.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function sf(e,t,s){let i=1,n=1,r=0,a=0;if(t<ut){const o=e,l=o+t,c=Math.cos(o),h=Math.sin(o),u=Math.cos(l),d=Math.sin(l),f=(C,D,M)=>Js(C,o,l,!0)?1:Math.max(D,D*s,M,M*s),g=(C,D,M)=>Js(C,o,l,!0)?-1:Math.min(D,D*s,M,M*s),b=f(0,c,u),v=f(Dt,h,d),w=g(vt,c,u),k=g(vt+Dt,h,d);i=(b-w)/2,n=(v-k)/2,r=-(b+w)/2,a=-(v+k)/2}return{ratioX:i,ratioY:n,offsetX:r,offsetY:a}}class oi extends ce{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(q(i[t])){const{key:l="value"}=this._parsing;r=c=>+je(i[c],l)}let a,o;for(a=t,o=t+s;a<o;++a)n._parsed[a]=r(a)}}_getRotation(){return le(this.options.rotation-90)}_getCircumference(){return le(this.options.circumference)}_getRotationExtents(){let t=ut,s=-ut;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(Jh(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:h,rotation:u}=this._getRotationExtents(),{ratioX:d,ratioY:f,offsetX:g,offsetY:b}=sf(u,h,l),v=(i.width-a)/d,w=(i.height-a)/f,k=Math.max(Math.min(v,w)/2,0),C=ao(this.options.radius,k),D=Math.max(C*l,0),M=(C-D)/this._getVisibleDatasetWeightTotal();this.offsetX=g*C,this.offsetY=b*C,n.total=this.calculateTotal(),this.outerRadius=C-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*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/ut)}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,d=r&&c.animateScale,f=d?0:this.innerRadius,g=d?0:this.outerRadius,{sharedOptions:b,includeOptions:v}=this._getSharedOptions(s,n);let w=this._getRotation(),k;for(k=0;k<s;++k)w+=this._circumference(k,r);for(k=s;k<s+i;++k){const C=this._circumference(k,r),D=t[k],M={x:h+this.offsetX,y:u+this.offsetY,startAngle:w,endAngle:w+C,circumference:C,outerRadius:g,innerRadius:f};v&&(M.options=b||this.resolveDataElementOptions(k,D.active?"active":n)),w+=C,this.updateElement(D,k,M,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)?ut*(Math.abs(t)/s):0}getLabelAndValue(t){const s=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=ri(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(B(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}oi.id="doughnut",oi.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"},oi.descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"},oi.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 gt(t)?(t=t.slice(),t[0]+=s):t+=s,t}}}}};class rn extends ce{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}=xo(s,n,a);this._drawStart=o,this._drawCount=l,wo(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),d=a.axis,f=o.axis,{spanGaps:g,segment:b}=this.options,v=Os(g)?g:Number.POSITIVE_INFINITY,w=this.chart._animationsDisabled||r||n==="none";let k=s>0&&this.getParsed(s-1);for(let C=s;C<s+i;++C){const D=t[C],M=this.getParsed(C),L=w?D:{},F=at(M[f]),Y=L[d]=a.getPixelForValue(M[d],C),z=L[f]=r||F?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,M,l):M[f],C);L.skip=isNaN(Y)||isNaN(z)||F,L.stop=C>0&&Math.abs(M[d]-k[d])>v,b&&(L.parsed=M,L.raw=c.data[C]),u&&(L.options=h||this.resolveDataElementOptions(C,D.active?"active":n)),w||this.updateElement(D,C,L,n),k=M}}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()}}rn.id="line",rn.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},rn.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Yr extends ce{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=ri(s._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}parseObjectData(t,s,i,n){return Bo.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,d=c.getIndexAngle(0)-.5*vt;let f=d,g;const b=360/this.countVisibleElements();for(g=0;g<s;++g)f+=this._computeAngle(g,n,b);for(g=s;g<s+i;g++){const v=t[g];let w=f,k=f+this._computeAngle(g,n,b),C=a.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=k,r&&(l.animateScale&&(C=0),l.animateRotate&&(w=k=d));const D={x:h,y:u,innerRadius:0,outerRadius:C,startAngle:w,endAngle:k,options:this.resolveDataElementOptions(g,v.active?"active":n)};this.updateElement(v,g,D,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)?le(this.resolveDataElementOptions(t,s).angle||i):0}}Yr.id="polarArea",Yr.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Yr.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 zr extends oi{}zr.id="pie",zr.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Vr extends ce{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 Bo.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,d=a?r.yCenter:h.y,f={x:u,y:d,angle:h.angle,skip:isNaN(u)||isNaN(d),options:c};this.updateElement(l,o,f,n)}}}Vr.id="radar",Vr.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Vr.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class he{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 Os(this.x)&&Os(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}}he.defaults={},he.defaultRoutes=void 0;const bl={values(e){return gt(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=nf(e,s)}const a=te(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),ri(e,i,l)},logarithmic(e,t,s){if(e===0)return"0";const i=e/Math.pow(10,Math.floor(te(e)));return i===1||i===2||i===5?bl.numeric.call(this,e,t,s):""}};function nf(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 an={formatters:bl};K.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:an.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),K.route("scale.ticks","color","","color"),K.route("scale.grid","color","","borderColor"),K.route("scale.grid","borderColor","","borderColor"),K.route("scale.title","color","","color"),K.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"}),K.describe("scales",{_fallback:"scale"}),K.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"});function rf(e,t){const s=e.options.ticks,i=s.maxTicksLimit||af(e),n=s.major.enabled?lf(t):[],r=n.length,a=n[0],o=n[r-1],l=[];if(r>i)return cf(t,l,n,r/i),l;const c=of(n,t,i);if(r>0){let h,u;const d=r>1?Math.round((o-a)/(r-1)):null;for(on(t,l,c,at(d)?0:a-d,a),h=0,u=r-1;h<u;h++)on(t,l,c,n[h],n[h+1]);return on(t,l,c,o,at(d)?t.length:o+d),l}return on(t,l,c),l}function af(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 of(e,t,s){const i=hf(e),n=t.length/s;if(!i)return Math.max(n,1);const r=au(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 lf(e){const t=[];let s,i;for(s=0,i=e.length;s<i;s++)e[s].major&&t.push(s);return t}function cf(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 on(e,t,s,i,n){const r=B(i,0),a=Math.min(B(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 hf(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 uf=e=>e==="left"?"right":e==="right"?"left":e,_l=(e,t,s)=>t==="top"||t==="left"?e[t]+s:e[t]-s;function yl(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 df(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 ff(e,t){lt(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 li(e){return e.drawTicks?e.tickLength:0}function vl(e,t){if(!e.display)return 0;const s=Rt(e.font,t),i=Yt(e.padding);return(gt(e.text)?e.text.length:1)*s.lineHeight+i.height}function gf(e,t){return Xe(e,{scale:t,type:"scale"})}function pf(e,t,s){return Xe(e,{tick:s,index:t,type:"tick"})}function mf(e,t,s){let i=_r(e);return(s&&t!=="right"||!s&&t==="right")&&(i=uf(i)),i}function bf(e,t,s,i){const{top:n,left:r,bottom:a,right:o,chart:l}=e,{chartArea:c,scales:h}=l;let u=0,d,f,g;const b=a-n,v=o-r;if(e.isHorizontal()){if(f=Nt(i,r,o),q(s)){const w=Object.keys(s)[0],k=s[w];g=h[w].getPixelForValue(k)+b-t}else s==="center"?g=(c.bottom+c.top)/2+b-t:g=_l(e,s,t);d=o-r}else{if(q(s)){const w=Object.keys(s)[0],k=s[w];f=h[w].getPixelForValue(k)-v+t}else s==="center"?f=(c.left+c.right)/2-v+t:f=_l(e,s,t);g=Nt(i,a,n),u=s==="left"?-Dt:Dt}return{titleX:f,titleY:g,maxWidth:d,rotation:u}}class bs extends he{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=Jt(t,Number.POSITIVE_INFINITY),s=Jt(s,Number.NEGATIVE_INFINITY),i=Jt(i,Number.POSITIVE_INFINITY),n=Jt(n,Number.NEGATIVE_INFINITY),{min:Jt(t,i),max:Jt(s,n),minDefined:Ot(t),maxDefined:Ot(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:Jt(s,Jt(i,s)),max:Jt(i,Jt(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(){pt(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=qu(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?yl(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=rf(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(){pt(this.options.afterUpdate,[this])}beforeSetDimensions(){pt(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(){pt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),pt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){pt(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=pt(s.callback,[r.value,i,t],this)}afterTickToLabelConversion(){pt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){pt(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,d=h.highest.height,f=It(this.chart.width-u,0,this.maxWidth);o=t.offset?this.maxWidth/i:f/(i-1),u+6>o&&(o=f/(i-(t.offset?.5:1)),l=this.maxHeight-li(t.grid)-s.padding-vl(t.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),a=pr(Math.min(Math.asin(It((h.highest.height+6)/o,-1,1)),Math.asin(It(l/c,-1,1))-Math.asin(It(d/c,-1,1)))),a=Math.max(n,Math.min(r,a))),this.labelRotation=a}afterCalculateLabelRotation(){pt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){pt(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=vl(n,s.options.font);if(o?(t.width=this.maxWidth,t.height=li(r)+l):(t.height=this.maxHeight,t.width=li(r)+l),i.display&&this.ticks.length){const{first:c,last:h,widest:u,highest:d}=this._getLabelSizes(),f=i.padding*2,g=le(this.labelRotation),b=Math.cos(g),v=Math.sin(g);if(o){const w=i.mirror?0:v*u.width+b*d.height;t.height=Math.min(this.maxHeight,t.height+w+f)}else{const w=i.mirror?0:b*u.width+v*d.height;t.width=Math.min(this.maxWidth,t.width+w+f)}this._calculatePadding(c,h,v,b)}}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 d=0,f=0;l?c?(d=n*t.width,f=i*s.height):(d=i*t.height,f=n*s.width):r==="start"?f=s.width:r==="end"?d=t.width:r!=="inner"&&(d=t.width/2,f=s.width/2),this.paddingLeft=Math.max((d-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-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(){pt(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++)at(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=yl(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,d,f,g,b,v,w,k,C;for(c=0;c<s;++c){if(d=t[c].label,f=this._resolveTickFontOptions(c),i.font=g=f.string,b=n[g]=n[g]||{data:{},gc:[]},v=f.lineHeight,w=k=0,!at(d)&&!gt(d))w=Ki(i,b.data,b.gc,w,d),k=v;else if(gt(d))for(h=0,u=d.length;h<u;++h)C=d[h],!at(C)&&!gt(C)&&(w=Ki(i,b.data,b.gc,w,C),k+=v);r.push(w),a.push(k),o=Math.max(w,o),l=Math.max(k,l)}ff(n,s);const D=r.indexOf(o),M=a.indexOf(l),L=F=>({width:r[F]||0,height:a[F]||0});return{first:L(0),last:L(s-1),widest:L(D),highest:L(M),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 cu(this._alignToPixels?us(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=pf(this.getContext(),t,i))}return this.$context||(this.$context=gf(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,s=le(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=li(r),d=[],f=r.setContext(this.getContext()),g=f.drawBorder?f.borderWidth:0,b=g/2,v=function(H){return us(i,H,g)};let w,k,C,D,M,L,F,Y,z,G,Z,U;if(a==="top")w=v(this.bottom),L=this.bottom-u,Y=w-b,G=v(t.top)+b,U=t.bottom;else if(a==="bottom")w=v(this.top),G=t.top,U=v(t.bottom)-b,L=w+b,Y=this.top+u;else if(a==="left")w=v(this.right),M=this.right-u,F=w-b,z=v(t.left)+b,Z=t.right;else if(a==="right")w=v(this.left),z=t.left,Z=v(t.right)-b,M=w+b,F=this.left+u;else if(s==="x"){if(a==="center")w=v((t.top+t.bottom)/2+.5);else if(q(a)){const H=Object.keys(a)[0],St=a[H];w=v(this.chart.scales[H].getPixelForValue(St))}G=t.top,U=t.bottom,L=w+b,Y=L+u}else if(s==="y"){if(a==="center")w=v((t.left+t.right)/2);else if(q(a)){const H=Object.keys(a)[0],St=a[H];w=v(this.chart.scales[H].getPixelForValue(St))}M=w-b,F=M-u,z=t.left,Z=t.right}const wt=B(n.ticks.maxTicksLimit,h),Tt=Math.max(1,Math.ceil(h/wt));for(k=0;k<h;k+=Tt){const H=r.setContext(this.getContext(k)),St=H.lineWidth,_t=H.color,qt=H.borderDash||[],ns=H.borderDashOffset,ke=H.tickWidth,rs=H.tickColor,me=H.tickBorderDash||[],et=H.tickBorderDashOffset;C=df(this,k,o),C!==void 0&&(D=us(i,C,St),l?M=F=z=Z=D:L=Y=G=U=D,d.push({tx1:M,ty1:L,tx2:F,ty2:Y,x1:z,y1:G,x2:Z,y2:U,width:St,color:_t,borderDash:qt,borderDashOffset:ns,tickWidth:ke,tickColor:rs,tickBorderDash:me,tickBorderDashOffset:et}))}return this._ticksLength=h,this._borderValue=w,d}_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,d=li(i.grid),f=d+h,g=u?-h:f,b=-le(this.labelRotation),v=[];let w,k,C,D,M,L,F,Y,z,G,Z,U,wt="middle";if(n==="top")L=this.bottom-g,F=this._getXAxisLabelAlignment();else if(n==="bottom")L=this.top+g,F=this._getXAxisLabelAlignment();else if(n==="left"){const H=this._getYAxisLabelAlignment(d);F=H.textAlign,M=H.x}else if(n==="right"){const H=this._getYAxisLabelAlignment(d);F=H.textAlign,M=H.x}else if(s==="x"){if(n==="center")L=(t.top+t.bottom)/2+f;else if(q(n)){const H=Object.keys(n)[0],St=n[H];L=this.chart.scales[H].getPixelForValue(St)+f}F=this._getXAxisLabelAlignment()}else if(s==="y"){if(n==="center")M=(t.left+t.right)/2-f;else if(q(n)){const H=Object.keys(n)[0],St=n[H];M=this.chart.scales[H].getPixelForValue(St)}F=this._getYAxisLabelAlignment(d).textAlign}s==="y"&&(l==="start"?wt="top":l==="end"&&(wt="bottom"));const Tt=this._getLabelSizes();for(w=0,k=o.length;w<k;++w){C=o[w],D=C.label;const H=r.setContext(this.getContext(w));Y=this.getPixelForTick(w)+r.labelOffset,z=this._resolveTickFontOptions(w),G=z.lineHeight,Z=gt(D)?D.length:1;const St=Z/2,_t=H.color,qt=H.textStrokeColor,ns=H.textStrokeWidth;let ke=F;a?(M=Y,F==="inner"&&(w===k-1?ke=this.options.reverse?"left":"right":w===0?ke=this.options.reverse?"right":"left":ke="center"),n==="top"?c==="near"||b!==0?U=-Z*G+G/2:c==="center"?U=-Tt.highest.height/2-St*G+G:U=-Tt.highest.height+G/2:c==="near"||b!==0?U=G/2:c==="center"?U=Tt.highest.height/2-St*G:U=Tt.highest.height-Z*G,u&&(U*=-1)):(L=Y,U=(1-Z)*G/2);let rs;if(H.showLabelBackdrop){const me=Yt(H.backdropPadding),et=Tt.heights[w],as=Tt.widths[w];let He=L+U-me.top,Xt=M-me.left;switch(wt){case"middle":He-=et/2;break;case"bottom":He-=et;break}switch(F){case"center":Xt-=as/2;break;case"right":Xt-=as;break}rs={left:Xt,top:He,width:as+me.width,height:et+me.height,color:H.backdropColor}}v.push({rotation:b,label:D,font:z,color:_t,strokeColor:qt,strokeWidth:ns,textOffset:U,textAlign:ke,textBaseline:wt,translation:[M,L],backdrop:rs})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:s}=this.options;if(-le(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=us(t,this.left,r)-r/2,c=us(t,this.right,a)+a/2,h=u=o):(h=us(t,this.top,r)-r/2,u=us(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&&Zi(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;ds(i,h,0,u,c,l)}n&&Ji(i)}drawTitle(){const{ctx:t,options:{position:s,title:i,reverse:n}}=this;if(!i.display)return;const r=Rt(i.font),a=Yt(i.padding),o=i.align;let l=r.lineHeight/2;s==="bottom"||s==="center"||q(s)?(l+=a.bottom,gt(i.text)&&(l+=r.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:u,rotation:d}=bf(this,l,s,o);ds(t,i.text,0,0,r,{color:i.color,maxWidth:u,rotation:d,textAlign:mf(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=B(t.grid&&t.grid.z,-1);return!this._isVisible()||this.draw!==bs.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 Rt(s.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ln{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;vf(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,_f(t,a,i),this.override&&K.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 K[n]&&(delete K[n][i],this.override&&delete hs[i])}}function _f(e,t,s){const i=qs(Object.create(null),[s?K.get(s):{},K.get(t),e.defaults]);K.set(t,i),e.defaultRoutes&&yf(t,e.defaultRoutes),e.descriptors&&K.describe(t,e.descriptors)}function yf(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(".");K.route(r,n,l,o)})}function vf(e){return"id"in e&&"defaults"in e}class xf{constructor(){this.controllers=new ln(ce,"datasets",!0),this.elements=new ln(he,"elements"),this.plugins=new ln(Object,"plugins"),this.scales=new ln(bs,"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):lt(n,a=>{const o=i||this._getRegistryForType(a);this._exec(t,o,a)})})}_exec(t,s,i){const n=gr(t);pt(i["before"+n],[],i),s[t](i),pt(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 _e=new xf;class $r extends ce{update(t){const s=this._cachedMeta,{data:i=[]}=s,n=this.chart._animationsDisabled;let{start:r,count:a}=xo(s,i,n);if(this._drawStart=r,this._drawCount=a,wo(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=_e.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),d=this.includeOptions(n,u),f=a.axis,g=o.axis,{spanGaps:b,segment:v}=this.options,w=Os(b)?b:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||r||n==="none";let C=s>0&&this.getParsed(s-1);for(let D=s;D<s+i;++D){const M=t[D],L=this.getParsed(D),F=k?M:{},Y=at(L[g]),z=F[f]=a.getPixelForValue(L[f],D),G=F[g]=r||Y?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,L,l):L[g],D);F.skip=isNaN(z)||isNaN(G)||Y,F.stop=D>0&&Math.abs(L[f]-C[f])>w,v&&(F.parsed=L,F.raw=c.data[D]),d&&(F.options=u||this.resolveDataElementOptions(D,M.active?"active":n)),k||this.updateElement(M,D,F,n),C=L}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}}$r.id="scatter",$r.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},$r.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(e){return"("+e.label+", "+e.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function _s(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Wr{constructor(t){this.options=t||{}}init(t){}formats(){return _s()}parse(t,s){return _s()}format(t,s){return _s()}add(t,s,i){return _s()}diff(t,s,i){return _s()}startOf(t,s,i){return _s()}endOf(t,s){return _s()}}Wr.override=function(e){Object.assign(Wr.prototype,e)};var xl={_date:Wr};function wf(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?hu:cs;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),d=l(r,t,s+h);return{lo:u.lo,hi:d.hi}}}}else return l(r,t,s)}return{lo:0,hi:r.length-1}}function ci(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:d}=wf(r[o],t,a,n);for(let f=u;f<=d;++f){const g=h[f];g.skip||i(g,c,f)}}}function Sf(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 Hr(e,t,s,i,n){const r=[];return!n&&!e.isPointInArea(t)||ci(e,s,t,function(o,l,c){!n&&!ii(o,e.chartArea,0)||o.inRange(t.x,t.y,i)&&r.push({element:o,datasetIndex:l,index:c})},!0),r}function kf(e,t,s,i){let n=[];function r(a,o,l){const{startAngle:c,endAngle:h}=a.getProps(["startAngle","endAngle"],i),{angle:u}=po(a,{x:t.x,y:t.y});Js(u,c,h)&&n.push({element:a,datasetIndex:o,index:l})}return ci(e,s,t,r),n}function Mf(e,t,s,i,n,r){let a=[];const o=Sf(s);let l=Number.POSITIVE_INFINITY;function c(h,u,d){const f=h.inRange(t.x,t.y,n);if(i&&!f)return;const g=h.getCenterPoint(n);if(!(!!r||e.isPointInArea(g))&&!f)return;const v=o(t,g);v<l?(a=[{element:h,datasetIndex:u,index:d}],l=v):v===l&&a.push({element:h,datasetIndex:u,index:d})}return ci(e,s,t,c),a}function Br(e,t,s,i,n,r){return!r&&!e.isPointInArea(t)?[]:s==="r"&&!i?kf(e,t,s,n):Mf(e,t,s,i,n,r)}function wl(e,t,s,i,n){const r=[],a=s==="x"?"inXRange":"inYRange";let o=!1;return ci(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 Df={evaluateInteractionItems:ci,modes:{index(e,t,s,i){const n=ps(t,e),r=s.axis||"x",a=s.includeInvisible||!1,o=s.intersect?Hr(e,n,r,i,a):Br(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=ps(t,e),r=s.axis||"xy",a=s.includeInvisible||!1;let o=s.intersect?Hr(e,n,r,i,a):Br(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=ps(t,e),r=s.axis||"xy",a=s.includeInvisible||!1;return Hr(e,n,r,i,a)},nearest(e,t,s,i){const n=ps(t,e),r=s.axis||"xy",a=s.includeInvisible||!1;return Br(e,n,r,s.intersect,i,a)},x(e,t,s,i){const n=ps(t,e);return wl(e,n,"x",s.intersect,i)},y(e,t,s,i){const n=ps(t,e);return wl(e,n,"y",s.intersect,i)}}};const Sl=["left","top","right","bottom"];function hi(e,t){return e.filter(s=>s.pos===t)}function kl(e,t){return e.filter(s=>Sl.indexOf(s.pos)===-1&&s.box.axis===t)}function ui(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 Cf(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 Of(e){const t={};for(const s of e){const{stack:i,pos:n,stackWeight:r}=s;if(!i||!Sl.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 Pf(e,t){const s=Of(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 Tf(e){const t=Cf(e),s=ui(t.filter(c=>c.box.fullSize),!0),i=ui(hi(t,"left"),!0),n=ui(hi(t,"right")),r=ui(hi(t,"top"),!0),a=ui(hi(t,"bottom")),o=kl(t,"x"),l=kl(t,"y");return{fullSize:s,leftAndTop:i.concat(r),rightAndBottom:n.concat(l).concat(a).concat(o),chartArea:hi(t,"chartArea"),vertical:i.concat(n).concat(l),horizontal:r.concat(a).concat(o)}}function Ml(e,t,s,i){return Math.max(e[s],t[s])+Math.max(e[i],t[i])}function Dl(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 Af(e,t,s,i){const{pos:n,box:r}=s,a=e.maxPadding;if(!q(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&&Dl(a,r.getPadding());const o=Math.max(0,t.outerWidth-Ml(a,e,"left","right")),l=Math.max(0,t.outerHeight-Ml(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 Rf(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 Lf(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 di(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,Lf(o.horizontal,t));const{same:u,other:d}=Af(t,s,o,i);c|=u&&n.length,h=h||d,l.fullSize||n.push(o)}return c&&di(n,t,s,i)||h}function cn(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 Cl(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,d=c.size||l.height;Qt(c.start)&&(a=c.start),l.fullSize?cn(l,n.left,a,s.outerWidth-n.right-n.left,d):cn(l,t.left+c.placed,a,u,d),c.start=a,c.placed+=u,a=l.bottom}else{const u=t.h*h,d=c.size||l.width;Qt(c.start)&&(r=c.start),l.fullSize?cn(l,r,n.top,d,s.outerHeight-n.bottom-n.top):cn(l,r,t.top+c.placed,d,u),c.start=r,c.placed+=u,r=l.right}}t.x=r,t.y=a}K.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var se={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=Yt(e.options.layout.padding),r=Math.max(t-n.width,0),a=Math.max(s-n.height,0),o=Tf(e.boxes),l=o.vertical,c=o.horizontal;lt(e.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});const h=l.reduce((b,v)=>v.box.options&&v.box.options.display===!1?b:b+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:s,padding:n,availableWidth:r,availableHeight:a,vBoxMaxWidth:r/2/h,hBoxMaxHeight:a/2}),d=Object.assign({},n);Dl(d,Yt(i));const f=Object.assign({maxPadding:d,w:r,h:a,x:n.left,y:n.top},n),g=Pf(l.concat(c),u);di(o.fullSize,f,u,g),di(l,f,u,g),di(c,f,u,g)&&di(l,f,u,g),Rf(f),Cl(o.leftAndTop,f,u,g),f.x+=f.w,f.y+=f.h,Cl(o.rightAndBottom,f,u,g),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},lt(o.chartArea,b=>{const v=b.box;Object.assign(v,e.chartArea),v.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Ol{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 Ff extends Ol{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const hn="$chartjs",Ef={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Pl=e=>e===null||e==="";function If(e,t){const s=e.style,i=e.getAttribute("height"),n=e.getAttribute("width");if(e[hn]={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",Pl(n)){const r=qo(e,"width");r!==void 0&&(e.width=r)}if(Pl(i))if(e.style.height==="")e.height=e.width/(t||2);else{const r=qo(e,"height");r!==void 0&&(e.height=r)}return e}const Tl=bd?{passive:!0}:!1;function Nf(e,t,s){e.addEventListener(t,s,Tl)}function Yf(e,t,s){e.canvas.removeEventListener(t,s,Tl)}function zf(e,t){const s=Ef[e.type]||e.type,{x:i,y:n}=ps(e,t);return{type:s,chart:t,native:e,x:i!==void 0?i:null,y:n!==void 0?n:null}}function un(e,t){for(const s of e)if(s===t||s.contains(t))return!0}function Vf(e,t,s){const i=e.canvas,n=new MutationObserver(r=>{let a=!1;for(const o of r)a=a||un(o.addedNodes,i),a=a&&!un(o.removedNodes,i);a&&s()});return n.observe(document,{childList:!0,subtree:!0}),n}function $f(e,t,s){const i=e.canvas,n=new MutationObserver(r=>{let a=!1;for(const o of r)a=a||un(o.removedNodes,i),a=a&&!un(o.addedNodes,i);a&&s()});return n.observe(document,{childList:!0,subtree:!0}),n}const fi=new Map;let Al=0;function Rl(){const e=window.devicePixelRatio;e!==Al&&(Al=e,fi.forEach((t,s)=>{s.currentDevicePixelRatio!==e&&t()}))}function Wf(e,t){fi.size||window.addEventListener("resize",Rl),fi.set(e,t)}function Hf(e){fi.delete(e),fi.size||window.removeEventListener("resize",Rl)}function Bf(e,t,s){const i=e.canvas,n=i&&Rr(i);if(!n)return;const r=vo((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),Wf(e,r),a}function jr(e,t,s){s&&s.disconnect(),t==="resize"&&Hf(e)}function jf(e,t,s){const i=e.canvas,n=vo(r=>{e.ctx!==null&&s(zf(r,e))},e,r=>{const a=r[0];return[a,a.offsetX,a.offsetY]});return Nf(i,t,n),n}class Uf extends Ol{acquireContext(t,s){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(If(t,s),i):null}releaseContext(t){const s=t.canvas;if(!s[hn])return!1;const i=s[hn].initial;["height","width"].forEach(r=>{const a=i[r];at(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[hn],!0}addEventListener(t,s,i){this.removeEventListener(t,s);const n=t.$proxies||(t.$proxies={}),a={attach:Vf,detach:$f,resize:Bf}[s]||jf;n[s]=a(t,s,i)}removeEventListener(t,s){const i=t.$proxies||(t.$proxies={}),n=i[s];if(!n)return;({attach:jr,detach:jr,resize:jr}[s]||Yf)(t,s,n),i[s]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,s,i,n){return md(t,s,i,n)}isAttached(t){const s=Rr(t);return!!(s&&s.isConnected)}}function Gf(e){return!Uo()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Ff:Uf}class qf{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(pt(o,l,a)===!1&&n.cancelable)return!1}return!0}invalidate(){at(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=B(i.options&&i.options.plugins,{}),r=Xf(i);return n===!1&&!s?[]:Zf(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 Xf(e){const t={},s=[],i=Object.keys(_e.plugins.items);for(let r=0;r<i.length;r++)s.push(_e.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 Kf(e,t){return!t&&e===!1?null:e===!0?{}:e}function Zf(e,{plugins:t,localIds:s},i,n){const r=[],a=e.getContext();for(const o of t){const l=o.id,c=Kf(i[l],n);c!==null&&r.push({plugin:o,options:Jf(e.config,{plugin:o,local:s[l]},c,a)})}return r}function Jf(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 Ur(e,t){const s=K.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||s.indexAxis||"x"}function Qf(e,t){let s=e;return e==="_index_"?s=t:e==="_value_"&&(s=t==="x"?"y":"x"),s}function tg(e,t){return e===t?"_index_":"_value_"}function eg(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Gr(e,t){return e==="x"||e==="y"?e:t.axis||eg(t.position)||e.charAt(0).toLowerCase()}function sg(e,t){const s=hs[e.type]||{scales:{}},i=t.scales||{},n=Ur(e.type,t),r=Object.create(null),a=Object.create(null);return Object.keys(i).forEach(o=>{const l=i[o];if(!q(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=Gr(o,l),h=tg(c,n),u=s.scales||{};r[c]=r[c]||o,a[o]=Xs(Object.create(null),[{axis:c},l,u[c],u[h]])}),e.data.datasets.forEach(o=>{const l=o.type||e.type,c=o.indexAxis||Ur(l,t),u=(hs[l]||{}).scales||{};Object.keys(u).forEach(d=>{const f=Qf(d,c),g=o[f+"AxisID"]||r[f]||f;a[g]=a[g]||Object.create(null),Xs(a[g],[{axis:f},i[g],u[d]])})}),Object.keys(a).forEach(o=>{const l=a[o];Xs(l,[K.scales[l.type],K.scale])}),a}function Ll(e){const t=e.options||(e.options={});t.plugins=B(t.plugins,{}),t.scales=sg(e,t)}function Fl(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function ig(e){return e=e||{},e.data=Fl(e.data),Ll(e),e}const El=new Map,Il=new Set;function dn(e,t){let s=El.get(e);return s||(s=t(),El.set(e,s),Il.add(s)),s}const gi=(e,t,s)=>{const i=je(t,s);i!==void 0&&e.add(i)};class ng{constructor(t){this._config=ig(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=Fl(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(),Ll(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dn(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,s){return dn(`${t}.transition.${s}`,()=>[[`datasets.${t}.transitions.${s}`,`transitions.${s}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,s){return dn(`${t}-${s}`,()=>[[`datasets.${t}.elements.${s}`,`datasets.${t}`,`elements.${s}`,""]])}pluginScopeKeys(t){const s=t.id,i=this.type;return dn(`${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=>gi(l,t,u))),h.forEach(u=>gi(l,n,u)),h.forEach(u=>gi(l,hs[r]||{},u)),h.forEach(u=>gi(l,K,u)),h.forEach(u=>gi(l,Mr,u))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Il.has(s)&&a.set(s,c),c}chartOptionScopes(){const{options:t,type:s}=this;return[t,hs[s]||{},K.datasets[s]||{},{type:s},K,Mr]}resolveNamedOptions(t,s,i,n=[""]){const r={$shared:!0},{resolver:a,subPrefixes:o}=Nl(this._resolverCache,t,n);let l=a;if(ag(a,s)){r.$shared=!1,i=Ue(i)?i():i;const c=this.createResolver(t,i,o);l=Ts(a,i,c)}for(const c of s)r[c]=l[c];return r}createResolver(t,s,i=[""],n){const{resolver:r}=Nl(this._resolverCache,t,i);return q(s)?Ts(r,s,void 0,n):r}}function Nl(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:Pr(t,s),subPrefixes:s.filter(o=>!o.toLowerCase().includes("hover"))},i.set(n,r)),r}const rg=e=>q(e)&&Object.getOwnPropertyNames(e).reduce((t,s)=>t||Ue(e[s]),!1);function ag(e,t){const{isScriptable:s,isIndexable:i}=Yo(e);for(const n of t){const r=s(n),a=i(n),o=(a||r)&&e[n];if(r&&(Ue(o)||rg(o))||a&>(o))return!0}return!1}var og="3.9.1";const lg=["top","bottom","left","right","chartArea"];function Yl(e,t){return e==="top"||e==="bottom"||lg.indexOf(e)===-1&&t==="x"}function zl(e,t){return function(s,i){return s[e]===i[e]?s[t]-i[t]:s[e]-i[e]}}function Vl(e){const t=e.chart,s=t.options.animation;t.notifyPlugins("afterRender"),pt(s&&s.onComplete,[e],t)}function cg(e){const t=e.chart,s=t.options.animation;pt(s&&s.onProgress,[e],t)}function $l(e){return Uo()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const fn={},Wl=e=>{const t=$l(e);return Object.values(fn).filter(s=>s.canvas===t).pop()};function hg(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 ug(e,t,s,i){return!s||e.type==="mouseout"?null:i?t:e}class pi{constructor(t,s){const i=this.config=new ng(s),n=$l(t),r=Wl(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||Gf(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=Zh(),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 qf,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=fu(u=>this.update(u),a.resizeDelay||0),this._dataChanges=[],fn[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Re.listen(this,"complete",Vl),Re.listen(this,"progress",cg),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:s},width:i,height:n,_aspectRatio:r}=this;return at(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():Go(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Eo(this.canvas,this.ctx),this}stop(){return Re.stop(this),this}resize(t,s){Re.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,Go(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),pt(i.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const s=this.options.scales||{};lt(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=Gr(a,o),c=l==="r",h=l==="x";return{options:o,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),lt(r,a=>{const o=a.options,l=o.id,c=Gr(l,o),h=B(o.type,a.dtype);(o.position===void 0||Yl(o.position,c)!==Yl(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 d=_e.getScale(h);u=new d({id:l,type:h,ctx:this.ctx,chart:this}),i[u.id]=u}u.init(o,t)}),lt(n,(a,o)=>{a||delete i[o]}),lt(i,a=>{se.configure(this,a,a.options),se.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(zl("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||Ur(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=_e.getController(o),{datasetElementType:c,dataElementType:h}=K.datasets[o];Object.assign(l.prototype,{dataElementType:_e.getElement(h),datasetElementType:c&&_e.getElement(c)}),a.controller=new l(this,i),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){lt(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),d=!n&&r.indexOf(u)===-1;u.buildOrUpdateElements(d),a=Math.max(+u.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),n||lt(r,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(zl("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){lt(this.scales,t=>{se.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,s=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!co(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;hg(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(!co(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;se.update(this,this.width,this.height,t);const s=this.chartArea,i=s.width<=0||s.height<=0;this._layers=[],lt(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,Ue(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&&(Re.has(this)?this.attached&&!Re.running(this)&&Re.start(this):(this.draw(),Vl({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&&Zi(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&&Ji(s),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return ii(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,s,i,n){const r=Df.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=Xe(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);Qt(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(),Re.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(),Eo(t,s),this.platform.releaseContext(s),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete fn[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)};lt(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(){lt(this._listeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._listeners={},lt(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}});!Wi(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=iu(t),c=ug(t,this._lastEvent,i,l);i&&(this._lastEvent=null,pt(r.onHover,[t,o,this],this),l&&pt(r.onClick,[t,o,this],this));const h=!Wi(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 Hl=()=>lt(pi.instances,e=>e._plugins.invalidate()),Ke=!0;Object.defineProperties(pi,{defaults:{enumerable:Ke,value:K},instances:{enumerable:Ke,value:fn},overrides:{enumerable:Ke,value:hs},registry:{enumerable:Ke,value:_e},version:{enumerable:Ke,value:og},getChart:{enumerable:Ke,value:Wl},register:{enumerable:Ke,value:(...e)=>{_e.add(...e),Hl()}},unregister:{enumerable:Ke,value:(...e)=>{_e.remove(...e),Hl()}}});function Bl(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+Dt,i-Dt),e.closePath(),e.clip()}function dg(e){return Or(e,["outerStart","outerEnd","innerStart","innerEnd"])}function fg(e,t,s,i){const n=dg(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 It(l,0,Math.min(r,c))};return{outerStart:o(n.outerStart),outerEnd:o(n.outerEnd),innerStart:It(n.innerStart,0,a),innerEnd:It(n.innerEnd,0,a)}}function Ls(e,t,s,i){return{x:s+e*Math.cos(t),y:i+e*Math.sin(t)}}function qr(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),d=h>0?h+i+s+c:0;let f=0;const g=n-l;if(i){const H=h>0?h-i:0,St=u>0?u-i:0,_t=(H+St)/2,qt=_t!==0?g*_t/(_t+i):g;f=(g-qt)/2}const b=Math.max(.001,g*u-s/vt)/u,v=(g-b)/2,w=l+v+f,k=n-v-f,{outerStart:C,outerEnd:D,innerStart:M,innerEnd:L}=fg(t,d,u,k-w),F=u-C,Y=u-D,z=w+C/F,G=k-D/Y,Z=d+M,U=d+L,wt=w+M/Z,Tt=k-L/U;if(e.beginPath(),r){if(e.arc(a,o,u,z,G),D>0){const _t=Ls(Y,G,a,o);e.arc(_t.x,_t.y,D,G,k+Dt)}const H=Ls(U,k,a,o);if(e.lineTo(H.x,H.y),L>0){const _t=Ls(U,Tt,a,o);e.arc(_t.x,_t.y,L,k+Dt,Tt+Math.PI)}if(e.arc(a,o,d,k-L/d,w+M/d,!0),M>0){const _t=Ls(Z,wt,a,o);e.arc(_t.x,_t.y,M,wt+Math.PI,w-Dt)}const St=Ls(F,w,a,o);if(e.lineTo(St.x,St.y),C>0){const _t=Ls(F,z,a,o);e.arc(_t.x,_t.y,C,w-Dt,z)}}else{e.moveTo(a,o);const H=Math.cos(z)*u+a,St=Math.sin(z)*u+o;e.lineTo(H,St);const _t=Math.cos(G)*u+a,qt=Math.sin(G)*u+o;e.lineTo(_t,qt)}e.closePath()}function gg(e,t,s,i,n){const{fullCircles:r,startAngle:a,circumference:o}=t;let l=t.endAngle;if(r){qr(e,t,s,i,a+ut,n);for(let c=0;c<r;++c)e.fill();isNaN(o)||(l=a+o%ut,o%ut===0&&(l+=ut))}return qr(e,t,s,i,l,n),e.fill(),l}function pg(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&&Bl(e,t,r+ut),e.beginPath(),e.arc(i,n,c,r+ut,r,!0),h=0;h<o;++h)e.stroke();for(e.beginPath(),e.arc(i,n,l,r,r+ut),h=0;h<o;++h)e.stroke()}function mg(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&&pg(e,t,c),c&&Bl(e,t,n),qr(e,t,s,i,n,r),e.stroke())}class gn extends he{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}=po(n,{x:t,y:s}),{startAngle:o,endAngle:l,innerRadius:c,outerRadius:h,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,g=B(u,l-o)>=ut||Js(r,o,l),b=Te(a,c+d,h+d);return g&&b}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>ut?Math.floor(i/ut):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>=vt&&(o=n)}t.fillStyle=s.backgroundColor,t.strokeStyle=s.borderColor;const l=gg(t,this,o,r,a);mg(t,this,o,r,l,a),t.restore()}}gn.id="arc",gn.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},gn.defaultRoutes={backgroundColor:"backgroundColor"};function jl(e,t,s=t){e.lineCap=B(s.borderCapStyle,t.borderCapStyle),e.setLineDash(B(s.borderDash,t.borderDash)),e.lineDashOffset=B(s.borderDashOffset,t.borderDashOffset),e.lineJoin=B(s.borderJoinStyle,t.borderJoinStyle),e.lineWidth=B(s.borderWidth,t.borderWidth),e.strokeStyle=B(s.borderColor,t.borderColor)}function bg(e,t,s){e.lineTo(s.x,s.y)}function _g(e){return e.stepped?Vu:e.tension||e.cubicInterpolationMode==="monotone"?$u:bg}function Ul(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 yg(e,t,s,i){const{points:n,options:r}=t,{count:a,start:o,loop:l,ilen:c}=Ul(n,s,i),h=_g(r);let{move:u=!0,reverse:d}=i||{},f,g,b;for(f=0;f<=c;++f)g=n[(o+(d?c-f:f))%a],!g.skip&&(u?(e.moveTo(g.x,g.y),u=!1):h(e,b,g,d,r.stepped),b=g);return l&&(g=n[(o+(d?c:0))%a],h(e,b,g,d,r.stepped)),!!l}function vg(e,t,s,i){const n=t.points,{count:r,start:a,ilen:o}=Ul(n,s,i),{move:l=!0,reverse:c}=i||{};let h=0,u=0,d,f,g,b,v,w;const k=D=>(a+(c?o-D:D))%r,C=()=>{b!==v&&(e.lineTo(h,v),e.lineTo(h,b),e.lineTo(h,w))};for(l&&(f=n[k(0)],e.moveTo(f.x,f.y)),d=0;d<=o;++d){if(f=n[k(d)],f.skip)continue;const D=f.x,M=f.y,L=D|0;L===g?(M<b?b=M:M>v&&(v=M),h=(u*h+D)/++u):(C(),e.lineTo(D,M),g=L,u=0,b=v=M),w=M}C()}function Xr(e){const t=e.options,s=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!s?vg:yg}function xg(e){return e.stepped?_d:e.tension||e.cubicInterpolationMode==="monotone"?yd:ms}function wg(e,t,s,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,s,i)&&n.closePath()),jl(e,t.options),e.stroke(n)}function Sg(e,t,s,i){const{segments:n,options:r}=t,a=Xr(t);for(const o of n)jl(e,r,o.style),e.beginPath(),a(e,t,o,{start:s,end:s+i-1})&&e.closePath(),e.stroke()}const kg=typeof Path2D=="function";function Mg(e,t,s,i){kg&&!t.options.segment?wg(e,t,s,i):Sg(e,t,s,i)}class Ze extends he{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;hd(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=Dd(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=el(this,{property:s,start:n,end:n});if(!a.length)return;const o=[],l=xg(i);let c,h;for(c=0,h=a.length;c<h;++c){const{start:u,end:d}=a[c],f=r[u],g=r[d];if(f===g){o.push(f);continue}const b=Math.abs((n-f[s])/(g[s]-f[s])),v=l(f,g,b,i.stepped);v[s]=t[s],o.push(v)}return o.length===1?o[0]:o}pathSegment(t,s,i){return Xr(this)(t,this,s,i)}path(t,s,i){const n=this.segments,r=Xr(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(),Mg(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Ze.id="line",Ze.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Ze.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Ze.descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};function Gl(e,t,s,i){const n=e.options,{[s]:r}=e.getProps([s],i);return Math.abs(t-r)<n.radius+n.hitRadius}class pn extends he{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 Gl(this,t,"x",s)}inYRange(t,s){return Gl(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||!ii(this,s,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Cr(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}pn.id="point",pn.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},pn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function ql(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 Je(e,t,s,i){return e?0:It(t,s,i)}function Dg(e,t,s){const i=e.options.borderWidth,n=e.borderSkipped,r=No(i);return{t:Je(n.top,r.top,0,s),r:Je(n.right,r.right,0,t),b:Je(n.bottom,r.bottom,0,s),l:Je(n.left,r.left,0,t)}}function Cg(e,t,s){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),n=e.options.borderRadius,r=fs(n),a=Math.min(t,s),o=e.borderSkipped,l=i||q(n);return{topLeft:Je(!l||o.top||o.left,r.topLeft,0,a),topRight:Je(!l||o.top||o.right,r.topRight,0,a),bottomLeft:Je(!l||o.bottom||o.left,r.bottomLeft,0,a),bottomRight:Je(!l||o.bottom||o.right,r.bottomRight,0,a)}}function Og(e){const t=ql(e),s=t.right-t.left,i=t.bottom-t.top,n=Dg(e,s/2,i/2),r=Cg(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 Kr(e,t,s,i){const n=t===null,r=s===null,o=e&&!(n&&r)&&ql(e,i);return o&&(n||Te(t,o.left,o.right))&&(r||Te(s,o.top,o.bottom))}function Pg(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Tg(e,t){e.rect(t.x,t.y,t.w,t.h)}function Zr(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 mn extends he{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}=Og(this),o=Pg(a.radius)?ni:Tg;t.save(),(a.w!==r.w||a.h!==r.h)&&(t.beginPath(),o(t,Zr(a,s,r)),t.clip(),o(t,Zr(r,-s,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Zr(r,s)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,s,i){return Kr(this,t,s,i)}inXRange(t,s){return Kr(this,t,null,s)}inYRange(t,s){return Kr(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}}mn.id="bar",mn.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},mn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Ag(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=Qr(l,c,n);const h=Jr(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=el(t,h);for(const d of u){const f=Jr(s,r[d.start],r[d.end],d.loop),g=tl(o,n,f);for(const b of g)a.push({source:b,target:d,start:{[s]:Xl(h,f,"start",Math.max)},end:{[s]:Xl(h,f,"end",Math.min)}})}}return a}function Jr(e,t,s,i){if(i)return;let n=t[e],r=s[e];return e==="angle"&&(n=Ut(n),r=Ut(r)),{property:e,start:n,end:r}}function Rg(e,t){const{x:s=null,y:i=null}=e||{},n=t.points,r=[];return t.segments.forEach(({start:a,end:o})=>{o=Qr(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 Qr(e,t,s){for(;t>e;t--){const i=s[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Xl(e,t,s,i){return e&&t?i(e[s],t[s]):e?e[s]:t?t[s]:0}function Kl(e,t){let s=[],i=!1;return gt(e)?(i=!0,s=e):s=Rg(e,t),s.length?new Ze({points:s,options:{tension:0},_loop:i,_fullLoop:i}):null}function Zl(e){return e&&e.fill!==!1}function Lg(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(!Ot(n))return n;if(a=e[n],!a)return!1;if(a.visible)return n;r.push(n),n=a.fill}return!1}function Fg(e,t,s){const i=Yg(e);if(q(i))return isNaN(i.value)?!1:i;let n=parseFloat(i);return Ot(n)&&Math.floor(n)===n?Eg(i[0],t,n,s):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function Eg(e,t,s,i){return(e==="-"||e==="+")&&(s=t+s),s===t||s<0||s>=i?!1:s}function Ig(e,t){let s=null;return e==="start"?s=t.bottom:e==="end"?s=t.top:q(e)?s=t.getPixelForValue(e.value):t.getBasePixel&&(s=t.getBasePixel()),s}function Ng(e,t,s){let i;return e==="start"?i=s:e==="end"?i=t.options.reverse?t.min:t.max:q(e)?i=e.value:i=t.getBaseValue(),i}function Yg(e){const t=e.options,s=t.fill;let i=B(s&&s.target,s);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function zg(e){const{scale:t,index:s,line:i}=e,n=[],r=i.segments,a=i.points,o=Vg(t,s);o.push(Kl({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++)$g(n,a[h],o)}return new Ze({points:n,options:{}})}function Vg(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 $g(e,t,s){const i=[];for(let n=0;n<s.length;n++){const r=s[n],{first:a,last:o,point:l}=Wg(r,t,"x");if(!(!l||a&&o)){if(a)i.unshift(l);else if(e.push(l),!o)break}}e.push(...i)}function Wg(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],d=a[h.end][s];if(Te(n,u,d)){o=n===u,l=n===d;break}}return{first:o,last:l,point:i}}class Jl{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:ut},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 Hg(e){const{chart:t,fill:s,line:i}=e;if(Ot(s))return Bg(t,s);if(s==="stack")return zg(e);if(s==="shape")return!0;const n=jg(e);return n instanceof Jl?n:Kl(n,i)}function Bg(e,t){const s=e.getDatasetMeta(t);return s&&e.isDatasetVisible(t)?s.dataset:null}function jg(e){return(e.scale||{}).getPointPositionForValue?Gg(e):Ug(e)}function Ug(e){const{scale:t={},fill:s}=e,i=Ig(s,t);if(Ot(i)){const n=t.isHorizontal();return{x:n?i:null,y:n?null:i}}return null}function Gg(e){const{scale:t,fill:s}=e,i=t.options,n=t.getLabels().length,r=i.reverse?t.max:t.min,a=Ng(s,t,r),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,r);return new Jl({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 ta(e,t,s){const i=Hg(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&&(Zi(e,s),qg(e,{line:n,target:i,above:h,below:u,area:s,scale:r,axis:a}),Ji(e))}function qg(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&&(Ql(e,i,a.top),tc(e,{line:s,target:i,color:n,scale:o,property:l}),e.restore(),e.save(),Ql(e,i,a.bottom)),tc(e,{line:s,target:i,color:r,scale:o,property:l}),e.restore()}function Ql(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[Qr(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 tc(e,t){const{line:s,target:i,property:n,color:r,scale:a}=t,o=Ag(s,i,n);for(const{source:l,target:c,start:h,end:u}of o){const{style:{backgroundColor:d=r}={}}=l,f=i!==!0;e.save(),e.fillStyle=d,Xg(e,a,f&&Jr(n,h,u)),e.beginPath();const g=!!s.pathSegment(e,l);let b;if(f){g?e.closePath():ec(e,i,u,n);const v=!!i.pathSegment(e,c,{move:g,reverse:!0});b=g&&v,b||ec(e,i,h,n)}e.closePath(),e.fill(b?"evenodd":"nonzero"),e.restore()}}function Xg(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 ec(e,t,s,i){const n=t.interpolate(s,i);n&&e.lineTo(n.x,n.y)}var Kg={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 Ze&&(l={visible:e.isDatasetVisible(a),index:a,fill:Fg(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=Lg(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&&ta(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;Zl(r)&&ta(e.ctx,r,e.chartArea)}},beforeDatasetDraw(e,t,s){const i=t.meta.$filler;!Zl(i)||s.drawTime!=="beforeDatasetDraw"||ta(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const sc=(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)}},Zg=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class ic extends he{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=pt(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=Rt(i.font),r=n.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=sc(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 d=-1,f=-h;return this.legendItems.forEach((g,b)=>{const v=i+s/2+r.measureText(g.text).width;(b===0||c[c.length-1]+v+2*o>a)&&(u+=h,c[c.length-(b>0?0:1)]=0,f+=h,d++),l[b]={left:0,top:f,row:d,width:v,height:n},c[c.length-1]+=v+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,d=0,f=0,g=0,b=0;return this.legendItems.forEach((v,w)=>{const k=i+s/2+r.measureText(v.text).width;w>0&&f+n+2*o>h&&(u+=d+o,c.push({width:d,height:f}),g+=d+o,b++,d=f=0),l[w]={left:g,top:f,col:b,width:k,height:n},d=Math.max(d,k),f+=n+o}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:s,options:{align:i,labels:{padding:n},rtl:r}}=this,a=Rs(r,this.left,this.width);if(this.isHorizontal()){let o=0,l=Nt(i,this.left+n,this.right-this.lineWidths[o]);for(const c of s)o!==c.row&&(o=c.row,l=Nt(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=Nt(i,this.top+t+n,this.bottom-this.columnSizes[o].height);for(const c of s)c.col!==o&&(o=c.col,l=Nt(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;Zi(t,this),this._draw(),Ji(t)}}_draw(){const{options:t,columnSizes:s,lineWidths:i,ctx:n}=this,{align:r,labels:a}=t,o=K.color,l=Rs(t.rtl,this.left,this.width),c=Rt(a.font),{color:h,padding:u}=a,d=c.size,f=d/2;let g;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:b,boxHeight:v,itemHeight:w}=sc(a,d),k=function(F,Y,z){if(isNaN(b)||b<=0||isNaN(v)||v<0)return;n.save();const G=B(z.lineWidth,1);if(n.fillStyle=B(z.fillStyle,o),n.lineCap=B(z.lineCap,"butt"),n.lineDashOffset=B(z.lineDashOffset,0),n.lineJoin=B(z.lineJoin,"miter"),n.lineWidth=G,n.strokeStyle=B(z.strokeStyle,o),n.setLineDash(B(z.lineDash,[])),a.usePointStyle){const Z={radius:v*Math.SQRT2/2,pointStyle:z.pointStyle,rotation:z.rotation,borderWidth:G},U=l.xPlus(F,b/2),wt=Y+f;Io(n,Z,U,wt,a.pointStyleWidth&&b)}else{const Z=Y+Math.max((d-v)/2,0),U=l.leftForLtr(F,b),wt=fs(z.borderRadius);n.beginPath(),Object.values(wt).some(Tt=>Tt!==0)?ni(n,{x:U,y:Z,w:b,h:v,radius:wt}):n.rect(U,Z,b,v),n.fill(),G!==0&&n.stroke()}n.restore()},C=function(F,Y,z){ds(n,z.text,F,Y+w/2,c,{strikethrough:z.hidden,textAlign:l.textAlign(z.textAlign)})},D=this.isHorizontal(),M=this._computeTitleHeight();D?g={x:Nt(r,this.left+u,this.right-i[0]),y:this.top+u+M,line:0}:g={x:this.left+u,y:Nt(r,this.top+M+u,this.bottom-s[0].height),line:0},Ko(this.ctx,t.textDirection);const L=w+u;this.legendItems.forEach((F,Y)=>{n.strokeStyle=F.fontColor||h,n.fillStyle=F.fontColor||h;const z=n.measureText(F.text).width,G=l.textAlign(F.textAlign||(F.textAlign=a.textAlign)),Z=b+f+z;let U=g.x,wt=g.y;l.setWidth(this.width),D?Y>0&&U+Z+u>this.right&&(wt=g.y+=L,g.line++,U=g.x=Nt(r,this.left+u,this.right-i[g.line])):Y>0&&wt+L>this.bottom&&(U=g.x=U+s[g.line].width+u,g.line++,wt=g.y=Nt(r,this.top+M+u,this.bottom-s[g.line].height));const Tt=l.x(U);k(Tt,wt,F),U=gu(G,U+b+f,D?U+Z:this.right,t.rtl),C(l.x(U),wt,F),D?g.x+=Z+u:g.y+=L}),Zo(this.ctx,t.textDirection)}drawTitle(){const t=this.options,s=t.title,i=Rt(s.font),n=Yt(s.padding);if(!s.display)return;const r=Rs(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,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+c,u=Nt(t.align,u,this.right-d);else{const g=this.columnSizes.reduce((b,v)=>Math.max(b,v.height),0);h=c+Nt(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=Nt(o,u,u+d);a.textAlign=r.textAlign(_r(o)),a.textBaseline="middle",a.strokeStyle=s.color,a.fillStyle=s.color,a.font=i.string,ds(a,s.text,f,h,i)}_computeTitleHeight(){const t=this.options.title,s=Rt(t.font),i=Yt(t.padding);return t.display?s.lineHeight+i.height:0}_getLegendItemAt(t,s){let i,n,r;if(Te(t,this.left,this.right)&&Te(s,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(n=r[i],Te(t,n.left,n.left+n.width)&&Te(s,n.top,n.top+n.height))return this.legendItems[i]}return null}handleEvent(t){const s=this.options;if(!Jg(t.type,s))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,r=Zg(n,i);n&&!r&&pt(s.onLeave,[t,n,this],this),this._hoveredItem=i,i&&!r&&pt(s.onHover,[t,i,this],this)}else i&&pt(s.onClick,[t,i,this],this)}}function Jg(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Qg={id:"legend",_element:ic,start(e,t,s){const i=e.legend=new ic({ctx:e.ctx,options:s,chart:e});se.configure(e,i,s),se.addBox(e,i)},stop(e){se.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,s){const i=e.legend;se.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=Yt(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 nc extends he{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=gt(i.text)?i.text.length:1;this._padding=Yt(i.padding);const r=n*Rt(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=Nt(o,i,r),u=s+t,c=r-i):(a.position==="left"?(h=i+t,u=Nt(o,n,s),l=vt*-.5):(h=r-t,u=Nt(o,s,n),l=vt*.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=Rt(s.font),r=i.lineHeight/2+this._padding.top,{titleX:a,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(r);ds(t,s.text,0,0,i,{color:s.color,maxWidth:l,rotation:c,textAlign:_r(s.align),textBaseline:"middle",translation:[a,o]})}}function tp(e,t){const s=new nc({ctx:e.ctx,options:t,chart:e});se.configure(e,s,t),se.addBox(e,s),e.titleBlock=s}var ep={id:"title",_element:nc,start(e,t,s){tp(e,s)},stop(e){const t=e.titleBlock;se.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,s){const i=e.titleBlock;se.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 mi={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=mr(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 ye(e,t){return t&&(gt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Le(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function sp(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 rc(e,t){const s=e.chart.ctx,{body:i,footer:n,title:r}=e,{boxWidth:a,boxHeight:o}=t,l=Rt(t.bodyFont),c=Rt(t.titleFont),h=Rt(t.footerFont),u=r.length,d=n.length,f=i.length,g=Yt(t.padding);let b=g.height,v=0,w=i.reduce((D,M)=>D+M.before.length+M.lines.length+M.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,u&&(b+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),w){const D=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;b+=f*D+(w-f)*l.lineHeight+(w-1)*t.bodySpacing}d&&(b+=t.footerMarginTop+d*h.lineHeight+(d-1)*t.footerSpacing);let k=0;const C=function(D){v=Math.max(v,s.measureText(D).width+k)};return s.save(),s.font=c.string,lt(e.title,C),s.font=l.string,lt(e.beforeBody.concat(e.afterBody),C),k=t.displayColors?a+2+t.boxPadding:0,lt(i,D=>{lt(D.before,C),lt(D.lines,C),lt(D.after,C)}),k=0,s.font=h.string,lt(e.footer,C),s.restore(),v+=g.width,{width:v,height:b}}function ip(e,t){const{y:s,height:i}=t;return s<i/2?"top":s>e.height-i/2?"bottom":"center"}function np(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 rp(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"),np(c,e,t,s)&&(c="center"),c}function ac(e,t,s){const i=s.yAlign||t.yAlign||ip(e,s);return{xAlign:s.xAlign||t.xAlign||rp(e,t,s,i),yAlign:i}}function ap(e,t){let{x:s,width:i}=e;return t==="right"?s-=i:t==="center"&&(s-=i/2),s}function op(e,t,s){let{y:i,height:n}=e;return t==="top"?i+=s:t==="bottom"?i-=n+s:i-=n/2,i}function oc(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:d,bottomRight:f}=fs(a);let g=ap(t,o);const b=op(t,l,c);return l==="center"?o==="left"?g+=c:o==="right"&&(g-=c):o==="left"?g-=Math.max(h,d)+n:o==="right"&&(g+=Math.max(u,f)+n),{x:It(g,0,i.width-t.width),y:It(b,0,i.height-t.height)}}function bn(e,t,s){const i=Yt(s.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function lc(e){return ye([],Le(e))}function lp(e,t,s){return Xe(e,{tooltip:t,tooltipItems:s,type:"tooltip"})}function cc(e,t){const s=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return s?e.override(s):e}class ea extends he{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 rl(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=lp(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=ye(o,Le(n)),o=ye(o,Le(r)),o=ye(o,Le(a)),o}getBeforeBody(t,s){return lc(s.callbacks.beforeBody.apply(this,[t]))}getBody(t,s){const{callbacks:i}=s,n=[];return lt(t,r=>{const a={before:[],lines:[],after:[]},o=cc(i,r);ye(a.before,Le(o.beforeLabel.call(this,r))),ye(a.lines,o.label.call(this,r)),ye(a.after,Le(o.afterLabel.call(this,r))),n.push(a)}),n}getAfterBody(t,s){return lc(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=ye(o,Le(n)),o=ye(o,Le(r)),o=ye(o,Le(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(sp(this.chart,s[l]));return t.filter&&(o=o.filter((h,u,d)=>t.filter(h,u,d,i))),t.itemSort&&(o=o.sort((h,u)=>t.itemSort(h,u,i))),lt(o,h=>{const u=cc(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=mi[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=rc(this,i),c=Object.assign({},o,l),h=ac(this.chart,i,c),u=oc(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}=fs(o),{x:d,y:f}=t,{width:g,height:b}=s;let v,w,k,C,D,M;return r==="center"?(D=f+b/2,n==="left"?(v=d,w=v-a,C=D+a,M=D-a):(v=d+g,w=v+a,C=D-a,M=D+a),k=v):(n==="left"?w=d+Math.max(l,h)+a:n==="right"?w=d+g-Math.max(c,u)-a:w=this.caretX,r==="top"?(C=f,D=C-a,v=w-a,k=w+a):(C=f+b,D=C+a,v=w+a,k=w-a),M=C),{x1:v,x2:w,x3:k,y1:C,y2:D,y3:M}}drawTitle(t,s,i){const n=this.title,r=n.length;let a,o,l;if(r){const c=Rs(i.rtl,this.x,this.width);for(t.x=bn(this,i.titleAlign,i),s.textAlign=c.textAlign(i.titleAlign),s.textBaseline="middle",a=Rt(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=Rt(r.bodyFont),d=bn(this,"left",r),f=n.x(d),g=l<u.lineHeight?(u.lineHeight-l)/2:0,b=s.y+g;if(r.usePointStyle){const v={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},w=n.leftForLtr(f,c)+c/2,k=b+l/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,Cr(t,v,w,k),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Cr(t,v,w,k)}else{t.lineWidth=q(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 v=n.leftForLtr(f,c-h),w=n.leftForLtr(n.xPlus(f,1),c-h-2),k=fs(a.borderRadius);Object.values(k).some(C=>C!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,ni(t,{x:v,y:b,w:c,h:l,radius:k}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ni(t,{x:w,y:b+1,w:c-2,h:l-2,radius:k}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(v,b,c,l),t.strokeRect(v,b,c,l),t.fillStyle=a.backgroundColor,t.fillRect(w,b+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=Rt(i.bodyFont);let d=u.lineHeight,f=0;const g=Rs(i.rtl,this.x,this.width),b=function(Y){s.fillText(Y,g.x(t.x+f),t.y+d/2),t.y+=d+r},v=g.textAlign(a);let w,k,C,D,M,L,F;for(s.textAlign=a,s.textBaseline="middle",s.font=u.string,t.x=bn(this,v,i),s.fillStyle=i.bodyColor,lt(this.beforeBody,b),f=o&&v!=="right"?a==="center"?c/2+h:c+2+h:0,D=0,L=n.length;D<L;++D){for(w=n[D],k=this.labelTextColors[D],s.fillStyle=k,lt(w.before,b),C=w.lines,o&&C.length&&(this._drawColorBox(s,t,D,g,i),d=Math.max(u.lineHeight,l)),M=0,F=C.length;M<F;++M)b(C[M]),d=u.lineHeight;lt(w.after,b)}f=0,d=u.lineHeight,lt(this.afterBody,b),t.y-=r}drawFooter(t,s,i){const n=this.footer,r=n.length;let a,o;if(r){const l=Rs(i.rtl,this.x,this.width);for(t.x=bn(this,i.footerAlign,i),t.y+=i.footerMarginTop,s.textAlign=l.textAlign(i.footerAlign),s.textBaseline="middle",a=Rt(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:d,bottomLeft:f,bottomRight:g}=fs(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-d,l),s.quadraticCurveTo(o+c,l,o+c,l+d),a==="center"&&r==="right"&&this.drawCaret(t,s,i,n),s.lineTo(o+c,l+h-g),s.quadraticCurveTo(o+c,l+h,o+c-g,l+h),a==="bottom"&&this.drawCaret(t,s,i,n),s.lineTo(o+f,l+h),s.quadraticCurveTo(o,l+h,o,l+h-f),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=mi[t.position].call(this,this._active,this._eventPosition);if(!a)return;const o=this._size=rc(this,t),l=Object.assign({},a,this._size),c=ac(s,t,l),h=oc(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=Yt(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),Ko(t,s.textDirection),r.y+=a.top,this.drawTitle(r,t,s),this.drawBody(r,t,s),this.drawFooter(r,t,s),Zo(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=!Wi(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||!Wi(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=mi[r.position].call(this,t,s);return a!==!1&&(i!==a.x||n!==a.y)}}ea.positioners=mi;var cp={id:"tooltip",_element:ea,positioners:mi,afterInit(e,t,s){s&&(e.tooltip=new ea({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:Pe,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:Pe,beforeBody:Pe,beforeLabel:Pe,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 at(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:Pe,afterBody:Pe,beforeFooter:Pe,footer:Pe,afterFooter:Pe}},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 hp=(e,t,s,i)=>(typeof t=="string"?(s=e.push(t)-1,i.unshift({index:s,label:t})):isNaN(t)&&(s=null),s);function up(e,t,s,i){const n=e.indexOf(t);if(n===-1)return hp(e,t,s,i);const r=e.lastIndexOf(t);return n!==r?s:n}const dp=(e,t)=>e===null?null:It(Math.round(e),0,t);class _n extends bs{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(at(t))return null;const i=this.getLabels();return s=isFinite(s)&&i[s]===t?s:up(i,t,B(s,t),this._addedLabels),dp(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 fp(e,t){const s=[],{bounds:n,step:r,min:a,max:o,precision:l,count:c,maxTicks:h,maxDigits:u,includeBounds:d}=e,f=r||1,g=h-1,{min:b,max:v}=t,w=!at(a),k=!at(o),C=!at(c),D=(v-b)/(u+1);let M=uo((v-b)/g/f)*f,L,F,Y,z;if(M<1e-14&&!w&&!k)return[{value:b},{value:v}];z=Math.ceil(v/M)-Math.floor(b/M),z>g&&(M=uo(z*M/g/f)*f),at(l)||(L=Math.pow(10,l),M=Math.ceil(M*L)/L),n==="ticks"?(F=Math.floor(b/M)*M,Y=Math.ceil(v/M)*M):(F=b,Y=v),w&&k&&r&&ou((o-a)/r,M/1e3)?(z=Math.round(Math.min((o-a)/M,h)),M=(o-a)/z,F=a,Y=o):C?(F=w?a:F,Y=k?o:Y,z=c-1,M=(Y-F)/z):(z=(Y-F)/M,Zs(z,Math.round(z),M/1e3)?z=Math.round(z):z=Math.ceil(z));const G=Math.max(go(M),go(F));L=Math.pow(10,at(l)?G:l),F=Math.round(F*L)/L,Y=Math.round(Y*L)/L;let Z=0;for(w&&(d&&F!==a?(s.push({value:a}),F<a&&Z++,Zs(Math.round((F+Z*M)*L)/L,a,hc(a,D,e))&&Z++):F<a&&Z++);Z<z;++Z)s.push({value:Math.round((F+Z*M)*L)/L});return k&&d&&Y!==o?s.length&&Zs(s[s.length-1].value,o,hc(o,D,e))?s[s.length-1].value=o:s.push({value:o}):(!k||Y===o)&&s.push({value:Y}),s}function hc(e,t,{horizontal:s,minRotation:i}){const n=le(i),r=(s?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+e).length;return Math.min(t/r,a)}class yn extends bs{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 at(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=be(n),c=be(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=fp(n,r);return t.bounds==="ticks"&&fo(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 ri(t,this.chart.options.locale,this.options.ticks.format)}}class sa extends yn{determineDataLimits(){const{min:t,max:s}=this.getMinMax(!0);this.min=Ot(t)?t:0,this.max=Ot(s)?s:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),s=t?this.width:this.height,i=le(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}}sa.id="linear",sa.defaults={ticks:{callback:an.formatters.numeric}};function uc(e){return e/Math.pow(10,Math.floor(te(e)))===1}function gp(e,t){const s=Math.floor(te(t.max)),i=Math.ceil(t.max/Math.pow(10,s)),n=[];let r=Jt(e.min,Math.pow(10,Math.floor(te(t.min)))),a=Math.floor(te(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:uc(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=Jt(e.max,r);return n.push({value:c,major:uc(r)}),n}class dc extends bs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,s){const i=yn.prototype.parse.apply(this,[t,s]);if(i===0){this._zero=!0;return}return Ot(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:s}=this.getMinMax(!0);this.min=Ot(t)?Math.max(0,t):null,this.max=Ot(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(te(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=gp(s,this);return t.bounds==="ticks"&&fo(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":ri(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=te(t),this._valueRange=te(this.max)-te(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(te(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const s=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+s*this._valueRange)}}dc.id="logarithmic",dc.defaults={ticks:{callback:an.formatters.logarithmic,major:{enabled:!0}}};function ia(e){const t=e.ticks;if(t.display&&e.display){const s=Yt(t.backdropPadding);return B(t.font&&t.font.size,K.font.size)+s.height}return 0}function pp(e,t,s){return s=gt(s)?s:[s],{w:zu(e,t.string,s),h:s.length*t.lineHeight}}function fc(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 mp(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?vt/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=Rt(c.font),d=pp(e.ctx,u,e._pointLabels[l]);i[l]=d;const f=Ut(e.getIndexAngle(l)+o),g=Math.round(pr(f)),b=fc(g,h.x,d.w,0,180),v=fc(g,h.y,d.h,90,270);bp(s,t,f,b,v)}e.setCenterPoint(t.l-s.l,s.r-t.r,t.t-s.t,s.b-t.b),e._pointLabelItems=_p(e,i,n)}function bp(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 _p(e,t,s){const i=[],n=e._pointLabels.length,r=e.options,a=ia(r)/2,o=e.drawingArea,l=r.pointLabels.centerPointLabels?vt/n:0;for(let c=0;c<n;c++){const h=e.getPointPosition(c,o+a+s[c],l),u=Math.round(pr(Ut(h.angle+Dt))),d=t[c],f=xp(h.y,d.h,u),g=yp(u),b=vp(h.x,d.w,g);i.push({x:h.x,y:f,textAlign:g,left:b,top:f,right:b+d.w,bottom:f+d.h})}return i}function yp(e){return e===0||e===180?"center":e<180?"left":"right"}function vp(e,t,s){return s==="right"?e-=t:s==="center"&&(e-=t/2),e}function xp(e,t,s){return s===90||s===270?e-=t/2:(s>270||s<90)&&(e-=t),e}function wp(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=Rt(r.font),{x:o,y:l,textAlign:c,left:h,top:u,right:d,bottom:f}=e._pointLabelItems[n],{backdropColor:g}=r;if(!at(g)){const b=fs(r.borderRadius),v=Yt(r.backdropPadding);s.fillStyle=g;const w=h-v.left,k=u-v.top,C=d-h+v.width,D=f-u+v.height;Object.values(b).some(M=>M!==0)?(s.beginPath(),ni(s,{x:w,y:k,w:C,h:D,radius:b}),s.fill()):s.fillRect(w,k,C,D)}ds(s,e._pointLabels[n],o,l+a.lineHeight/2,a,{color:r.color,textAlign:c,textBaseline:"middle"})}}function gc(e,t,s,i){const{ctx:n}=e;if(s)n.arc(e.xCenter,e.yCenter,t,0,ut);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 Sp(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(),gc(e,s,r,i),n.closePath(),n.stroke(),n.restore())}function kp(e,t,s){return Xe(e,{label:s,index:t,type:"pointLabel"})}class vn extends yn{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=Yt(ia(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=Ot(t)&&!isNaN(t)?t:0,this.max=Ot(s)&&!isNaN(s)?s:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ia(this.options))}generateTickLabels(t){yn.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((s,i)=>{const n=pt(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?mp(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=ut/(this._pointLabels.length||1),i=this.options.startAngle||0;return Ut(t*s+le(i))}getDistanceFromCenterForValue(t){if(at(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(at(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 kp(this.getContext(),t,i)}}getPointPosition(t,s,i=0){const n=this.getIndexAngle(t)-Dt+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(),gc(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&&wp(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));Sp(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=Rt(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=Yt(c.backdropPadding);t.fillRect(-a/2-u.left,-r-h.size/2-u.top,a+u.width,h.size+u.height)}ds(t,o.label,0,-r,h,{color:c.color})}),t.restore()}drawTitle(){}}vn.id="radialLinear",vn.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:an.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}},vn.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},vn.descriptors={angleLines:{_fallback:"grid"}};const xn={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}},Bt=Object.keys(xn);function Mp(e,t){return e-t}function pc(e,t){if(at(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)),Ot(a)||(a=typeof i=="string"?s.parse(a,i):s.parse(a)),a===null?null:(n&&(a=n==="week"&&(Os(r)||r===!0)?s.startOf(a,"isoWeek",r):s.startOf(a,n)),+a)}function mc(e,t,s,i){const n=Bt.length;for(let r=Bt.indexOf(e);r<n-1;++r){const a=xn[Bt[r]],o=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((s-t)/(o*a.size))<=i)return Bt[r]}return Bt[n-1]}function Dp(e,t,s,i,n){for(let r=Bt.length-1;r>=Bt.indexOf(s);r--){const a=Bt[r];if(xn[a].common&&e._adapter.diff(n,i,a)>=t-1)return a}return Bt[s?Bt.indexOf(s):0]}function Cp(e){for(let t=Bt.indexOf(e)+1,s=Bt.length;t<s;++t)if(xn[Bt[t]].common)return Bt[t]}function bc(e,t,s){if(!s)e[t]=!0;else if(s.length){const{lo:i,hi:n}=br(s,t),r=s[i]>=t?s[i]:s[n];e[r]=!0}}function Op(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 _c(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:Op(e,i,n,s)}class bi extends bs{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 xl._date(t.adapters.date);n.init(s),Xs(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:pc(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=Ot(n)&&!isNaN(n)?n:+s.startOf(Date.now(),i),r=Ot(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=uu(n,r,a);return this._unit=s.unit||(i.autoSkip?mc(s.minUnit,this.min,this.max,this._getLabelCapacity(r)):Dp(this,o.length,s.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Cp(this._unit),this.initOffsets(n),t.reverse&&o.reverse(),_c(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=It(s,0,a),i=It(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||mc(r.minUnit,s,i,this._getLabelCapacity(s)),o=B(r.stepSize,1),l=a==="week"?r.isoWeekday:!1,c=Os(l)||l===!0,h={};let u=s,d,f;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 g=n.ticks.source==="data"&&this.getDataTimestamps();for(d=u,f=0;d<i;d=+t.add(d,o,a),f++)bc(h,d,g);return(d===i||n.bounds==="ticks"||f===1)&&bc(h,d,g),Object.keys(h).sort((b,v)=>b-v).map(b=>+b)}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],d=l&&h&&u&&u.major,f=this._adapter.format(t,n||(d?h:c)),g=r.ticks.callback;return g?pt(g,[f,s,i],this):f}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=le(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,_c(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(pc(this,n[s]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return _o(t.sort(Mp))}}bi.id="time",bi.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function wn(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}=cs(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}=cs(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 yc extends bi{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=wn(s,this.min),this._tableRange=wn(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(wn(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const s=this._offsets,i=this.getDecimalForPixel(t)/s.factor-s.end;return wn(this._table,i*this._tableRange+this._minPos,!0)}}yc.id="timeseries",yc.defaults=bi.defaults;var Wt;(function(e){e.ChartRendered="chart:rendered",e.ChartUpdated="chart:updated",e.ChartDestroyed="chart:destroyed",e.LabelsUpdated="labels:updated"})(Wt||(Wt={}));function Sn(e,t,s,i){e(t,s),i!==void 0&&i.emit(Wt.ChartRendered)}function Pp(e,t){e.update(),t!==void 0&&t.emit(Wt.ChartUpdated)}function kn(e,t){e.destroy(),t!==void 0&&t.emit(Wt.ChartDestroyed)}function Tp(e,t){const s={labels:typeof e.labels>"u"?[]:[...e.labels],datasets:[]};return vc(s,{...e},t),s}function vc(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 Ap(e,t,s){e.data.labels=t,s!==void 0&&s.emit(Wt.LabelsUpdated)}function Rp(e,t){e.options={...t}}function Lp(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 Fp="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",Ep="annotation";function na(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[Ep])<"u"}},created(){pi.register(s)},mounted(){i[this.$data._id]=null,"datasets"in this.chartData&&this.chartData.datasets.length>0&&(Sn(this.renderChart,this.chartData,this.chartOptions),this.$emit(Wt.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&&(kn(a),this.$emit(Wt.ChartDestroyed)),this.$refs.canvas){const o=Tp(n,this.datasetIdKey),l=this.$refs.canvas.getContext("2d");l!==null&&this.setCurrentChart(new pi(l,{type:t,data:o,options:r,plugins:this.plugins}))}else throw new Error(Fp)},chartDataHandler(n,r){const a={...n},o={...r},l=this.getCurrentChart();Object.keys(o).length>0?Lp(a,o)&&l!==null?(vc(l.data,a,this.datasetIdKey),a.labels!==void 0&&(Ap(l,a.labels),this.$emit(Wt.LabelsUpdated)),this.updateChart(),this.$emit(Wt.ChartUpdated)):(l!==null&&(kn(l),this.$emit(Wt.ChartDestroyed)),Sn(this.renderChart,this.chartData,this.chartOptions),this.$emit(Wt.ChartRendered)):(l!==null&&(kn(l),this.$emit(Wt.ChartDestroyed)),Sn(this.renderChart,this.chartData,this.chartOptions),this.$emit(Wt.ChartRendered))},chartOptionsHandler(n){const r=this.getCurrentChart();r!==null?(Rp(r,n),this.updateChart()):Sn(this.renderChart,this.chartData,this.chartOptions)},updateChart(){const n=this.getCurrentChart();Pp(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&&(kn(n),this.$emit(Wt.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 Ip=na("bar-chart","bar",nn),Np=na("line-chart","line",rn),Yp=na("pie-chart","pie",zr);//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var xc;function R(){return xc.apply(null,arguments)}function zp(e){xc=e}function ue(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function ys(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function st(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ra(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(st(e,t))return!1;return!0}function jt(e){return e===void 0}function Fe(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function _i(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function wc(e,t){var s=[],i,n=e.length;for(i=0;i<n;++i)s.push(t(e[i],i));return s}function Qe(e,t){for(var s in t)st(t,s)&&(e[s]=t[s]);return st(t,"toString")&&(e.toString=t.toString),st(t,"valueOf")&&(e.valueOf=t.valueOf),e}function ve(e,t,s,i){return Xc(e,t,s,i,!0).utc()}function Vp(){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 j(e){return e._pf==null&&(e._pf=Vp()),e._pf}var aa;Array.prototype.some?aa=Array.prototype.some:aa=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 oa(e){var t=null,s=!1,i=e._d&&!isNaN(e._d.getTime());if(i&&(t=j(e),s=aa.call(t.parsedDateParts,function(n){return n!=null}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s),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 Mn(e){var t=ve(NaN);return e!=null?Qe(j(t),e):j(t).userInvalidated=!0,t}var Sc=R.momentProperties=[],la=!1;function ca(e,t){var s,i,n,r=Sc.length;if(jt(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),jt(t._i)||(e._i=t._i),jt(t._f)||(e._f=t._f),jt(t._l)||(e._l=t._l),jt(t._strict)||(e._strict=t._strict),jt(t._tzm)||(e._tzm=t._tzm),jt(t._isUTC)||(e._isUTC=t._isUTC),jt(t._offset)||(e._offset=t._offset),jt(t._pf)||(e._pf=j(t)),jt(t._locale)||(e._locale=t._locale),r>0)for(s=0;s<r;s++)i=Sc[s],n=t[i],jt(n)||(e[i]=n);return e}function yi(e){ca(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),la===!1&&(la=!0,R.updateOffset(this),la=!1)}function de(e){return e instanceof yi||e!=null&&e._isAMomentObject!=null}function kc(e){R.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function ie(e,t){var s=!0;return Qe(function(){if(R.deprecationHandler!=null&&R.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])st(arguments[0],a)&&(n+=a+": "+arguments[0][a]+", ");n=n.slice(0,-2)}else n=arguments[r];i.push(n)}kc(e+`
Arguments: `+Array.prototype.slice.call(i).join("")+`
`+new Error().stack),s=!1}return t.apply(this,arguments)},t)}var Mc={};function Dc(e,t){R.deprecationHandler!=null&&R.deprecationHandler(e,t),Mc[e]||(kc(t),Mc[e]=!0)}R.suppressDeprecationWarnings=!1,R.deprecationHandler=null;function xe(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function $p(e){var t,s;for(s in e)st(e,s)&&(t=e[s],xe(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 ha(e,t){var s=Qe({},e),i;for(i in t)st(t,i)&&(ys(e[i])&&ys(t[i])?(s[i]={},Qe(s[i],e[i]),Qe(s[i],t[i])):t[i]!=null?s[i]=t[i]:delete s[i]);for(i in e)st(e,i)&&!st(t,i)&&ys(e[i])&&(s[i]=Qe({},s[i]));return s}function ua(e){e!=null&&this.set(e)}var da;Object.keys?da=Object.keys:da=function(e){var t,s=[];for(t in e)st(e,t)&&s.push(t);return s};var Wp={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Hp(e,t,s){var i=this._calendar[e]||this._calendar.sameElse;return xe(i)?i.call(t,s):i}function we(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 fa=/(\[[^\[]*\])|(\\)?([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,Dn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ga={},Fs={};function V(e,t,s,i){var n=i;typeof i=="string"&&(n=function(){return this[i]()}),e&&(Fs[e]=n),t&&(Fs[t[0]]=function(){return we(n.apply(this,arguments),t[1],t[2])}),s&&(Fs[s]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function Bp(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function jp(e){var t=e.match(fa),s,i;for(s=0,i=t.length;s<i;s++)Fs[t[s]]?t[s]=Fs[t[s]]:t[s]=Bp(t[s]);return function(n){var r="",a;for(a=0;a<i;a++)r+=xe(t[a])?t[a].call(n,e):t[a];return r}}function Cn(e,t){return e.isValid()?(t=Cc(t,e.localeData()),ga[t]=ga[t]||jp(t),ga[t](e)):e.localeData().invalidDate()}function Cc(e,t){var s=5;function i(n){return t.longDateFormat(n)||n}for(Dn.lastIndex=0;s>=0&&Dn.test(e);)e=e.replace(Dn,i),Dn.lastIndex=0,s-=1;return e}var Up={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 Gp(e){var t=this._longDateFormat[e],s=this._longDateFormat[e.toUpperCase()];return t||!s?t:(this._longDateFormat[e]=s.match(fa).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[e])}var qp="Invalid date";function Xp(){return this._invalidDate}var Kp="%d",Zp=/\d{1,2}/;function Jp(e){return this._ordinal.replace("%d",e)}var Qp={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 tm(e,t,s,i){var n=this._relativeTime[s];return xe(n)?n(e,t,s,i):n.replace(/%d/i,e)}function em(e,t){var s=this._relativeTime[e>0?"future":"past"];return xe(s)?s(t):s.replace(/%s/i,t)}var Oc={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return typeof e=="string"?Oc[e]||Oc[e.toLowerCase()]:void 0}function pa(e){var t={},s,i;for(i in e)st(e,i)&&(s=ne(i),s&&(t[s]=e[i]));return t}var sm={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function im(e){var t=[],s;for(s in e)st(e,s)&&t.push({unit:s,priority:sm[s]});return t.sort(function(i,n){return i.priority-n.priority}),t}var Pc=/\d/,Gt=/\d\d/,Tc=/\d{3}/,ma=/\d{4}/,On=/[+-]?\d{6}/,mt=/\d\d?/,Ac=/\d\d\d\d?/,Rc=/\d\d\d\d\d\d?/,Pn=/\d{1,3}/,ba=/\d{1,4}/,Tn=/[+-]?\d{1,6}/,Es=/\d+/,An=/[+-]?\d+/,nm=/Z|[+-]\d\d:?\d\d/gi,Rn=/Z|[+-]\d\d(?::?\d\d)?/gi,rm=/[+-]?\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,Is=/^[1-9]\d?/,_a=/^([1-9]\d|\d)/,Ln;Ln={};function I(e,t,s){Ln[e]=xe(t)?t:function(i,n){return i&&s?s:t}}function am(e,t){return st(Ln,e)?Ln[e](t._strict,t._locale):new RegExp(om(e))}function om(e){return Ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,s,i,n,r){return s||i||n||r}))}function Ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function re(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function X(e){var t=+e,s=0;return t!==0&&isFinite(t)&&(s=re(t)),s}var ya={};function dt(e,t){var s,i=t,n;for(typeof e=="string"&&(e=[e]),Fe(t)&&(i=function(r,a){a[t]=X(r)}),n=e.length,s=0;s<n;s++)ya[e[s]]=i}function xi(e,t){dt(e,function(s,i,n,r){n._w=n._w||{},t(s,n._w,n,r)})}function lm(e,t,s){t!=null&&st(ya,e)&&ya[e](t,s._a,s,e)}function Fn(e){return e%4===0&&e%100!==0||e%400===0}var zt=0,Ie=1,Se=2,Lt=3,fe=4,Ne=5,vs=6,cm=7,hm=8;V("Y",0,0,function(){var e=this.year();return e<=9999?we(e,4):"+"+e}),V(0,["YY",2],0,function(){return this.year()%100}),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),I("Y",An),I("YY",mt,Gt),I("YYYY",ba,ma),I("YYYYY",Tn,On),I("YYYYYY",Tn,On),dt(["YYYYY","YYYYYY"],zt),dt("YYYY",function(e,t){t[zt]=e.length===2?R.parseTwoDigitYear(e):X(e)}),dt("YY",function(e,t){t[zt]=R.parseTwoDigitYear(e)}),dt("Y",function(e,t){t[zt]=parseInt(e,10)});function wi(e){return Fn(e)?366:365}R.parseTwoDigitYear=function(e){return X(e)+(X(e)>68?1900:2e3)};var Lc=Ns("FullYear",!0);function um(){return Fn(this.year())}function Ns(e,t){return function(s){return s!=null?(Fc(this,e,s),R.updateOffset(this,t),this):Si(this,e)}}function Si(e,t){if(!e.isValid())return NaN;var s=e._d,i=e._isUTC;switch(t){case"Milliseconds":return i?s.getUTCMilliseconds():s.getMilliseconds();case"Seconds":return i?s.getUTCSeconds():s.getSeconds();case"Minutes":return i?s.getUTCMinutes():s.getMinutes();case"Hours":return i?s.getUTCHours():s.getHours();case"Date":return i?s.getUTCDate():s.getDate();case"Day":return i?s.getUTCDay():s.getDay();case"Month":return i?s.getUTCMonth():s.getMonth();case"FullYear":return i?s.getUTCFullYear():s.getFullYear();default:return NaN}}function Fc(e,t,s){var i,n,r,a,o;if(!(!e.isValid()||isNaN(s))){switch(i=e._d,n=e._isUTC,t){case"Milliseconds":return void(n?i.setUTCMilliseconds(s):i.setMilliseconds(s));case"Seconds":return void(n?i.setUTCSeconds(s):i.setSeconds(s));case"Minutes":return void(n?i.setUTCMinutes(s):i.setMinutes(s));case"Hours":return void(n?i.setUTCHours(s):i.setHours(s));case"Date":return void(n?i.setUTCDate(s):i.setDate(s));case"FullYear":break;default:return}r=s,a=e.month(),o=e.date(),o=o===29&&a===1&&!Fn(r)?28:o,n?i.setUTCFullYear(r,a,o):i.setFullYear(r,a,o)}}function dm(e){return e=ne(e),xe(this[e])?this[e]():this}function fm(e,t){if(typeof e=="object"){e=pa(e);var s=im(e),i,n=s.length;for(i=0;i<n;i++)this[s[i].unit](e[s[i].unit])}else if(e=ne(e),xe(this[e]))return this[e](t);return this}function gm(e,t){return(e%t+t)%t}var Pt;Array.prototype.indexOf?Pt=Array.prototype.indexOf:Pt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function va(e,t){if(isNaN(e)||isNaN(t))return NaN;var s=gm(t,12);return e+=(t-s)/12,s===1?Fn(e)?29:28:31-s%7%2}V("M",["MM",2],"Mo",function(){return this.month()+1}),V("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),V("MMMM",0,0,function(e){return this.localeData().months(this,e)}),I("M",mt,Is),I("MM",mt,Gt),I("MMM",function(e,t){return t.monthsShortRegex(e)}),I("MMMM",function(e,t){return t.monthsRegex(e)}),dt(["M","MM"],function(e,t){t[Ie]=X(e)-1}),dt(["MMM","MMMM"],function(e,t,s,i){var n=s._locale.monthsParse(e,i,s._strict);n!=null?t[Ie]=n:j(s).invalidMonth=e});var pm="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ec="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ic=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,mm=vi,bm=vi;function _m(e,t){return e?ue(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ic).test(t)?"format":"standalone"][e.month()]:ue(this._months)?this._months:this._months.standalone}function ym(e,t){return e?ue(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ic.test(t)?"format":"standalone"][e.month()]:ue(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function vm(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=ve([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return s?t==="MMM"?(n=Pt.call(this._shortMonthsParse,a),n!==-1?n:null):(n=Pt.call(this._longMonthsParse,a),n!==-1?n:null):t==="MMM"?(n=Pt.call(this._shortMonthsParse,a),n!==-1?n:(n=Pt.call(this._longMonthsParse,a),n!==-1?n:null)):(n=Pt.call(this._longMonthsParse,a),n!==-1?n:(n=Pt.call(this._shortMonthsParse,a),n!==-1?n:null))}function xm(e,t,s){var i,n,r;if(this._monthsParseExact)return vm.call(this,e,t,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(n=ve([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 Nc(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=X(t);else if(t=e.localeData().monthsParse(t),!Fe(t))return e}var s=t,i=e.date();return i=i<29?i:Math.min(i,va(e.year(),s)),e._isUTC?e._d.setUTCMonth(s,i):e._d.setMonth(s,i),e}function Yc(e){return e!=null?(Nc(this,e),R.updateOffset(this,!0),this):Si(this,"Month")}function wm(){return va(this.year(),this.month())}function Sm(e){return this._monthsParseExact?(st(this,"_monthsRegex")||zc.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(st(this,"_monthsShortRegex")||(this._monthsShortRegex=mm),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function km(e){return this._monthsParseExact?(st(this,"_monthsRegex")||zc.call(this),e?this._monthsStrictRegex:this._monthsRegex):(st(this,"_monthsRegex")||(this._monthsRegex=bm),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function zc(){function e(l,c){return c.length-l.length}var t=[],s=[],i=[],n,r,a,o;for(n=0;n<12;n++)r=ve([2e3,n]),a=Ee(this.monthsShort(r,"")),o=Ee(this.months(r,"")),t.push(a),s.push(o),i.push(o),i.push(a);t.sort(e),s.sort(e),i.sort(e),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")}function Mm(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 ki(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 En(e,t,s){var i=7+t-s,n=(7+ki(e,0,i).getUTCDay()-t)%7;return-n+i-1}function Vc(e,t,s,i,n){var r=(7+s-i)%7,a=En(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 Mi(e,t,s){var i=En(e.year(),t,s),n=Math.floor((e.dayOfYear()-i-1)/7)+1,r,a;return n<1?(a=e.year()-1,r=n+Ye(a,t,s)):n>Ye(e.year(),t,s)?(r=n-Ye(e.year(),t,s),a=e.year()+1):(a=e.year(),r=n),{week:r,year:a}}function Ye(e,t,s){var i=En(e,t,s),n=En(e+1,t,s);return(wi(e)-i+n)/7}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),I("w",mt,Is),I("ww",mt,Gt),I("W",mt,Is),I("WW",mt,Gt),xi(["w","ww","W","WW"],function(e,t,s,i){t[i.substr(0,1)]=X(e)});function Dm(e){return Mi(e,this._week.dow,this._week.doy).week}var Cm={dow:0,doy:6};function Om(){return this._week.dow}function Pm(){return this._week.doy}function Tm(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Am(e){var t=Mi(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}V("d",0,"do","day"),V("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),V("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),V("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),I("d",mt),I("e",mt),I("E",mt),I("dd",function(e,t){return t.weekdaysMinRegex(e)}),I("ddd",function(e,t){return t.weekdaysShortRegex(e)}),I("dddd",function(e,t){return t.weekdaysRegex(e)}),xi(["dd","ddd","dddd"],function(e,t,s,i){var n=s._locale.weekdaysParse(e,i,s._strict);n!=null?t.d=n:j(s).invalidWeekday=e}),xi(["d","e","E"],function(e,t,s,i){t[i]=X(e)});function Rm(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Lm(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function xa(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Fm="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$c="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Em="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Im=vi,Nm=vi,Ym=vi;function zm(e,t){var s=ue(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?xa(s,this._week.dow):e?s[e.day()]:s}function Vm(e){return e===!0?xa(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function $m(e){return e===!0?xa(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Wm(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=ve([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=Pt.call(this._weekdaysParse,a),n!==-1?n:null):t==="ddd"?(n=Pt.call(this._shortWeekdaysParse,a),n!==-1?n:null):(n=Pt.call(this._minWeekdaysParse,a),n!==-1?n:null):t==="dddd"?(n=Pt.call(this._weekdaysParse,a),n!==-1||(n=Pt.call(this._shortWeekdaysParse,a),n!==-1)?n:(n=Pt.call(this._minWeekdaysParse,a),n!==-1?n:null)):t==="ddd"?(n=Pt.call(this._shortWeekdaysParse,a),n!==-1||(n=Pt.call(this._weekdaysParse,a),n!==-1)?n:(n=Pt.call(this._minWeekdaysParse,a),n!==-1?n:null)):(n=Pt.call(this._minWeekdaysParse,a),n!==-1||(n=Pt.call(this._weekdaysParse,a),n!==-1)?n:(n=Pt.call(this._shortWeekdaysParse,a),n!==-1?n:null))}function Hm(e,t,s){var i,n,r;if(this._weekdaysParseExact)return Wm.call(this,e,t,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(n=ve([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 Bm(e){if(!this.isValid())return e!=null?this:NaN;var t=Si(this,"Day");return e!=null?(e=Rm(e,this.localeData()),this.add(e-t,"d")):t}function jm(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 Um(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Lm(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Gm(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||wa.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(st(this,"_weekdaysRegex")||(this._weekdaysRegex=Im),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qm(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||wa.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(st(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Nm),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Xm(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||wa.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(st(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ym),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=ve([2e3,1]).day(r),o=Ee(this.weekdaysMin(a,"")),l=Ee(this.weekdaysShort(a,"")),c=Ee(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 Sa(){return this.hours()%12||12}function Km(){return this.hours()||24}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Sa),V("k",["kk",2],0,Km),V("hmm",0,0,function(){return""+Sa.apply(this)+we(this.minutes(),2)}),V("hmmss",0,0,function(){return""+Sa.apply(this)+we(this.minutes(),2)+we(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+we(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+we(this.minutes(),2)+we(this.seconds(),2)});function Wc(e,t){V(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Wc("a",!0),Wc("A",!1);function Hc(e,t){return t._meridiemParse}I("a",Hc),I("A",Hc),I("H",mt,_a),I("h",mt,Is),I("k",mt,Is),I("HH",mt,Gt),I("hh",mt,Gt),I("kk",mt,Gt),I("hmm",Ac),I("hmmss",Rc),I("Hmm",Ac),I("Hmmss",Rc),dt(["H","HH"],Lt),dt(["k","kk"],function(e,t,s){var i=X(e);t[Lt]=i===24?0:i}),dt(["a","A"],function(e,t,s){s._isPm=s._locale.isPM(e),s._meridiem=e}),dt(["h","hh"],function(e,t,s){t[Lt]=X(e),j(s).bigHour=!0}),dt("hmm",function(e,t,s){var i=e.length-2;t[Lt]=X(e.substr(0,i)),t[fe]=X(e.substr(i)),j(s).bigHour=!0}),dt("hmmss",function(e,t,s){var i=e.length-4,n=e.length-2;t[Lt]=X(e.substr(0,i)),t[fe]=X(e.substr(i,2)),t[Ne]=X(e.substr(n)),j(s).bigHour=!0}),dt("Hmm",function(e,t,s){var i=e.length-2;t[Lt]=X(e.substr(0,i)),t[fe]=X(e.substr(i))}),dt("Hmmss",function(e,t,s){var i=e.length-4,n=e.length-2;t[Lt]=X(e.substr(0,i)),t[fe]=X(e.substr(i,2)),t[Ne]=X(e.substr(n))});function Zm(e){return(e+"").toLowerCase().charAt(0)==="p"}var Jm=/[ap]\.?m?\.?/i,Qm=Ns("Hours",!0);function tb(e,t,s){return e>11?s?"pm":"PM":s?"am":"AM"}var Bc={calendar:Wp,longDateFormat:Up,invalidDate:qp,ordinal:Kp,dayOfMonthOrdinalParse:Zp,relativeTime:Qp,months:pm,monthsShort:Ec,week:Cm,weekdays:Fm,weekdaysMin:Em,weekdaysShort:$c,meridiemParse:Jm},xt={},Di={},Ci;function eb(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 jc(e){return e&&e.toLowerCase().replace("_","-")}function sb(e){for(var t=0,s,i,n,r;t<e.length;){for(r=jc(e[t]).split("-"),s=r.length,i=jc(e[t+1]),i=i?i.split("-"):null;s>0;){if(n=In(r.slice(0,s).join("-")),n)return n;if(i&&i.length>=s&&eb(r,i)>=s-1)break;s--}t++}return Ci}function ib(e){return!!(e&&e.match("^[^/\\\\]*$"))}function In(e){var t=null,s;if(xt[e]===void 0&&typeof module<"u"&&module&&module.exports&&ib(e))try{t=Ci._abbr,s=require,s("./locale/"+e),ts(t)}catch{xt[e]=null}return xt[e]}function ts(e,t){var s;return e&&(jt(t)?s=ze(e):s=ka(e,t),s?Ci=s:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ci._abbr}function ka(e,t){if(t!==null){var s,i=Bc;if(t.abbr=e,xt[e]!=null)Dc("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=xt[e]._config;else if(t.parentLocale!=null)if(xt[t.parentLocale]!=null)i=xt[t.parentLocale]._config;else if(s=In(t.parentLocale),s!=null)i=s._config;else return Di[t.parentLocale]||(Di[t.parentLocale]=[]),Di[t.parentLocale].push({name:e,config:t}),null;return xt[e]=new ua(ha(i,t)),Di[e]&&Di[e].forEach(function(n){ka(n.name,n.config)}),ts(e),xt[e]}else return delete xt[e],null}function nb(e,t){if(t!=null){var s,i,n=Bc;xt[e]!=null&&xt[e].parentLocale!=null?xt[e].set(ha(xt[e]._config,t)):(i=In(e),i!=null&&(n=i._config),t=ha(n,t),i==null&&(t.abbr=e),s=new ua(t),s.parentLocale=xt[e],xt[e]=s),ts(e)}else xt[e]!=null&&(xt[e].parentLocale!=null?(xt[e]=xt[e].parentLocale,e===ts()&&ts(e)):xt[e]!=null&&delete xt[e]);return xt[e]}function ze(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ci;if(!ue(e)){if(t=In(e),t)return t;e=[e]}return sb(e)}function rb(){return da(xt)}function Ma(e){var t,s=e._a;return s&&j(e).overflow===-2&&(t=s[Ie]<0||s[Ie]>11?Ie:s[Se]<1||s[Se]>va(s[zt],s[Ie])?Se:s[Lt]<0||s[Lt]>24||s[Lt]===24&&(s[fe]!==0||s[Ne]!==0||s[vs]!==0)?Lt:s[fe]<0||s[fe]>59?fe:s[Ne]<0||s[Ne]>59?Ne:s[vs]<0||s[vs]>999?vs:-1,j(e)._overflowDayOfYear&&(t<zt||t>Se)&&(t=Se),j(e)._overflowWeeks&&t===-1&&(t=cm),j(e)._overflowWeekday&&t===-1&&(t=hm),j(e).overflow=t),e}var ab=/^\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)?)?$/,ob=/^\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)?)?$/,lb=/Z|[+-]\d\d(?::?\d\d)?/,Nn=[["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]],Da=[["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/]],cb=/^\/?Date\((-?\d+)/i,hb=/^(?:(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}))$/,ub={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Uc(e){var t,s,i=e._i,n=ab.exec(i)||ob.exec(i),r,a,o,l,c=Nn.length,h=Da.length;if(n){for(j(e).iso=!0,t=0,s=c;t<s;t++)if(Nn[t][1].exec(n[1])){a=Nn[t][0],r=Nn[t][2]!==!1;break}if(a==null){e._isValid=!1;return}if(n[3]){for(t=0,s=h;t<s;t++)if(Da[t][1].exec(n[3])){o=(n[2]||" ")+Da[t][0];break}if(o==null){e._isValid=!1;return}}if(!r&&o!=null){e._isValid=!1;return}if(n[4])if(lb.exec(n[4]))l="Z";else{e._isValid=!1;return}e._f=a+(o||"")+(l||""),Oa(e)}else e._isValid=!1}function db(e,t,s,i,n,r){var a=[fb(e),Ec.indexOf(t),parseInt(s,10),parseInt(i,10),parseInt(n,10)];return r&&a.push(parseInt(r,10)),a}function fb(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function gb(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function pb(e,t,s){if(e){var i=$c.indexOf(e),n=new Date(t[0],t[1],t[2]).getDay();if(i!==n)return j(s).weekdayMismatch=!0,s._isValid=!1,!1}return!0}function mb(e,t,s){if(e)return ub[e];if(t)return 0;var i=parseInt(s,10),n=i%100,r=(i-n)/100;return r*60+n}function Gc(e){var t=hb.exec(gb(e._i)),s;if(t){if(s=db(t[4],t[3],t[2],t[5],t[6],t[7]),!pb(t[1],s,e))return;e._a=s,e._tzm=mb(t[8],t[9],t[10]),e._d=ki.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),j(e).rfc2822=!0}else e._isValid=!1}function bb(e){var t=cb.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Uc(e),e._isValid===!1)delete e._isValid;else return;if(Gc(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:R.createFromInputFallback(e)}R.createFromInputFallback=ie("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 Ys(e,t,s){return e??t??s}function _b(e){var t=new Date(R.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Ca(e){var t,s,i=[],n,r,a;if(!e._d){for(n=_b(e),e._w&&e._a[Se]==null&&e._a[Ie]==null&&yb(e),e._dayOfYear!=null&&(a=Ys(e._a[zt],n[zt]),(e._dayOfYear>wi(a)||e._dayOfYear===0)&&(j(e)._overflowDayOfYear=!0),s=ki(a,0,e._dayOfYear),e._a[Ie]=s.getUTCMonth(),e._a[Se]=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[Lt]===24&&e._a[fe]===0&&e._a[Ne]===0&&e._a[vs]===0&&(e._nextDay=!0,e._a[Lt]=0),e._d=(e._useUTC?ki:Mm).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[Lt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==r&&(j(e).weekdayMismatch=!0)}}function yb(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=Ys(t.GG,e._a[zt],Mi(bt(),1,4).year),i=Ys(t.W,1),n=Ys(t.E,1),(n<1||n>7)&&(l=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,c=Mi(bt(),r,a),s=Ys(t.gg,e._a[zt],c.year),i=Ys(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>Ye(s,r,a)?j(e)._overflowWeeks=!0:l!=null?j(e)._overflowWeekday=!0:(o=Vc(s,i,n,r,a),e._a[zt]=o.year,e._dayOfYear=o.dayOfYear)}R.ISO_8601=function(){},R.RFC_2822=function(){};function Oa(e){if(e._f===R.ISO_8601){Uc(e);return}if(e._f===R.RFC_2822){Gc(e);return}e._a=[],j(e).empty=!0;var t=""+e._i,s,i,n,r,a,o=t.length,l=0,c,h;for(n=Cc(e._f,e._locale).match(fa)||[],h=n.length,s=0;s<h;s++)r=n[s],i=(t.match(am(r,e))||[])[0],i&&(a=t.substr(0,t.indexOf(i)),a.length>0&&j(e).unusedInput.push(a),t=t.slice(t.indexOf(i)+i.length),l+=i.length),Fs[r]?(i?j(e).empty=!1:j(e).unusedTokens.push(r),lm(r,i,e)):e._strict&&!i&&j(e).unusedTokens.push(r);j(e).charsLeftOver=o-l,t.length>0&&j(e).unusedInput.push(t),e._a[Lt]<=12&&j(e).bigHour===!0&&e._a[Lt]>0&&(j(e).bigHour=void 0),j(e).parsedDateParts=e._a.slice(0),j(e).meridiem=e._meridiem,e._a[Lt]=vb(e._locale,e._a[Lt],e._meridiem),c=j(e).era,c!==null&&(e._a[zt]=e._locale.erasConvertYear(c,e._a[zt])),Ca(e),Ma(e)}function vb(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 xb(e){var t,s,i,n,r,a,o=!1,l=e._f.length;if(l===0){j(e).invalidFormat=!0,e._d=new Date(NaN);return}for(n=0;n<l;n++)r=0,a=!1,t=ca({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[n],Oa(t),oa(t)&&(a=!0),r+=j(t).charsLeftOver,r+=j(t).unusedTokens.length*10,j(t).score=r,o?r<i&&(i=r,s=t):(i==null||r<i||a)&&(i=r,s=t,a&&(o=!0));Qe(e,s||t)}function wb(e){if(!e._d){var t=pa(e._i),s=t.day===void 0?t.date:t.day;e._a=wc([t.year,t.month,s,t.hour,t.minute,t.second,t.millisecond],function(i){return i&&parseInt(i,10)}),Ca(e)}}function Sb(e){var t=new yi(Ma(qc(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function qc(e){var t=e._i,s=e._f;return e._locale=e._locale||ze(e._l),t===null||s===void 0&&t===""?Mn({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),de(t)?new yi(Ma(t)):(_i(t)?e._d=t:ue(s)?xb(e):s?Oa(e):kb(e),oa(e)||(e._d=null),e))}function kb(e){var t=e._i;jt(t)?e._d=new Date(R.now()):_i(t)?e._d=new Date(t.valueOf()):typeof t=="string"?bb(e):ue(t)?(e._a=wc(t.slice(0),function(s){return parseInt(s,10)}),Ca(e)):ys(t)?wb(e):Fe(t)?e._d=new Date(t):R.createFromInputFallback(e)}function Xc(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),(ys(e)&&ra(e)||ue(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,Sb(r)}function bt(e,t,s,i){return Xc(e,t,s,i,!1)}var Mb=ie("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Mn()}),Db=ie("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Mn()});function Kc(e,t){var s,i;if(t.length===1&&ue(t[0])&&(t=t[0]),!t.length)return bt();for(s=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][e](s))&&(s=t[i]);return s}function Cb(){var e=[].slice.call(arguments,0);return Kc("isBefore",e)}function Ob(){var e=[].slice.call(arguments,0);return Kc("isAfter",e)}var Pb=function(){return Date.now?Date.now():+new Date},Oi=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Tb(e){var t,s=!1,i,n=Oi.length;for(t in e)if(st(e,t)&&!(Pt.call(Oi,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(i=0;i<n;++i)if(e[Oi[i]]){if(s)return!1;parseFloat(e[Oi[i]])!==X(e[Oi[i]])&&(s=!0)}return!0}function Ab(){return this._isValid}function Rb(){return ge(NaN)}function Yn(e){var t=pa(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=Tb(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=ze(),this._bubble()}function zn(e){return e instanceof Yn}function Pa(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Lb(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&&X(e[a])!==X(t[a]))&&r++;return r+n}function Zc(e,t){V(e,0,0,function(){var s=this.utcOffset(),i="+";return s<0&&(s=-s,i="-"),i+we(~~(s/60),2)+t+we(~~s%60,2)})}Zc("Z",":"),Zc("ZZ",""),I("Z",Rn),I("ZZ",Rn),dt(["Z","ZZ"],function(e,t,s){s._useUTC=!0,s._tzm=Ta(Rn,e)});var Fb=/([\+\-]|\d\d)/gi;function Ta(e,t){var s=(t||"").match(e),i,n,r;return s===null?null:(i=s[s.length-1]||[],n=(i+"").match(Fb)||["-",0,0],r=+(n[1]*60)+X(n[2]),r===0?0:n[0]==="+"?r:-r)}function Aa(e,t){var s,i;return t._isUTC?(s=t.clone(),i=(de(e)||_i(e)?e.valueOf():bt(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),R.updateOffset(s,!1),s):bt(e).local()}function Ra(e){return-Math.round(e._d.getTimezoneOffset())}R.updateOffset=function(){};function Eb(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=Ta(Rn,e),e===null)return this}else Math.abs(e)<16&&!s&&(e=e*60);return!this._isUTC&&t&&(n=Ra(this)),this._offset=e,this._isUTC=!0,n!=null&&this.add(n,"m"),i!==e&&(!t||this._changeInProgress?eh(this,ge(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,R.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:Ra(this)}function Ib(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Nb(e){return this.utcOffset(0,e)}function Yb(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ra(this),"m")),this}function zb(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Ta(nm,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Vb(e){return this.isValid()?(e=e?bt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function $b(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Wb(){if(!jt(this._isDSTShifted))return this._isDSTShifted;var e={},t;return ca(e,this),e=qc(e),e._a?(t=e._isUTC?ve(e._a):bt(e._a),this._isDSTShifted=this.isValid()&&Lb(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Hb(){return this.isValid()?!this._isUTC:!1}function Bb(){return this.isValid()?this._isUTC:!1}function Jc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var jb=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ub=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ge(e,t){var s=e,i=null,n,r,a;return zn(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:Fe(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(i=jb.exec(e))?(n=i[1]==="-"?-1:1,s={y:0,d:X(i[Se])*n,h:X(i[Lt])*n,m:X(i[fe])*n,s:X(i[Ne])*n,ms:X(Pa(i[vs]*1e3))*n}):(i=Ub.exec(e))?(n=i[1]==="-"?-1:1,s={y:xs(i[2],n),M:xs(i[3],n),w:xs(i[4],n),d:xs(i[5],n),h:xs(i[6],n),m:xs(i[7],n),s:xs(i[8],n)}):s==null?s={}:typeof s=="object"&&("from"in s||"to"in s)&&(a=Gb(bt(s.from),bt(s.to)),s={},s.ms=a.milliseconds,s.M=a.months),r=new Yn(s),zn(e)&&st(e,"_locale")&&(r._locale=e._locale),zn(e)&&st(e,"_isValid")&&(r._isValid=e._isValid),r}ge.fn=Yn.prototype,ge.invalid=Rb;function xs(e,t){var s=e&&parseFloat(e.replace(",","."));return(isNaN(s)?0:s)*t}function Qc(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 Gb(e,t){var s;return e.isValid()&&t.isValid()?(t=Aa(t,e),e.isBefore(t)?s=Qc(e,t):(s=Qc(t,e),s.milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0}}function th(e,t){return function(s,i){var n,r;return i!==null&&!isNaN(+i)&&(Dc(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=ge(s,i),eh(this,n,e),this}}function eh(e,t,s,i){var n=t._milliseconds,r=Pa(t._days),a=Pa(t._months);e.isValid()&&(i=i??!0,a&&Nc(e,Si(e,"Month")+a*s),r&&Fc(e,"Date",Si(e,"Date")+r*s),n&&e._d.setTime(e._d.valueOf()+n*s),i&&R.updateOffset(e,r||a))}var qb=th(1,"add"),Xb=th(-1,"subtract");function sh(e){return typeof e=="string"||e instanceof String}function Kb(e){return de(e)||_i(e)||sh(e)||Fe(e)||Jb(e)||Zb(e)||e===null||e===void 0}function Zb(e){var t=ys(e)&&!ra(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||st(e,r);return t&&s}function Jb(e){var t=ue(e),s=!1;return t&&(s=e.filter(function(i){return!Fe(i)&&sh(e)}).length===0),t&&s}function Qb(e){var t=ys(e)&&!ra(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||st(e,r);return t&&s}function t_(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 e_(e,t){arguments.length===1&&(arguments[0]?Kb(arguments[0])?(e=arguments[0],t=void 0):Qb(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||bt(),i=Aa(s,this).startOf("day"),n=R.calendarFormat(this,i)||"sameElse",r=t&&(xe(t[n])?t[n].call(this,s):t[n]);return this.format(r||this.localeData().calendar(n,this,bt(s)))}function s_(){return new yi(this)}function i_(e,t){var s=de(e)?e:bt(e);return this.isValid()&&s.isValid()?(t=ne(t)||"millisecond",t==="millisecond"?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(t).valueOf()):!1}function n_(e,t){var s=de(e)?e:bt(e);return this.isValid()&&s.isValid()?(t=ne(t)||"millisecond",t==="millisecond"?this.valueOf()<s.valueOf():this.clone().endOf(t).valueOf()<s.valueOf()):!1}function r_(e,t,s,i){var n=de(e)?e:bt(e),r=de(t)?t:bt(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 a_(e,t){var s=de(e)?e:bt(e),i;return this.isValid()&&s.isValid()?(t=ne(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 o_(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function l_(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function c_(e,t,s){var i,n,r;if(!this.isValid())return NaN;if(i=Aa(e,this),!i.isValid())return NaN;switch(n=(i.utcOffset()-this.utcOffset())*6e4,t=ne(t),t){case"year":r=Vn(this,i)/12;break;case"month":r=Vn(this,i);break;case"quarter":r=Vn(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:re(r)}function Vn(e,t){if(e.date()<t.date())return-Vn(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}R.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",R.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function h_(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function u_(e){if(!this.isValid())return null;var t=e!==!0,s=t?this.clone().utc():this;return s.year()<0||s.year()>9999?Cn(s,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):xe(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Cn(s,"Z")):Cn(s,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function d_(){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 f_(e){e||(e=this.isUtc()?R.defaultFormatUtc:R.defaultFormat);var t=Cn(this,e);return this.localeData().postformat(t)}function g_(e,t){return this.isValid()&&(de(e)&&e.isValid()||bt(e).isValid())?ge({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function p_(e){return this.from(bt(),e)}function m_(e,t){return this.isValid()&&(de(e)&&e.isValid()||bt(e).isValid())?ge({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function b_(e){return this.to(bt(),e)}function ih(e){var t;return e===void 0?this._locale._abbr:(t=ze(e),t!=null&&(this._locale=t),this)}var nh=ie("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 rh(){return this._locale}var $n=1e3,zs=60*$n,Wn=60*zs,ah=(365*400+97)*24*Wn;function Vs(e,t){return(e%t+t)%t}function oh(e,t,s){return e<100&&e>=0?new Date(e+400,t,s)-ah:new Date(e,t,s).valueOf()}function lh(e,t,s){return e<100&&e>=0?Date.UTC(e+400,t,s)-ah:Date.UTC(e,t,s)}function __(e){var t,s;if(e=ne(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?lh:oh,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-=Vs(t+(this._isUTC?0:this.utcOffset()*zs),Wn);break;case"minute":t=this._d.valueOf(),t-=Vs(t,zs);break;case"second":t=this._d.valueOf(),t-=Vs(t,$n);break}return this._d.setTime(t),R.updateOffset(this,!0),this}function y_(e){var t,s;if(e=ne(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?lh:oh,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+=Wn-Vs(t+(this._isUTC?0:this.utcOffset()*zs),Wn)-1;break;case"minute":t=this._d.valueOf(),t+=zs-Vs(t,zs)-1;break;case"second":t=this._d.valueOf(),t+=$n-Vs(t,$n)-1;break}return this._d.setTime(t),R.updateOffset(this,!0),this}function v_(){return this._d.valueOf()-(this._offset||0)*6e4}function x_(){return Math.floor(this.valueOf()/1e3)}function w_(){return new Date(this.valueOf())}function S_(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function k_(){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 M_(){return this.isValid()?this.toISOString():null}function D_(){return oa(this)}function C_(){return Qe({},j(this))}function O_(){return j(this).overflow}function P_(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),I("N",La),I("NN",La),I("NNN",La),I("NNNN",V_),I("NNNNN",$_),dt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,s,i){var n=s._locale.erasParse(e,i,s._strict);n?j(s).era=n:j(s).invalidEra=e}),I("y",Es),I("yy",Es),I("yyy",Es),I("yyyy",Es),I("yo",W_),dt(["y","yy","yyy","yyyy"],zt),dt(["yo"],function(e,t,s,i){var n;s._locale._eraYearOrdinalRegex&&(n=e.match(s._locale._eraYearOrdinalRegex)),s._locale.eraYearOrdinalParse?t[zt]=s._locale.eraYearOrdinalParse(e,n):t[zt]=parseInt(e,10)});function T_(e,t){var s,i,n,r=this._eras||ze("en")._eras;for(s=0,i=r.length;s<i;++s){switch(typeof r[s].since){case"string":n=R(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=R(r[s].until).startOf("day").valueOf(),r[s].until=n.valueOf();break}}return r}function A_(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 R_(e,t){var s=e.since<=e.until?1:-1;return t===void 0?R(e.since).year():R(e.since).year()+(t-e.offset)*s}function L_(){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 F_(){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 E_(){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 I_(){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()-R(n[e].since).year())*s+n[e].offset;return this.year()}function N_(e){return st(this,"_erasNameRegex")||Fa.call(this),e?this._erasNameRegex:this._erasRegex}function Y_(e){return st(this,"_erasAbbrRegex")||Fa.call(this),e?this._erasAbbrRegex:this._erasRegex}function z_(e){return st(this,"_erasNarrowRegex")||Fa.call(this),e?this._erasNarrowRegex:this._erasRegex}function La(e,t){return t.erasAbbrRegex(e)}function V_(e,t){return t.erasNameRegex(e)}function $_(e,t){return t.erasNarrowRegex(e)}function W_(e,t){return t._eraYearOrdinalRegex||Es}function Fa(){var e=[],t=[],s=[],i=[],n,r,a,o,l,c=this.eras();for(n=0,r=c.length;n<r;++n)a=Ee(c[n].name),o=Ee(c[n].abbr),l=Ee(c[n].narrow),t.push(a),e.push(o),s.push(l),i.push(a),i.push(o),i.push(l);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")}V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Hn(e,t){V(0,[e,e.length],0,t)}Hn("gggg","weekYear"),Hn("ggggg","weekYear"),Hn("GGGG","isoWeekYear"),Hn("GGGGG","isoWeekYear"),I("G",An),I("g",An),I("GG",mt,Gt),I("gg",mt,Gt),I("GGGG",ba,ma),I("gggg",ba,ma),I("GGGGG",Tn,On),I("ggggg",Tn,On),xi(["gggg","ggggg","GGGG","GGGGG"],function(e,t,s,i){t[i.substr(0,2)]=X(e)}),xi(["gg","GG"],function(e,t,s,i){t[i]=R.parseTwoDigitYear(e)});function H_(e){return ch.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function B_(e){return ch.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function j_(){return Ye(this.year(),1,4)}function U_(){return Ye(this.isoWeekYear(),1,4)}function G_(){var e=this.localeData()._week;return Ye(this.year(),e.dow,e.doy)}function q_(){var e=this.localeData()._week;return Ye(this.weekYear(),e.dow,e.doy)}function ch(e,t,s,i,n){var r;return e==null?Mi(this,i,n).year:(r=Ye(e,i,n),t>r&&(t=r),X_.call(this,e,t,s,i,n))}function X_(e,t,s,i,n){var r=Vc(e,t,s,i,n),a=ki(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}V("Q",0,"Qo","quarter"),I("Q",Pc),dt("Q",function(e,t){t[Ie]=(X(e)-1)*3});function K_(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}V("D",["DD",2],"Do","date"),I("D",mt,Is),I("DD",mt,Gt),I("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),dt(["D","DD"],Se),dt("Do",function(e,t){t[Se]=X(e.match(mt)[0])});var hh=Ns("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),I("DDD",Pn),I("DDDD",Tc),dt(["DDD","DDDD"],function(e,t,s){s._dayOfYear=X(e)});function Z_(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}V("m",["mm",2],0,"minute"),I("m",mt,_a),I("mm",mt,Gt),dt(["m","mm"],fe);var J_=Ns("Minutes",!1);V("s",["ss",2],0,"second"),I("s",mt,_a),I("ss",mt,Gt),dt(["s","ss"],Ne);var Q_=Ns("Seconds",!1);V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return this.millisecond()*10}),V(0,["SSSSS",5],0,function(){return this.millisecond()*100}),V(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),V(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),V(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),V(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),I("S",Pn,Pc),I("SS",Pn,Gt),I("SSS",Pn,Tc);var es,uh;for(es="SSSS";es.length<=9;es+="S")I(es,Es);function ty(e,t){t[vs]=X(("0."+e)*1e3)}for(es="S";es.length<=9;es+="S")dt(es,ty);uh=Ns("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");function ey(){return this._isUTC?"UTC":""}function sy(){return this._isUTC?"Coordinated Universal Time":""}var P=yi.prototype;P.add=qb,P.calendar=e_,P.clone=s_,P.diff=c_,P.endOf=y_,P.format=f_,P.from=g_,P.fromNow=p_,P.to=m_,P.toNow=b_,P.get=dm,P.invalidAt=O_,P.isAfter=i_,P.isBefore=n_,P.isBetween=r_,P.isSame=a_,P.isSameOrAfter=o_,P.isSameOrBefore=l_,P.isValid=D_,P.lang=nh,P.locale=ih,P.localeData=rh,P.max=Db,P.min=Mb,P.parsingFlags=C_,P.set=fm,P.startOf=__,P.subtract=Xb,P.toArray=S_,P.toObject=k_,P.toDate=w_,P.toISOString=u_,P.inspect=d_,typeof Symbol<"u"&&Symbol.for!=null&&(P[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),P.toJSON=M_,P.toString=h_,P.unix=x_,P.valueOf=v_,P.creationData=P_,P.eraName=L_,P.eraNarrow=F_,P.eraAbbr=E_,P.eraYear=I_,P.year=Lc,P.isLeapYear=um,P.weekYear=H_,P.isoWeekYear=B_,P.quarter=P.quarters=K_,P.month=Yc,P.daysInMonth=wm,P.week=P.weeks=Tm,P.isoWeek=P.isoWeeks=Am,P.weeksInYear=G_,P.weeksInWeekYear=q_,P.isoWeeksInYear=j_,P.isoWeeksInISOWeekYear=U_,P.date=hh,P.day=P.days=Bm,P.weekday=jm,P.isoWeekday=Um,P.dayOfYear=Z_,P.hour=P.hours=Qm,P.minute=P.minutes=J_,P.second=P.seconds=Q_,P.millisecond=P.milliseconds=uh,P.utcOffset=Eb,P.utc=Nb,P.local=Yb,P.parseZone=zb,P.hasAlignedHourOffset=Vb,P.isDST=$b,P.isLocal=Hb,P.isUtcOffset=Bb,P.isUtc=Jc,P.isUTC=Jc,P.zoneAbbr=ey,P.zoneName=sy,P.dates=ie("dates accessor is deprecated. Use date instead.",hh),P.months=ie("months accessor is deprecated. Use month instead",Yc),P.years=ie("years accessor is deprecated. Use year instead",Lc),P.zone=ie("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ib),P.isDSTShifted=ie("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Wb);function iy(e){return bt(e*1e3)}function ny(){return bt.apply(null,arguments).parseZone()}function dh(e){return e}var it=ua.prototype;it.calendar=Hp,it.longDateFormat=Gp,it.invalidDate=Xp,it.ordinal=Jp,it.preparse=dh,it.postformat=dh,it.relativeTime=tm,it.pastFuture=em,it.set=$p,it.eras=T_,it.erasParse=A_,it.erasConvertYear=R_,it.erasAbbrRegex=Y_,it.erasNameRegex=N_,it.erasNarrowRegex=z_,it.months=_m,it.monthsShort=ym,it.monthsParse=xm,it.monthsRegex=km,it.monthsShortRegex=Sm,it.week=Dm,it.firstDayOfYear=Pm,it.firstDayOfWeek=Om,it.weekdays=zm,it.weekdaysMin=$m,it.weekdaysShort=Vm,it.weekdaysParse=Hm,it.weekdaysRegex=Gm,it.weekdaysShortRegex=qm,it.weekdaysMinRegex=Xm,it.isPM=Zm,it.meridiem=tb;function Bn(e,t,s,i){var n=ze(),r=ve().set(i,t);return n[s](r,e)}function fh(e,t,s){if(Fe(e)&&(t=e,e=void 0),e=e||"",t!=null)return Bn(e,t,s,"month");var i,n=[];for(i=0;i<12;i++)n[i]=Bn(e,i,s,"month");return n}function Ea(e,t,s,i){typeof e=="boolean"?(Fe(t)&&(s=t,t=void 0),t=t||""):(t=e,s=t,e=!1,Fe(t)&&(s=t,t=void 0),t=t||"");var n=ze(),r=e?n._week.dow:0,a,o=[];if(s!=null)return Bn(t,(s+r)%7,i,"day");for(a=0;a<7;a++)o[a]=Bn(t,(a+r)%7,i,"day");return o}function ry(e,t){return fh(e,t,"months")}function ay(e,t){return fh(e,t,"monthsShort")}function oy(e,t,s){return Ea(e,t,s,"weekdays")}function ly(e,t,s){return Ea(e,t,s,"weekdaysShort")}function cy(e,t,s){return Ea(e,t,s,"weekdaysMin")}ts("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=X(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+s}}),R.lang=ie("moment.lang is deprecated. Use moment.locale instead.",ts),R.langData=ie("moment.langData is deprecated. Use moment.localeData instead.",ze);var Ve=Math.abs;function hy(){var e=this._data;return this._milliseconds=Ve(this._milliseconds),this._days=Ve(this._days),this._months=Ve(this._months),e.milliseconds=Ve(e.milliseconds),e.seconds=Ve(e.seconds),e.minutes=Ve(e.minutes),e.hours=Ve(e.hours),e.months=Ve(e.months),e.years=Ve(e.years),this}function gh(e,t,s,i){var n=ge(t,s);return e._milliseconds+=i*n._milliseconds,e._days+=i*n._days,e._months+=i*n._months,e._bubble()}function uy(e,t){return gh(this,e,t,1)}function dy(e,t){return gh(this,e,t,-1)}function ph(e){return e<0?Math.floor(e):Math.ceil(e)}function fy(){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+=ph(Ia(s)+t)*864e5,t=0,s=0),i.milliseconds=e%1e3,n=re(e/1e3),i.seconds=n%60,r=re(n/60),i.minutes=r%60,a=re(r/60),i.hours=a%24,t+=re(a/24),l=re(mh(t)),s+=l,t-=ph(Ia(l)),o=re(s/12),s%=12,i.days=t,i.months=s,i.years=o,this}function mh(e){return e*4800/146097}function Ia(e){return e*146097/4800}function gy(e){if(!this.isValid())return NaN;var t,s,i=this._milliseconds;if(e=ne(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+i/864e5,s=this._months+mh(t),e){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(t=this._days+Math.round(Ia(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 $e(e){return function(){return this.as(e)}}var bh=$e("ms"),py=$e("s"),my=$e("m"),by=$e("h"),_y=$e("d"),yy=$e("w"),vy=$e("M"),xy=$e("Q"),wy=$e("y"),Sy=bh;function ky(){return ge(this)}function My(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function ws(e){return function(){return this.isValid()?this._data[e]:NaN}}var Dy=ws("milliseconds"),Cy=ws("seconds"),Oy=ws("minutes"),Py=ws("hours"),Ty=ws("days"),Ay=ws("months"),Ry=ws("years");function Ly(){return re(this.days()/7)}var We=Math.round,$s={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Fy(e,t,s,i,n){return n.relativeTime(t||1,!!s,e,i)}function Ey(e,t,s,i){var n=ge(e).abs(),r=We(n.as("s")),a=We(n.as("m")),o=We(n.as("h")),l=We(n.as("d")),c=We(n.as("M")),h=We(n.as("w")),u=We(n.as("y")),d=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&&(d=d||h<=1&&["w"]||h<s.w&&["ww",h]),d=d||c<=1&&["M"]||c<s.M&&["MM",c]||u<=1&&["y"]||["yy",u],d[2]=t,d[3]=+e>0,d[4]=i,Fy.apply(null,d)}function Iy(e){return e===void 0?We:typeof e=="function"?(We=e,!0):!1}function Ny(e,t){return $s[e]===void 0?!1:t===void 0?$s[e]:($s[e]=t,e==="s"&&($s.ss=t-1),!0)}function Yy(e,t){if(!this.isValid())return this.localeData().invalidDate();var s=!1,i=$s,n,r;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(s=e),typeof t=="object"&&(i=Object.assign({},$s,t),t.s!=null&&t.ss==null&&(i.ss=t.s-1)),n=this.localeData(),r=Ey(this,!s,i,n),s&&(r=n.pastFuture(+this,r)),n.postformat(r)}var Na=Math.abs;function Ws(e){return(e>0)-(e<0)||+e}function jn(){if(!this.isValid())return this.localeData().invalidDate();var e=Na(this._milliseconds)/1e3,t=Na(this._days),s=Na(this._months),i,n,r,a,o=this.asSeconds(),l,c,h,u;return o?(i=re(e/60),n=re(i/60),e%=60,i%=60,r=re(s/12),s%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",c=Ws(this._months)!==Ws(o)?"-":"",h=Ws(this._days)!==Ws(o)?"-":"",u=Ws(this._milliseconds)!==Ws(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 Q=Yn.prototype;Q.isValid=Ab,Q.abs=hy,Q.add=uy,Q.subtract=dy,Q.as=gy,Q.asMilliseconds=bh,Q.asSeconds=py,Q.asMinutes=my,Q.asHours=by,Q.asDays=_y,Q.asWeeks=yy,Q.asMonths=vy,Q.asQuarters=xy,Q.asYears=wy,Q.valueOf=Sy,Q._bubble=fy,Q.clone=ky,Q.get=My,Q.milliseconds=Dy,Q.seconds=Cy,Q.minutes=Oy,Q.hours=Py,Q.days=Ty,Q.weeks=Ly,Q.months=Ay,Q.years=Ry,Q.humanize=Yy,Q.toISOString=jn,Q.toString=jn,Q.toJSON=jn,Q.locale=ih,Q.localeData=rh,Q.toIsoString=ie("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",jn),Q.lang=nh,V("X",0,0,"unix"),V("x",0,0,"valueOf"),I("x",An),I("X",rm),dt("X",function(e,t,s){s._d=new Date(parseFloat(e)*1e3)}),dt("x",function(e,t,s){s._d=new Date(X(e))});//! moment.js
R.version="2.30.1",zp(bt),R.fn=P,R.min=Cb,R.max=Ob,R.now=Pb,R.utc=ve,R.unix=iy,R.months=ry,R.isDate=_i,R.locale=ts,R.invalid=Mn,R.duration=ge,R.isMoment=de,R.weekdays=oy,R.parseZone=ny,R.localeData=ze,R.isDuration=zn,R.monthsShort=ay,R.weekdaysMin=cy,R.defineLocale=ka,R.updateLocale=nb,R.locales=rb,R.weekdaysShort=ly,R.normalizeUnits=ne,R.relativeTimeRounding=Iy,R.relativeTimeThreshold=Ny,R.calendarFormat=t_,R.prototype=P,R.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 zy={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"};xl._date.override(typeof R=="function"?{_id:"moment",formats:function(){return zy},parse:function(e,t){return typeof e=="string"&&typeof t=="string"?e=R(e,t):e instanceof R||(e=R(e)),e.isValid()?e.valueOf():null},format:function(e,t){return R(e).format(t)},add:function(e,t,s){return R(e).add(t,s).valueOf()},diff:function(e,t,s){return R(e).diff(R(t),s)},startOf:function(e,t,s){return e=R(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 R(e).endOf(t).valueOf()}}:{});var Un=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gn={exports:{}};Gn.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]",d="[object Error]",f="[object Function]",g="[object GeneratorFunction]",b="[object Map]",v="[object Number]",w="[object Null]",k="[object Object]",C="[object Proxy]",D="[object RegExp]",M="[object Set]",L="[object String]",F="[object Undefined]",Y="[object WeakMap]",z="[object ArrayBuffer]",G="[object DataView]",Z="[object Float32Array]",U="[object Float64Array]",wt="[object Int8Array]",Tt="[object Int16Array]",H="[object Int32Array]",St="[object Uint8Array]",_t="[object Uint8ClampedArray]",qt="[object Uint16Array]",ns="[object Uint32Array]",ke=/[\\^$.*+?()[\]{}|]/g,rs=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,et={};et[Z]=et[U]=et[wt]=et[Tt]=et[H]=et[St]=et[_t]=et[qt]=et[ns]=!0,et[o]=et[l]=et[z]=et[h]=et[G]=et[u]=et[d]=et[f]=et[b]=et[v]=et[k]=et[D]=et[M]=et[L]=et[Y]=!1;var as=typeof Un=="object"&&Un&&Un.Object===Object&&Un,He=typeof self=="object"&&self&&self.Object===Object&&self,Xt=as||He||Function("return this")(),Ti=t&&!t.nodeType&&t,Kt=Ti&&!0&&e&&!e.nodeType&&e,Qn=Kt&&Kt.exports===Ti,Hs=Qn&&as.process,tr=(function(){try{var p=Kt&&Kt.require&&Kt.require("util").types;return p||Hs&&Hs.binding&&Hs.binding("util")}catch{}})(),er=tr&&tr.isTypedArray;function Wa(p,_,S){switch(S.length){case 0:return p.call(_);case 1:return p.call(_,S[0]);case 2:return p.call(_,S[0],S[1]);case 3:return p.call(_,S[0],S[1],S[2])}return p.apply(_,S)}function Ai(p,_){for(var S=-1,N=Array(p);++S<p;)N[S]=_(S);return N}function Ri(p){return function(_){return p(_)}}function Ha(p,_){return p==null?void 0:p[_]}function Ba(p,_){return function(S){return p(_(S))}}var ja=Array.prototype,sr=Function.prototype,os=Object.prototype,Li=Xt["__core-js_shared__"],Me=sr.toString,rt=os.hasOwnProperty,Ss=(function(){var p=/[^.]+$/.exec(Li&&Li.keys&&Li.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""})(),Bs=os.toString,ir=Me.call(Object),nr=RegExp("^"+Me.call(rt).replace(ke,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),js=Qn?Xt.Buffer:void 0,Us=Xt.Symbol,De=Xt.Uint8Array,ls=js?js.allocUnsafe:void 0,Fi=Ba(Object.getPrototypeOf,Object),ks=Object.create,Ua=os.propertyIsEnumerable,Ga=ja.splice,Ce=Us?Us.toStringTag:void 0,Gs=(function(){try{var p=Ja(Object,"defineProperty");return p({},"",{}),p}catch{}})(),rr=js?js.isBuffer:void 0,ar=Math.max,qa=Date.now,Ei=Ja(Xt,"Map"),Ms=Ja(Object,"create"),Xa=(function(){function p(){}return function(_){if(!Ds(_))return{};if(ks)return ks(_);p.prototype=_;var S=new p;return p.prototype=void 0,S}})();function ae(p){var _=-1,S=p==null?0:p.length;for(this.clear();++_<S;){var N=p[_];this.set(N[0],N[1])}}function m(){this.__data__=Ms?Ms(null):{},this.size=0}function y(p){var _=this.has(p)&&delete this.__data__[p];return this.size-=_?1:0,_}function x(p){var _=this.__data__;if(Ms){var S=_[p];return S===i?void 0:S}return rt.call(_,p)?_[p]:void 0}function O(p){var _=this.__data__;return Ms?_[p]!==void 0:rt.call(_,p)}function A(p,_){var S=this.__data__;return this.size+=this.has(p)?0:1,S[p]=Ms&&_===void 0?i:_,this}ae.prototype.clear=m,ae.prototype.delete=y,ae.prototype.get=x,ae.prototype.has=O,ae.prototype.set=A;function T(p){var _=-1,S=p==null?0:p.length;for(this.clear();++_<S;){var N=p[_];this.set(N[0],N[1])}}function $(){this.__data__=[],this.size=0}function E(p){var _=this.__data__,S=hr(_,p);if(S<0)return!1;var N=_.length-1;return S==N?_.pop():Ga.call(_,S,1),--this.size,!0}function ct(p){var _=this.__data__,S=hr(_,p);return S<0?void 0:_[S][1]}function ht(p){return hr(this.__data__,p)>-1}function yt(p,_){var S=this.__data__,N=hr(S,p);return N<0?(++this.size,S.push([p,_])):S[N][1]=_,this}T.prototype.clear=$,T.prototype.delete=E,T.prototype.get=ct,T.prototype.has=ht,T.prototype.set=yt;function ot(p){var _=-1,S=p==null?0:p.length;for(this.clear();++_<S;){var N=p[_];this.set(N[0],N[1])}}function nt(){this.size=0,this.__data__={hash:new ae,map:new(Ei||T),string:new ae}}function Ct(p){var _=dr(this,p).delete(p);return this.size-=_?1:0,_}function Et(p){return dr(this,p).get(p)}function At(p){return dr(this,p).has(p)}function Ft(p,_){var S=dr(this,p),N=S.size;return S.set(p,_),this.size+=S.size==N?0:1,this}ot.prototype.clear=nt,ot.prototype.delete=Ct,ot.prototype.get=Et,ot.prototype.has=At,ot.prototype.set=Ft;function Oe(p){var _=this.__data__=new T(p);this.size=_.size}function Ii(){this.__data__=new T,this.size=0}function Ni(p){var _=this.__data__,S=_.delete(p);return this.size=_.size,S}function or(p){return this.__data__.get(p)}function Yi(p){return this.__data__.has(p)}function lr(p,_){var S=this.__data__;if(S instanceof T){var N=S.__data__;if(!Ei||N.length<s-1)return N.push([p,_]),this.size=++S.size,this;S=this.__data__=new ot(N)}return S.set(p,_),this.size=S.size,this}Oe.prototype.clear=Ii,Oe.prototype.delete=Ni,Oe.prototype.get=or,Oe.prototype.has=Yi,Oe.prototype.set=lr;function cr(p,_){var S=eo(p),N=!S&&to(p),tt=!S&&!N&&Fh(p),ft=!S&&!N&&!tt&&Ih(p),kt=S||N||tt||ft,J=kt?Ai(p.length,String):[],Mt=J.length;for(var oe in p)(_||rt.call(p,oe))&&!(kt&&(oe=="length"||tt&&(oe=="offset"||oe=="parent")||ft&&(oe=="buffer"||oe=="byteLength"||oe=="byteOffset")||Rh(oe,Mt)))&&J.push(oe);return J}function Ka(p,_,S){(S!==void 0&&!fr(p[_],S)||S===void 0&&!(_ in p))&&Za(p,_,S)}function Nv(p,_,S){var N=p[_];(!(rt.call(p,_)&&fr(N,S))||S===void 0&&!(_ in p))&&Za(p,_,S)}function hr(p,_){for(var S=p.length;S--;)if(fr(p[S][0],_))return S;return-1}function Za(p,_,S){_=="__proto__"&&Gs?Gs(p,_,{configurable:!0,enumerable:!0,value:S,writable:!0}):p[_]=S}var Yv=Zv();function ur(p){return p==null?p===void 0?F:w:Ce&&Ce in Object(p)?Jv(p):nx(p)}function Th(p){return zi(p)&&ur(p)==o}function zv(p){if(!Ds(p)||sx(p))return!1;var _=io(p)?nr:rs;return _.test(lx(p))}function Vv(p){return zi(p)&&Eh(p.length)&&!!et[ur(p)]}function $v(p){if(!Ds(p))return ix(p);var _=Lh(p),S=[];for(var N in p)N=="constructor"&&(_||!rt.call(p,N))||S.push(N);return S}function Ah(p,_,S,N,tt){p!==_&&Yv(_,function(ft,kt){if(tt||(tt=new Oe),Ds(ft))Wv(p,_,kt,S,Ah,N,tt);else{var J=N?N(Qa(p,kt),ft,kt+"",p,_,tt):void 0;J===void 0&&(J=ft),Ka(p,kt,J)}},Nh)}function Wv(p,_,S,N,tt,ft,kt){var J=Qa(p,S),Mt=Qa(_,S),oe=kt.get(Mt);if(oe){Ka(p,S,oe);return}var Zt=ft?ft(J,Mt,S+"",p,_,kt):void 0,Vi=Zt===void 0;if(Vi){var no=eo(Mt),ro=!no&&Fh(Mt),zh=!no&&!ro&&Ih(Mt);Zt=Mt,no||ro||zh?eo(J)?Zt=J:cx(J)?Zt=qv(J):ro?(Vi=!1,Zt=jv(Mt,!0)):zh?(Vi=!1,Zt=Gv(Mt,!0)):Zt=[]:hx(Mt)||to(Mt)?(Zt=J,to(J)?Zt=ux(J):(!Ds(J)||io(J))&&(Zt=Qv(Mt))):Vi=!1}Vi&&(kt.set(Mt,Zt),tt(Zt,Mt,N,ft,kt),kt.delete(Mt)),Ka(p,S,Zt)}function Hv(p,_){return ax(rx(p,_,Yh),p+"")}var Bv=Gs?function(p,_){return Gs(p,"toString",{configurable:!0,enumerable:!1,value:fx(_),writable:!0})}:Yh;function jv(p,_){if(_)return p.slice();var S=p.length,N=ls?ls(S):new p.constructor(S);return p.copy(N),N}function Uv(p){var _=new p.constructor(p.byteLength);return new De(_).set(new De(p)),_}function Gv(p,_){var S=_?Uv(p.buffer):p.buffer;return new p.constructor(S,p.byteOffset,p.length)}function qv(p,_){var S=-1,N=p.length;for(_||(_=Array(N));++S<N;)_[S]=p[S];return _}function Xv(p,_,S,N){var tt=!S;S||(S={});for(var ft=-1,kt=_.length;++ft<kt;){var J=_[ft],Mt=N?N(S[J],p[J],J,S,p):void 0;Mt===void 0&&(Mt=p[J]),tt?Za(S,J,Mt):Nv(S,J,Mt)}return S}function Kv(p){return Hv(function(_,S){var N=-1,tt=S.length,ft=tt>1?S[tt-1]:void 0,kt=tt>2?S[2]:void 0;for(ft=p.length>3&&typeof ft=="function"?(tt--,ft):void 0,kt&&tx(S[0],S[1],kt)&&(ft=tt<3?void 0:ft,tt=1),_=Object(_);++N<tt;){var J=S[N];J&&p(_,J,N,ft)}return _})}function Zv(p){return function(_,S,N){for(var tt=-1,ft=Object(_),kt=N(_),J=kt.length;J--;){var Mt=kt[p?J:++tt];if(S(ft[Mt],Mt,ft)===!1)break}return _}}function dr(p,_){var S=p.__data__;return ex(_)?S[typeof _=="string"?"string":"hash"]:S.map}function Ja(p,_){var S=Ha(p,_);return zv(S)?S:void 0}function Jv(p){var _=rt.call(p,Ce),S=p[Ce];try{p[Ce]=void 0;var N=!0}catch{}var tt=Bs.call(p);return N&&(_?p[Ce]=S:delete p[Ce]),tt}function Qv(p){return typeof p.constructor=="function"&&!Lh(p)?Xa(Fi(p)):{}}function Rh(p,_){var S=typeof p;return _=_??a,!!_&&(S=="number"||S!="symbol"&&me.test(p))&&p>-1&&p%1==0&&p<_}function tx(p,_,S){if(!Ds(S))return!1;var N=typeof _;return(N=="number"?so(S)&&Rh(_,S.length):N=="string"&&_ in S)?fr(S[_],p):!1}function ex(p){var _=typeof p;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?p!=="__proto__":p===null}function sx(p){return!!Ss&&Ss in p}function Lh(p){var _=p&&p.constructor,S=typeof _=="function"&&_.prototype||os;return p===S}function ix(p){var _=[];if(p!=null)for(var S in Object(p))_.push(S);return _}function nx(p){return Bs.call(p)}function rx(p,_,S){return _=ar(_===void 0?p.length-1:_,0),function(){for(var N=arguments,tt=-1,ft=ar(N.length-_,0),kt=Array(ft);++tt<ft;)kt[tt]=N[_+tt];tt=-1;for(var J=Array(_+1);++tt<_;)J[tt]=N[tt];return J[_]=S(kt),Wa(p,this,J)}}function Qa(p,_){if(!(_==="constructor"&&typeof p[_]=="function")&&_!="__proto__")return p[_]}var ax=ox(Bv);function ox(p){var _=0,S=0;return function(){var N=qa(),tt=r-(N-S);if(S=N,tt>0){if(++_>=n)return arguments[0]}else _=0;return p.apply(void 0,arguments)}}function lx(p){if(p!=null){try{return Me.call(p)}catch{}try{return p+""}catch{}}return""}function fr(p,_){return p===_||p!==p&&_!==_}var to=Th((function(){return arguments})())?Th:function(p){return zi(p)&&rt.call(p,"callee")&&!Ua.call(p,"callee")},eo=Array.isArray;function so(p){return p!=null&&Eh(p.length)&&!io(p)}function cx(p){return zi(p)&&so(p)}var Fh=rr||gx;function io(p){if(!Ds(p))return!1;var _=ur(p);return _==f||_==g||_==c||_==C}function Eh(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=a}function Ds(p){var _=typeof p;return p!=null&&(_=="object"||_=="function")}function zi(p){return p!=null&&typeof p=="object"}function hx(p){if(!zi(p)||ur(p)!=k)return!1;var _=Fi(p);if(_===null)return!0;var S=rt.call(_,"constructor")&&_.constructor;return typeof S=="function"&&S instanceof S&&Me.call(S)==ir}var Ih=er?Ri(er):Vv;function ux(p){return Xv(p,Nh(p))}function Nh(p){return so(p)?cr(p,!0):$v(p)}var dx=Kv(function(p,_,S){Ah(p,_,S)});function fx(p){return function(){return p}}function Yh(p){return p}function gx(){return!1}e.exports=dx})(Gn,Gn.exports);var $y=Gn.exports;const Wy=Vy($y),xx="";pi.register(ep,cp,Qg,Ze,sa,_n,pn,bi,Kg,mn,gn);const Hy={name:"AreaChart",components:{LineChart:Np,BarChart:Ip,PieChart:Yp},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:""},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(){const e=new Date;return String(this.download??"MyChart.png").replace(".png","-"+e.getFullYear()+"-"+Number(e.getMonth()+1).toString().padStart(2,"0")+"-"+Number(e.getDate()).toString().padStart(2,"0")+".png")},fullChartOptions(){return Wy({},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(e,t,s,i){return!(i.datasets.length>5&&e.raw===0)}}}},this.type==="Pie"?{}:{scales:{xAxis:{afterSetDimensions:e=>{e.maxHeight=25}}}},this.fill?{fill:!0,backgroundColor:this.chartColor}:{},this.xTimeAxis?{scales:{xAxis:{title:{display:!1,text:this.xTitle??this.$t("simplestats.charts.time","Time")},type:"time",time:{unit:"month",displayFormats:{month:"MMM YYYY"}}}}}:{},this.yVisitsAxis?{scales:{yAxis:{title:{display:!0,text:this.yTitle??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:!0,title:{display:!1}},yAxis:{tickLength:5}}}:{})},chartColor(){if(typeof this.fill=="string"&&this.fill.length>0){let t=this.$library.colors.parseAs(this.fill,"hex");if(t&&t.length)return t}let e=document.getElementById("chart-default-color-getter");if(e){let t=window.getComputedStyle(e);if(t&&t.color){let s=this.$library.colors.parseAs(t.color,"hex");if(s&&s.length)return s}}return"#313740"},fullChartData(){const e=this,t=this.chartData.map((s,i)=>s.ss_uid??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 d=0;for(let f of e.chartLabels)s.backgroundColor.push(e.autoColorize?"hsl("+Number(360/u*d).toFixed(0)+","+Number(n*100).toFixed(0)+"%,"+Number(r*100).toFixed(0)+"%)":"hsl(0,0%,"+Number(40+40/u*d).toFixed(0)+"%)"),d++;return s}const a=s.ss_uid?s.ss_uid.split("/"):[""+i];let o=0,l=0,c=1,h=null;a.forEach((u,d)=>{s.ss_uid?d===0?h=t.filter(b=>String(b).includes("/")===!1):h=t.filter(function(b){const v=a.slice(0,d).join("/");return String(b).startsWith(v)}):h=e.chartData.map((b,v)=>v);const f=h.indexOf(s.ss_uid?a.slice(0,d+1).join("/"):i),g=h.length>1?h.length:1;e.autoColorize?d===0?o=1/g*f:(c/=g,l+=c*.8*f,d>1&&(n-=10)):(c/=g,l+=c*f)}),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 By=function(){var t=this,s=t._self._c;return s("div",[t.label.length>0?s("k-headline",[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)},jy=[],Uy=$t(Hy,By,jy,!1,null,null,null,null);const qn=Uy.exports,wx="",Gy={extends:Cs,components:{SearchableTable:$i,AreaChart:qn},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){var t,s,i;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,(t=window.panel)!=null&&t.$language||(i=(s=this.$store)==null?void 0:s.state)!=null&&i.i18n?this.userLocale=window.panel.$language?window.panel.$language.locale:this.$store.state.i18n?this.$store.state.i18n.locale:"en":this.userLocale=window.panel.language.code??"en"}}};var qy=function(){var t=this,s=t._self._c;return s("k-grid",{staticStyle:{gap:"var(--spacing-12)"},attrs:{variant:"columns"}},[s("k-column",[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,label:t.$t("simplestats.visits.visitsovertime","Visits over time")}})],1),s("k-column",[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,label:t.$t("simplestats.visits.pagevisitsovertime")}})],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"}},[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,label:t.$t("simplestats.visits.globallanguages")}}):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)},Xy=[],Ky=$t(Gy,qy,Xy,!1,null,null,null,null);const Zy=Ky.exports,Sx="",Jy={extends:Cs,components:{AreaChart:qn},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 Qy=function(){var t=this,s=t._self._c;return s("k-grid",{staticStyle:{gap:"var(--spacing-12)"},attrs:{variant:"columns"}},[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)},t0=[],e0=$t(Jy,Qy,t0,!1,null,null,null,null);const s0=e0.exports,kx="",i0={extends:Cs,components:{AreaChart:qn,SearchableTable:$i},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 n0=function(){var t=this,s=t._self._c;return s("k-grid",{staticStyle:{gap:"var(--spacing-12)"},attrs:{variant:"columns"}},[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)},r0=[],a0=$t(i0,n0,r0,!1,null,null,null,null);const o0=a0.exports,Mx="",l0={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:"",databaseSpanFrom:"",databaseSpanTo:"",databaseTimeframes:-1}},components:{SearchableTable:$i},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.databaseSpanFrom=e.databaseSpanFrom,this.databaseSpanTo=e.databaseSpanTo,this.databaseTimeframes=e.databaseTimeframes,this.updateMessage=null}).catch(e=>{var t;this.isLoading=!1,this.updateMessage=e.message,(t=this.$store)!=null&&t.dispatch?this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3}):Be().error(e.message??"Unknown error",!0)}),this.$api.get("simplestats/checkrequirements").then(e=>{this.isLoading=!1,this.dbRequirements=e.dbRequirements,this.dbRequirementsPassed=e.dbRequirementsPassed}).catch(e=>{var t;this.isLoading=!1,this.dbRequirements=e.message,(t=this.$store)!=null&&t.dispatch?this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3}):Be().error(e.message??"Unknown error",!0)})},acceptUpgrade(e){this.unlockUpgrade=e},requestUpgrade(e){var t;e.stopPropagation(),this.unlockUpgrade?(this.isUpdatingDb=!0,this.updateMessage=null,this.$api.get("simplestats/dbupgrade").then(s=>{this.isUpdatingDb=!1,this.updateMessage=s.message,this.updateMessageTheme=s.status?"positive":"negative"}).catch(s=>{var i;this.isUpdatingDb=!1,this.error=s.message,(i=this.$store)!=null&&i.dispatch?this.$store.dispatch("notification/open",{type:"error",message:s.message,timeout:5e3}):Be().error(s.message??"Unknown error",!0)})):(t=this.$store)!=null&&t.dispatch?this.$store.dispatch("notification/open",{type:"error",message:"Before hitting that button, please ensure to backup your database file !",timeout:5e3}):Be().error(error.message??"Unknown error",!0)}}};var c0=function(){var t=this,s=t._self._c;return s("div",{staticClass:"dbinformation"},[s("k-headline",{staticClass:"h3 k-section-header"},[t._v(t._s(t.$t("simplestats.info.title")))]),s("k-headline",{staticClass:"rightColumnAlign h5"},[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("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.softwareversion"),value:t.softwareDbVersion,icon:"bolt"}}),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.spanfromperiod"),value:t.databaseSpanFrom,icon:"calendar"}}),s("k-text-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.spantoperiod"),value:t.databaseSpanTo,icon:"calendar"}}),s("k-number-field",{attrs:{name:"",counter:!1,disabled:!0,label:t.$t("simplestats.info.db.spannumperiods"),value:t.databaseTimeframes,icon:"calendar"}}),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)},h0=[],u0=$t(l0,c0,h0,!1,null,null,null,null);const d0=u0.exports,Dx="",f0={extends:Cs,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 g0=function(){var t=this,s=t._self._c;return s("div",{staticClass:"configuration"},[s("k-headline",{staticClass:"h3 k-section-header"},[t._v(t._s(t.$t("simplestats.info.config.title")))]),s("k-headline",{staticClass:"rightColumnAlign h5"},[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 h5"},[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)},p0=[],m0=$t(f0,g0,p0,!1,null,null,null,null);const b0=m0.exports,Cx="",_0={name:"list-viewer",props:{arrayData:{type:Array,default:[]},depth:{type:Number,default:0}},methods:{}};var y0=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()])},v0=[],x0=$t(_0,y0,v0,!1,null,null,null,null);const w0=x0.exports,Ox="",S0={name:"TrackingTester",components:{ListViewer:w0},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:t.toString(),generatorFrom:e.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=>{var t;this.isLoading=!1,this.error=e.message,(t=this.$store)!=null&&t.dispatch?this.$store.dispatch("notification/open",{type:"error",message:e.message,timeout:5e3}):Be().error(e.message??"Unknown error",!0)})},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 k0=function(){var t=this,s=t._self._c;return s("k-grid",{staticClass:"trackingtester",staticStyle:{gap:"var(--spacing-12)"},attrs:{variant:"columns"}},[s("k-column",{attrs:{width:"1/1"}},[s("k-headline",{staticClass:"h3"},[t._v(t._s(t.$t("simplestats.info.tester.title")))])],1),s("k-column",{attrs:{width:"1/2"}},[s("k-headline",{staticClass:"rightColumnAlign h5"},[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 h5"},[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 h5"},[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)},M0=[],D0=$t(S0,k0,M0,!1,null,null,null,null);const C0=D0.exports;var ss;(function(e){e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values"})(ss||(ss={}));var Ht;(function(e){e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue"})(Ht||(Ht={}));function O0(e){return Xn(e)&&typeof e.from=="function"}function Xn(e){return typeof e=="object"&&typeof e.to=="function"}function _h(e){e.parentElement.removeChild(e)}function Ya(e){return e!=null}function yh(e){e.preventDefault()}function P0(e){return e.filter(function(t){return this[t]?!1:this[t]=!0},{})}function T0(e,t){return Math.round(e/t)*t}function A0(e,t){var s=e.getBoundingClientRect(),i=e.ownerDocument,n=i.documentElement,r=wh(i);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(r.x=0),t?s.top+r.y-n.clientTop:s.left+r.x-n.clientLeft}function pe(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function vh(e,t,s){s>0&&(Vt(e,t),setTimeout(function(){Zn(e,t)},s))}function xh(e){return Math.max(Math.min(e,100),0)}function Kn(e){return Array.isArray(e)?e:[e]}function R0(e){e=String(e);var t=e.split(".");return t.length>1?t[1].length:0}function Vt(e,t){e.classList&&!/\s/.test(t)?e.classList.add(t):e.className+=" "+t}function Zn(e,t){e.classList&&!/\s/.test(t)?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function L0(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function wh(e){var t=window.pageXOffset!==void 0,s=(e.compatMode||"")==="CSS1Compat",i=t?window.pageXOffset:s?e.documentElement.scrollLeft:e.body.scrollLeft,n=t?window.pageYOffset:s?e.documentElement.scrollTop:e.body.scrollTop;return{x:i,y:n}}function F0(){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 E0(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch{}return e}function I0(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function za(e,t){return 100/(t-e)}function Va(e,t,s){return t*100/(e[s+1]-e[s])}function N0(e,t){return Va(e,e[0]<0?t+Math.abs(e[0]):t-e[0],0)}function Y0(e,t){return t*(e[1]-e[0])/100+e[0]}function Pi(e,t){for(var s=1;e>=t[s];)s+=1;return s}function z0(e,t,s){if(s>=e.slice(-1)[0])return 100;var i=Pi(s,e),n=e[i-1],r=e[i],a=t[i-1],o=t[i];return a+N0([n,r],s)/za(a,o)}function V0(e,t,s){if(s>=100)return e.slice(-1)[0];var i=Pi(s,t),n=e[i-1],r=e[i],a=t[i-1],o=t[i];return Y0([n,r],(s-a)*za(a,o))}function $0(e,t,s,i){if(i===100)return i;var n=Pi(i,e),r=e[n-1],a=e[n];return s?i-r>(a-r)/2?a:r:t[n-1]?e[n-1]+T0(i-e[n-1],t[n-1]):i}var Sh=(function(){function e(t,s,i){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[i||!1],this.xNumSteps=[!1],this.snap=s;var n,r=[];for(Object.keys(t).forEach(function(a){r.push([Kn(t[a]),a])}),r.sort(function(a,o){return a[0][0]-o[0][0]}),n=0;n<r.length;n++)this.handleEntryPoint(r[n][1],r[n][0]);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)this.handleStepPoint(n,this.xNumSteps[n])}return e.prototype.getDistance=function(t){for(var s=[],i=0;i<this.xNumSteps.length-1;i++)s[i]=Va(this.xVal,t,i);return s},e.prototype.getAbsoluteDistance=function(t,s,i){var n=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[n+1];)n++;else t===this.xPct[this.xPct.length-1]&&(n=this.xPct.length-2);!i&&t===this.xPct[n+1]&&n++,s===null&&(s=[]);var r,a=1,o=s[n],l=0,c=0,h=0,u=0;for(i?r=(t-this.xPct[n])/(this.xPct[n+1]-this.xPct[n]):r=(this.xPct[n+1]-t)/(this.xPct[n+1]-this.xPct[n]);o>0;)l=this.xPct[n+1+u]-this.xPct[n+u],s[n+u]*a+100-r*100>100?(c=l*r,a=(o-100*r)/s[n+u],r=1):(c=s[n+u]*l/100*a,a=0),i?(h=h-c,this.xPct.length+u>=1&&u--):(h=h+c,this.xPct.length-u>=1&&u++),o=s[n+u]*a;return t+h},e.prototype.toStepping=function(t){return t=z0(this.xVal,this.xPct,t),t},e.prototype.fromStepping=function(t){return V0(this.xVal,this.xPct,t)},e.prototype.getStep=function(t){return t=$0(this.xPct,this.xSteps,this.snap,t),t},e.prototype.getDefaultStep=function(t,s,i){var n=Pi(t,this.xPct);return(t===100||s&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/i},e.prototype.getNearbySteps=function(t){var s=Pi(t,this.xPct);return{stepBefore:{startValue:this.xVal[s-2],step:this.xNumSteps[s-2],highestStep:this.xHighestCompleteStep[s-2]},thisStep:{startValue:this.xVal[s-1],step:this.xNumSteps[s-1],highestStep:this.xHighestCompleteStep[s-1]},stepAfter:{startValue:this.xVal[s],step:this.xNumSteps[s],highestStep:this.xHighestCompleteStep[s]}}},e.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(R0);return Math.max.apply(null,t)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(t){return this.getStep(this.toStepping(t))},e.prototype.handleEntryPoint=function(t,s){var i;if(t==="min"?i=0:t==="max"?i=100:i=parseFloat(t),!pe(i)||!pe(s[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(i),this.xVal.push(s[0]);var n=Number(s[1]);i?this.xSteps.push(isNaN(n)?!1:n):isNaN(n)||(this.xSteps[0]=n),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(t,s){if(s){if(this.xVal[t]===this.xVal[t+1]){this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t];return}this.xSteps[t]=Va([this.xVal[t],this.xVal[t+1]],s,0)/za(this.xPct[t],this.xPct[t+1]);var i=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],n=Math.ceil(Number(i.toFixed(3))-1),r=this.xVal[t]+this.xNumSteps[t]*n;this.xHighestCompleteStep[t]=r}},e})(),kh={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},Mh={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"},is={tooltips:".__tooltips",aria:".__aria"};function W0(e,t){if(!pe(t))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=t}function H0(e,t){if(!pe(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=t}function B0(e,t){if(!pe(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=t}function j0(e,t){if(!pe(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=t}function U0(e,t){if(typeof t!="object"||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(t.min===void 0||t.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new Sh(t,e.snap||!1,e.singleStep)}function G0(e,t){if(t=Kn(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length,e.start=t}function q0(e,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=t}function X0(e,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=t}function K0(e,t){if(typeof t!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=t}function Dh(e,t){var s=[!1],i;if(t==="lower"?t=[!0,!1]:t==="upper"&&(t=[!1,!0]),t===!0||t===!1){for(i=1;i<e.handles;i++)s.push(t);s.push(!1)}else{if(!Array.isArray(t)||!t.length||t.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");s=t}e.connect=s}function Z0(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Ch(e,t){if(!pe(t))throw new Error("noUiSlider: 'margin' option must be numeric.");t!==0&&(e.margin=e.spectrum.getDistance(t))}function J0(e,t){if(!pe(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(t),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function Q0(e,t){var s;if(!pe(t)&&!Array.isArray(t))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(t)&&!(t.length===2||pe(t[0])||pe(t[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(t!==0){for(Array.isArray(t)||(t=[t,t]),e.padding=[e.spectrum.getDistance(t[0]),e.spectrum.getDistance(t[1])],s=0;s<e.spectrum.xNumSteps.length-1;s++)if(e.padding[0][s]<0||e.padding[1][s]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var i=t[0]+t[1],n=e.spectrum.xVal[0],r=e.spectrum.xVal[e.spectrum.xVal.length-1];if(i/(r-n)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function tv(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function ev(e,t){if(typeof t!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var s=t.indexOf("tap")>=0,i=t.indexOf("drag")>=0,n=t.indexOf("fixed")>=0,r=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0,o=t.indexOf("unconstrained")>=0,l=t.indexOf("invert-connects")>=0,c=t.indexOf("drag-all")>=0,h=t.indexOf("smooth-steps")>=0;if(n){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Ch(e,e.start[1]-e.start[0])}if(l&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(o&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:s||r,drag:i,dragAll:c,smoothSteps:h,fixed:n,snap:r,hover:a,unconstrained:o,invertConnects:l}}function sv(e,t){if(t!==!1)if(t===!0||Xn(t)){e.tooltips=[];for(var s=0;s<e.handles;s++)e.tooltips.push(t)}else{if(t=Kn(t),t.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.forEach(function(i){if(typeof i!="boolean"&&!Xn(i))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=t}}function iv(e,t){if(t.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=t}function nv(e,t){if(!Xn(t))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=t}function rv(e,t){if(!O0(t))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=t}function av(e,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=t}function ov(e,t){e.documentElement=t}function lv(e,t){if(typeof t!="string"&&t!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=t}function cv(e,t){if(typeof t!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof e.cssPrefix=="string"?(e.cssClasses={},Object.keys(t).forEach(function(s){e.cssClasses[s]=e.cssPrefix+t[s]})):e.cssClasses=t}function Oh(e){var t={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:kh,format:kh},s={step:{r:!1,t:W0},keyboardPageMultiplier:{r:!1,t:H0},keyboardMultiplier:{r:!1,t:B0},keyboardDefaultStep:{r:!1,t:j0},start:{r:!0,t:G0},connect:{r:!0,t:Dh},direction:{r:!0,t:tv},snap:{r:!1,t:q0},animate:{r:!1,t:X0},animationDuration:{r:!1,t:K0},range:{r:!0,t:U0},orientation:{r:!1,t:Z0},margin:{r:!1,t:Ch},limit:{r:!1,t:J0},padding:{r:!1,t:Q0},behaviour:{r:!0,t:ev},ariaFormat:{r:!1,t:nv},format:{r:!1,t:rv},tooltips:{r:!1,t:sv},keyboardSupport:{r:!0,t:av},documentElement:{r:!1,t:ov},cssPrefix:{r:!0,t:lv},cssClasses:{r:!0,t:cv},handleAttributes:{r:!1,t:iv}},i={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:Mh,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(s).forEach(function(l){if(!Ya(e[l])&&i[l]===void 0){if(s[l].r)throw new Error("noUiSlider: '"+l+"' is required.");return}s[l].t(t,Ya(e[l])?e[l]:i[l])}),t.pips=e.pips;var n=document.createElement("div"),r=n.style.msTransform!==void 0,a=n.style.transform!==void 0;t.transformRule=a?"transform":r?"msTransform":"webkitTransform";var o=[["left","top"],["right","bottom"]];return t.style=o[t.dir][t.ort],t}function hv(e,t,s){var i=F0(),n=I0(),r=n&&E0(),a=e,o,l,c,h,u,d,f=t.spectrum,g=[],b=[],v=[],w=0,k={},C=!1,D=e.ownerDocument,M=t.documentElement||D.documentElement,L=D.body,F=D.dir==="rtl"||t.ort===1?0:100;function Y(m,y){var x=D.createElement("div");return y&&Vt(x,y),m.appendChild(x),x}function z(m,y){var x=Y(m,t.cssClasses.origin),O=Y(x,t.cssClasses.handle);if(Y(O,t.cssClasses.touchArea),O.setAttribute("data-handle",String(y)),t.keyboardSupport&&(O.setAttribute("tabindex","0"),O.addEventListener("keydown",function(T){return ja(T,y)})),t.handleAttributes!==void 0){var A=t.handleAttributes[y];Object.keys(A).forEach(function(T){O.setAttribute(T,A[T])})}return O.setAttribute("role","slider"),O.setAttribute("aria-orientation",t.ort?"vertical":"horizontal"),y===0?Vt(O,t.cssClasses.handleLower):y===t.handles-1&&Vt(O,t.cssClasses.handleUpper),x.handle=O,x}function G(m,y){return y?Y(m,t.cssClasses.connect):!1}function Z(m,y){l=Y(y,t.cssClasses.connects),c=[],h=[],h.push(G(l,m[0]));for(var x=0;x<t.handles;x++)c.push(z(y,x)),v[x]=x,h.push(G(l,m[x+1]))}function U(m){Vt(m,t.cssClasses.target),t.dir===0?Vt(m,t.cssClasses.ltr):Vt(m,t.cssClasses.rtl),t.ort===0?Vt(m,t.cssClasses.horizontal):Vt(m,t.cssClasses.vertical);var y=getComputedStyle(m).direction;return y==="rtl"?Vt(m,t.cssClasses.textDirectionRtl):Vt(m,t.cssClasses.textDirectionLtr),Y(m,t.cssClasses.base)}function wt(m,y){return!t.tooltips||!t.tooltips[y]?!1:Y(m.firstChild,t.cssClasses.tooltip)}function Tt(){return a.hasAttribute("disabled")}function H(m){var y=c[m];return y.hasAttribute("disabled")}function St(m){m!=null?(c[m].setAttribute("disabled",""),c[m].handle.removeAttribute("tabindex")):(a.setAttribute("disabled",""),c.forEach(function(y){y.handle.removeAttribute("tabindex")}))}function _t(m){m!=null?(c[m].removeAttribute("disabled"),c[m].handle.setAttribute("tabindex","0")):(a.removeAttribute("disabled"),c.forEach(function(y){y.removeAttribute("disabled"),y.handle.setAttribute("tabindex","0")}))}function qt(){d&&(Me("update"+is.tooltips),d.forEach(function(m){m&&_h(m)}),d=null)}function ns(){qt(),d=c.map(wt),os("update"+is.tooltips,function(m,y,x){if(!(!d||!t.tooltips)&&d[y]!==!1){var O=m[y];t.tooltips[y]!==!0&&(O=t.tooltips[y].to(x[y])),d[y].innerHTML=O}})}function ke(){Me("update"+is.aria),os("update"+is.aria,function(m,y,x,O,A){v.forEach(function(T){var $=c[T],E=Ss(b,T,0,!0,!0,!0),ct=Ss(b,T,100,!0,!0,!0),ht=A[T],yt=String(t.ariaFormat.to(x[T]));E=f.fromStepping(E).toFixed(1),ct=f.fromStepping(ct).toFixed(1),ht=f.fromStepping(ht).toFixed(1),$.children[0].setAttribute("aria-valuemin",E),$.children[0].setAttribute("aria-valuemax",ct),$.children[0].setAttribute("aria-valuenow",ht),$.children[0].setAttribute("aria-valuetext",yt)})})}function rs(m){if(m.mode===ss.Range||m.mode===ss.Steps)return f.xVal;if(m.mode===ss.Count){if(m.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var y=m.values-1,x=100/y,O=[];y--;)O[y]=y*x;return O.push(100),me(O,m.stepped)}return m.mode===ss.Positions?me(m.values,m.stepped):m.mode===ss.Values?m.stepped?m.values.map(function(A){return f.fromStepping(f.getStep(f.toStepping(A)))}):m.values:[]}function me(m,y){return m.map(function(x){return f.fromStepping(y?f.getStep(x):x)})}function et(m){function y(ht,yt){return Number((ht+yt).toFixed(7))}var x=rs(m),O={},A=f.xVal[0],T=f.xVal[f.xVal.length-1],$=!1,E=!1,ct=0;return x=P0(x.slice().sort(function(ht,yt){return ht-yt})),x[0]!==A&&(x.unshift(A),$=!0),x[x.length-1]!==T&&(x.push(T),E=!0),x.forEach(function(ht,yt){var ot,nt,Ct,Et=ht,At=x[yt+1],Ft,Oe,Ii,Ni,or,Yi,lr,cr=m.mode===ss.Steps;for(cr&&(ot=f.xNumSteps[yt]),ot||(ot=At-Et),At===void 0&&(At=Et),ot=Math.max(ot,1e-7),nt=Et;nt<=At;nt=y(nt,ot)){for(Ft=f.toStepping(nt),Oe=Ft-ct,or=Oe/(m.density||1),Yi=Math.round(or),lr=Oe/Yi,Ct=1;Ct<=Yi;Ct+=1)Ii=ct+Ct*lr,O[Ii.toFixed(5)]=[f.fromStepping(Ii),0];Ni=x.indexOf(nt)>-1?Ht.LargeValue:cr?Ht.SmallValue:Ht.NoValue,!yt&&$&&nt!==At&&(Ni=0),nt===At&&E||(O[Ft.toFixed(5)]=[nt,Ni]),ct=Ft}}),O}function as(m,y,x){var O,A,T=D.createElement("div"),$=(O={},O[Ht.None]="",O[Ht.NoValue]=t.cssClasses.valueNormal,O[Ht.LargeValue]=t.cssClasses.valueLarge,O[Ht.SmallValue]=t.cssClasses.valueSub,O),E=(A={},A[Ht.None]="",A[Ht.NoValue]=t.cssClasses.markerNormal,A[Ht.LargeValue]=t.cssClasses.markerLarge,A[Ht.SmallValue]=t.cssClasses.markerSub,A),ct=[t.cssClasses.valueHorizontal,t.cssClasses.valueVertical],ht=[t.cssClasses.markerHorizontal,t.cssClasses.markerVertical];Vt(T,t.cssClasses.pips),Vt(T,t.ort===0?t.cssClasses.pipsHorizontal:t.cssClasses.pipsVertical);function yt(nt,Ct){var Et=Ct===t.cssClasses.value,At=Et?ct:ht,Ft=Et?$:E;return Ct+" "+At[t.ort]+" "+Ft[nt]}function ot(nt,Ct,Et){if(Et=y?y(Ct,Et):Et,Et!==Ht.None){var At=Y(T,!1);At.className=yt(Et,t.cssClasses.marker),At.style[t.style]=nt+"%",Et>Ht.NoValue&&(At=Y(T,!1),At.className=yt(Et,t.cssClasses.value),At.setAttribute("data-value",String(Ct)),At.style[t.style]=nt+"%",At.innerHTML=String(x.to(Ct)))}}return Object.keys(m).forEach(function(nt){ot(nt,m[nt][0],m[nt][1])}),T}function He(){u&&(_h(u),u=null)}function Xt(m){He();var y=et(m),x=m.filter,O=m.format||{to:function(A){return String(Math.round(A))}};return u=a.appendChild(as(y,x,O)),u}function Ti(){var m=o.getBoundingClientRect(),y="offset"+["Width","Height"][t.ort];return t.ort===0?m.width||o[y]:m.height||o[y]}function Kt(m,y,x,O){var A=function($){var E=Qn($,O.pageOffset,O.target||y);if(!E||Tt()&&!O.doNotReject||L0(a,t.cssClasses.tap)&&!O.doNotReject||m===i.start&&E.buttons!==void 0&&E.buttons>1||O.hover&&E.buttons)return!1;r||E.preventDefault(),E.calcPoint=E.points[t.ort],x(E,O)},T=[];return m.split(" ").forEach(function($){y.addEventListener($,A,r?{passive:!0}:!1),T.push([$,A])}),T}function Qn(m,y,x){var O=m.type.indexOf("touch")===0,A=m.type.indexOf("mouse")===0,T=m.type.indexOf("pointer")===0,$=0,E=0;if(m.type.indexOf("MSPointer")===0&&(T=!0),m.type==="mousedown"&&!m.buttons&&!m.touches)return!1;if(O){var ct=function(ot){var nt=ot.target;return nt===x||x.contains(nt)||m.composed&&m.composedPath().shift()===x};if(m.type==="touchstart"){var ht=Array.prototype.filter.call(m.touches,ct);if(ht.length>1)return!1;$=ht[0].pageX,E=ht[0].pageY}else{var yt=Array.prototype.find.call(m.changedTouches,ct);if(!yt)return!1;$=yt.pageX,E=yt.pageY}}return y=y||wh(D),(A||T)&&($=m.clientX+y.x,E=m.clientY+y.y),m.pageOffset=y,m.points=[$,E],m.cursor=A||T,m}function Hs(m){var y=m-A0(o,t.ort),x=y*100/Ti();return x=xh(x),t.dir?100-x:x}function tr(m){var y=100,x=!1;return c.forEach(function(O,A){if(!H(A)){var T=b[A],$=Math.abs(T-m),E=$===100&&y===100,ct=$<y,ht=$<=y&&m>T;(ct||ht||E)&&(x=A,y=$)}}),x}function er(m,y){m.type==="mouseout"&&m.target.nodeName==="HTML"&&m.relatedTarget===null&&Ai(m,y)}function Wa(m,y){if(navigator.appVersion.indexOf("MSIE 9")===-1&&m.buttons===0&&y.buttonsProperty!==0)return Ai(m,y);var x=(t.dir?-1:1)*(m.calcPoint-y.startCalcPoint),O=x*100/y.baseSize;ir(x>0,O,y.locations,y.handleNumbers,y.connect)}function Ai(m,y){y.handle&&(Zn(y.handle,t.cssClasses.active),w-=1),y.listeners.forEach(function(x){M.removeEventListener(x[0],x[1])}),w===0&&(Zn(a,t.cssClasses.drag),Us(),m.cursor&&(L.style.cursor="",L.removeEventListener("selectstart",yh))),t.events.smoothSteps&&(y.handleNumbers.forEach(function(x){De(x,b[x],!0,!0,!1,!1)}),y.handleNumbers.forEach(function(x){rt("update",x)})),y.handleNumbers.forEach(function(x){rt("change",x),rt("set",x),rt("end",x)})}function Ri(m,y){if(!y.handleNumbers.some(H)){var x;if(y.handleNumbers.length===1){var O=c[y.handleNumbers[0]];x=O.children[0],w+=1,Vt(x,t.cssClasses.active)}m.stopPropagation();var A=[],T=Kt(i.move,M,Wa,{target:m.target,handle:x,connect:y.connect,listeners:A,startCalcPoint:m.calcPoint,baseSize:Ti(),pageOffset:m.pageOffset,handleNumbers:y.handleNumbers,buttonsProperty:m.buttons,locations:b.slice()}),$=Kt(i.end,M,Ai,{target:m.target,handle:x,listeners:A,doNotReject:!0,handleNumbers:y.handleNumbers}),E=Kt("mouseout",M,er,{target:m.target,handle:x,listeners:A,doNotReject:!0,handleNumbers:y.handleNumbers});A.push.apply(A,T.concat($,E)),m.cursor&&(L.style.cursor=getComputedStyle(m.target).cursor,c.length>1&&Vt(a,t.cssClasses.drag),L.addEventListener("selectstart",yh,!1)),y.handleNumbers.forEach(function(ct){rt("start",ct)})}}function Ha(m){m.stopPropagation();var y=Hs(m.calcPoint),x=tr(y);x!==!1&&(t.events.snap||vh(a,t.cssClasses.tap,t.animationDuration),De(x,y,!0,!0),Us(),rt("slide",x,!0),rt("update",x,!0),t.events.snap?Ri(m,{handleNumbers:[x]}):(rt("change",x,!0),rt("set",x,!0)))}function Ba(m){var y=Hs(m.calcPoint),x=f.getStep(y),O=f.fromStepping(x);Object.keys(k).forEach(function(A){A.split(".")[0]==="hover"&&k[A].forEach(function(T){T.call(ae,O)})})}function ja(m,y){if(Tt()||H(y))return!1;var x=["Left","Right"],O=["Down","Up"],A=["PageDown","PageUp"],T=["Home","End"];t.dir&&!t.ort?x.reverse():t.ort&&!t.dir&&(O.reverse(),A.reverse());var $=m.key.replace("Arrow",""),E=$===A[0],ct=$===A[1],ht=$===O[0]||$===x[0]||E,yt=$===O[1]||$===x[1]||ct,ot=$===T[0],nt=$===T[1];if(!ht&&!yt&&!ot&&!nt)return!0;m.preventDefault();var Ct;if(yt||ht){var Et=ht?0:1,At=rr(y),Ft=At[Et];if(Ft===null)return!1;Ft===!1&&(Ft=f.getDefaultStep(b[y],ht,t.keyboardDefaultStep)),ct||E?Ft*=t.keyboardPageMultiplier:Ft*=t.keyboardMultiplier,Ft=Math.max(Ft,1e-7),Ft=(ht?-1:1)*Ft,Ct=g[y]+Ft}else nt?Ct=t.spectrum.xVal[t.spectrum.xVal.length-1]:Ct=t.spectrum.xVal[0];return De(y,f.toStepping(Ct),!0,!0),rt("slide",y),rt("update",y),rt("change",y),rt("set",y),!1}function sr(m){m.fixed||c.forEach(function(y,x){Kt(i.start,y.children[0],Ri,{handleNumbers:[x]})}),m.tap&&Kt(i.start,o,Ha,{}),m.hover&&Kt(i.move,o,Ba,{hover:!0}),m.drag&&h.forEach(function(y,x){if(!(y===!1||x===0||x===h.length-1)){var O=c[x-1],A=c[x],T=[y],$=[O,A],E=[x-1,x];Vt(y,t.cssClasses.draggable),m.fixed&&(T.push(O.children[0]),T.push(A.children[0])),m.dragAll&&($=c,E=v),T.forEach(function(ct){Kt(i.start,ct,Ri,{handles:$,handleNumbers:E,connect:y})})}})}function os(m,y){k[m]=k[m]||[],k[m].push(y),m.split(".")[0]==="update"&&c.forEach(function(x,O){rt("update",O)})}function Li(m){return m===is.aria||m===is.tooltips}function Me(m){var y=m&&m.split(".")[0],x=y?m.substring(y.length):m;Object.keys(k).forEach(function(O){var A=O.split(".")[0],T=O.substring(A.length);(!y||y===A)&&(!x||x===T)&&(!Li(T)||x===T)&&delete k[O]})}function rt(m,y,x){Object.keys(k).forEach(function(O){var A=O.split(".")[0];m===A&&k[O].forEach(function(T){T.call(ae,g.map(t.format.to),y,g.slice(),x||!1,b.slice(),ae)})})}function Ss(m,y,x,O,A,T,$){var E;return c.length>1&&!t.events.unconstrained&&(O&&y>0&&(E=f.getAbsoluteDistance(m[y-1],t.margin,!1),x=Math.max(x,E)),A&&y<c.length-1&&(E=f.getAbsoluteDistance(m[y+1],t.margin,!0),x=Math.min(x,E))),c.length>1&&t.limit&&(O&&y>0&&(E=f.getAbsoluteDistance(m[y-1],t.limit,!1),x=Math.min(x,E)),A&&y<c.length-1&&(E=f.getAbsoluteDistance(m[y+1],t.limit,!0),x=Math.max(x,E))),t.padding&&(y===0&&(E=f.getAbsoluteDistance(0,t.padding[0],!1),x=Math.max(x,E)),y===c.length-1&&(E=f.getAbsoluteDistance(100,t.padding[1],!0),x=Math.min(x,E))),$||(x=f.getStep(x)),x=xh(x),x===m[y]&&!T?!1:x}function Bs(m,y){var x=t.ort;return(x?y:m)+", "+(x?m:y)}function ir(m,y,x,O,A){var T=x.slice(),$=O[0],E=t.events.smoothSteps,ct=[!m,m],ht=[m,!m];O=O.slice(),m&&O.reverse(),O.length>1?O.forEach(function(ot,nt){var Ct=Ss(T,ot,T[ot]+y,ct[nt],ht[nt],!1,E);Ct===!1?y=0:(y=Ct-T[ot],T[ot]=Ct)}):ct=ht=[!0];var yt=!1;O.forEach(function(ot,nt){yt=De(ot,x[ot]+y,ct[nt],ht[nt],!1,E)||yt}),yt&&(O.forEach(function(ot){rt("update",ot),rt("slide",ot)}),A!=null&&rt("drag",$))}function nr(m,y){return t.dir?100-m-y:m}function js(m,y){b[m]=y,g[m]=f.fromStepping(y);var x=nr(y,0)-F,O="translate("+Bs(x+"%","0")+")";if(c[m].style[t.transformRule]=O,t.events.invertConnects&&b.length>1){var A=b.every(function(T,$,E){return $===0||T>=E[$-1]});if(C!==!A){Ms();return}}ls(m),ls(m+1),C&&(ls(m-1),ls(m+2))}function Us(){v.forEach(function(m){var y=b[m]>50?-1:1,x=3+(c.length+y*m);c[m].style.zIndex=String(x)})}function De(m,y,x,O,A,T){return A||(y=Ss(b,m,y,x,O,!1,T)),y===!1?!1:(js(m,y),!0)}function ls(m){if(h[m]){var y=b.slice();C&&y.sort(function(E,ct){return E-ct});var x=0,O=100;m!==0&&(x=y[m-1]),m!==h.length-1&&(O=y[m]);var A=O-x,T="translate("+Bs(nr(x,A)+"%","0")+")",$="scale("+Bs(A/100,"1")+")";h[m].style[t.transformRule]=T+" "+$}}function Fi(m,y){return m===null||m===!1||m===void 0||(typeof m=="number"&&(m=String(m)),m=t.format.from(m),m!==!1&&(m=f.toStepping(m)),m===!1||isNaN(m))?b[y]:m}function ks(m,y,x){var O=Kn(m),A=b[0]===void 0;y=y===void 0?!0:y,t.animate&&!A&&vh(a,t.cssClasses.tap,t.animationDuration),v.forEach(function(E){De(E,Fi(O[E],E),!0,!1,x)});var T=v.length===1?0:1;if(A&&f.hasNoSize()&&(x=!0,b[0]=0,v.length>1)){var $=100/(v.length-1);v.forEach(function(E){b[E]=E*$})}for(;T<v.length;++T)v.forEach(function(E){De(E,b[E],!0,!0,x)});Us(),v.forEach(function(E){rt("update",E),O[E]!==null&&y&&rt("set",E)})}function Ua(m){ks(t.start,m)}function Ga(m,y,x,O){if(m=Number(m),!(m>=0&&m<v.length))throw new Error("noUiSlider: invalid handle number, got: "+m);De(m,Fi(y,m),!0,!0,O),rt("update",m),x&&rt("set",m)}function Ce(m){if(m===void 0&&(m=!1),m)return g.length===1?g[0]:g.slice(0);var y=g.map(t.format.to);return y.length===1?y[0]:y}function Gs(){for(Me(is.aria),Me(is.tooltips),Object.keys(t.cssClasses).forEach(function(m){Zn(a,t.cssClasses[m])});a.firstChild;)a.removeChild(a.firstChild);delete a.noUiSlider}function rr(m){var y=b[m],x=f.getNearbySteps(y),O=g[m],A=x.thisStep.step,T=null;if(t.snap)return[O-x.stepBefore.startValue||null,x.stepAfter.startValue-O||null];A!==!1&&O+A>x.stepAfter.startValue&&(A=x.stepAfter.startValue-O),O>x.thisStep.startValue?T=x.thisStep.step:x.stepBefore.step===!1?T=!1:T=O-x.stepBefore.highestStep,y===100?A=null:y===0&&(T=null);var $=f.countStepDecimals();return A!==null&&A!==!1&&(A=Number(A.toFixed($))),T!==null&&T!==!1&&(T=Number(T.toFixed($))),[T,A]}function ar(){return v.map(rr)}function qa(m,y){var x=Ce(),O=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];O.forEach(function(T){m[T]!==void 0&&(s[T]=m[T])});var A=Oh(s);O.forEach(function(T){m[T]!==void 0&&(t[T]=A[T])}),f=A.spectrum,t.margin=A.margin,t.limit=A.limit,t.padding=A.padding,t.pips?Xt(t.pips):He(),t.tooltips?ns():qt(),b=[],ks(Ya(m.start)?m.start:x,y),m.connect&&Ei()}function Ei(){for(;l.firstChild;)l.removeChild(l.firstChild);for(var m=0;m<=t.handles;m++)h[m]=G(l,t.connect[m]),ls(m);sr({drag:t.events.drag,fixed:!0})}function Ms(){C=!C,Dh(t,t.connect.map(function(m){return!m})),Ei()}function Xa(){o=U(a),Z(t.connect,o),sr(t.events),ks(t.start),t.pips&&Xt(t.pips),t.tooltips&&ns(),ke()}Xa();var ae={destroy:Gs,steps:ar,on:os,off:Me,get:Ce,set:ks,setHandle:Ga,reset:Ua,disable:St,enable:_t,__moveHandles:function(m,y,x){ir(m,y,b,x)},options:s,updateOptions:qa,target:a,removePips:He,removeTooltips:qt,getPositions:function(){return b.slice()},getTooltips:function(){return d},getOrigins:function(){return c},pips:Xt};return ae}function uv(e,t){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var s=Oh(t),i=hv(e,s,t);return e.noUiSlider=i,i}const dv={__spectrum:Sh,cssClasses:Mh,create:uv};var fv=["start","slide","update","change","set","end"],Ph={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%"),dv.create(i,this.optionz),fv.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",pv,this.$slots.default);return t("div",gv,[s,i])},data:function(){return{optionz:Object,latestHandleValue:null}},watch:{set:function(t){this.$el.noUiSlider.set(t)}}},gv={style:{position:"relative"},class:{veeno:!0},attrs:{name:"custom-slider"}},pv={style:{position:"absolute",top:"-2.5rem"},class:{"veeno-span":!0}};function $a(e){$a.installed||($a.installed=!0,e.component("veeno",Ph))}var mv={install:$a},Jn=null;typeof window<"u"?Jn=window.Vue:typeof global<"u"&&(Jn=global.Vue),Jn&&Jn.use(mv);const Px="",bv={components:{"slider-fixed":{extends:Ph,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.initialViewPeriods>0&&(this.dateFrom=this.dateChoices[e.max-Math.min(this.initialViewPeriods,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){var o;if(a===1||a===2){let l=""+e.dateChoices[Number(r).toFixed(0)],c=l.split("-")[0],h=l.split("-")[1];if(c&&c!==i)return n=h,i=c,1;if(n!==h){i=c,n=h;let u=(o=e.$el)==null?void 0:o.getElementsByClassName("ss-tf-range-col").item(0);if(u){let d=e.dateChoices.length;e.timePeriod=="Weekly"&&(d/=4);let f=u.offsetWidth/Math.max(1,d);if(d/12>3&&u.offsetWidth/Math.max(1,d/12)<80)return 0;let g=Math.max(f,1)/30;if(g<1){let b=Math.max(1,Math.ceil(1/g));if(b>1&&g<1&&h%b!==Math.floor(b*.5))return 0}}return 2}return 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'<div class="kk-range-input-tooltip-text">'+e.dateChoices[Number(r).toFixed(0)]+(a>0?'<br/><span class="tooltip-span">('+Number(Math.abs(a-r)).toFixed(0)+" timeframes)":"")+"</span></div>"},from:function(r){return 0}},{to:function(r){const a=e.dateChoices.indexOf(e.dateFrom);return'<div class="kk-range-input-tooltip-text">'+e.dateChoices[Number(r).toFixed(0)]+(a>0?'<br/><span class="tooltip-span">('+Number(Math.abs(r-a)).toFixed(0)+" timeframes)":"")+"</span></div>"},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[]}},timePeriod:{type:String,default:"Monthly"},initialViewPeriods:{type:Number,default:-1}},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(g,b){let v=Number(g.replaceAll("-","")).toFixed(0);r===0&&v>c||r===1&&v<c||(r===0&&v>=u.num||r===1&&v<=u.num)&&(u.i=b,u.num=v)}),this[a]=this.dateChoices[u.i];const d=this.$library.dayjs(this[a]);let f=this.$refs[r===0?"calendarFrom":"calendarTo"];f&&(f.selected=d),(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 _v=function(){var t=this,s=t._self._c;return s("k-grid",{staticClass:"ss-timeframe-input"},[s("k-column",{staticClass:"ss-tf-from-col",attrs:{width:"2/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",on:{open:function(i){t.$refs.calendarFrom.show(t.$library.dayjs.interpret(t.dateFrom,"date"))}}},[s("k-calendar-input",{ref:"calendarFrom",attrs:{value:t.dateFrom,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",{staticClass:"ss-tf-range-col",attrs:{width:"8/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",{staticClass:"ss-tf-to-col",attrs:{width:"2/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",on:{open:function(i){t.$refs.calendarTo.show(t.$library.dayjs.interpret(t.dateTo,"date"))}}},[s("k-calendar",{ref:"calendarTo",attrs:{value:t.dateTo,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)},yv=[],vv=$t(bv,_v,yv,!1,null,null,null,null);const xv=vv.exports,Tx="",wv={components:{Visitors:Kh,PageStats:Zy,Devices:s0,Referers:o0,DbInformation:d0,Configuration:b0,TrackingTester:C0,TimeFrameInput:xv},data(){return{tab:"",dismissDisclaimer:!1,isLoading:!0}},props:{label:{type:String,default:"Simple Stats"},initialtab:{type:String,default:"pagevisits"},tabs:{type:Array,default:[]},timePeriod:{type:String,default:"Monthly"},timeframes:{type:Array,default:[]},initialViewPeriods:{type:Number,default:-1}},watch:{initialtab(e){e&&(this.tab=e)}},computed:{tabsWithLinks(){let e=this;return this.tabs.map(function(t){return t.click=function(s){e.onTab(t.name)},t})}},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=null){var s,i,n,r;let t=e;if((!e||e.length<1)&&(t=this.getTabFromLocalStorage()),(!t||t.length<1&&this.initialtab)&&(t=this.initialtab),this.tabs.some(a=>a.name===t)||(t=this.tabs[0].name),this.tab=t,(i=(s=this==null?void 0:this.$root)==null?void 0:s.$view)!=null&&i.breadcrumb)this.$root.$view.breadcrumb[0].label=((n=this.tabs.find(a=>a.name===e))==null?void 0:n.label)??t,this.$root.$view.breadcrumb[0].link=null;else{const a=Be();a.view.breadcrumb[0].label=((r=this.tabs.find(o=>o.name===e))==null?void 0:r.label)??t,a.view.breadcrumb[0].link=null}this.writeTabToLocalStorage()}}};var Sv=function(){var t=this,s=t._self._c;return s("k-panel-inside",[s("k-view",{staticClass:"k-simplestats-view"},[!t.isLoading&&!t.dismissDisclaimer?s("k-box",{attrs:{theme:"warning",icon:"flag"},scopedSlots:t._u([{key:"default",fn:function(){return[s("div",[s("k-headline",{staticClass:"h4"},[t._v(t._s(t.$t("simplestats.disclaimer.title")))]),s("k-text",{attrs:{size:"small"}},[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"}},[t._v(t._s(t.$t("simplestats.disclaimer.dismiss")))])],1)],1),s("br")])],1)]},proxy:!0}],null,!1,480016184)}):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)+" ")])],2),s("time-frame-input",{ref:"timeFrame",attrs:{dateChoices:t.timeframes,"time-period":t.timePeriod,"initial-view-periods":t.initialViewPeriods}}),s("k-tabs",{attrs:{tabs:t.tabsWithLinks,tab:t.tab}}),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",{staticStyle:{gap:"var(--spacing-12)"},attrs:{variant:"columns"}},[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),s("div",{attrs:{id:"chart-default-color-getter"}})],1)],1)},kv=[],Mv=$t(wv,Sv,kv,!1,null,null,null,null);const Dv=Mv.exports,Ax="",Cv={extends:Cs,components:{AreaChart:qn},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=>{this.label=e.label??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 Ov=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",{staticClass:"h3 k-section-header"},[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("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,label:t.$t("simplestats.visits.visitsovertime")}}),s("br")],1):t._e(),t.languagesAreEnabled&&t.showLanguages?s("div",{staticClass:"detailcolumn 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,label:t.$t("simplestats.visits.globallanguages")}})],1):t._e()],1)},Pv=[],Tv=$t(Cv,Ov,Pv,!1,null,null,null,null);const Av=Tv.exports,Rx="",Rv={props:{value:String|Number,column:Object,field:Object},computed:{percentage(){return Number(this.value*100).toFixed()}}};var Lv=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)+"%")])])},Fv=[],Ev=$t(Rv,Lv,Fv,!1,null,null,null,null);const Iv=Ev.exports;panel.plugin("daandelange/simplestats",{components:{"k-simplestats-view":Dv,"k-percentage-field-preview":Iv},sections:{pagestats:Av},use:[]})})();