@eox/chart 2.0.0-alpha11 → 2.0.0-alpha12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/main-6438d57a.js +25 -0
- package/dist/index.html +83 -0
- package/dist/interface.mjs +1 -1
- package/dist/interface.umd.js +1 -1
- package/package.json +1 -1
- package/dist/eox-chart.mjs +0 -18842
- package/dist/eox-chart.umd.js +0 -32
package/dist/eox-chart.umd.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
(function(Vt){typeof define=="function"&&define.amd?define(Vt):Vt()})(function(){"use strict";var ew=Object.defineProperty;var nw=(Vt,be,Tn)=>be in Vt?ew(Vt,be,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):Vt[be]=Tn;var R=(Vt,be,Tn)=>(nw(Vt,typeof be!="symbol"?be+"":be,Tn),Tn);function Vt(e,t){const n=Object.create(null),s=e.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}function be(e){if(Y(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=Et(s)?Om(s):be(s);if(i)for(const r in i)t[r]=i[r]}return t}else{if(Et(e))return e;if(pt(e))return e}}const Tn=/;(?![^(]*\))/g,Tm=/:([^]+)/,Em=/\/\*.*?\*\//gs;function Om(e){const t={};return e.replace(Em,"").split(Tn).forEach(n=>{if(n){const s=n.split(Tm);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function vo(e){let t="";if(Et(e))t=e;else if(Y(e))for(let n=0;n<e.length;n++){const s=vo(e[n]);s&&(t+=s+" ")}else if(pt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const km=Vt("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Il(e){return!!e||e===""}const ut=Object.freeze({}),ds=Object.freeze([]),Gt=()=>{},Pl=()=>!1,Cm=/^on[^a-z]/,Ws=e=>Cm.test(e),Bi=e=>e.startsWith("onUpdate:"),xt=Object.assign,So=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Dm=Object.prototype.hasOwnProperty,tt=(e,t)=>Dm.call(e,t),Y=Array.isArray,fs=e=>Hi(e)==="[object Map]",Am=e=>Hi(e)==="[object Set]",Z=e=>typeof e=="function",Et=e=>typeof e=="string",wo=e=>typeof e=="symbol",pt=e=>e!==null&&typeof e=="object",Mo=e=>pt(e)&&Z(e.then)&&Z(e.catch),Im=Object.prototype.toString,Hi=e=>Im.call(e),To=e=>Hi(e).slice(8,-1),Pm=e=>Hi(e)==="[object Object]",Eo=e=>Et(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Wi=Vt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Nm=Vt("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),$i=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Lm=/-(\w)/g,Be=$i(e=>e.replace(Lm,(t,n)=>n?n.toUpperCase():"")),Rm=/\B([A-Z])/g,te=$i(e=>e.replace(Rm,"-$1").toLowerCase()),ji=$i(e=>e.charAt(0).toUpperCase()+e.slice(1)),En=$i(e=>e?`on${ji(e)}`:""),$s=(e,t)=>!Object.is(e,t),js=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Ui=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Fm=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Nl=e=>{const t=Et(e)?Number(e):NaN;return isNaN(t)?e:t};let Ll;const Rl=()=>Ll||(Ll=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Oo(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let _e;class zm{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=_e,!t&&_e&&(this.index=(_e.scopes||(_e.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=_e;try{return _e=this,t()}finally{_e=n}}else Oo("cannot run an inactive effect scope.")}on(){_e=this}off(){_e=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function Vm(e,t=_e){t&&t.active&&t.effects.push(e)}function Bm(){return _e}const ko=e=>{const t=new Set(e);return t.w=0,t.n=0,t},Fl=e=>(e.w&sn)>0,zl=e=>(e.n&sn)>0,Hm=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=sn},Wm=e=>{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s<t.length;s++){const i=t[s];Fl(i)&&!zl(i)?i.delete(e):t[n++]=i,i.w&=~sn,i.n&=~sn}t.length=n}},Co=new WeakMap;let Us=0,sn=1;const Do=30;let Bt;const On=Symbol("iterate"),Ao=Symbol("Map key iterate");class Io{constructor(t,n=null,s){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,Vm(this,s)}run(){if(!this.active)return this.fn();let t=Bt,n=rn;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=Bt,Bt=this,rn=!0,sn=1<<++Us,Us<=Do?Hm(this):Vl(this),this.fn()}finally{Us<=Do&&Wm(this),sn=1<<--Us,Bt=this.parent,rn=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){Bt===this?this.deferStop=!0:this.active&&(Vl(this),this.onStop&&this.onStop(),this.active=!1)}}function Vl(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let rn=!0;const Bl=[];function kn(){Bl.push(rn),rn=!1}function Cn(){const e=Bl.pop();rn=e===void 0?!0:e}function Yt(e,t,n){if(rn&&Bt){let s=Co.get(e);s||Co.set(e,s=new Map);let i=s.get(n);i||s.set(n,i=ko()),Hl(i,{effect:Bt,target:e,type:t,key:n})}}function Hl(e,t){let n=!1;Us<=Do?zl(e)||(e.n|=sn,n=!Fl(e)):n=!e.has(Bt),n&&(e.add(Bt),Bt.deps.push(e),Bt.onTrack&&Bt.onTrack(Object.assign({effect:Bt},t)))}function He(e,t,n,s,i,r){const o=Co.get(e);if(!o)return;let a=[];if(t==="clear")a=[...o.values()];else if(n==="length"&&Y(e)){const c=Number(s);o.forEach((u,h)=>{(h==="length"||h>=c)&&a.push(u)})}else switch(n!==void 0&&a.push(o.get(n)),t){case"add":Y(e)?Eo(n)&&a.push(o.get("length")):(a.push(o.get(On)),fs(e)&&a.push(o.get(Ao)));break;case"delete":Y(e)||(a.push(o.get(On)),fs(e)&&a.push(o.get(Ao)));break;case"set":fs(e)&&a.push(o.get(On));break}const l={target:e,type:t,key:n,newValue:s,oldValue:i,oldTarget:r};if(a.length===1)a[0]&&Po(a[0],l);else{const c=[];for(const u of a)u&&c.push(...u);Po(ko(c),l)}}function Po(e,t){const n=Y(e)?e:[...e];for(const s of n)s.computed&&Wl(s,t);for(const s of n)s.computed||Wl(s,t)}function Wl(e,t){(e!==Bt||e.allowRecurse)&&(e.onTrigger&&e.onTrigger(xt({effect:e},t)),e.scheduler?e.scheduler():e.run())}const $m=Vt("__proto__,__v_isRef,__isVue"),$l=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(wo)),jm=Gi(),Um=Gi(!1,!0),Gm=Gi(!0),Ym=Gi(!0,!0),jl=Km();function Km(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=q(this);for(let r=0,o=this.length;r<o;r++)Yt(s,"get",r+"");const i=s[t](...n);return i===-1||i===!1?s[t](...n.map(q)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){kn();const s=q(this)[t].apply(this,n);return Cn(),s}}),e}function Xm(e){const t=q(this);return Yt(t,"has",e),t.hasOwnProperty(e)}function Gi(e=!1,t=!1){return function(s,i,r){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&r===(e?t?nc:ec:t?tc:Ql).get(s))return s;const o=Y(s);if(!e){if(o&&tt(jl,i))return Reflect.get(jl,i,r);if(i==="hasOwnProperty")return Xm}const a=Reflect.get(s,i,r);return(wo(i)?$l.has(i):$m(i))||(e||Yt(s,"get",i),t)?a:Dt(a)?o&&Eo(i)?a:a.value:pt(a)?e?sc(a):Lo(a):a}}const Zm=Ul(),qm=Ul(!0);function Ul(e=!1){return function(n,s,i,r){let o=n[s];if(an(o)&&Dt(o)&&!Dt(i))return!1;if(!e&&(!er(i)&&!an(i)&&(o=q(o),i=q(i)),!Y(n)&&Dt(o)&&!Dt(i)))return o.value=i,!0;const a=Y(n)&&Eo(s)?Number(s)<n.length:tt(n,s),l=Reflect.set(n,s,i,r);return n===q(r)&&(a?$s(i,o)&&He(n,"set",s,i,o):He(n,"add",s,i)),l}}function Jm(e,t){const n=tt(e,t),s=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&He(e,"delete",t,void 0,s),i}function Qm(e,t){const n=Reflect.has(e,t);return(!wo(t)||!$l.has(t))&&Yt(e,"has",t),n}function tp(e){return Yt(e,"iterate",Y(e)?"length":On),Reflect.ownKeys(e)}const Gl={get:jm,set:Zm,deleteProperty:Jm,has:Qm,ownKeys:tp},Yl={get:Gm,set(e,t){return Oo(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return Oo(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},ep=xt({},Gl,{get:Um,set:qm}),np=xt({},Yl,{get:Ym}),No=e=>e,Yi=e=>Reflect.getPrototypeOf(e);function Ki(e,t,n=!1,s=!1){e=e.__v_raw;const i=q(e),r=q(t);n||(t!==r&&Yt(i,"get",t),Yt(i,"get",r));const{has:o}=Yi(i),a=s?No:n?Fo:Gs;if(o.call(i,t))return a(e.get(t));if(o.call(i,r))return a(e.get(r));e!==i&&e.get(t)}function Xi(e,t=!1){const n=this.__v_raw,s=q(n),i=q(e);return t||(e!==i&&Yt(s,"has",e),Yt(s,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Zi(e,t=!1){return e=e.__v_raw,!t&&Yt(q(e),"iterate",On),Reflect.get(e,"size",e)}function Kl(e){e=q(e);const t=q(this);return Yi(t).has.call(t,e)||(t.add(e),He(t,"add",e,e)),this}function Xl(e,t){t=q(t);const n=q(this),{has:s,get:i}=Yi(n);let r=s.call(n,e);r?Jl(n,s,e):(e=q(e),r=s.call(n,e));const o=i.call(n,e);return n.set(e,t),r?$s(t,o)&&He(n,"set",e,t,o):He(n,"add",e,t),this}function Zl(e){const t=q(this),{has:n,get:s}=Yi(t);let i=n.call(t,e);i?Jl(t,n,e):(e=q(e),i=n.call(t,e));const r=s?s.call(t,e):void 0,o=t.delete(e);return i&&He(t,"delete",e,void 0,r),o}function ql(){const e=q(this),t=e.size!==0,n=fs(e)?new Map(e):new Set(e),s=e.clear();return t&&He(e,"clear",void 0,void 0,n),s}function qi(e,t){return function(s,i){const r=this,o=r.__v_raw,a=q(o),l=t?No:e?Fo:Gs;return!e&&Yt(a,"iterate",On),o.forEach((c,u)=>s.call(i,l(c),l(u),r))}}function Ji(e,t,n){return function(...s){const i=this.__v_raw,r=q(i),o=fs(r),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=i[e](...s),u=n?No:t?Fo:Gs;return!t&&Yt(r,"iterate",l?Ao:On),{next(){const{value:h,done:d}=c.next();return d?{value:h,done:d}:{value:a?[u(h[0]),u(h[1])]:u(h),done:d}},[Symbol.iterator](){return this}}}}function on(e){return function(...t){{const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${ji(e)} operation ${n}failed: target is readonly.`,q(this))}return e==="delete"?!1:this}}function sp(){const e={get(r){return Ki(this,r)},get size(){return Zi(this)},has:Xi,add:Kl,set:Xl,delete:Zl,clear:ql,forEach:qi(!1,!1)},t={get(r){return Ki(this,r,!1,!0)},get size(){return Zi(this)},has:Xi,add:Kl,set:Xl,delete:Zl,clear:ql,forEach:qi(!1,!0)},n={get(r){return Ki(this,r,!0)},get size(){return Zi(this,!0)},has(r){return Xi.call(this,r,!0)},add:on("add"),set:on("set"),delete:on("delete"),clear:on("clear"),forEach:qi(!0,!1)},s={get(r){return Ki(this,r,!0,!0)},get size(){return Zi(this,!0)},has(r){return Xi.call(this,r,!0)},add:on("add"),set:on("set"),delete:on("delete"),clear:on("clear"),forEach:qi(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{e[r]=Ji(r,!1,!1),n[r]=Ji(r,!0,!1),t[r]=Ji(r,!1,!0),s[r]=Ji(r,!0,!0)}),[e,n,t,s]}const[ip,rp,op,ap]=sp();function Qi(e,t){const n=t?e?ap:op:e?rp:ip;return(s,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?s:Reflect.get(tt(n,i)&&i in s?n:s,i,r)}const lp={get:Qi(!1,!1)},cp={get:Qi(!1,!0)},up={get:Qi(!0,!1)},hp={get:Qi(!0,!0)};function Jl(e,t,n){const s=q(n);if(s!==n&&t.call(e,s)){const i=To(e);console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Ql=new WeakMap,tc=new WeakMap,ec=new WeakMap,nc=new WeakMap;function dp(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function fp(e){return e.__v_skip||!Object.isExtensible(e)?0:dp(To(e))}function Lo(e){return an(e)?e:tr(e,!1,Gl,lp,Ql)}function mp(e){return tr(e,!1,ep,cp,tc)}function sc(e){return tr(e,!0,Yl,up,ec)}function ms(e){return tr(e,!0,np,hp,nc)}function tr(e,t,n,s,i){if(!pt(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=i.get(e);if(r)return r;const o=fp(e);if(o===0)return e;const a=new Proxy(e,o===2?s:n);return i.set(e,a),a}function Dn(e){return an(e)?Dn(e.__v_raw):!!(e&&e.__v_isReactive)}function an(e){return!!(e&&e.__v_isReadonly)}function er(e){return!!(e&&e.__v_isShallow)}function Ro(e){return Dn(e)||an(e)}function q(e){const t=e&&e.__v_raw;return t?q(t):e}function ic(e){return Ui(e,"__v_skip",!0),e}const Gs=e=>pt(e)?Lo(e):e,Fo=e=>pt(e)?sc(e):e;function rc(e){rn&&Bt&&(e=q(e),Hl(e.dep||(e.dep=ko()),{target:e,type:"get",key:"value"}))}function oc(e,t){e=q(e);const n=e.dep;n&&Po(n,{target:e,type:"set",key:"value",newValue:t})}function Dt(e){return!!(e&&e.__v_isRef===!0)}function ac(e){return pp(e,!1)}function pp(e,t){return Dt(e)?e:new gp(e,t)}class gp{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:q(t),this._value=n?t:Gs(t)}get value(){return rc(this),this._value}set value(t){const n=this.__v_isShallow||er(t)||an(t);t=n?t:q(t),$s(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Gs(t),oc(this,t))}}function bp(e){return Dt(e)?e.value:e}const _p={get:(e,t,n)=>bp(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return Dt(i)&&!Dt(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};function lc(e){return Dn(e)?e:new Proxy(e,_p)}var cc;class yp{constructor(t,n,s,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[cc]=!1,this._dirty=!0,this.effect=new Io(t,()=>{this._dirty||(this._dirty=!0,oc(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=s}get value(){const t=q(this);return rc(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}cc="__v_isReadonly";function xp(e,t,n=!1){let s,i;const r=Z(e);r?(s=e,i=()=>{console.warn("Write operation failed: computed value is readonly")}):(s=e.get,i=e.set);const o=new yp(s,i,r||!i,n);return t&&!n&&(o.effect.onTrack=t.onTrack,o.effect.onTrigger=t.onTrigger),o}const An=[];function nr(e){An.push(e)}function sr(){An.pop()}function N(e,...t){kn();const n=An.length?An[An.length-1].component:null,s=n&&n.appContext.config.warnHandler,i=vp();if(s)We(s,n,11,[e+t.join(""),n&&n.proxy,i.map(({vnode:r})=>`at <${xr(n,r.type)}>`).join(`
|
|
2
|
-
`),i]);else{const r=[`[Vue warn]: ${e}`,...t];i.length&&r.push(`
|
|
3
|
-
`,...Sp(i)),console.warn(...r)}Cn()}function vp(){let e=An[An.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function Sp(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
|
|
4
|
-
`],...wp(n))}),t}function wp({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,i=` at <${xr(e.component,e.type,s)}`,r=">"+n;return e.props?[i,...Mp(e.props),r]:[i+r]}function Mp(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...uc(s,e[s]))}),n.length>3&&t.push(" ..."),t}function uc(e,t,n){return Et(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Dt(t)?(t=uc(e,q(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):Z(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=q(t),n?t:[`${e}=`,t])}const zo={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",[0]:"setup function",[1]:"render function",[2]:"watcher getter",[3]:"watcher callback",[4]:"watcher cleanup function",[5]:"native event handler",[6]:"component event handler",[7]:"vnode hook",[8]:"directive hook",[9]:"transition hook",[10]:"app errorHandler",[11]:"app warnHandler",[12]:"ref function",[13]:"async component loader",[14]:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function We(e,t,n,s){let i;try{i=s?e(...s):e()}catch(r){ir(r,t,n)}return i}function le(e,t,n,s){if(Z(e)){const r=We(e,t,n,s);return r&&Mo(r)&&r.catch(o=>{ir(o,t,n)}),r}const i=[];for(let r=0;r<e.length;r++)i.push(le(e[r],t,n,s));return i}function ir(e,t,n,s=!0){const i=t?t.vnode:null;if(t){let r=t.parent;const o=t.proxy,a=zo[n];for(;r;){const c=r.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](e,o,a)===!1)return}r=r.parent}const l=t.appContext.config.errorHandler;if(l){We(l,null,10,[e,o,a]);return}}Tp(e,n,i,s)}function Tp(e,t,n,s=!0){{const i=zo[t];if(n&&nr(n),N(`Unhandled error${i?` during execution of ${i}`:""}`),n&&sr(),s)throw e;console.error(e)}}let Ys=!1,Vo=!1;const Nt=[];let Ce=0;const ps=[];let De=null,ln=0;const hc=Promise.resolve();let Bo=null;const Ep=100;function dc(e){const t=Bo||hc;return e?t.then(this?e.bind(this):e):t}function Op(e){let t=Ce+1,n=Nt.length;for(;t<n;){const s=t+n>>>1;Ks(Nt[s])<e?t=s+1:n=s}return t}function rr(e){(!Nt.length||!Nt.includes(e,Ys&&e.allowRecurse?Ce+1:Ce))&&(e.id==null?Nt.push(e):Nt.splice(Op(e.id),0,e),fc())}function fc(){!Ys&&!Vo&&(Vo=!0,Bo=hc.then(bc))}function kp(e){const t=Nt.indexOf(e);t>Ce&&Nt.splice(t,1)}function mc(e){Y(e)?ps.push(...e):(!De||!De.includes(e,e.allowRecurse?ln+1:ln))&&ps.push(e),fc()}function pc(e,t=Ys?Ce+1:0){for(e=e||new Map;t<Nt.length;t++){const n=Nt[t];if(n&&n.pre){if(Ho(e,n))continue;Nt.splice(t,1),t--,n()}}}function gc(e){if(ps.length){const t=[...new Set(ps)];if(ps.length=0,De){De.push(...t);return}for(De=t,e=e||new Map,De.sort((n,s)=>Ks(n)-Ks(s)),ln=0;ln<De.length;ln++)Ho(e,De[ln])||De[ln]();De=null,ln=0}}const Ks=e=>e.id==null?1/0:e.id,Cp=(e,t)=>{const n=Ks(e)-Ks(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function bc(e){Vo=!1,Ys=!0,e=e||new Map,Nt.sort(Cp);const t=n=>Ho(e,n);try{for(Ce=0;Ce<Nt.length;Ce++){const n=Nt[Ce];if(n&&n.active!==!1){if(t(n))continue;We(n,null,14)}}}finally{Ce=0,Nt.length=0,gc(e),Ys=!1,Bo=null,(Nt.length||ps.length)&&bc(e)}}function Ho(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>Ep){const s=t.ownerInstance,i=s&&ou(s.type);return N(`Maximum recursive updates exceeded${i?` in component <${i}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}else e.set(t,n+1)}}let In=!1;const gs=new Set;Rl().__VUE_HMR_RUNTIME__={createRecord:Wo(_c),rerender:Wo(Ip),reload:Wo(Pp)};const Pn=new Map;function Dp(e){const t=e.type.__hmrId;let n=Pn.get(t);n||(_c(t,e.type),n=Pn.get(t)),n.instances.add(e)}function Ap(e){Pn.get(e.type.__hmrId).instances.delete(e)}function _c(e,t){return Pn.has(e)?!1:(Pn.set(e,{initialDef:Xs(t),instances:new Set}),!0)}function Xs(e){return au(e)?e.__vccOpts:e}function Ip(e,t){const n=Pn.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,Xs(s.type).render=t),s.renderCache=[],In=!0,s.update(),In=!1}))}function Pp(e,t){const n=Pn.get(e);if(!n)return;t=Xs(t),yc(n.initialDef,t);const s=[...n.instances];for(const i of s){const r=Xs(i.type);gs.has(r)||(r!==n.initialDef&&yc(r,t),gs.add(r)),i.appContext.optionsCache.delete(i.type),i.ceReload?(gs.add(r),i.ceReload(t.styles),gs.delete(r)):i.parent?rr(i.parent.update):i.appContext.reload?i.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}mc(()=>{for(const i of s)gs.delete(Xs(i.type))})}function yc(e,t){xt(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Wo(e){return(t,n)=>{try{return e(t,n)}catch(s){console.error(s),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let Ae,Zs=[],$o=!1;function qs(e,...t){Ae?Ae.emit(e,...t):$o||Zs.push({event:e,args:t})}function xc(e,t){var n,s;Ae=e,Ae?(Ae.enabled=!0,Zs.forEach(({event:i,args:r})=>Ae.emit(i,...r)),Zs=[]):typeof window<"u"&&window.HTMLElement&&!(!((s=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||s===void 0)&&s.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{xc(r,t)}),setTimeout(()=>{Ae||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,$o=!0,Zs=[])},3e3)):($o=!0,Zs=[])}function Np(e,t){qs("app:init",e,t,{Fragment:ue,Text:ti,Comment:Wt,Static:gr})}function Lp(e){qs("app:unmount",e)}const Rp=jo("component:added"),vc=jo("component:updated"),Fp=jo("component:removed"),zp=e=>{Ae&&typeof Ae.cleanupBuffer=="function"&&!Ae.cleanupBuffer(e)&&Fp(e)};function jo(e){return t=>{qs(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Vp=Sc("perf:start"),Bp=Sc("perf:end");function Sc(e){return(t,n,s)=>{qs(e,t.appContext.app,t.uid,t,n,s)}}function Hp(e,t,n){qs("component:emit",e.appContext.app,e,t,n)}function Wp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ut;{const{emitsOptions:u,propsOptions:[h]}=e;if(u)if(!(t in u))(!h||!(En(t)in h))&&N(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${En(t)}" prop.`);else{const d=u[t];Z(d)&&(d(...n)||N(`Invalid event arguments: event validation failed for event "${t}".`))}}let i=n;const r=t.startsWith("update:"),o=r&&t.slice(7);if(o&&o in s){const u=`${o==="modelValue"?"model":o}Modifiers`,{number:h,trim:d}=s[u]||ut;d&&(i=n.map(f=>Et(f)?f.trim():f)),h&&(i=n.map(Fm))}Hp(e,t,i);{const u=t.toLowerCase();u!==t&&s[En(u)]&&N(`Event "${u}" is emitted in component ${xr(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${te(t)}" instead of "${t}".`)}let a,l=s[a=En(t)]||s[a=En(Be(t))];!l&&r&&(l=s[a=En(te(t))]),l&&le(l,e,6,i);const c=s[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,le(c,e,6,i)}}function wc(e,t,n=!1){const s=t.emitsCache,i=s.get(e);if(i!==void 0)return i;const r=e.emits;let o={},a=!1;if(!Z(e)){const l=c=>{const u=wc(c,t,!0);u&&(a=!0,xt(o,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!r&&!a?(pt(e)&&s.set(e,null),null):(Y(r)?r.forEach(l=>o[l]=null):xt(o,r),pt(e)&&s.set(e,o),o)}function or(e,t){return!e||!Ws(t)?!1:(t=t.slice(2).replace(/Once$/,""),tt(e,t[0].toLowerCase()+t.slice(1))||tt(e,te(t))||tt(e,t))}let ee=null,Mc=null;function ar(e){const t=ee;return ee=e,Mc=e&&e.type.__scopeId||null,t}function $p(e,t=ee,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&tu(-1);const r=ar(t);let o;try{o=e(...i)}finally{ar(r),s._d&&tu(1)}return vc(t),o};return s._n=!0,s._c=!0,s._d=!0,s}let Uo=!1;function lr(){Uo=!0}function Go(e){const{type:t,vnode:n,proxy:s,withProxy:i,props:r,propsOptions:[o],slots:a,attrs:l,emit:c,render:u,renderCache:h,data:d,setupState:f,ctx:m,inheritAttrs:p}=e;let b,y;const x=ar(e);Uo=!1;try{if(n.shapeFlag&4){const S=i||s;b=xe(u.call(S,S,h,r,f,d,m)),y=l}else{const S=t;l===r&&lr(),b=xe(S.length>1?S(r,{get attrs(){return lr(),l},slots:a,emit:c}):S(r,null)),y=t.props?l:Up(l)}}catch(S){ei.length=0,ir(S,e,1),b=un(Wt)}let w=b,v;if(b.patchFlag>0&&b.patchFlag&2048&&([w,v]=jp(b)),y&&p!==!1){const S=Object.keys(y),{shapeFlag:C}=w;if(S.length){if(C&7)o&&S.some(Bi)&&(y=Gp(y,o)),w=Ie(w,y);else if(!Uo&&w.type!==Wt){const D=Object.keys(l),T=[],L=[];for(let V=0,$=D.length;V<$;V++){const G=D[V];Ws(G)?Bi(G)||T.push(G[2].toLowerCase()+G.slice(3)):L.push(G)}L.length&&N(`Extraneous non-props attributes (${L.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),T.length&&N(`Extraneous non-emits event listeners (${T.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(Ec(w)||N("Runtime directive used on component with non-element root node. The directives will not function as intended."),w=Ie(w),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&(Ec(w)||N("Component inside <Transition> renders non-element root node that cannot be animated."),w.transition=n.transition),v?v(w):b=w,ar(x),b}const jp=e=>{const t=e.children,n=e.dynamicChildren,s=Tc(t);if(!s)return[e,void 0];const i=t.indexOf(s),r=n?n.indexOf(s):-1,o=a=>{t[i]=a,n&&(r>-1?n[r]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[xe(s),o]};function Tc(e){let t;for(let n=0;n<e.length;n++){const s=e[n];if(la(s)){if(s.type!==Wt||s.children==="v-if"){if(t)return;t=s}}else return}return t}const Up=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ws(n))&&((t||(t={}))[n]=e[n]);return t},Gp=(e,t)=>{const n={};for(const s in e)(!Bi(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n},Ec=e=>e.shapeFlag&7||e.type===Wt;function Yp(e,t,n){const{props:s,children:i,component:r}=e,{props:o,children:a,patchFlag:l}=t,c=r.emitsOptions;if((i||a)&&In||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?Oc(s,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const d=u[h];if(o[d]!==s[d]&&!or(c,d))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:s===o?!1:s?o?Oc(s,o,c):!0:!!o;return!1}function Oc(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let i=0;i<s.length;i++){const r=s[i];if(t[r]!==e[r]&&!or(n,r))return!0}return!1}function Kp({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const Xp=e=>e.__isSuspense;function Zp(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):mc(e)}function qp(e,t){if(!Mt)N("provide() can only be used inside setup().");else{let n=Mt.provides;const s=Mt.parent&&Mt.parent.provides;s===n&&(n=Mt.provides=Object.create(s)),n[e]=t}}function cr(e,t,n=!1){const s=Mt||ee;if(s){const i=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&Z(t)?t.call(s.proxy):t;N(`injection "${String(e)}" not found.`)}else N("inject() can only be used inside setup() or functional components.")}const ur={};function Yo(e,t,n){return Z(t)||N("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),kc(e,t,n)}function kc(e,t,{immediate:n,deep:s,flush:i,onTrack:r,onTrigger:o}=ut){t||(n!==void 0&&N('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&N('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));const a=v=>{N("Invalid watch source: ",v,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},l=Bm()===(Mt==null?void 0:Mt.scope)?Mt:null;let c,u=!1,h=!1;if(Dt(e)?(c=()=>e.value,u=er(e)):Dn(e)?(c=()=>e,s=!0):Y(e)?(h=!0,u=e.some(v=>Dn(v)||er(v)),c=()=>e.map(v=>{if(Dt(v))return v.value;if(Dn(v))return bs(v);if(Z(v))return We(v,l,2);a(v)})):Z(e)?t?c=()=>We(e,l,2):c=()=>{if(!(l&&l.isUnmounted))return d&&d(),le(e,l,3,[f])}:(c=Gt,a(e)),t&&s){const v=c;c=()=>bs(v())}let d,f=v=>{d=x.onStop=()=>{We(v,l,4)}},m;if(si)if(f=Gt,t?n&&le(t,l,3,[c(),h?[]:void 0,f]):c(),i==="sync"){const v=l0();m=v.__watcherHandles||(v.__watcherHandles=[])}else return Gt;let p=h?new Array(e.length).fill(ur):ur;const b=()=>{if(x.active)if(t){const v=x.run();(s||u||(h?v.some((S,C)=>$s(S,p[C])):$s(v,p)))&&(d&&d(),le(t,l,3,[v,p===ur?void 0:h&&p[0]===ur?[]:p,f]),p=v)}else x.run()};b.allowRecurse=!!t;let y;i==="sync"?y=b:i==="post"?y=()=>Kt(b,l&&l.suspense):(b.pre=!0,l&&(b.id=l.uid),y=()=>rr(b));const x=new Io(c,y);x.onTrack=r,x.onTrigger=o,t?n?b():p=x.run():i==="post"?Kt(x.run.bind(x),l&&l.suspense):x.run();const w=()=>{x.stop(),l&&l.scope&&So(l.scope.effects,x)};return m&&m.push(w),w}function Jp(e,t,n){const s=this.proxy,i=Et(e)?e.includes(".")?Cc(s,e):()=>s[e]:e.bind(s,s);let r;Z(t)?r=t:(r=t.handler,n=t);const o=Mt;_s(this);const a=kc(i,r.bind(s),n);return o?_s(o):Vn(),a}function Cc(e,t){const n=t.split(".");return()=>{let s=e;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}function bs(e,t){if(!pt(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),Dt(e))bs(e.value,t);else if(Y(e))for(let n=0;n<e.length;n++)bs(e[n],t);else if(Am(e)||fs(e))e.forEach(n=>{bs(n,t)});else if(Pm(e))for(const n in e)bs(e[n],t);return e}function Qp(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return qo(()=>{e.isMounted=!0}),Lc(()=>{e.isUnmounting=!0}),e}const ce=[Function,Array],tg={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ce,onEnter:ce,onAfterEnter:ce,onEnterCancelled:ce,onBeforeLeave:ce,onLeave:ce,onAfterLeave:ce,onLeaveCancelled:ce,onBeforeAppear:ce,onAppear:ce,onAfterAppear:ce,onAppearCancelled:ce},setup(e,{slots:t}){const n=qg(),s=Qp();let i;return()=>{const r=t.default&&Ic(t.default(),!0);if(!r||!r.length)return;let o=r[0];if(r.length>1){let p=!1;for(const b of r)if(b.type!==Wt){if(p){N("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}o=b,p=!0}}const a=q(e),{mode:l}=a;if(l&&l!=="in-out"&&l!=="out-in"&&l!=="default"&&N(`invalid <transition> mode: ${l}`),s.isLeaving)return Xo(o);const c=Ac(o);if(!c)return Xo(o);const u=Ko(c,a,s,n);Zo(c,u);const h=n.subTree,d=h&&Ac(h);let f=!1;const{getTransitionKey:m}=c.type;if(m){const p=m();i===void 0?i=p:p!==i&&(i=p,f=!0)}if(d&&d.type!==Wt&&(!zn(c,d)||f)){const p=Ko(d,a,s,n);if(Zo(d,p),l==="out-in")return s.isLeaving=!0,p.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&n.update()},Xo(o);l==="in-out"&&c.type!==Wt&&(p.delayLeave=(b,y,x)=>{const w=Dc(s,d);w[String(d.key)]=d,b._leaveCb=()=>{y(),b._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=x})}return o}}};function Dc(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Ko(e,t,n,s){const{appear:i,mode:r,persisted:o=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:h,onLeave:d,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:p,onAppear:b,onAfterAppear:y,onAppearCancelled:x}=t,w=String(e.key),v=Dc(n,e),S=(T,L)=>{T&&le(T,s,9,L)},C=(T,L)=>{const V=L[1];S(T,L),Y(T)?T.every($=>$.length<=1)&&V():T.length<=1&&V()},D={mode:r,persisted:o,beforeEnter(T){let L=a;if(!n.isMounted)if(i)L=p||a;else return;T._leaveCb&&T._leaveCb(!0);const V=v[w];V&&zn(e,V)&&V.el._leaveCb&&V.el._leaveCb(),S(L,[T])},enter(T){let L=l,V=c,$=u;if(!n.isMounted)if(i)L=b||l,V=y||c,$=x||u;else return;let G=!1;const ht=T._enterCb=Pt=>{G||(G=!0,Pt?S($,[T]):S(V,[T]),D.delayedLeave&&D.delayedLeave(),T._enterCb=void 0)};L?C(L,[T,ht]):ht()},leave(T,L){const V=String(e.key);if(T._enterCb&&T._enterCb(!0),n.isUnmounting)return L();S(h,[T]);let $=!1;const G=T._leaveCb=ht=>{$||($=!0,L(),ht?S(m,[T]):S(f,[T]),T._leaveCb=void 0,v[V]===e&&delete v[V])};v[V]=e,d?C(d,[T,G]):G()},clone(T){return Ko(T,t,n,s)}};return D}function Xo(e){if(Js(e))return e=Ie(e),e.children=null,e}function Ac(e){return Js(e)?e.children?e.children[0]:void 0:e}function Zo(e,t){e.shapeFlag&6&&e.component?Zo(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ic(e,t=!1,n){let s=[],i=0;for(let r=0;r<e.length;r++){let o=e[r];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:r);o.type===ue?(o.patchFlag&128&&i++,s=s.concat(Ic(o.children,t,a))):(t||o.type!==Wt)&&s.push(a!=null?Ie(o,{key:a}):o)}if(i>1)for(let r=0;r<s.length;r++)s[r].patchFlag=-2;return s}function Pc(e){return Z(e)?{setup:e,name:e.name}:e}const hr=e=>!!e.type.__asyncLoader,Js=e=>e.type.__isKeepAlive;function eg(e,t){Nc(e,"a",t)}function ng(e,t){Nc(e,"da",t)}function Nc(e,t,n=Mt){const s=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(dr(t,s,n),n){let i=n.parent;for(;i&&i.parent;)Js(i.parent.vnode)&&sg(s,t,n,i),i=i.parent}}function sg(e,t,n,s){const i=dr(t,e,s,!0);Rc(()=>{So(s[t],i)},n)}function dr(e,t,n=Mt,s=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;kn(),_s(n);const a=le(t,n,e,o);return Vn(),Cn(),a});return s?i.unshift(r):i.push(r),r}else{const i=En(zo[e].replace(/ hook$/,""));N(`${i} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const $e=e=>(t,n=Mt)=>(!si||e==="sp")&&dr(e,(...s)=>t(...s),n),ig=$e("bm"),qo=$e("m"),rg=$e("bu"),og=$e("u"),Lc=$e("bum"),Rc=$e("um"),ag=$e("sp"),lg=$e("rtg"),cg=$e("rtc");function ug(e,t=Mt){dr("ec",e,t)}function Fc(e){Nm(e)&&N("Do not use built-in directive ids as custom directive id: "+e)}function Nn(e,t,n,s){const i=e.dirs,r=t&&t.dirs;for(let o=0;o<i.length;o++){const a=i[o];r&&(a.oldValue=r[o].value);let l=a.dir[s];l&&(kn(),le(l,n,8,[e.el,a,e,t]),Cn())}}const hg=Symbol(),Jo=e=>e?su(e)?da(e)||e.proxy:Jo(e.parent):null,Ln=xt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>ms(e.props),$attrs:e=>ms(e.attrs),$slots:e=>ms(e.slots),$refs:e=>ms(e.refs),$parent:e=>Jo(e.parent),$root:e=>Jo(e.root),$emit:e=>e.emit,$options:e=>na(e),$forceUpdate:e=>e.f||(e.f=()=>rr(e.update)),$nextTick:e=>e.n||(e.n=dc.bind(e.proxy)),$watch:e=>Jp.bind(e)}),Qo=e=>e==="_"||e==="$",ta=(e,t)=>e!==ut&&!e.__isScriptSetup&&tt(e,t),zc={get({_:e},t){const{ctx:n,setupState:s,data:i,props:r,accessCache:o,type:a,appContext:l}=e;if(t==="__isVue")return!0;let c;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return s[t];case 2:return i[t];case 4:return n[t];case 3:return r[t]}else{if(ta(s,t))return o[t]=1,s[t];if(i!==ut&&tt(i,t))return o[t]=2,i[t];if((c=e.propsOptions[0])&&tt(c,t))return o[t]=3,r[t];if(n!==ut&&tt(n,t))return o[t]=4,n[t];ea&&(o[t]=0)}}const u=Ln[t];let h,d;if(u)return t==="$attrs"&&(Yt(e,"get",t),lr()),u(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(n!==ut&&tt(n,t))return o[t]=4,n[t];if(d=l.config.globalProperties,tt(d,t))return d[t];ee&&(!Et(t)||t.indexOf("__v")!==0)&&(i!==ut&&Qo(t[0])&&tt(i,t)?N(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===ee&&N(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:s,setupState:i,ctx:r}=e;return ta(i,t)?(i[t]=n,!0):i.__isScriptSetup&&tt(i,t)?(N(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):s!==ut&&tt(s,t)?(s[t]=n,!0):tt(e.props,t)?(N(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(N(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(t in e.appContext.config.globalProperties?Object.defineProperty(r,t,{enumerable:!0,configurable:!0,value:n}):r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:i,propsOptions:r}},o){let a;return!!n[o]||e!==ut&&tt(e,o)||ta(t,o)||(a=r[0])&&tt(a,o)||tt(s,o)||tt(Ln,o)||tt(i.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:tt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};zc.ownKeys=e=>(N("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e));function dg(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(Ln).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>Ln[n](e),set:Gt})}),t}function fg(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(s=>{Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>e.props[s],set:Gt})})}function mg(e){const{ctx:t,setupState:n}=e;Object.keys(q(n)).forEach(s=>{if(!n.__isScriptSetup){if(Qo(s[0])){N(`setup() return property ${JSON.stringify(s)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>n[s],set:Gt})}})}function pg(){const e=Object.create(null);return(t,n)=>{e[n]?N(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let ea=!0;function gg(e){const t=na(e),n=e.proxy,s=e.ctx;ea=!1,t.beforeCreate&&Vc(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:h,mounted:d,beforeUpdate:f,updated:m,activated:p,deactivated:b,beforeDestroy:y,beforeUnmount:x,destroyed:w,unmounted:v,render:S,renderTracked:C,renderTriggered:D,errorCaptured:T,serverPrefetch:L,expose:V,inheritAttrs:$,components:G,directives:ht,filters:Pt}=t,et=pg();{const[j]=e.propsOptions;if(j)for(const K in j)et("Props",K)}if(c&&bg(c,s,et,e.appContext.config.unwrapInjectedRef),o)for(const j in o){const K=o[j];Z(K)?(Object.defineProperty(s,j,{value:K.bind(n),configurable:!0,enumerable:!0,writable:!0}),et("Methods",j)):N(`Method "${j}" has type "${typeof K}" in the component definition. Did you reference the function correctly?`)}if(i){Z(i)||N("The data option must be a function. Plain object usage is no longer supported.");const j=i.call(n,n);if(Mo(j)&&N("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!pt(j))N("data() should return an object.");else{e.data=Lo(j);for(const K in j)et("Data",K),Qo(K[0])||Object.defineProperty(s,K,{configurable:!0,enumerable:!0,get:()=>j[K],set:Gt})}}if(ea=!0,r)for(const j in r){const K=r[j],dt=Z(K)?K.bind(n,n):Z(K.get)?K.get.bind(n,n):Gt;dt===Gt&&N(`Computed property "${j}" has no getter.`);const Fe=!Z(K)&&Z(K.set)?K.set.bind(n):()=>{N(`Write operation failed: computed property "${j}" is readonly.`)},ze=o0({get:dt,set:Fe});Object.defineProperty(s,j,{enumerable:!0,configurable:!0,get:()=>ze.value,set:ae=>ze.value=ae}),et("Computed",j)}if(a)for(const j in a)Bc(a[j],s,n,j);if(l){const j=Z(l)?l.call(n):l;Reflect.ownKeys(j).forEach(K=>{qp(K,j[K])})}u&&Vc(u,e,"c");function Q(j,K){Y(K)?K.forEach(dt=>j(dt.bind(n))):K&&j(K.bind(n))}if(Q(ig,h),Q(qo,d),Q(rg,f),Q(og,m),Q(eg,p),Q(ng,b),Q(ug,T),Q(cg,C),Q(lg,D),Q(Lc,x),Q(Rc,v),Q(ag,L),Y(V))if(V.length){const j=e.exposed||(e.exposed={});V.forEach(K=>{Object.defineProperty(j,K,{get:()=>n[K],set:dt=>n[K]=dt})})}else e.exposed||(e.exposed={});S&&e.render===Gt&&(e.render=S),$!=null&&(e.inheritAttrs=$),G&&(e.components=G),ht&&(e.directives=ht)}function bg(e,t,n=Gt,s=!1){Y(e)&&(e=sa(e));for(const i in e){const r=e[i];let o;pt(r)?"default"in r?o=cr(r.from||i,r.default,!0):o=cr(r.from||i):o=cr(r),Dt(o)?s?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):(N(`injected property "${i}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`),t[i]=o):t[i]=o,n("Inject",i)}}function Vc(e,t,n){le(Y(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Bc(e,t,n,s){const i=s.includes(".")?Cc(n,s):()=>n[s];if(Et(e)){const r=t[e];Z(r)?Yo(i,r):N(`Invalid watch handler specified by key "${e}"`,r)}else if(Z(e))Yo(i,e.bind(n));else if(pt(e))if(Y(e))e.forEach(r=>Bc(r,t,n,s));else{const r=Z(e.handler)?e.handler.bind(n):t[e.handler];Z(r)?Yo(i,r,e):N(`Invalid watch handler specified by key "${e.handler}"`,r)}else N(`Invalid watch option: "${s}"`,e)}function na(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:o}}=e.appContext,a=r.get(t);let l;return a?l=a:!i.length&&!n&&!s?l=t:(l={},i.length&&i.forEach(c=>fr(l,c,o,!0)),fr(l,t,o)),pt(t)&&r.set(t,l),l}function fr(e,t,n,s=!1){const{mixins:i,extends:r}=t;r&&fr(e,r,n,!0),i&&i.forEach(o=>fr(e,o,n,!0));for(const o in t)if(s&&o==="expose")N('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=_g[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const _g={data:Hc,props:Rn,emits:Rn,methods:Rn,computed:Rn,beforeCreate:Ht,created:Ht,beforeMount:Ht,mounted:Ht,beforeUpdate:Ht,updated:Ht,beforeDestroy:Ht,beforeUnmount:Ht,destroyed:Ht,unmounted:Ht,activated:Ht,deactivated:Ht,errorCaptured:Ht,serverPrefetch:Ht,components:Rn,directives:Rn,watch:xg,provide:Hc,inject:yg};function Hc(e,t){return t?e?function(){return xt(Z(e)?e.call(this,this):e,Z(t)?t.call(this,this):t)}:t:e}function yg(e,t){return Rn(sa(e),sa(t))}function sa(e){if(Y(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ht(e,t){return e?[...new Set([].concat(e,t))]:t}function Rn(e,t){return e?xt(xt(Object.create(null),e),t):t}function xg(e,t){if(!e)return t;if(!t)return e;const n=xt(Object.create(null),e);for(const s in t)n[s]=Ht(e[s],t[s]);return n}function vg(e,t,n,s=!1){const i={},r={};Ui(r,br,1),e.propsDefaults=Object.create(null),Wc(e,t,i,r);for(const o in e.propsOptions[0])o in i||(i[o]=void 0);Yc(t||{},i,e),n?e.props=s?i:mp(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function Sg(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function wg(e,t,n,s){const{props:i,attrs:r,vnode:{patchFlag:o}}=e,a=q(i),[l]=e.propsOptions;let c=!1;if(!Sg(e)&&(s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let d=u[h];if(or(e.emitsOptions,d))continue;const f=t[d];if(l)if(tt(r,d))f!==r[d]&&(r[d]=f,c=!0);else{const m=Be(d);i[m]=ia(l,a,m,f,e,!1)}else f!==r[d]&&(r[d]=f,c=!0)}}}else{Wc(e,t,i,r)&&(c=!0);let u;for(const h in a)(!t||!tt(t,h)&&((u=te(h))===h||!tt(t,u)))&&(l?n&&(n[h]!==void 0||n[u]!==void 0)&&(i[h]=ia(l,a,h,void 0,e,!0)):delete i[h]);if(r!==a)for(const h in r)(!t||!tt(t,h))&&(delete r[h],c=!0)}c&&He(e,"set","$attrs"),Yc(t||{},i,e)}function Wc(e,t,n,s){const[i,r]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Wi(l))continue;const c=t[l];let u;i&&tt(i,u=Be(l))?!r||!r.includes(u)?n[u]=c:(a||(a={}))[u]=c:or(e.emitsOptions,l)||(!(l in s)||c!==s[l])&&(s[l]=c,o=!0)}if(r){const l=q(n),c=a||ut;for(let u=0;u<r.length;u++){const h=r[u];n[h]=ia(i,l,h,c[h],e,!tt(c,h))}}return o}function ia(e,t,n,s,i,r){const o=e[n];if(o!=null){const a=tt(o,"default");if(a&&s===void 0){const l=o.default;if(o.type!==Function&&Z(l)){const{propsDefaults:c}=i;n in c?s=c[n]:(_s(i),s=c[n]=l.call(null,t),Vn())}else s=l}o[0]&&(r&&!a?s=!1:o[1]&&(s===""||s===te(n))&&(s=!0))}return s}function $c(e,t,n=!1){const s=t.propsCache,i=s.get(e);if(i)return i;const r=e.props,o={},a=[];let l=!1;if(!Z(e)){const u=h=>{l=!0;const[d,f]=$c(h,t,!0);xt(o,d),f&&a.push(...f)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!l)return pt(e)&&s.set(e,ds),ds;if(Y(r))for(let u=0;u<r.length;u++){Et(r[u])||N("props must be strings when using array syntax.",r[u]);const h=Be(r[u]);jc(h)&&(o[h]=ut)}else if(r){pt(r)||N("invalid props options",r);for(const u in r){const h=Be(u);if(jc(h)){const d=r[u],f=o[h]=Y(d)||Z(d)?{type:d}:Object.assign({},d);if(f){const m=Gc(Boolean,f.type),p=Gc(String,f.type);f[0]=m>-1,f[1]=p<0||m<p,(m>-1||tt(f,"default"))&&a.push(h)}}}}const c=[o,a];return pt(e)&&s.set(e,c),c}function jc(e){return e[0]!=="$"?!0:(N(`Invalid prop name: "${e}" is a reserved property.`),!1)}function ra(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Uc(e,t){return ra(e)===ra(t)}function Gc(e,t){return Y(t)?t.findIndex(n=>Uc(n,e)):Z(t)&&Uc(t,e)?0:-1}function Yc(e,t,n){const s=q(t),i=n.propsOptions[0];for(const r in i){let o=i[r];o!=null&&Mg(r,s[r],o,!tt(e,r)&&!tt(e,te(r)))}}function Mg(e,t,n,s){const{type:i,required:r,validator:o}=n;if(r&&s){N('Missing required prop: "'+e+'"');return}if(!(t==null&&!n.required)){if(i!=null&&i!==!0){let a=!1;const l=Y(i)?i:[i],c=[];for(let u=0;u<l.length&&!a;u++){const{valid:h,expectedType:d}=Eg(t,l[u]);c.push(d||""),a=h}if(!a){N(Og(e,t,c));return}}o&&!o(t)&&N('Invalid prop: custom validator check failed for prop "'+e+'".')}}const Tg=Vt("String,Number,Boolean,Function,Symbol,BigInt");function Eg(e,t){let n;const s=ra(t);if(Tg(s)){const i=typeof e;n=i===s.toLowerCase(),!n&&i==="object"&&(n=e instanceof t)}else s==="Object"?n=pt(e):s==="Array"?n=Y(e):s==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:s}}function Og(e,t,n){let s=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(ji).join(" | ")}`;const i=n[0],r=To(t),o=Kc(t,i),a=Kc(t,r);return n.length===1&&Xc(i)&&!kg(i,r)&&(s+=` with value ${o}`),s+=`, got ${r} `,Xc(r)&&(s+=`with value ${a}.`),s}function Kc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Xc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function kg(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Zc=e=>e[0]==="_"||e==="$stable",oa=e=>Y(e)?e.map(xe):[xe(e)],Cg=(e,t,n)=>{if(t._n)return t;const s=$p((...i)=>(Mt&&N(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),oa(t(...i))),n);return s._c=!1,s},qc=(e,t,n)=>{const s=e._ctx;for(const i in e){if(Zc(i))continue;const r=e[i];if(Z(r))t[i]=Cg(i,r,s);else if(r!=null){N(`Non-function value encountered for slot "${i}". Prefer function slots for better performance.`);const o=oa(r);t[i]=()=>o}}},Jc=(e,t)=>{Js(e.vnode)||N("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=oa(t);e.slots.default=()=>n},Dg=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=q(t),Ui(t,"_",n)):qc(t,e.slots={})}else e.slots={},t&&Jc(e,t);Ui(e.slots,br,1)},Ag=(e,t,n)=>{const{vnode:s,slots:i}=e;let r=!0,o=ut;if(s.shapeFlag&32){const a=t._;a?In?xt(i,t):n&&a===1?r=!1:(xt(i,t),!n&&a===1&&delete i._):(r=!t.$stable,qc(t,i)),o=t}else t&&(Jc(e,t),o={default:1});if(r)for(const a in i)!Zc(a)&&!(a in o)&&delete i[a]};function Qc(){return{app:null,config:{isNativeTag:Pl,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ig=0;function Pg(e,t){return function(s,i=null){Z(s)||(s=Object.assign({},s)),i!=null&&!pt(i)&&(N("root props passed to app.mount() must be an object."),i=null);const r=Qc(),o=new Set;let a=!1;const l=r.app={_uid:Ig++,_component:s,_props:i,_container:null,_context:r,_instance:null,version:lu,get config(){return r.config},set config(c){N("app.config cannot be replaced. Modify individual options instead.")},use(c,...u){return o.has(c)?N("Plugin has already been applied to target app."):c&&Z(c.install)?(o.add(c),c.install(l,...u)):Z(c)?(o.add(c),c(l,...u)):N('A plugin must either be a function or an object with an "install" function.'),l},mixin(c){return r.mixins.includes(c)?N("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):r.mixins.push(c),l},component(c,u){return ua(c,r.config),u?(r.components[c]&&N(`Component "${c}" has already been registered in target app.`),r.components[c]=u,l):r.components[c]},directive(c,u){return Fc(c),u?(r.directives[c]&&N(`Directive "${c}" has already been registered in target app.`),r.directives[c]=u,l):r.directives[c]},mount(c,u,h){if(a)N("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{c.__vue_app__&&N("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const d=un(s,i);return d.appContext=r,r.reload=()=>{e(Ie(d),c,h)},u&&t?t(d,c):e(d,c,h),a=!0,l._container=c,c.__vue_app__=l,l._instance=d.component,Np(l,lu),da(d.component)||d.component.proxy}},unmount(){a?(e(null,l._container),l._instance=null,Lp(l),delete l._container.__vue_app__):N("Cannot unmount an app that is not mounted.")},provide(c,u){return c in r.provides&&N(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),r.provides[c]=u,l}};return l}}function aa(e,t,n,s,i=!1){if(Y(e)){e.forEach((d,f)=>aa(d,t&&(Y(t)?t[f]:t),n,s,i));return}if(hr(s)&&!i)return;const r=s.shapeFlag&4?da(s.component)||s.component.proxy:s.el,o=i?null:r,{i:a,r:l}=e;if(!a){N("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const c=t&&t.r,u=a.refs===ut?a.refs={}:a.refs,h=a.setupState;if(c!=null&&c!==l&&(Et(c)?(u[c]=null,tt(h,c)&&(h[c]=null)):Dt(c)&&(c.value=null)),Z(l))We(l,a,12,[o,u]);else{const d=Et(l),f=Dt(l);if(d||f){const m=()=>{if(e.f){const p=d?tt(h,l)?h[l]:u[l]:l.value;i?Y(p)&&So(p,r):Y(p)?p.includes(r)||p.push(r):d?(u[l]=[r],tt(h,l)&&(h[l]=u[l])):(l.value=[r],e.k&&(u[e.k]=l.value))}else d?(u[l]=o,tt(h,l)&&(h[l]=o)):f?(l.value=o,e.k&&(u[e.k]=o)):N("Invalid template ref type:",l,`(${typeof l})`)};o?(m.id=-1,Kt(m,n)):m()}else N("Invalid template ref type:",l,`(${typeof l})`)}}let Qs,cn;function je(e,t){e.appContext.config.performance&&mr()&&cn.mark(`vue-${t}-${e.uid}`),Vp(e,t,mr()?cn.now():Date.now())}function Ue(e,t){if(e.appContext.config.performance&&mr()){const n=`vue-${t}-${e.uid}`,s=n+":end";cn.mark(s),cn.measure(`<${xr(e,e.type)}> ${t}`,n,s),cn.clearMarks(n),cn.clearMarks(s)}Bp(e,t,mr()?cn.now():Date.now())}function mr(){return Qs!==void 0||(typeof window<"u"&&window.performance?(Qs=!0,cn=window.performance):Qs=!1),Qs}function Ng(){const e=[];if(e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
5
|
-
|
|
6
|
-
For more details, see https://link.vuejs.org/feature-flags.`)}}const Kt=Zp;function Lg(e){return Rg(e)}function Rg(e,t){Ng();const n=Rl();n.__VUE__=!0,xc(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:s,remove:i,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:h,nextSibling:d,setScopeId:f=Gt,insertStaticContent:m}=e,p=(g,_,M,O=null,E=null,I=null,F=!1,A=null,P=In?!1:!!_.dynamicChildren)=>{if(g===_)return;g&&!zn(g,_)&&(O=xo(g),Qt(g,E,I,!0),g=null),_.patchFlag===-2&&(P=!1,_.dynamicChildren=null);const{type:k,ref:W,shapeFlag:H}=_;switch(k){case ti:b(g,_,M,O);break;case Wt:y(g,_,M,O);break;case gr:g==null?x(_,M,O,F):w(g,_,M,F);break;case ue:ht(g,_,M,O,E,I,F,A,P);break;default:H&1?C(g,_,M,O,E,I,F,A,P):H&6?Pt(g,_,M,O,E,I,F,A,P):H&64||H&128?k.process(g,_,M,O,E,I,F,A,P,Bs):N("Invalid VNode type:",k,`(${typeof k})`)}W!=null&&E&&aa(W,g&&g.ref,I,_||g,!_)},b=(g,_,M,O)=>{if(g==null)s(_.el=a(_.children),M,O);else{const E=_.el=g.el;_.children!==g.children&&c(E,_.children)}},y=(g,_,M,O)=>{g==null?s(_.el=l(_.children||""),M,O):_.el=g.el},x=(g,_,M,O)=>{[g.el,g.anchor]=m(g.children,_,M,O,g.el,g.anchor)},w=(g,_,M,O)=>{if(_.children!==g.children){const E=d(g.anchor);S(g),[_.el,_.anchor]=m(_.children,M,E,O)}else _.el=g.el,_.anchor=g.anchor},v=({el:g,anchor:_},M,O)=>{let E;for(;g&&g!==_;)E=d(g),s(g,M,O),g=E;s(_,M,O)},S=({el:g,anchor:_})=>{let M;for(;g&&g!==_;)M=d(g),i(g),g=M;i(_)},C=(g,_,M,O,E,I,F,A,P)=>{F=F||_.type==="svg",g==null?D(_,M,O,E,I,F,A,P):V(g,_,E,I,F,A,P)},D=(g,_,M,O,E,I,F,A)=>{let P,k;const{type:W,props:H,shapeFlag:U,transition:X,dirs:st}=g;if(P=g.el=o(g.type,I,H&&H.is,H),U&8?u(P,g.children):U&16&&L(g.children,P,null,O,E,I&&W!=="foreignObject",F,A),st&&Nn(g,null,O,"created"),T(P,g,g.scopeId,F,O),H){for(const ct in H)ct!=="value"&&!Wi(ct)&&r(P,ct,null,H[ct],I,g.children,O,E,nn);"value"in H&&r(P,"value",null,H.value),(k=H.onVnodeBeforeMount)&&Pe(k,O,g)}Object.defineProperty(P,"__vnode",{value:g,enumerable:!1}),Object.defineProperty(P,"__vueParentComponent",{value:O,enumerable:!1}),st&&Nn(g,null,O,"beforeMount");const ft=(!E||E&&!E.pendingBranch)&&X&&!X.persisted;ft&&X.beforeEnter(P),s(P,_,M),((k=H&&H.onVnodeMounted)||ft||st)&&Kt(()=>{k&&Pe(k,O,g),ft&&X.enter(P),st&&Nn(g,null,O,"mounted")},E)},T=(g,_,M,O,E)=>{if(M&&f(g,M),O)for(let I=0;I<O.length;I++)f(g,O[I]);if(E){let I=E.subTree;if(I.patchFlag>0&&I.patchFlag&2048&&(I=Tc(I.children)||I),_===I){const F=E.vnode;T(g,F,F.scopeId,F.slotScopeIds,E.parent)}}},L=(g,_,M,O,E,I,F,A,P=0)=>{for(let k=P;k<g.length;k++){const W=g[k]=A?hn(g[k]):xe(g[k]);p(null,W,_,M,O,E,I,F,A)}},V=(g,_,M,O,E,I,F)=>{const A=_.el=g.el;let{patchFlag:P,dynamicChildren:k,dirs:W}=_;P|=g.patchFlag&16;const H=g.props||ut,U=_.props||ut;let X;M&&Fn(M,!1),(X=U.onVnodeBeforeUpdate)&&Pe(X,M,_,g),W&&Nn(_,g,M,"beforeUpdate"),M&&Fn(M,!0),In&&(P=0,F=!1,k=null);const st=E&&_.type!=="foreignObject";if(k?($(g.dynamicChildren,k,A,M,O,st,I),M&&M.type.__hmrId&&pr(g,_)):F||dt(g,_,A,null,M,O,st,I,!1),P>0){if(P&16)G(A,_,H,U,M,O,E);else if(P&2&&H.class!==U.class&&r(A,"class",null,U.class,E),P&4&&r(A,"style",H.style,U.style,E),P&8){const ft=_.dynamicProps;for(let ct=0;ct<ft.length;ct++){const Ct=ft[ct],ke=H[Ct],Hs=U[Ct];(Hs!==ke||Ct==="value")&&r(A,Ct,ke,Hs,E,g.children,M,O,nn)}}P&1&&g.children!==_.children&&u(A,_.children)}else!F&&k==null&&G(A,_,H,U,M,O,E);((X=U.onVnodeUpdated)||W)&&Kt(()=>{X&&Pe(X,M,_,g),W&&Nn(_,g,M,"updated")},O)},$=(g,_,M,O,E,I,F)=>{for(let A=0;A<_.length;A++){const P=g[A],k=_[A],W=P.el&&(P.type===ue||!zn(P,k)||P.shapeFlag&70)?h(P.el):M;p(P,k,W,null,O,E,I,F,!0)}},G=(g,_,M,O,E,I,F)=>{if(M!==O){if(M!==ut)for(const A in M)!Wi(A)&&!(A in O)&&r(g,A,M[A],null,F,_.children,E,I,nn);for(const A in O){if(Wi(A))continue;const P=O[A],k=M[A];P!==k&&A!=="value"&&r(g,A,k,P,F,_.children,E,I,nn)}"value"in O&&r(g,"value",M.value,O.value)}},ht=(g,_,M,O,E,I,F,A,P)=>{const k=_.el=g?g.el:a(""),W=_.anchor=g?g.anchor:a("");let{patchFlag:H,dynamicChildren:U,slotScopeIds:X}=_;(In||H&2048)&&(H=0,P=!1,U=null),X&&(A=A?A.concat(X):X),g==null?(s(k,M,O),s(W,M,O),L(_.children,M,W,E,I,F,A,P)):H>0&&H&64&&U&&g.dynamicChildren?($(g.dynamicChildren,U,M,E,I,F,A),E&&E.type.__hmrId?pr(g,_):(_.key!=null||E&&_===E.subTree)&&pr(g,_,!0)):dt(g,_,M,W,E,I,F,A,P)},Pt=(g,_,M,O,E,I,F,A,P)=>{_.slotScopeIds=A,g==null?_.shapeFlag&512?E.ctx.activate(_,M,O,F,P):et(_,M,O,E,I,F,P):Q(g,_,P)},et=(g,_,M,O,E,I,F)=>{const A=g.component=Zg(g,O,E);if(A.type.__hmrId&&Dp(A),nr(g),je(A,"mount"),Js(g)&&(A.ctx.renderer=Bs),je(A,"init"),Qg(A),Ue(A,"init"),A.asyncDep){if(E&&E.registerDep(A,j),!g.el){const P=A.subTree=un(Wt);y(null,P,_,M)}return}j(A,g,_,M,E,I,F),sr(),Ue(A,"mount")},Q=(g,_,M)=>{const O=_.component=g.component;if(Yp(g,_,M))if(O.asyncDep&&!O.asyncResolved){nr(_),K(O,_,M),sr();return}else O.next=_,kp(O.update),O.update();else _.el=g.el,O.vnode=_},j=(g,_,M,O,E,I,F)=>{const A=()=>{if(g.isMounted){let{next:W,bu:H,u:U,parent:X,vnode:st}=g,ft=W,ct;nr(W||g.vnode),Fn(g,!1),W?(W.el=st.el,K(g,W,F)):W=st,H&&js(H),(ct=W.props&&W.props.onVnodeBeforeUpdate)&&Pe(ct,X,W,st),Fn(g,!0),je(g,"render");const Ct=Go(g);Ue(g,"render");const ke=g.subTree;g.subTree=Ct,je(g,"patch"),p(ke,Ct,h(ke.el),xo(ke),g,E,I),Ue(g,"patch"),W.el=Ct.el,ft===null&&Kp(g,Ct.el),U&&Kt(U,E),(ct=W.props&&W.props.onVnodeUpdated)&&Kt(()=>Pe(ct,X,W,st),E),vc(g),sr()}else{let W;const{el:H,props:U}=_,{bm:X,m:st,parent:ft}=g,ct=hr(_);if(Fn(g,!1),X&&js(X),!ct&&(W=U&&U.onVnodeBeforeMount)&&Pe(W,ft,_),Fn(g,!0),H&&Al){const Ct=()=>{je(g,"render"),g.subTree=Go(g),Ue(g,"render"),je(g,"hydrate"),Al(H,g.subTree,g,E,null),Ue(g,"hydrate")};ct?_.type.__asyncLoader().then(()=>!g.isUnmounted&&Ct()):Ct()}else{je(g,"render");const Ct=g.subTree=Go(g);Ue(g,"render"),je(g,"patch"),p(null,Ct,M,O,g,E,I),Ue(g,"patch"),_.el=Ct.el}if(st&&Kt(st,E),!ct&&(W=U&&U.onVnodeMounted)){const Ct=_;Kt(()=>Pe(W,ft,Ct),E)}(_.shapeFlag&256||ft&&hr(ft.vnode)&&ft.vnode.shapeFlag&256)&&g.a&&Kt(g.a,E),g.isMounted=!0,Rp(g),_=M=O=null}},P=g.effect=new Io(A,()=>rr(k),g.scope),k=g.update=()=>P.run();k.id=g.uid,Fn(g,!0),P.onTrack=g.rtc?W=>js(g.rtc,W):void 0,P.onTrigger=g.rtg?W=>js(g.rtg,W):void 0,k.ownerInstance=g,k()},K=(g,_,M)=>{_.component=g;const O=g.vnode.props;g.vnode=_,g.next=null,wg(g,_.props,O,M),Ag(g,_.children,M),kn(),pc(),Cn()},dt=(g,_,M,O,E,I,F,A,P=!1)=>{const k=g&&g.children,W=g?g.shapeFlag:0,H=_.children,{patchFlag:U,shapeFlag:X}=_;if(U>0){if(U&128){ze(k,H,M,O,E,I,F,A,P);return}else if(U&256){Fe(k,H,M,O,E,I,F,A,P);return}}X&8?(W&16&&nn(k,E,I),H!==k&&u(M,H)):W&16?X&16?ze(k,H,M,O,E,I,F,A,P):nn(k,E,I,!0):(W&8&&u(M,""),X&16&&L(H,M,O,E,I,F,A,P))},Fe=(g,_,M,O,E,I,F,A,P)=>{g=g||ds,_=_||ds;const k=g.length,W=_.length,H=Math.min(k,W);let U;for(U=0;U<H;U++){const X=_[U]=P?hn(_[U]):xe(_[U]);p(g[U],X,M,null,E,I,F,A,P)}k>W?nn(g,E,I,!0,!1,H):L(_,M,O,E,I,F,A,P,H)},ze=(g,_,M,O,E,I,F,A,P)=>{let k=0;const W=_.length;let H=g.length-1,U=W-1;for(;k<=H&&k<=U;){const X=g[k],st=_[k]=P?hn(_[k]):xe(_[k]);if(zn(X,st))p(X,st,M,null,E,I,F,A,P);else break;k++}for(;k<=H&&k<=U;){const X=g[H],st=_[U]=P?hn(_[U]):xe(_[U]);if(zn(X,st))p(X,st,M,null,E,I,F,A,P);else break;H--,U--}if(k>H){if(k<=U){const X=U+1,st=X<W?_[X].el:O;for(;k<=U;)p(null,_[k]=P?hn(_[k]):xe(_[k]),M,st,E,I,F,A,P),k++}}else if(k>U)for(;k<=H;)Qt(g[k],E,I,!0),k++;else{const X=k,st=k,ft=new Map;for(k=st;k<=U;k++){const Ut=_[k]=P?hn(_[k]):xe(_[k]);Ut.key!=null&&(ft.has(Ut.key)&&N("Duplicate keys found during update:",JSON.stringify(Ut.key),"Make sure keys are unique."),ft.set(Ut.key,k))}let ct,Ct=0;const ke=U-st+1;let Hs=!1,Sm=0;const Vi=new Array(ke);for(k=0;k<ke;k++)Vi[k]=0;for(k=X;k<=H;k++){const Ut=g[k];if(Ct>=ke){Qt(Ut,E,I,!0);continue}let Ve;if(Ut.key!=null)Ve=ft.get(Ut.key);else for(ct=st;ct<=U;ct++)if(Vi[ct-st]===0&&zn(Ut,_[ct])){Ve=ct;break}Ve===void 0?Qt(Ut,E,I,!0):(Vi[Ve-st]=k+1,Ve>=Sm?Sm=Ve:Hs=!0,p(Ut,_[Ve],M,null,E,I,F,A,P),Ct++)}const wm=Hs?Fg(Vi):ds;for(ct=wm.length-1,k=ke-1;k>=0;k--){const Ut=st+k,Ve=_[Ut],Mm=Ut+1<W?_[Ut+1].el:O;Vi[k]===0?p(null,Ve,M,Mm,E,I,F,A,P):Hs&&(ct<0||k!==wm[ct]?ae(Ve,M,Mm,2):ct--)}}},ae=(g,_,M,O,E=null)=>{const{el:I,type:F,transition:A,children:P,shapeFlag:k}=g;if(k&6){ae(g.component.subTree,_,M,O);return}if(k&128){g.suspense.move(_,M,O);return}if(k&64){F.move(g,_,M,Bs);return}if(F===ue){s(I,_,M);for(let H=0;H<P.length;H++)ae(P[H],_,M,O);s(g.anchor,_,M);return}if(F===gr){v(g,_,M);return}if(O!==2&&k&1&&A)if(O===0)A.beforeEnter(I),s(I,_,M),Kt(()=>A.enter(I),E);else{const{leave:H,delayLeave:U,afterLeave:X}=A,st=()=>s(I,_,M),ft=()=>{H(I,()=>{st(),X&&X()})};U?U(I,st,ft):ft()}else s(I,_,M)},Qt=(g,_,M,O=!1,E=!1)=>{const{type:I,props:F,ref:A,children:P,dynamicChildren:k,shapeFlag:W,patchFlag:H,dirs:U}=g;if(A!=null&&aa(A,null,M,g,!0),W&256){_.ctx.deactivate(g);return}const X=W&1&&U,st=!hr(g);let ft;if(st&&(ft=F&&F.onVnodeBeforeUnmount)&&Pe(ft,_,g),W&6)hs(g.component,M,O);else{if(W&128){g.suspense.unmount(M,O);return}X&&Nn(g,null,_,"beforeUnmount"),W&64?g.type.remove(g,_,M,E,Bs,O):k&&(I!==ue||H>0&&H&64)?nn(k,_,M,!1,!0):(I===ue&&H&384||!E&&W&16)&&nn(P,_,M),O&&en(g)}(st&&(ft=F&&F.onVnodeUnmounted)||X)&&Kt(()=>{ft&&Pe(ft,_,g),X&&Nn(g,null,_,"unmounted")},M)},en=g=>{const{type:_,el:M,anchor:O,transition:E}=g;if(_===ue){g.patchFlag>0&&g.patchFlag&2048&&E&&!E.persisted?g.children.forEach(F=>{F.type===Wt?i(F.el):en(F)}):us(M,O);return}if(_===gr){S(g);return}const I=()=>{i(M),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(g.shapeFlag&1&&E&&!E.persisted){const{leave:F,delayLeave:A}=E,P=()=>F(M,I);A?A(g.el,I,P):P()}else I()},us=(g,_)=>{let M;for(;g!==_;)M=d(g),i(g),g=M;i(_)},hs=(g,_,M)=>{g.type.__hmrId&&Ap(g);const{bum:O,scope:E,update:I,subTree:F,um:A}=g;O&&js(O),E.stop(),I&&(I.active=!1,Qt(F,g,_,M)),A&&Kt(A,_),Kt(()=>{g.isUnmounted=!0},_),_&&_.pendingBranch&&!_.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===_.pendingId&&(_.deps--,_.deps===0&&_.resolve()),zp(g)},nn=(g,_,M,O=!1,E=!1,I=0)=>{for(let F=I;F<g.length;F++)Qt(g[F],_,M,O,E)},xo=g=>g.shapeFlag&6?xo(g.component.subTree):g.shapeFlag&128?g.suspense.next():d(g.anchor||g.el),vm=(g,_,M)=>{g==null?_._vnode&&Qt(_._vnode,null,null,!0):p(_._vnode||null,g,_,null,null,null,M),pc(),gc(),_._vnode=g},Bs={p,um:Qt,m:ae,r:en,mt:et,mc:L,pc:dt,pbc:$,n:xo,o:e};let Dl,Al;return t&&([Dl,Al]=t(Bs)),{render:vm,hydrate:Dl,createApp:Pg(vm,Dl)}}function Fn({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function pr(e,t,n=!1){const s=e.children,i=t.children;if(Y(s)&&Y(i))for(let r=0;r<s.length;r++){const o=s[r];let a=i[r];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[r]=hn(i[r]),a.el=o.el),n||pr(o,a)),a.type===ti&&(a.el=o.el),a.type===Wt&&!a.el&&(a.el=o.el)}}function Fg(e){const t=e.slice(),n=[0];let s,i,r,o,a;const l=e.length;for(s=0;s<l;s++){const c=e[s];if(c!==0){if(i=n[n.length-1],e[i]<c){t[s]=i,n.push(s);continue}for(r=0,o=n.length-1;r<o;)a=r+o>>1,e[n[a]]<c?r=a+1:o=a;c<e[n[r]]&&(r>0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,o=n[r-1];r-- >0;)n[r]=o,o=t[o];return n}const zg=e=>e.__isTeleport,ue=Symbol("Fragment"),ti=Symbol("Text"),Wt=Symbol("Comment"),gr=Symbol("Static"),ei=[];let ye=null;function Vg(e=!1){ei.push(ye=e?null:[])}function Bg(){ei.pop(),ye=ei[ei.length-1]||null}let ni=1;function tu(e){ni+=e}function Hg(e){return e.dynamicChildren=ni>0?ye||ds:null,Bg(),ni>0&&ye&&ye.push(e),e}function Wg(e,t,n,s,i,r){return Hg(yr(e,t,n,s,i,r,!0))}function la(e){return e?e.__v_isVNode===!0:!1}function zn(e,t){return t.shapeFlag&6&&gs.has(t.type)?(e.shapeFlag&=-257,t.shapeFlag&=-513,!1):e.type===t.type&&e.key===t.key}const $g=(...e)=>jg(...e),br="__vInternal",eu=({key:e})=>e??null,_r=({ref:e,ref_key:t,ref_for:n})=>e!=null?Et(e)||Dt(e)||Z(e)?{i:ee,r:e,k:t,f:!!n}:e:null;function yr(e,t=null,n=null,s=0,i=null,r=e===ue?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&eu(t),ref:t&&_r(t),scopeId:Mc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ee};return a?(ca(l,n),r&128&&e.normalize(l)):n&&(l.shapeFlag|=Et(n)?8:16),l.key!==l.key&&N("VNode created with invalid key (NaN). VNode type:",l.type),ni>0&&!o&&ye&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&ye.push(l),l}const un=$g;function jg(e,t=null,n=null,s=0,i=null,r=!1){if((!e||e===hg)&&(e||N(`Invalid vnode type when creating vnode: ${e}.`),e=Wt),la(e)){const a=Ie(e,t,!0);return n&&ca(a,n),ni>0&&!r&&ye&&(a.shapeFlag&6?ye[ye.indexOf(e)]=a:ye.push(a)),a.patchFlag|=-2,a}if(au(e)&&(e=e.__vccOpts),t){t=Ug(t);let{class:a,style:l}=t;a&&!Et(a)&&(t.class=vo(a)),pt(l)&&(Ro(l)&&!Y(l)&&(l=xt({},l)),t.style=be(l))}const o=Et(e)?1:Xp(e)?128:zg(e)?64:pt(e)?4:Z(e)?2:0;return o&4&&Ro(e)&&(e=q(e),N("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
7
|
-
Component that was made reactive: `,e)),yr(e,t,n,s,i,o,r,!0)}function Ug(e){return e?Ro(e)||br in e?xt({},e):e:null}function Ie(e,t,n=!1){const{props:s,ref:i,patchFlag:r,children:o}=e,a=t?Yg(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&eu(a),ref:t&&t.ref?n&&i?Y(i)?i.concat(_r(t)):[i,_r(t)]:_r(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r===-1&&Y(o)?o.map(nu):o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ue?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ie(e.ssContent),ssFallback:e.ssFallback&&Ie(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function nu(e){const t=Ie(e);return Y(e.children)&&(t.children=e.children.map(nu)),t}function Gg(e=" ",t=0){return un(ti,null,e,t)}function xe(e){return e==null||typeof e=="boolean"?un(Wt):Y(e)?un(ue,null,e.slice()):typeof e=="object"?hn(e):un(ti,null,String(e))}function hn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ie(e)}function ca(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Y(t))n=16;else if(typeof t=="object")if(s&65){const i=t.default;i&&(i._c&&(i._d=!1),ca(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(br in t)?t._ctx=ee:i===3&&ee&&(ee.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Z(t)?(t={default:t,_ctx:ee},n=32):(t=String(t),s&64?(n=16,t=[Gg(t)]):n=8);e.children=t,e.shapeFlag|=n}function Yg(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const i in s)if(i==="class")t.class!==s.class&&(t.class=vo([t.class,s.class]));else if(i==="style")t.style=be([t.style,s.style]);else if(Ws(i)){const r=t[i],o=s[i];o&&r!==o&&!(Y(r)&&r.includes(o))&&(t[i]=r?[].concat(r,o):o)}else i!==""&&(t[i]=s[i])}return t}function Pe(e,t,n,s=null){le(e,t,7,[n,s])}const Kg=Qc();let Xg=0;function Zg(e,t,n){const s=e.type,i=(t?t.appContext:e.appContext)||Kg,r={uid:Xg++,vnode:e,type:s,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new zm(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:$c(s,i),emitsOptions:wc(s,i),emit:null,emitted:null,propsDefaults:ut,inheritAttrs:s.inheritAttrs,ctx:ut,data:ut,props:ut,attrs:ut,slots:ut,refs:ut,setupState:ut,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx=dg(r),r.root=t?t.root:r,r.emit=Wp.bind(null,r),e.ce&&e.ce(r),r}let Mt=null;const qg=()=>Mt||ee,_s=e=>{Mt=e,e.scope.on()},Vn=()=>{Mt&&Mt.scope.off(),Mt=null},Jg=Vt("slot,component");function ua(e,t){const n=t.isNativeTag||Pl;(Jg(e)||n(e))&&N("Do not use built-in or reserved HTML elements as component id: "+e)}function su(e){return e.vnode.shapeFlag&4}let si=!1;function Qg(e,t=!1){si=t;const{props:n,children:s}=e.vnode,i=su(e);vg(e,n,i,t),Dg(e,s);const r=i?t0(e,t):void 0;return si=!1,r}function t0(e,t){var n;const s=e.type;{if(s.name&&ua(s.name,e.appContext.config),s.components){const r=Object.keys(s.components);for(let o=0;o<r.length;o++)ua(r[o],e.appContext.config)}if(s.directives){const r=Object.keys(s.directives);for(let o=0;o<r.length;o++)Fc(r[o])}s.compilerOptions&&e0()&&N('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=ic(new Proxy(e.ctx,zc)),fg(e);const{setup:i}=s;if(i){const r=e.setupContext=i.length>1?s0(e):null;_s(e),kn();const o=We(i,e,0,[ms(e.props),r]);if(Cn(),Vn(),Mo(o)){if(o.then(Vn,Vn),t)return o.then(a=>{iu(e,a,t)}).catch(a=>{ir(a,e,0)});if(e.asyncDep=o,!e.suspense){const a=(n=s.name)!==null&&n!==void 0?n:"Anonymous";N(`Component <${a}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else iu(e,o,t)}else ru(e,t)}function iu(e,t,n){Z(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:pt(t)?(la(t)&&N("setup() should not return VNodes directly - return a render function instead."),e.devtoolsRawSetupState=t,e.setupState=lc(t),mg(e)):t!==void 0&&N(`setup() should return an object. Received: ${t===null?"null":typeof t}`),ru(e,n)}let ha;const e0=()=>!ha;function ru(e,t,n){const s=e.type;if(!e.render){if(!t&&ha&&!s.render){const i=s.template||na(e).template;if(i){je(e,"compile");const{isCustomElement:r,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=s,c=xt(xt({isCustomElement:r,delimiters:a},o),l);s.render=ha(i,c),Ue(e,"compile")}}e.render=s.render||Gt}_s(e),kn(),gg(e),Cn(),Vn(),!s.render&&e.render===Gt&&!t&&(s.template?N('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):N("Component is missing template or render function."))}function n0(e){return new Proxy(e.attrs,{get(t,n){return lr(),Yt(e,"get","$attrs"),t[n]},set(){return N("setupContext.attrs is readonly."),!1},deleteProperty(){return N("setupContext.attrs is readonly."),!1}})}function s0(e){const t=s=>{if(e.exposed&&N("expose() should be called only once per setup()."),s!=null){let i=typeof s;i==="object"&&(Y(s)?i="array":Dt(s)&&(i="ref")),i!=="object"&&N(`expose() should be passed a plain object, received ${i}.`)}e.exposed=s||{}};let n;return Object.freeze({get attrs(){return n||(n=n0(e))},get slots(){return ms(e.slots)},get emit(){return(s,...i)=>e.emit(s,...i)},expose:t})}function da(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(lc(ic(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ln)return Ln[n](e)},has(t,n){return n in t||n in Ln}}))}const i0=/(?:^|[-_])(\w)/g,r0=e=>e.replace(i0,t=>t.toUpperCase()).replace(/[-_]/g,"");function ou(e,t=!0){return Z(e)?e.displayName||e.name:e.name||t&&e.__name}function xr(e,t,n=!1){let s=ou(t);if(!s&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(s=i[1])}if(!s&&e&&e.parent){const i=r=>{for(const o in r)if(r[o]===t)return o};s=i(e.components||e.parent.type.components)||i(e.appContext.components)}return s?r0(s):n?"App":"Anonymous"}function au(e){return Z(e)&&"__vccOpts"in e}const o0=(e,t)=>xp(e,t,si),a0=Symbol("ssrContext"),l0=()=>{{const e=cr(a0);return e||N("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function fa(e){return!!(e&&e.__v_isShallow)}function c0(){if(typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#0b1bc9"},n={style:"color:#b62e24"},s={style:"color:#9d288c"},i={header(h){return pt(h)?h.__isVue?["div",e,"VueInstance"]:Dt(h)?["div",{},["span",e,u(h)],"<",a(h.value),">"]:Dn(h)?["div",{},["span",e,fa(h)?"ShallowReactive":"Reactive"],"<",a(h),`>${an(h)?" (readonly)":""}`]:an(h)?["div",{},["span",e,fa(h)?"ShallowReadonly":"Readonly"],"<",a(h),">"]:null:null},hasBody(h){return h&&h.__isVue},body(h){if(h&&h.__isVue)return["div",{},...r(h.$)]}};function r(h){const d=[];h.type.props&&h.props&&d.push(o("props",q(h.props))),h.setupState!==ut&&d.push(o("setup",h.setupState)),h.data!==ut&&d.push(o("data",q(h.data)));const f=l(h,"computed");f&&d.push(o("computed",f));const m=l(h,"inject");return m&&d.push(o("injected",m)),d.push(["div",{},["span",{style:s.style+";opacity:0.66"},"$ (internal): "],["object",{object:h}]]),d}function o(h,d){return d=xt({},d),Object.keys(d).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},h],["div",{style:"padding-left:1.25em"},...Object.keys(d).map(f=>["div",{},["span",s,f+": "],a(d[f],!1)])]]:["span",{}]}function a(h,d=!0){return typeof h=="number"?["span",t,h]:typeof h=="string"?["span",n,JSON.stringify(h)]:typeof h=="boolean"?["span",s,h]:pt(h)?["object",{object:d?q(h):h}]:["span",n,String(h)]}function l(h,d){const f=h.type;if(Z(f))return;const m={};for(const p in h.ctx)c(f,p,d)&&(m[p]=h.ctx[p]);return m}function c(h,d,f){const m=h[f];if(Y(m)&&m.includes(d)||pt(m)&&d in m||h.extends&&c(h.extends,d,f)||h.mixins&&h.mixins.some(p=>c(p,d,f)))return!0}function u(h){return fa(h)?"ShallowRef":h.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(i):window.devtoolsFormatters=[i]}const lu="3.2.47",u0="http://www.w3.org/2000/svg",Bn=typeof document<"u"?document:null,cu=Bn&&Bn.createElement("template"),h0={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const i=t?Bn.createElementNS(u0,e):Bn.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>Bn.createTextNode(e),createComment:e=>Bn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Bn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,r){const o=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{cu.innerHTML=s?`<svg>${e}</svg>`:e;const a=cu.content;if(s){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function d0(e,t,n){const s=e._vtc;s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function f0(e,t,n){const s=e.style,i=Et(n);if(n&&!i){if(t&&!Et(t))for(const r in t)n[r]==null&&ma(s,r,"");for(const r in n)ma(s,r,n[r])}else{const r=s.display;i?t!==n&&(s.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(s.display=r)}}const m0=/[^\\];\s*$/,uu=/\s*!important$/;function ma(e,t,n){if(Y(n))n.forEach(s=>ma(e,t,s));else if(n==null&&(n=""),m0.test(n)&&N(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const s=p0(e,t);uu.test(n)?e.setProperty(te(s),n.replace(uu,""),"important"):e[s]=n}}const hu=["Webkit","Moz","ms"],pa={};function p0(e,t){const n=pa[t];if(n)return n;let s=Be(t);if(s!=="filter"&&s in e)return pa[t]=s;s=ji(s);for(let i=0;i<hu.length;i++){const r=hu[i]+s;if(r in e)return pa[t]=r}return t}const du="http://www.w3.org/1999/xlink";function g0(e,t,n,s,i){if(s&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(du,t.slice(6,t.length)):e.setAttributeNS(du,t,n);else{const r=km(t);n==null||r&&!Il(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}function b0(e,t,n,s,i,r,o){if(t==="innerHTML"||t==="textContent"){s&&o(s,i,r),e[t]=n??"";return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const l=n??"";(e.value!==l||e.tagName==="OPTION")&&(e.value=l),n==null&&e.removeAttribute(t);return}let a=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Il(n):n==null&&l==="string"?(n="",a=!0):l==="number"&&(n=0,a=!0)}try{e[t]=n}catch(l){a||N(`Failed setting prop "${t}" on <${e.tagName.toLowerCase()}>: value ${n} is invalid.`,l)}a&&e.removeAttribute(t)}function _0(e,t,n,s){e.addEventListener(t,n,s)}function y0(e,t,n,s){e.removeEventListener(t,n,s)}function x0(e,t,n,s,i=null){const r=e._vei||(e._vei={}),o=r[t];if(s&&o)o.value=s;else{const[a,l]=v0(t);if(s){const c=r[t]=M0(s,i);_0(e,a,c,l)}else o&&(y0(e,a,o,l),r[t]=void 0)}}const fu=/(?:Once|Passive|Capture)$/;function v0(e){let t;if(fu.test(e)){t={};let s;for(;s=e.match(fu);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):te(e.slice(2)),t]}let ga=0;const S0=Promise.resolve(),w0=()=>ga||(S0.then(()=>ga=0),ga=Date.now());function M0(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;le(T0(s,n.value),t,5,[s])};return n.value=e,n.attached=w0(),n}function T0(e,t){if(Y(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>i=>!i._stopped&&s&&s(i))}else return t}const mu=/^on[a-z]/,E0=(e,t,n,s,i=!1,r,o,a,l)=>{t==="class"?d0(e,s,i):t==="style"?f0(e,n,s):Ws(t)?Bi(t)||x0(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):O0(e,t,s,i))?b0(e,t,s,r,o,a,l):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),g0(e,t,s,i))};function O0(e,t,n,s){return s?!!(t==="innerHTML"||t==="textContent"||t in e&&mu.test(t)&&Z(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||mu.test(t)&&Et(n)?!1:t in e}function k0(e,t){const n=Pc(e);class s extends ba{constructor(r){super(n,r,t)}}return s.def=n,s}const C0=typeof HTMLElement<"u"?HTMLElement:class{};class ba extends C0{constructor(t,n={},s){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&s?s(this._createVNode(),this.shadowRoot):(this.shadowRoot&&N("Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use `defineSSRCustomElement`."),this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,dc(()=>{this._connected||(gu(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let s=0;s<this.attributes.length;s++)this._setAttr(this.attributes[s].name);new MutationObserver(s=>{for(const i of s)this._setAttr(i.attributeName)}).observe(this,{attributes:!0});const t=(s,i=!1)=>{const{props:r,styles:o}=s;let a;if(r&&!Y(r))for(const l in r){const c=r[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Nl(this._props[l])),(a||(a=Object.create(null)))[Be(l)]=!0)}this._numberProps=a,i&&this._resolveProps(s),this._applyStyles(o),this._update()},n=this._def.__asyncLoader;n?n().then(s=>t(s,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,s=Y(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&s.includes(i)&&this._setProp(i,this[i],!0,!1);for(const i of s.map(Be))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(r){this._setProp(i,r)}})}_setAttr(t){let n=this.getAttribute(t);const s=Be(t);this._numberProps&&this._numberProps[s]&&(n=Nl(n)),this._setProp(s,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,s=!0,i=!0){n!==this._props[t]&&(this._props[t]=n,i&&this._instance&&this._update(),s&&(n===!0?this.setAttribute(te(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(te(t),n+""):n||this.removeAttribute(te(t))))}_update(){gu(this._createVNode(),this.shadowRoot)}_createVNode(){const t=un(this._def,xt({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0,n.ceReload=r=>{this._styles&&(this._styles.forEach(o=>this.shadowRoot.removeChild(o)),this._styles.length=0),this._applyStyles(r),this._instance=null,this._update()};const s=(r,o)=>{this.dispatchEvent(new CustomEvent(r,{detail:o}))};n.emit=(r,...o)=>{s(r,o),te(r)!==r&&s(te(r),o)};let i=this;for(;i=i&&(i.parentNode||i.host);)if(i instanceof ba){n.parent=i._instance,n.provides=i._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const s=document.createElement("style");s.textContent=n,this.shadowRoot.appendChild(s),(this._styles||(this._styles=[])).push(s)})}}const D0={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};tg.props;const A0=xt({patchProp:E0},h0);let pu;function I0(){return pu||(pu=Lg(A0))}const gu=(...e)=>{I0().render(...e)};function P0(){c0()}P0();/*!
|
|
8
|
-
* @kurkle/color v0.3.2
|
|
9
|
-
* https://github.com/kurkle/color#readme
|
|
10
|
-
* (c) 2023 Jukka Kurkela
|
|
11
|
-
* Released under the MIT License
|
|
12
|
-
*/function ii(e){return e+.5|0}const dn=(e,t,n)=>Math.max(Math.min(e,n),t);function ri(e){return dn(ii(e*2.55),0,255)}function fn(e){return dn(ii(e*255),0,255)}function Ge(e){return dn(ii(e/2.55)/100,0,1)}function bu(e){return dn(ii(e*100),0,100)}const he={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},_a=[..."0123456789ABCDEF"],N0=e=>_a[e&15],L0=e=>_a[(e&240)>>4]+_a[e&15],vr=e=>(e&240)>>4===(e&15),R0=e=>vr(e.r)&&vr(e.g)&&vr(e.b)&&vr(e.a);function F0(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&he[e[1]]*17,g:255&he[e[2]]*17,b:255&he[e[3]]*17,a:t===5?he[e[4]]*17:255}:(t===7||t===9)&&(n={r:he[e[1]]<<4|he[e[2]],g:he[e[3]]<<4|he[e[4]],b:he[e[5]]<<4|he[e[6]],a:t===9?he[e[7]]<<4|he[e[8]]:255})),n}const z0=(e,t)=>e<255?t(e):"";function V0(e){var t=R0(e)?N0:L0;return e?"#"+t(e.r)+t(e.g)+t(e.b)+z0(e.a,t):void 0}const B0=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function _u(e,t,n){const s=t*Math.min(n,1-n),i=(r,o=(r+e/30)%12)=>n-s*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function H0(e,t,n){const s=(i,r=(i+e/60)%6)=>n-n*t*Math.max(Math.min(r,4-r,1),0);return[s(5),s(3),s(1)]}function W0(e,t,n){const s=_u(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)s[i]*=1-t-n,s[i]+=t;return s}function $0(e,t,n,s,i){return e===i?(t-n)/s+(t<n?6:0):t===i?(n-e)/s+2:(e-t)/s+4}function ya(e){const n=e.r/255,s=e.g/255,i=e.b/255,r=Math.max(n,s,i),o=Math.min(n,s,i),a=(r+o)/2;let l,c,u;return r!==o&&(u=r-o,c=a>.5?u/(2-r-o):u/(r+o),l=$0(n,s,i,u,r),l=l*60+.5),[l|0,c||0,a]}function xa(e,t,n,s){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,s)).map(fn)}function va(e,t,n){return xa(_u,e,t,n)}function j0(e,t,n){return xa(W0,e,t,n)}function U0(e,t,n){return xa(H0,e,t,n)}function yu(e){return(e%360+360)%360}function G0(e){const t=B0.exec(e);let n=255,s;if(!t)return;t[5]!==s&&(n=t[6]?ri(+t[5]):fn(+t[5]));const i=yu(+t[2]),r=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?s=j0(i,r,o):t[1]==="hsv"?s=U0(i,r,o):s=va(i,r,o),{r:s[0],g:s[1],b:s[2],a:n}}function Y0(e,t){var n=ya(e);n[0]=yu(n[0]+t),n=va(n),e.r=n[0],e.g=n[1],e.b=n[2]}function K0(e){if(!e)return;const t=ya(e),n=t[0],s=bu(t[1]),i=bu(t[2]);return e.a<255?`hsla(${n}, ${s}%, ${i}%, ${Ge(e.a)})`:`hsl(${n}, ${s}%, ${i}%)`}const xu={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"},vu={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 X0(){const e={},t=Object.keys(vu),n=Object.keys(xu);let s,i,r,o,a;for(s=0;s<t.length;s++){for(o=a=t[s],i=0;i<n.length;i++)r=n[i],a=a.replace(r,xu[r]);r=parseInt(vu[o],16),e[a]=[r>>16&255,r>>8&255,r&255]}return e}let Sr;function Z0(e){Sr||(Sr=X0(),Sr.transparent=[0,0,0,0]);const t=Sr[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const q0=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function J0(e){const t=q0.exec(e);let n=255,s,i,r;if(t){if(t[7]!==s){const o=+t[7];n=t[8]?ri(o):dn(o*255,0,255)}return s=+t[1],i=+t[3],r=+t[5],s=255&(t[2]?ri(s):dn(s,0,255)),i=255&(t[4]?ri(i):dn(i,0,255)),r=255&(t[6]?ri(r):dn(r,0,255)),{r:s,g:i,b:r,a:n}}}function Q0(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ge(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Sa=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ys=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function tb(e,t,n){const s=ys(Ge(e.r)),i=ys(Ge(e.g)),r=ys(Ge(e.b));return{r:fn(Sa(s+n*(ys(Ge(t.r))-s))),g:fn(Sa(i+n*(ys(Ge(t.g))-i))),b:fn(Sa(r+n*(ys(Ge(t.b))-r))),a:e.a+n*(t.a-e.a)}}function wr(e,t,n){if(e){let s=ya(e);s[t]=Math.max(0,Math.min(s[t]+s[t]*n,t===0?360:1)),s=va(s),e.r=s[0],e.g=s[1],e.b=s[2]}}function Su(e,t){return e&&Object.assign(t||{},e)}function wu(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=fn(e[3]))):(t=Su(e,{r:0,g:0,b:0,a:1}),t.a=fn(t.a)),t}function eb(e){return e.charAt(0)==="r"?J0(e):G0(e)}class oi{constructor(t){if(t instanceof oi)return t;const n=typeof t;let s;n==="object"?s=wu(t):n==="string"&&(s=F0(t)||Z0(t)||eb(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Su(this._rgb);return t&&(t.a=Ge(t.a)),t}set rgb(t){this._rgb=wu(t)}rgbString(){return this._valid?Q0(this._rgb):void 0}hexString(){return this._valid?V0(this._rgb):void 0}hslString(){return this._valid?K0(this._rgb):void 0}mix(t,n){if(t){const s=this.rgb,i=t.rgb;let r;const o=n===r?.5:n,a=2*o-1,l=s.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,s.r=255&c*s.r+r*i.r+.5,s.g=255&c*s.g+r*i.g+.5,s.b=255&c*s.b+r*i.b+.5,s.a=o*s.a+(1-o)*i.a,this.rgb=s}return this}interpolate(t,n){return t&&(this._rgb=tb(this._rgb,t._rgb,n)),this}clone(){return new oi(this.rgb)}alpha(t){return this._rgb.a=fn(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=ii(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.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 wr(this._rgb,2,t),this}darken(t){return wr(this._rgb,2,-t),this}saturate(t){return wr(this._rgb,1,t),this}desaturate(t){return wr(this._rgb,1,-t),this}rotate(t){return Y0(this._rgb,t),this}}/*!
|
|
13
|
-
* Chart.js v4.2.1
|
|
14
|
-
* https://www.chartjs.org
|
|
15
|
-
* (c) 2023 Chart.js Contributors
|
|
16
|
-
* Released under the MIT License
|
|
17
|
-
*/function Ye(){}const nb=(()=>{let e=0;return()=>e++})();function rt(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 nt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function vt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ne(e,t){return vt(e)?e:t}function J(e,t){return typeof e>"u"?t:e}const sb=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Mu=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function mt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function lt(e,t,n,s){let i,r,o;if(gt(e))if(r=e.length,s)for(i=r-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<r;i++)t.call(n,e[i],i);else if(nt(e))for(o=Object.keys(e),r=o.length,i=0;i<r;i++)t.call(n,e[o[i]],o[i])}function Mr(e,t){let n,s,i,r;if(!e||!t||e.length!==t.length)return!1;for(n=0,s=e.length;n<s;++n)if(i=e[n],r=t[n],i.datasetIndex!==r.datasetIndex||i.index!==r.index)return!1;return!0}function Tr(e){if(gt(e))return e.map(Tr);if(nt(e)){const t=Object.create(null),n=Object.keys(e),s=n.length;let i=0;for(;i<s;++i)t[n[i]]=Tr(e[n[i]]);return t}return e}function Tu(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function ib(e,t,n,s){if(!Tu(e))return;const i=t[e],r=n[e];nt(i)&&nt(r)?se(i,r,s):t[e]=Tr(r)}function se(e,t,n){const s=gt(t)?t:[t],i=s.length;if(!nt(e))return e;n=n||{};const r=n.merger||ib;let o;for(let a=0;a<i;++a){if(o=s[a],!nt(o))continue;const l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)r(l[c],e,o,n)}return e}function ai(e,t){return se(e,t,{merger:rb})}function rb(e,t,n){if(!Tu(e))return;const s=t[e],i=n[e];nt(s)&&nt(i)?ai(s,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Tr(i))}const Eu={"":e=>e,x:e=>e.x,y:e=>e.y};function ob(e){const t=e.split("."),n=[];let s="";for(const i of t)s+=i,s.endsWith("\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function ab(e){const t=ob(e);return n=>{for(const s of t){if(s==="")break;n=n&&n[s]}return n}}function mn(e,t){return(Eu[t]||(Eu[t]=ab(t)))(e)}function wa(e){return e.charAt(0).toUpperCase()+e.slice(1)}const de=e=>typeof e<"u",pn=e=>typeof e=="function",Ou=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function lb(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const yt=Math.PI,bt=2*yt,cb=bt+yt,Er=Number.POSITIVE_INFINITY,ub=yt/180,St=yt/2,Hn=yt/4,ku=yt*2/3,gn=Math.log10,Ne=Math.sign;function li(e,t,n){return Math.abs(e-t)<n}function Cu(e){const t=Math.round(e);e=li(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(gn(e))),s=e/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function hb(e){const t=[],n=Math.sqrt(e);let s;for(s=1;s<n;s++)e%s===0&&(t.push(s),t.push(e/s));return n===(n|0)&&t.push(n),t.sort((i,r)=>i-r).pop(),t}function xs(e){return!isNaN(parseFloat(e))&&isFinite(e)}function db(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Du(e,t,n){let s,i,r;for(s=0,i=e.length;s<i;s++)r=e[s][n],isNaN(r)||(t.min=Math.min(t.min,r),t.max=Math.max(t.max,r))}function ve(e){return e*(yt/180)}function Ma(e){return e*(180/yt)}function Au(e){if(!vt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Iu(e,t){const n=t.x-e.x,s=t.y-e.y,i=Math.sqrt(n*n+s*s);let r=Math.atan2(s,n);return r<-.5*yt&&(r+=bt),{angle:r,distance:i}}function Ta(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function fb(e,t){return(e-t+cb)%bt-yt}function ie(e){return(e%bt+bt)%bt}function ci(e,t,n,s){const i=ie(e),r=ie(t),o=ie(n),a=ie(r-i),l=ie(o-i),c=ie(i-r),u=ie(i-o);return i===r||i===o||s&&r===o||a>l&&c<u}function It(e,t,n){return Math.max(t,Math.min(n,e))}function mb(e){return It(e,-32768,32767)}function Ke(e,t,n,s=1e-6){return e>=Math.min(t,n)-s&&e<=Math.max(t,n)+s}function Ea(e,t,n){n=n||(o=>e[o]<t);let s=e.length-1,i=0,r;for(;s-i>1;)r=i+s>>1,n(r)?i=r:s=r;return{lo:i,hi:s}}const Xe=(e,t,n,s)=>Ea(e,n,s?i=>{const r=e[i][t];return r<n||r===n&&e[i+1][t]===n}:i=>e[i][t]<n),pb=(e,t,n)=>Ea(e,n,s=>e[s][t]>=n);function gb(e,t,n){let s=0,i=e.length;for(;s<i&&e[s]<t;)s++;for(;i>s&&e[i-1]>n;)i--;return s>0||i<e.length?e.slice(s,i):e}const Pu=["push","pop","shift","splice","unshift"];function bb(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Pu.forEach(n=>{const s="_onData"+wa(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...r){const o=i.apply(this,r);return e._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...r)}),o}})})}function Nu(e,t){const n=e._chartjs;if(!n)return;const s=n.listeners,i=s.indexOf(t);i!==-1&&s.splice(i,1),!(s.length>0)&&(Pu.forEach(r=>{delete e[r]}),delete e._chartjs)}function Lu(e){const t=new Set;let n,s;for(n=0,s=e.length;n<s;++n)t.add(e[n]);return t.size===s?e:Array.from(t)}const Ru=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Fu(e,t){let n=[],s=!1;return function(...i){n=i,s||(s=!0,Ru.call(window,()=>{s=!1,e.apply(t,n)}))}}function _b(e,t){let n;return function(...s){return t?(clearTimeout(n),n=setTimeout(e,t,s)):e.apply(this,s),t}}const Oa=e=>e==="start"?"left":e==="end"?"right":"center",Lt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,yb=(e,t,n,s)=>e===(s?"left":"right")?n:e==="center"?(t+n)/2:t;function zu(e,t,n){const s=t.length;let i=0,r=s;if(e._sorted){const{iScale:o,_parsed:a}=e,l=o.axis,{min:c,max:u,minDefined:h,maxDefined:d}=o.getUserBounds();h&&(i=It(Math.min(Xe(a,o.axis,c).lo,n?s:Xe(t,l,o.getPixelForValue(c)).lo),0,s-1)),d?r=It(Math.max(Xe(a,o.axis,u,!0).hi+1,n?0:Xe(t,l,o.getPixelForValue(u),!0).hi+1),i,s)-i:r=s-i}return{start:i,count:r}}function Vu(e){const{xScale:t,yScale:n,_scaleRanges:s}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!s)return e._scaleRanges=i,!0;const r=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==n.min||s.ymax!==n.max;return Object.assign(s,i),r}const Or=e=>e===0||e===1,Bu=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*bt/n)),Hu=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*bt/n)+1,ui={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*St)+1,easeOutSine:e=>Math.sin(e*St),easeInOutSine:e=>-.5*(Math.cos(yt*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=>Or(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=>Or(e)?e:Bu(e,.075,.3),easeOutElastic:e=>Or(e)?e:Hu(e,.075,.3),easeInOutElastic(e){return Or(e)?e:e<.5?.5*Bu(e*2,.1125,.45):.5+.5*Hu(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-ui.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?ui.easeInBounce(e*2)*.5:ui.easeOutBounce(e*2-1)*.5+.5};function Wu(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function kr(e){return Wu(e)?e:new oi(e)}function ka(e){return Wu(e)?e:new oi(e).saturate(.5).darken(.1).hexString()}const xb=["x","y","borderWidth","radius","tension"],vb=["color","borderColor","backgroundColor"];function Sb(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:vb},numbers:{type:"number",properties:xb}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function wb(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const $u=new Map;function Mb(e,t){t=t||{};const n=e+JSON.stringify(t);let s=$u.get(n);return s||(s=new Intl.NumberFormat(e,t),$u.set(n,s)),s}function hi(e,t,n){return Mb(t,n).format(e)}const ju={values(e){return gt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const s=this.chart.options.locale;let i,r=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),r=Tb(e,n)}const o=gn(Math.abs(r)),a=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),hi(e,s,l)},logarithmic(e,t,n){if(e===0)return"0";const s=n[t].significand||e/Math.pow(10,Math.floor(gn(e)));return[1,2,3,5,10,15].includes(s)||t>.8*n.length?ju.numeric.call(this,e,t,n):""}};function Tb(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Cr={formatters:ju};function Eb(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Cr.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Wn=Object.create(null),Ca=Object.create(null);function di(e,t){if(!t)return e;const n=t.split(".");for(let s=0,i=n.length;s<i;++s){const r=n[s];e=e[r]||(e[r]=Object.create(null))}return e}function Da(e,t,n){return typeof t=="string"?se(di(e,t),n):se(di(e,""),t)}class Ob{constructor(t,n){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)=>ka(i.backgroundColor),this.hoverBorderColor=(s,i)=>ka(i.borderColor),this.hoverColor=(s,i)=>ka(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Da(this,t,n)}get(t){return di(this,t)}describe(t,n){return Da(Ca,t,n)}override(t,n){return Da(Wn,t,n)}route(t,n,s,i){const r=di(this,t),o=di(this,s),a="_"+n;Object.defineProperties(r,{[a]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[i];return nt(l)?Object.assign({},c,l):J(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var Tt=new Ob({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Sb,wb,Eb]);function kb(e){return!e||rt(e.size)||rt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Dr(e,t,n,s,i){let r=t[i];return r||(r=t[i]=e.measureText(i).width,n.push(i)),r>s&&(s=r),s}function Cb(e,t,n,s){s=s||{};let i=s.data=s.data||{},r=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(i=s.data={},r=s.garbageCollect=[],s.font=t),e.save(),e.font=t;let o=0;const a=n.length;let l,c,u,h,d;for(l=0;l<a;l++)if(h=n[l],h!=null&>(h)!==!0)o=Dr(e,i,r,o,h);else if(gt(h))for(c=0,u=h.length;c<u;c++)d=h[c],d!=null&&!gt(d)&&(o=Dr(e,i,r,o,d));e.restore();const f=r.length/2;if(f>n.length){for(l=0;l<f;l++)delete i[r[l]];r.splice(0,f)}return o}function $n(e,t,n){const s=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*s)/s+i}function Uu(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function Aa(e,t,n,s){Gu(e,t,n,s,null)}function Gu(e,t,n,s,i){let r,o,a,l,c,u,h,d;const f=t.pointStyle,m=t.rotation,p=t.radius;let b=(m||0)*ub;if(f&&typeof f=="object"&&(r=f.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){e.save(),e.translate(n,s),e.rotate(b),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),f){default:i?e.ellipse(n,s,i/2,p,0,0,bt):e.arc(n,s,p,0,bt),e.closePath();break;case"triangle":u=i?i/2:p,e.moveTo(n+Math.sin(b)*u,s-Math.cos(b)*p),b+=ku,e.lineTo(n+Math.sin(b)*u,s-Math.cos(b)*p),b+=ku,e.lineTo(n+Math.sin(b)*u,s-Math.cos(b)*p),e.closePath();break;case"rectRounded":c=p*.516,l=p-c,o=Math.cos(b+Hn)*l,h=Math.cos(b+Hn)*(i?i/2-c:l),a=Math.sin(b+Hn)*l,d=Math.sin(b+Hn)*(i?i/2-c:l),e.arc(n-h,s-a,c,b-yt,b-St),e.arc(n+d,s-o,c,b-St,b),e.arc(n+h,s+a,c,b,b+St),e.arc(n-d,s+o,c,b+St,b+yt),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*p,u=i?i/2:l,e.rect(n-u,s-l,2*u,2*l);break}b+=Hn;case"rectRot":h=Math.cos(b)*(i?i/2:p),o=Math.cos(b)*p,a=Math.sin(b)*p,d=Math.sin(b)*(i?i/2:p),e.moveTo(n-h,s-a),e.lineTo(n+d,s-o),e.lineTo(n+h,s+a),e.lineTo(n-d,s+o),e.closePath();break;case"crossRot":b+=Hn;case"cross":h=Math.cos(b)*(i?i/2:p),o=Math.cos(b)*p,a=Math.sin(b)*p,d=Math.sin(b)*(i?i/2:p),e.moveTo(n-h,s-a),e.lineTo(n+h,s+a),e.moveTo(n+d,s-o),e.lineTo(n-d,s+o);break;case"star":h=Math.cos(b)*(i?i/2:p),o=Math.cos(b)*p,a=Math.sin(b)*p,d=Math.sin(b)*(i?i/2:p),e.moveTo(n-h,s-a),e.lineTo(n+h,s+a),e.moveTo(n+d,s-o),e.lineTo(n-d,s+o),b+=Hn,h=Math.cos(b)*(i?i/2:p),o=Math.cos(b)*p,a=Math.sin(b)*p,d=Math.sin(b)*(i?i/2:p),e.moveTo(n-h,s-a),e.lineTo(n+h,s+a),e.moveTo(n+d,s-o),e.lineTo(n-d,s+o);break;case"line":o=i?i/2:Math.cos(b)*p,a=Math.sin(b)*p,e.moveTo(n-o,s-a),e.lineTo(n+o,s+a);break;case"dash":e.moveTo(n,s),e.lineTo(n+Math.cos(b)*(i?i/2:p),s+Math.sin(b)*p);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function fi(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Ar(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Ir(e){e.restore()}function Db(e,t,n,s,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const r=(t.x+n.x)/2;e.lineTo(r,t.y),e.lineTo(r,n.y)}else i==="after"!=!!s?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Ab(e,t,n,s){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?n.cp2x:n.cp1x,s?n.cp2y:n.cp1y,n.x,n.y)}function jn(e,t,n,s,i,r={}){const o=gt(t)?t:[t],a=r.strokeWidth>0&&r.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,Ib(e,r),l=0;l<o.length;++l)c=o[l],r.backdrop&&Nb(e,r.backdrop),a&&(r.strokeColor&&(e.strokeStyle=r.strokeColor),rt(r.strokeWidth)||(e.lineWidth=r.strokeWidth),e.strokeText(c,n,s,r.maxWidth)),e.fillText(c,n,s,r.maxWidth),Pb(e,n,s,c,r),s+=i.lineHeight;e.restore()}function Ib(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),rt(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 Pb(e,t,n,s,i){if(i.strikethrough||i.underline){const r=e.measureText(s),o=t-r.actualBoundingBoxLeft,a=t+r.actualBoundingBoxRight,l=n-r.actualBoundingBoxAscent,c=n+r.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(a,u),e.stroke()}}function Nb(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function mi(e,t){const{x:n,y:s,w:i,h:r,radius:o}=t;e.arc(n+o.topLeft,s+o.topLeft,o.topLeft,-St,yt,!0),e.lineTo(n,s+r-o.bottomLeft),e.arc(n+o.bottomLeft,s+r-o.bottomLeft,o.bottomLeft,yt,St,!0),e.lineTo(n+i-o.bottomRight,s+r),e.arc(n+i-o.bottomRight,s+r-o.bottomRight,o.bottomRight,St,0,!0),e.lineTo(n+i,s+o.topRight),e.arc(n+i-o.topRight,s+o.topRight,o.topRight,0,-St,!0),e.lineTo(n+o.topLeft,s)}const Lb=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Rb=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Fb(e,t){const n=(""+e).match(Lb);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const zb=e=>+e||0;function Ia(e,t){const n={},s=nt(t),i=s?Object.keys(t):t,r=nt(e)?s?o=>J(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=zb(r(o));return n}function Yu(e){return Ia(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Un(e){return Ia(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Rt(e){const t=Yu(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function At(e,t){e=e||{},t=t||Tt.font;let n=J(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let s=J(e.style,t.style);s&&!(""+s).match(Rb)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const i={family:J(e.family,t.family),lineHeight:Fb(J(e.lineHeight,t.lineHeight),n),size:n,style:s,weight:J(e.weight,t.weight),string:""};return i.string=kb(i),i}function pi(e,t,n,s){let i=!0,r,o,a;for(r=0,o=e.length;r<o;++r)if(a=e[r],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),i=!1),n!==void 0&>(a)&&(a=a[n%a.length],i=!1),a!==void 0))return s&&!i&&(s.cacheable=!1),a}function Vb(e,t,n){const{min:s,max:i}=e,r=Mu(t,(i-s)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(s,-Math.abs(r)),max:o(i,r)}}function bn(e,t){return Object.assign(Object.create(e),t)}function Pa(e,t=[""],n=e,s,i=()=>e[0]){de(s)||(s=Ju("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:n,_fallback:s,_getTarget:i,override:o=>Pa([o,...e],t,n,s)};return new Proxy(r,{deleteProperty(o,a){return delete o[a],delete o._keys,delete e[0][a],!0},get(o,a){return Xu(o,a,()=>Yb(a,t,e,o))},getOwnPropertyDescriptor(o,a){return Reflect.getOwnPropertyDescriptor(o._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(o,a){return Qu(o).includes(a)},ownKeys(o){return Qu(o)},set(o,a,l){const c=o._storage||(o._storage=i());return o[a]=c[a]=l,delete o._keys,!0}})}function vs(e,t,n,s){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Ku(e,s),setContext:r=>vs(e,r,n,s),override:r=>vs(e.override(r),t,n,s)};return new Proxy(i,{deleteProperty(r,o){return delete r[o],delete e[o],!0},get(r,o,a){return Xu(r,o,()=>Hb(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(r,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(r,o,a){return e[o]=a,delete r[o],!0}})}function Ku(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:s=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:s,isScriptable:pn(n)?n:()=>n,isIndexable:pn(s)?s:()=>s}}const Bb=(e,t)=>e?e+wa(t):t,Na=(e,t)=>nt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Xu(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const s=n();return e[t]=s,s}function Hb(e,t,n){const{_proxy:s,_context:i,_subProxy:r,_descriptors:o}=e;let a=s[t];return pn(a)&&o.isScriptable(t)&&(a=Wb(t,a,e,n)),gt(a)&&a.length&&(a=$b(t,a,e,o.isIndexable)),Na(t,a)&&(a=vs(a,i,r&&r[t],o)),a}function Wb(e,t,n,s){const{_proxy:i,_context:r,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);return a.add(e),t=t(r,o||s),a.delete(e),Na(e,t)&&(t=La(i._scopes,i,e,t)),t}function $b(e,t,n,s){const{_proxy:i,_context:r,_subProxy:o,_descriptors:a}=n;if(de(r.index)&&s(e))t=t[r.index%t.length];else if(nt(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const h=La(c,i,e,u);t.push(vs(h,r,o&&o[e],a))}}return t}function Zu(e,t,n){return pn(e)?e(t,n):e}const jb=(e,t)=>e===!0?t:typeof e=="string"?mn(t,e):void 0;function Ub(e,t,n,s,i){for(const r of t){const o=jb(n,r);if(o){e.add(o);const a=Zu(o._fallback,n,i);if(de(a)&&a!==n&&a!==s)return a}else if(o===!1&&de(s)&&n!==s)return null}return!1}function La(e,t,n,s){const i=t._rootScopes,r=Zu(t._fallback,n,s),o=[...e,...i],a=new Set;a.add(s);let l=qu(a,o,n,r||n,s);return l===null||de(r)&&r!==n&&(l=qu(a,o,r,l,s),l===null)?!1:Pa(Array.from(a),[""],i,r,()=>Gb(t,n,s))}function qu(e,t,n,s,i){for(;n;)n=Ub(e,t,n,s,i);return n}function Gb(e,t,n){const s=e._getTarget();t in s||(s[t]={});const i=s[t];return gt(i)&&nt(n)?n:i||{}}function Yb(e,t,n,s){let i;for(const r of t)if(i=Ju(Bb(r,e),n),de(i))return Na(e,i)?La(n,s,e,i):i}function Ju(e,t){for(const n of t){if(!n)continue;const s=n[e];if(de(s))return s}}function Qu(e){let t=e._keys;return t||(t=e._keys=Kb(e._scopes)),t}function Kb(e){const t=new Set;for(const n of e)for(const s of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(s);return Array.from(t)}function th(e,t,n,s){const{iScale:i}=e,{key:r="r"}=this._parsing,o=new Array(s);let a,l,c,u;for(a=0,l=s;a<l;++a)c=a+n,u=t[c],o[a]={r:i.parse(mn(u,r),c)};return o}const Xb=Number.EPSILON||1e-14,Ss=(e,t)=>t<e.length&&!e[t].skip&&e[t],eh=e=>e==="x"?"y":"x";function Zb(e,t,n,s){const i=e.skip?t:e,r=t,o=n.skip?t:n,a=Ta(r,i),l=Ta(o,r);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=s*c,d=s*u;return{previous:{x:r.x-h*(o.x-i.x),y:r.y-h*(o.y-i.y)},next:{x:r.x+d*(o.x-i.x),y:r.y+d*(o.y-i.y)}}}function qb(e,t,n){const s=e.length;let i,r,o,a,l,c=Ss(e,0);for(let u=0;u<s-1;++u)if(l=c,c=Ss(e,u+1),!(!l||!c)){if(li(t[u],0,Xb)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],r=n[u+1]/t[u],a=Math.pow(i,2)+Math.pow(r,2),!(a<=9)&&(o=3/Math.sqrt(a),n[u]=i*o*t[u],n[u+1]=r*o*t[u])}}function Jb(e,t,n="x"){const s=eh(n),i=e.length;let r,o,a,l=Ss(e,0);for(let c=0;c<i;++c){if(o=a,a=l,l=Ss(e,c+1),!a)continue;const u=a[n],h=a[s];o&&(r=(u-o[n])/3,a[`cp1${n}`]=u-r,a[`cp1${s}`]=h-r*t[c]),l&&(r=(l[n]-u)/3,a[`cp2${n}`]=u+r,a[`cp2${s}`]=h+r*t[c])}}function Qb(e,t="x"){const n=eh(t),s=e.length,i=Array(s).fill(0),r=Array(s);let o,a,l,c=Ss(e,0);for(o=0;o<s;++o)if(a=l,l=c,c=Ss(e,o+1),!!l){if(c){const u=c[t]-l[t];i[o]=u!==0?(c[n]-l[n])/u:0}r[o]=a?c?Ne(i[o-1])!==Ne(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}qb(e,i,r),Jb(e,r,t)}function Pr(e,t,n){return Math.max(Math.min(e,n),t)}function t_(e,t){let n,s,i,r,o,a=fi(e[0],t);for(n=0,s=e.length;n<s;++n)o=r,r=a,a=n<s-1&&fi(e[n+1],t),r&&(i=e[n],o&&(i.cp1x=Pr(i.cp1x,t.left,t.right),i.cp1y=Pr(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=Pr(i.cp2x,t.left,t.right),i.cp2y=Pr(i.cp2y,t.top,t.bottom)))}function e_(e,t,n,s,i){let r,o,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Qb(e,i);else{let c=s?e[e.length-1]:e[0];for(r=0,o=e.length;r<o;++r)a=e[r],l=Zb(c,a,e[Math.min(r+1,o-(s?0:1))%o],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&t_(e,n)}function nh(){return typeof window<"u"&&typeof document<"u"}function Ra(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Nr(e,t,n){let s;return typeof e=="string"?(s=parseInt(e,10),e.indexOf("%")!==-1&&(s=s/100*t.parentNode[n])):s=e,s}const Lr=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function n_(e,t){return Lr(e).getPropertyValue(t)}const s_=["top","right","bottom","left"];function Gn(e,t,n){const s={};n=n?"-"+n:"";for(let i=0;i<4;i++){const r=s_[i];s[r]=parseFloat(e[t+"-"+r+n])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const i_=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function r_(e,t){const n=e.touches,s=n&&n.length?n[0]:e,{offsetX:i,offsetY:r}=s;let o=!1,a,l;if(i_(i,r,e.target))a=i,l=r;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function Yn(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:s}=t,i=Lr(n),r=i.boxSizing==="border-box",o=Gn(i,"padding"),a=Gn(i,"border","width"),{x:l,y:c,box:u}=r_(e,n),h=o.left+(u&&a.left),d=o.top+(u&&a.top);let{width:f,height:m}=t;return r&&(f-=o.width+a.width,m-=o.height+a.height),{x:Math.round((l-h)/f*n.width/s),y:Math.round((c-d)/m*n.height/s)}}function o_(e,t,n){let s,i;if(t===void 0||n===void 0){const r=Ra(e);if(!r)t=e.clientWidth,n=e.clientHeight;else{const o=r.getBoundingClientRect(),a=Lr(r),l=Gn(a,"border","width"),c=Gn(a,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,s=Nr(a.maxWidth,r,"clientWidth"),i=Nr(a.maxHeight,r,"clientHeight")}}return{width:t,height:n,maxWidth:s||Er,maxHeight:i||Er}}const Rr=e=>Math.round(e*10)/10;function a_(e,t,n,s){const i=Lr(e),r=Gn(i,"margin"),o=Nr(i.maxWidth,e,"clientWidth")||Er,a=Nr(i.maxHeight,e,"clientHeight")||Er,l=o_(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const d=Gn(i,"border","width"),f=Gn(i,"padding");c-=f.width+d.width,u-=f.height+d.height}return c=Math.max(0,c-r.width),u=Math.max(0,s?c/s:u-r.height),c=Rr(Math.min(c,o,l.maxWidth)),u=Rr(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Rr(c/2)),(t!==void 0||n!==void 0)&&s&&l.height&&u>l.height&&(u=l.height,c=Rr(Math.floor(u*s))),{width:c,height:u}}function sh(e,t,n){const s=t||1,i=Math.floor(e.height*s),r=Math.floor(e.width*s);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==s||o.height!==i||o.width!==r?(e.currentDevicePixelRatio=s,o.height=i,o.width=r,e.ctx.setTransform(s,0,0,s,0,0),!0):!1}const l_=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 ih(e,t){const n=n_(e,t),s=n&&n.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Kn(e,t,n,s){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function c_(e,t,n,s){return{x:e.x+n*(t.x-e.x),y:s==="middle"?n<.5?e.y:t.y:s==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function u_(e,t,n,s){const i={x:e.cp2x,y:e.cp2y},r={x:t.cp1x,y:t.cp1y},o=Kn(e,i,n),a=Kn(i,r,n),l=Kn(r,t,n),c=Kn(o,a,n),u=Kn(a,l,n);return Kn(c,u,n)}const h_=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,s){return n-s},leftForLtr(n,s){return n-s}}},d_=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ws(e,t,n){return e?h_(t,n):d_()}function rh(e,t){let n,s;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,s=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=s)}function oh(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function ah(e){return e==="angle"?{between:ci,compare:fb,normalize:ie}:{between:Ke,compare:(t,n)=>t-n,normalize:t=>t}}function lh({start:e,end:t,count:n,loop:s,style:i}){return{start:e%n,end:t%n,loop:s&&(t-e+1)%n===0,style:i}}function f_(e,t,n){const{property:s,start:i,end:r}=n,{between:o,normalize:a}=ah(s),l=t.length;let{start:c,end:u,loop:h}=e,d,f;if(h){for(c+=l,u+=l,d=0,f=l;d<f&&o(a(t[c%l][s]),i,r);++d)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:h,style:e.style}}function ch(e,t,n){if(!n)return[e];const{property:s,start:i,end:r}=n,o=t.length,{compare:a,between:l,normalize:c}=ah(s),{start:u,end:h,loop:d,style:f}=f_(e,t,n),m=[];let p=!1,b=null,y,x,w;const v=()=>l(i,w,y)&&a(i,w)!==0,S=()=>a(r,y)===0||l(r,w,y),C=()=>p||v(),D=()=>!p||S();for(let T=u,L=u;T<=h;++T)x=t[T%o],!x.skip&&(y=c(x[s]),y!==w&&(p=l(y,i,r),b===null&&C()&&(b=a(y,i)===0?T:L),b!==null&&D()&&(m.push(lh({start:b,end:T,loop:d,count:o,style:f})),b=null),L=T,w=y));return b!==null&&m.push(lh({start:b,end:h,loop:d,count:o,style:f})),m}function uh(e,t){const n=[],s=e.segments;for(let i=0;i<s.length;i++){const r=ch(s[i],e.points,t);r.length&&n.push(...r)}return n}function m_(e,t,n,s){let i=0,r=t-1;if(n&&!s)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(r+=i);r>i&&e[r%t].skip;)r--;return r%=t,{start:i,end:r}}function p_(e,t,n,s){const i=e.length,r=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(s=!1,r.push({start:t%i,end:(l-1)%i,loop:s}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&r.push({start:t%i,end:o%i,loop:s}),r}function g_(e,t){const n=e.points,s=e.options.spanGaps,i=n.length;if(!i)return[];const r=!!e._loop,{start:o,end:a}=m_(n,i,r,s);if(s===!0)return hh(e,[{start:o,end:a,loop:r}],n,t);const l=a<o?a+i:a,c=!!e._fullLoop&&o===0&&a===i-1;return hh(e,p_(n,o,l,c),n,t)}function hh(e,t,n,s){return!s||!s.setContext||!n?t:b_(e,t,n,s)}function b_(e,t,n,s){const i=e._chart.getContext(),r=dh(e.options),{_datasetIndex:o,options:{spanGaps:a}}=e,l=n.length,c=[];let u=r,h=t[0].start,d=h;function f(m,p,b,y){const x=a?-1:1;if(m!==p){for(m+=l;n[m%l].skip;)m-=x;for(;n[p%l].skip;)p+=x;m%l!==p%l&&(c.push({start:m%l,end:p%l,loop:b,style:y}),u=y,h=p%l)}}for(const m of t){h=a?h:m.start;let p=n[h%l],b;for(d=h+1;d<=m.end;d++){const y=n[d%l];b=dh(s.setContext(bn(i,{type:"segment",p0:p,p1:y,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),__(b,u)&&f(h,d-1,m.loop,u),p=y,u=b}h<d-1&&f(h,d-1,m.loop,u)}return c}function dh(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function __(e,t){return t&&JSON.stringify(e)!==JSON.stringify(t)}/*!
|
|
18
|
-
* Chart.js v4.2.1
|
|
19
|
-
* https://www.chartjs.org
|
|
20
|
-
* (c) 2023 Chart.js Contributors
|
|
21
|
-
* Released under the MIT License
|
|
22
|
-
*/class y_{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,s,i){const r=n.listeners[i],o=n.duration;r.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(s-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Ru.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const r=s.items;let o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,s,t,"progress")),r.length||(s.running=!1,this._notify(i,s,t,"complete"),s.initial=!1),n+=r.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let s=n.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,s)),s}listen(t,n,s){this._getAnims(t).listeners[n].push(s)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const s=n.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ze=new y_;const fh="transparent",x_={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const s=kr(e||fh),i=s.valid&&kr(t||fh);return i&&i.valid?i.mix(s,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class v_{constructor(t,n,s,i){const r=n[s];i=pi([t.to,i,r,t.from]);const o=pi([t.from,r,i]);this._active=!0,this._fn=t.fn||x_[t.type||typeof o],this._easing=ui[t.easing]||ui.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=s,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,s){if(this._active){this._notify(!1);const i=this._target[this._prop],r=s-this._start,o=this._duration-r;this._start=s,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=pi([t.to,n,i,t.from]),this._from=pi([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,s=this._duration,i=this._prop,r=this._from,o=this._loop,a=this._to;let l;if(this._active=r!==a&&(o||n<s),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=r;return}l=n/s%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(r,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,s)=>{t.push({res:n,rej:s})})}_notify(t){const n=t?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][n]()}}class mh{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!nt(t))return;const n=Object.keys(Tt.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const r=t[i];if(!nt(r))return;const o={};for(const a of n)o[a]=r[a];(gt(r.properties)&&r.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,o)})})}_animateOptions(t,n){const s=n.options,i=w_(t,s);if(!i)return[];const r=this._createAnimations(i,s);return s.$shared&&S_(t.options.$animations,s).then(()=>{t.options=s},()=>{}),r}_createAnimations(t,n){const s=this._properties,i=[],r=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let h=r[c];const d=s.get(c);if(h)if(d&&h.active()){h.update(d,u,a);continue}else h.cancel();if(!d||!d.duration){t[c]=u;continue}r[c]=h=new v_(d,t,c,u),i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const s=this._createAnimations(t,n);if(s.length)return Ze.add(this._chart,s),!0}}function S_(e,t){const n=[],s=Object.keys(t);for(let i=0;i<s.length;i++){const r=e[s[i]];r&&r.active()&&n.push(r.wait())}return Promise.all(n)}function w_(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function ph(e,t){const n=e&&e.options||{},s=n.reverse,i=n.min===void 0?t:0,r=n.max===void 0?t:0;return{start:s?r:i,end:s?i:r}}function M_(e,t,n){if(n===!1)return!1;const s=ph(e,n),i=ph(t,n);return{top:i.end,right:s.end,bottom:i.start,left:s.start}}function T_(e){let t,n,s,i;return nt(e)?(t=e.top,n=e.right,s=e.bottom,i=e.left):t=n=s=i=e,{top:t,right:n,bottom:s,left:i,disabled:e===!1}}function gh(e,t){const n=[],s=e._getSortedDatasetMetas(t);let i,r;for(i=0,r=s.length;i<r;++i)n.push(s[i].index);return n}function bh(e,t,n,s={}){const i=e.keys,r=s.mode==="single";let o,a,l,c;if(t!==null){for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(s.all)continue;break}c=e.values[l],vt(c)&&(r||t===0||Ne(t)===Ne(c))&&(t+=c)}return t}}function E_(e){const t=Object.keys(e),n=new Array(t.length);let s,i,r;for(s=0,i=t.length;s<i;++s)r=t[s],n[s]={x:r,y:e[r]};return n}function _h(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function O_(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function k_(e){const{min:t,max:n,minDefined:s,maxDefined:i}=e.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function C_(e,t,n){const s=e[t]||(e[t]={});return s[n]||(s[n]={})}function yh(e,t,n,s){for(const i of t.getMatchingVisibleMetas(s).reverse()){const r=e[i.index];if(n&&r>0||!n&&r<0)return i.index}return null}function xh(e,t){const{chart:n,_cachedMeta:s}=e,i=n._stacks||(n._stacks={}),{iScale:r,vScale:o,index:a}=s,l=r.axis,c=o.axis,u=O_(r,o,s),h=t.length;let d;for(let f=0;f<h;++f){const m=t[f],{[l]:p,[c]:b}=m,y=m._stacks||(m._stacks={});d=y[c]=C_(i,u,p),d[a]=b,d._top=yh(d,o,!0,s.type),d._bottom=yh(d,o,!1,s.type);const x=d._visualValues||(d._visualValues={});x[a]=b}}function Fa(e,t){const n=e.scales;return Object.keys(n).filter(s=>n[s].axis===t).shift()}function D_(e,t){return bn(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function A_(e,t,n){return bn(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function gi(e,t){const n=e.controller.index,s=e.vScale&&e.vScale.axis;if(s){t=t||e._parsed;for(const i of t){const r=i._stacks;if(!r||r[s]===void 0||r[s][n]===void 0)return;delete r[s][n],r[s]._visualValues!==void 0&&r[s]._visualValues[n]!==void 0&&delete r[s]._visualValues[n]}}}const za=e=>e==="reset"||e==="none",vh=(e,t)=>t?e:Object.assign({},e),I_=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:gh(n,!0),values:null};class Se{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=_h(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&gi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,s=this.getDataset(),i=(h,d,f,m)=>h==="x"?d:h==="r"?m:f,r=n.xAxisID=J(s.xAxisID,Fa(t,"x")),o=n.yAxisID=J(s.yAxisID,Fa(t,"y")),a=n.rAxisID=J(s.rAxisID,Fa(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,r,o,a),u=n.vAxisID=i(l,o,r,a);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Nu(this._data,this),t._stacked&&gi(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),s=this._data;if(nt(n))this._data=E_(n);else if(s!==n){if(s){Nu(s,this);const i=this._cachedMeta;gi(i),i._parsed=[]}n&&Object.isExtensible(n)&&bb(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,s=this.getDataset();let i=!1;this._dataCheck();const r=n._stacked;n._stacked=_h(n.vScale,n),n.stack!==s.stack&&(i=!0,gi(n),n.stack=s.stack),this._resyncElements(t),(i||r!==n._stacked)&&xh(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:s,_data:i}=this,{iScale:r,_stacked:o}=s,a=r.axis;let l=t===0&&n===i.length?!0:s._sorted,c=t>0&&s._parsed[t-1],u,h,d;if(this._parsing===!1)s._parsed=i,s._sorted=!0,d=i;else{gt(i[t])?d=this.parseArrayData(s,i,t,n):nt(i[t])?d=this.parseObjectData(s,i,t,n):d=this.parsePrimitiveData(s,i,t,n);const f=()=>h[a]===null||c&&h[a]<c[a];for(u=0;u<n;++u)s._parsed[u+t]=h=d[u],l&&(f()&&(l=!1),c=h);s._sorted=l}o&&xh(this,d)}parsePrimitiveData(t,n,s,i){const{iScale:r,vScale:o}=t,a=r.axis,l=o.axis,c=r.getLabels(),u=r===o,h=new Array(i);let d,f,m;for(d=0,f=i;d<f;++d)m=d+s,h[d]={[a]:u||r.parse(c[m],m),[l]:o.parse(n[m],m)};return h}parseArrayData(t,n,s,i){const{xScale:r,yScale:o}=t,a=new Array(i);let l,c,u,h;for(l=0,c=i;l<c;++l)u=l+s,h=n[u],a[l]={x:r.parse(h[0],u),y:o.parse(h[1],u)};return a}parseObjectData(t,n,s,i){const{xScale:r,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,h,d,f;for(u=0,h=i;u<h;++u)d=u+s,f=n[d],c[u]={x:r.parse(mn(f,a),d),y:o.parse(mn(f,l),d)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,s){const i=this.chart,r=this._cachedMeta,o=n[t.axis],a={keys:gh(i,!0),values:n._stacks[t.axis]._visualValues};return bh(a,o,r.index,{mode:s})}updateRangeFromParsed(t,n,s,i){const r=s[n.axis];let o=r===null?NaN:r;const a=i&&s._stacks[n.axis];i&&a&&(i.values=a,o=bh(i,r,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const s=this._cachedMeta,i=s._parsed,r=s._sorted&&t===s.iScale,o=i.length,a=this._getOtherScale(t),l=I_(n,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=k_(a);let d,f;function m(){f=i[d];const p=f[a.axis];return!vt(f[t.axis])||u>p||h<p}for(d=0;d<o&&!(!m()&&(this.updateRangeFromParsed(c,t,f,l),r));++d);if(r){for(d=o-1;d>=0;--d)if(!m()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,s=[];let i,r,o;for(i=0,r=n.length;i<r;++i)o=n[i][t.axis],vt(o)&&s.push(o);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,s=n.iScale,i=n.vScale,r=this.getParsed(t);return{label:s?""+s.getLabelForValue(r[s.axis]):"",value:i?""+i.getLabelForValue(r[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=T_(J(this.options.clip,M_(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,s=this._cachedMeta,i=s.data||[],r=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(s.dataset&&s.dataset.draw(t,r,a,l),u=a;u<a+l;++u){const h=i[u];h.hidden||(h.active&&c?o.push(h):h.draw(t,r))}for(u=0;u<o.length;++u)o[u].draw(t,r)}getStyle(t,n){const s=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,n,s){const i=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];r=o.$context||(o.$context=A_(this.getContext(),t,o)),r.parsed=this.getParsed(t),r.raw=i.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=D_(this.chart.getContext(),this.index)),r.dataset=i,r.index=r.datasetIndex=this.index;return r.active=!!n,r.mode=s,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",s){const i=n==="active",r=this._cachedDataOpts,o=t+"-"+n,a=r[o],l=this.enableOptionSharing&&de(s);if(a)return vh(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),h=i?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(this.getDataset(),u),f=Object.keys(Tt.elements[t]),m=()=>this.getContext(s,i,n),p=c.resolveNamedOptions(d,f,m,h);return p.$shared&&(p.$shared=l,r[o]=Object.freeze(vh(p,l))),p}_resolveAnimations(t,n,s){const i=this.chart,r=this._cachedDataOpts,o=`animation-${n}`,a=r[o];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,n),d=u.getOptionScopes(this.getDataset(),h);l=u.createResolver(d,this.getContext(t,s,n))}const c=new mh(i,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||za(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const s=this.resolveDataElementOptions(t,n),i=this._sharedOptions,r=this.getSharedOptions(s),o=this.includeOptions(n,r)||r!==i;return this.updateSharedOptions(r,n,s),{sharedOptions:r,includeOptions:o}}updateElement(t,n,s,i){za(i)?Object.assign(t,s):this._resolveAnimations(n,i).update(t,s)}updateSharedOptions(t,n,s){t&&!za(n)&&this._resolveAnimations(void 0,n).update(t,s)}_setStyle(t,n,s,i){t.active=i;const r=this.getStyle(n,i);this._resolveAnimations(n,s,i).update(t,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(t,n,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,n,s){this._setStyle(t,s,"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 n=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=s.length,r=n.length,o=Math.min(r,i);o&&this.parse(0,o),r>i?this._insertElements(i,r-i,t):r<i&&this._removeElements(r,i-r)}_insertElements(t,n,s=!0){const i=this._cachedMeta,r=i.data,o=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(r),a=t;a<o;++a)r[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),s&&this.updateElements(r,t,n,"reset")}updateElements(t,n,s,i){}_removeElements(t,n){const s=this._cachedMeta;if(this._parsing){const i=s._parsed.splice(t,n);s._stacked&&gi(s,i)}s.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,s,i]=t;this[n](s,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}R(Se,"defaults",{}),R(Se,"datasetElementType",null),R(Se,"dataElementType",null);function P_(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let s=[];for(let i=0,r=n.length;i<r;i++)s=s.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Lu(s.sort((i,r)=>i-r))}return e._cache.$bar}function N_(e){const t=e.iScale,n=P_(t,e.type);let s=t._length,i,r,o,a;const l=()=>{o===32767||o===-32768||(de(a)&&(s=Math.min(s,Math.abs(o-a)||s)),a=o)};for(i=0,r=n.length;i<r;++i)o=t.getPixelForValue(n[i]),l();for(a=void 0,i=0,r=t.ticks.length;i<r;++i)o=t.getPixelForTick(i),l();return s}function L_(e,t,n,s){const i=n.barThickness;let r,o;return rt(i)?(r=t.min*n.categoryPercentage,o=n.barPercentage):(r=i*s,o=1),{chunk:r/s,ratio:o,start:t.pixels[e]-r/2}}function R_(e,t,n,s){const i=t.pixels,r=i[e];let o=e>0?i[e-1]:null,a=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;o===null&&(o=r-(a===null?t.end-t.start:a-r)),a===null&&(a=r+r-o);const c=r-(r-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/s,ratio:n.barPercentage,start:c}}function F_(e,t,n,s){const i=n.parse(e[0],s),r=n.parse(e[1],s),o=Math.min(i,r),a=Math.max(i,r);let l=o,c=a;Math.abs(o)>Math.abs(a)&&(l=a,c=o),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:r,min:o,max:a}}function Sh(e,t,n,s){return gt(e)?F_(e,t,n,s):t[n.axis]=n.parse(e,s),t}function wh(e,t,n,s){const i=e.iScale,r=e.vScale,o=i.getLabels(),a=i===r,l=[];let c,u,h,d;for(c=n,u=n+s;c<u;++c)d=t[c],h={},h[i.axis]=a||i.parse(o[c],c),l.push(Sh(d,h,r,c));return l}function Va(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function z_(e,t,n){return e!==0?Ne(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function V_(e){let t,n,s,i,r;return e.horizontal?(t=e.base>e.x,n="left",s="right"):(t=e.base<e.y,n="bottom",s="top"),t?(i="end",r="start"):(i="start",r="end"),{start:n,end:s,reverse:t,top:i,bottom:r}}function B_(e,t,n,s){let i=t.borderSkipped;const r={};if(!i){e.borderSkipped=r;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:c,bottom:u}=V_(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===s?i=c:(n._bottom||0)===s?i=u:(r[Mh(u,o,a,l)]=!0,i=c)),r[Mh(i,o,a,l)]=!0,e.borderSkipped=r}function Mh(e,t,n,s){return s?(e=H_(e,t,n),e=Th(e,n,t)):e=Th(e,t,n),e}function H_(e,t,n){return e===t?n:e===n?t:e}function Th(e,t,n){return e==="start"?t:e==="end"?n:e}function W_(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class _n extends Se{parsePrimitiveData(t,n,s,i){return wh(t,n,s,i)}parseArrayData(t,n,s,i){return wh(t,n,s,i)}parseObjectData(t,n,s,i){const{iScale:r,vScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=r.axis==="x"?a:l,u=o.axis==="x"?a:l,h=[];let d,f,m,p;for(d=s,f=s+i;d<f;++d)p=n[d],m={},m[r.axis]=r.parse(mn(p,c),d),h.push(Sh(mn(p,u),m,o,d));return h}updateRangeFromParsed(t,n,s,i){super.updateRangeFromParsed(t,n,s,i);const r=s._custom;r&&n===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 n=this._cachedMeta,{iScale:s,vScale:i}=n,r=this.getParsed(t),o=r._custom,a=Va(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(r[i.axis]);return{label:""+s.getLabelForValue(r[s.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,s,i){const r=i==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:h,includeOptions:d}=this._getSharedOptions(n,i);for(let f=n;f<n+s;f++){const m=this.getParsed(f),p=r||rt(m[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),b=this._calculateBarIndexPixels(f,u),y=(m._stacks||{})[a.axis],x={horizontal:c,base:p.base,enableBorderRadius:!y||Va(m._custom)||o===y._top||o===y._bottom,x:c?p.head:b.center,y:c?b.center:p.head,height:c?b.size:Math.abs(p.size),width:c?Math.abs(p.size):b.size};d&&(x.options=h||this.resolveDataElementOptions(f,t[f].active?"active":i));const w=x.options||t[f].options;B_(x,w,y,o),W_(x,w,u.ratio),this.updateElement(t[f],f,x,i)}}_getStacks(t,n){const{iScale:s}=this._cachedMeta,i=s.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),r=s.options.stacked,o=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(rt(u)||isNaN(u))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((r===!1||o.indexOf(l.stack)===-1||r===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,s){const i=this._getStacks(t,s),r=n!==void 0?i.indexOf(n):-1;return r===-1?i.length-1:r}_getRuler(){const t=this.options,n=this._cachedMeta,s=n.iScale,i=[];let r,o;for(r=0,o=n.data.length;r<o;++r)i.push(s.getPixelForValue(this.getParsed(r)[s.axis],r));const a=t.barThickness;return{min:a||N_(n),pixels:i,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:s,index:i},options:{base:r,minBarLength:o}}=this,a=r||0,l=this.getParsed(t),c=l._custom,u=Va(c);let h=l[n.axis],d=0,f=s?this.applyStack(n,l,s):h,m,p;f!==h&&(d=f-h,f=h),u&&(h=c.barStart,f=c.barEnd-c.barStart,h!==0&&Ne(h)!==Ne(c.barEnd)&&(d=0),d+=h);const b=!rt(r)&&!u?r:d;let y=n.getPixelForValue(b);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(d+f):m=y,p=m-y,Math.abs(p)<o){p=z_(p,n,a)*o,h===a&&(y-=p/2);const x=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),v=Math.min(x,w),S=Math.max(x,w);y=Math.max(Math.min(y,S),v),m=y+p,s&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(y))}if(y===n.getPixelForValue(a)){const x=Ne(p)*n.getLineWidthForValue(a)/2;y+=x,p-=x}return{size:p,base:y,head:m,center:m+p/2}}_calculateBarIndexPixels(t,n){const s=n.scale,i=this.options,r=i.skipNull,o=J(i.maxBarThickness,1/0);let a,l;if(n.grouped){const c=r?this._getStackCount(t):n.stackCount,u=i.barThickness==="flex"?R_(t,n,i,c):L_(t,n,i,c),h=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0);a=u.start+u.chunk*h+u.chunk/2,l=Math.min(o,u.chunk*u.ratio)}else a=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,s=t.data,i=s.length;let r=0;for(;r<i;++r)this.getParsed(r)[n.axis]!==null&&s[r].draw(this._ctx)}}R(_n,"id","bar"),R(_n,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),R(_n,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Fr extends Se{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,s,i){const r=super.parsePrimitiveData(t,n,s,i);for(let o=0;o<r.length;o++)r[o]._custom=this.resolveDataElementOptions(o+s).radius;return r}parseArrayData(t,n,s,i){const r=super.parseArrayData(t,n,s,i);for(let o=0;o<r.length;o++){const a=n[s+o];r[o]._custom=J(a[2],this.resolveDataElementOptions(o+s).radius)}return r}parseObjectData(t,n,s,i){const r=super.parseObjectData(t,n,s,i);for(let o=0;o<r.length;o++){const a=n[s+o];r[o]._custom=J(a&&a.r&&+a.r,this.resolveDataElementOptions(o+s).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let s=t.length-1;s>=0;--s)n=Math.max(n,t[s].size(this.resolveDataElementOptions(s))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:i,yScale:r}=n,o=this.getParsed(t),a=i.getLabelForValue(o.x),l=r.getLabelForValue(o.y),c=o._custom;return{label:s[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,s,i){const r=i==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),u=o.axis,h=a.axis;for(let d=n;d<n+s;d++){const f=t[d],m=!r&&this.getParsed(d),p={},b=p[u]=r?o.getPixelForDecimal(.5):o.getPixelForValue(m[u]),y=p[h]=r?a.getBasePixel():a.getPixelForValue(m[h]);p.skip=isNaN(b)||isNaN(y),c&&(p.options=l||this.resolveDataElementOptions(d,f.active?"active":i),r&&(p.options.radius=0)),this.updateElement(f,d,p,i)}}resolveDataElementOptions(t,n){const s=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const r=i.radius;return n!=="active"&&(i.radius=0),i.radius+=J(s&&s._custom,r),i}}R(Fr,"id","bubble"),R(Fr,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),R(Fr,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function $_(e,t,n){let s=1,i=1,r=0,o=0;if(t<bt){const a=e,l=a+t,c=Math.cos(a),u=Math.sin(a),h=Math.cos(l),d=Math.sin(l),f=(w,v,S)=>ci(w,a,l,!0)?1:Math.max(v,v*n,S,S*n),m=(w,v,S)=>ci(w,a,l,!0)?-1:Math.min(v,v*n,S,S*n),p=f(0,c,h),b=f(St,u,d),y=m(yt,c,h),x=m(yt+St,u,d);s=(p-y)/2,i=(b-x)/2,r=-(p+y)/2,o=-(b+x)/2}return{ratioX:s,ratioY:i,offsetX:r,offsetY:o}}class Xn extends Se{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const s=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=s;else{let r=l=>+s[l];if(nt(s[t])){const{key:l="value"}=this._parsing;r=c=>+mn(s[c],l)}let o,a;for(o=t,a=t+n;o<a;++o)i._parsed[o]=r(o)}}_getRotation(){return ve(this.options.rotation-90)}_getCircumference(){return ve(this.options.circumference)}_getRotationExtents(){let t=bt,n=-bt;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const i=this.chart.getDatasetMeta(s).controller,r=i._getRotation(),o=i._getCircumference();t=Math.min(t,r),n=Math.max(n,r+o)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:s}=n,i=this._cachedMeta,r=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,a=Math.max((Math.min(s.width,s.height)-o)/2,0),l=Math.min(sb(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:d,ratioY:f,offsetX:m,offsetY:p}=$_(h,u,l),b=(s.width-o)/d,y=(s.height-o)/f,x=Math.max(Math.min(b,y)/2,0),w=Mu(this.options.radius,x),v=Math.max(w*l,0),S=(w-v)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=p*w,i.total=this.calculateTotal(),this.outerRadius=w-S*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-S*c,0),this.updateElements(r,0,r.length,t)}_circumference(t,n){const s=this.options,i=this._cachedMeta,r=this._getCircumference();return n&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*r/bt)}updateElements(t,n,s,i){const r=i==="reset",o=this.chart,a=o.chartArea,c=o.options.animation,u=(a.left+a.right)/2,h=(a.top+a.bottom)/2,d=r&&c.animateScale,f=d?0:this.innerRadius,m=d?0:this.outerRadius,{sharedOptions:p,includeOptions:b}=this._getSharedOptions(n,i);let y=this._getRotation(),x;for(x=0;x<n;++x)y+=this._circumference(x,r);for(x=n;x<n+s;++x){const w=this._circumference(x,r),v=t[x],S={x:u+this.offsetX,y:h+this.offsetY,startAngle:y,endAngle:y+w,circumference:w,outerRadius:m,innerRadius:f};b&&(S.options=p||this.resolveDataElementOptions(x,v.active?"active":i)),y+=w,this.updateElement(v,x,S,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let s=0,i;for(i=0;i<n.length;i++){const r=t._parsed[i];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(s+=Math.abs(r))}return s}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?bt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],r=hi(n._parsed[t],s.options.locale);return{label:i[t]||"",value:r}}getMaxBorderWidth(t){let n=0;const s=this.chart;let i,r,o,a,l;if(!t){for(i=0,r=s.data.datasets.length;i<r;++i)if(s.isDatasetVisible(i)){o=s.getDatasetMeta(i),t=o.data,a=o.controller;break}}if(!t)return 0;for(i=0,r=t.length;i<r;++i)l=a.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let s=0,i=t.length;s<i;++s){const r=this.resolveDataElementOptions(s);n=Math.max(n,r.offset||0,r.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(n+=this._getRingWeight(s));return n}_getRingWeight(t){return Math.max(J(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}R(Xn,"id","doughnut"),R(Xn,"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"}),R(Xn,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"}),R(Xn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=t.legend.options;return n.labels.map((r,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}}});class qe extends Se{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:s,data:i=[],_dataset:r}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=zu(n,i,o);this._drawStart=a,this._drawCount=l,Vu(n)&&(a=0,l=i.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!r._decimated,s.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!o,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,s,i){const r=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(n,i),d=o.axis,f=a.axis,{spanGaps:m,segment:p}=this.options,b=xs(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||i==="none",x=n+s,w=t.length;let v=n>0&&this.getParsed(n-1);for(let S=0;S<w;++S){const C=t[S],D=y?C:{};if(S<n||S>=x){D.skip=!0;continue}const T=this.getParsed(S),L=rt(T[f]),V=D[d]=o.getPixelForValue(T[d],S),$=D[f]=r||L?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,T,l):T[f],S);D.skip=isNaN(V)||isNaN($)||L,D.stop=S>0&&Math.abs(T[d]-v[d])>b,p&&(D.parsed=T,D.raw=c.data[S]),h&&(D.options=u||this.resolveDataElementOptions(S,C.active?"active":i)),y||this.updateElement(C,S,D,i),v=T}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,s=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return s;const r=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}R(qe,"id","line"),R(qe,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),R(qe,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Le extends Se{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],r=hi(n._parsed[t].r,s.options.locale);return{label:i[t]||"",value:r}}parseObjectData(t,n,s,i){return th.bind(this)(t,n,s,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,i)=>{const r=this.getParsed(i).r;!isNaN(r)&&this.chart.getDataVisibility(i)&&(r<n.min&&(n.min=r),r>n.max&&(n.max=r))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,s=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(i/2,0),o=Math.max(s.cutoutPercentage?r/100*s.cutoutPercentage:1,0),a=(r-o)/t.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,s,i){const r=i==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,h=c.yCenter,d=c.getIndexAngle(0)-.5*yt;let f=d,m;const p=360/this.countVisibleElements();for(m=0;m<n;++m)f+=this._computeAngle(m,i,p);for(m=n;m<n+s;m++){const b=t[m];let y=f,x=f+this._computeAngle(m,i,p),w=o.getDataVisibility(m)?c.getDistanceFromCenterForValue(this.getParsed(m).r):0;f=x,r&&(l.animateScale&&(w=0),l.animateRotate&&(y=x=d));const v={x:u,y:h,innerRadius:0,outerRadius:w,startAngle:y,endAngle:x,options:this.resolveDataElementOptions(m,b.active?"active":i)};this.updateElement(b,m,v,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((s,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,s){return this.chart.getDataVisibility(t)?ve(this.resolveDataElementOptions(t,n).angle||s):0}}R(Le,"id","polarArea"),R(Le,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),R(Le,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=t.legend.options;return n.labels.map((r,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Ba extends Xn{}R(Ba,"id","pie"),R(Ba,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class zr extends Se{getLabelAndValue(t){const n=this._cachedMeta.vScale,s=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(s[n.axis])}}parseObjectData(t,n,s,i){return th.bind(this)(t,n,s,i)}update(t){const n=this._cachedMeta,s=n.dataset,i=n.data||[],r=n.iScale.getLabels();if(s.points=i,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:r.length===i.length,options:o};this.updateElement(s,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,s,i){const r=this._cachedMeta.rScale,o=i==="reset";for(let a=n;a<n+s;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":i),u=r.getPointPositionForValue(a,this.getParsed(a).r),h=o?r.xCenter:u.x,d=o?r.yCenter:u.y,f={x:h,y:d,angle:u.angle,skip:isNaN(h)||isNaN(d),options:c};this.updateElement(l,a,f,i)}}}R(zr,"id","radar"),R(zr,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),R(zr,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Zn extends Se{getLabelAndValue(t){const n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:i,yScale:r}=n,o=this.getParsed(t),a=i.getLabelForValue(o.x),l=r.getLabelForValue(o.y);return{label:s[t]||"",value:"("+a+", "+l+")"}}update(t){const n=this._cachedMeta,{data:s=[]}=n,i=this.chart._animationsDisabled;let{start:r,count:o}=zu(n,s,i);if(this._drawStart=r,this._drawCount=o,Vu(n)&&(r=0,o=s.length),this.options.showLine){const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=s;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},t)}this.updateElements(s,r,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,s,i){const r=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),h=this.getSharedOptions(u),d=this.includeOptions(i,h),f=o.axis,m=a.axis,{spanGaps:p,segment:b}=this.options,y=xs(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||r||i==="none";let w=n>0&&this.getParsed(n-1);for(let v=n;v<n+s;++v){const S=t[v],C=this.getParsed(v),D=x?S:{},T=rt(C[m]),L=D[f]=o.getPixelForValue(C[f],v),V=D[m]=r||T?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,C,l):C[m],v);D.skip=isNaN(L)||isNaN(V)||T,D.stop=v>0&&Math.abs(C[f]-w[f])>y,b&&(D.parsed=C,D.raw=c.data[v]),d&&(D.options=h||this.resolveDataElementOptions(v,S.active?"active":i)),x||this.updateElement(S,v,D,i),w=C}this.updateSharedOptions(h,i,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const s=t.dataset,i=s.options&&s.options.borderWidth||0;if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}}R(Zn,"id","scatter"),R(Zn,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),R(Zn,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var j_=Object.freeze({__proto__:null,BarController:_n,BubbleController:Fr,DoughnutController:Xn,LineController:qe,PolarAreaController:Le,PieController:Ba,RadarController:zr,ScatterController:Zn});function qn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ha{static override(t){Object.assign(Ha.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return qn()}parse(){return qn()}format(){return qn()}add(){return qn()}diff(){return qn()}startOf(){return qn()}endOf(){return qn()}}var Eh={_date:Ha};function U_(e,t,n,s){const{controller:i,data:r,_sorted:o}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&o&&r.length){const l=a._reversePixels?pb:Xe;if(s){if(i._sharedOptions){const c=r[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const h=l(r,t,n-u),d=l(r,t,n+u);return{lo:h.lo,hi:d.hi}}}}else return l(r,t,n)}return{lo:0,hi:r.length-1}}function bi(e,t,n,s,i){const r=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=r.length;a<l;++a){const{index:c,data:u}=r[a],{lo:h,hi:d}=U_(r[a],t,o,i);for(let f=h;f<=d;++f){const m=u[f];m.skip||s(m,c,f)}}}function G_(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(s,i){const r=t?Math.abs(s.x-i.x):0,o=n?Math.abs(s.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}function Wa(e,t,n,s,i){const r=[];return!i&&!e.isPointInArea(t)||bi(e,n,t,function(a,l,c){!i&&!fi(a,e.chartArea,0)||a.inRange(t.x,t.y,s)&&r.push({element:a,datasetIndex:l,index:c})},!0),r}function Y_(e,t,n,s){let i=[];function r(o,a,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],s),{angle:h}=Iu(o,{x:t.x,y:t.y});ci(h,c,u)&&i.push({element:o,datasetIndex:a,index:l})}return bi(e,n,t,r),i}function K_(e,t,n,s,i,r){let o=[];const a=G_(n);let l=Number.POSITIVE_INFINITY;function c(u,h,d){const f=u.inRange(t.x,t.y,i);if(s&&!f)return;const m=u.getCenterPoint(i);if(!(!!r||e.isPointInArea(m))&&!f)return;const b=a(t,m);b<l?(o=[{element:u,datasetIndex:h,index:d}],l=b):b===l&&o.push({element:u,datasetIndex:h,index:d})}return bi(e,n,t,c),o}function $a(e,t,n,s,i,r){return!r&&!e.isPointInArea(t)?[]:n==="r"&&!s?Y_(e,t,n,i):K_(e,t,n,s,i,r)}function Oh(e,t,n,s,i){const r=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return bi(e,n,t,(l,c,u)=>{l[o](t[n],i)&&(r.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),s&&!a?[]:r}var X_={evaluateInteractionItems:bi,modes:{index(e,t,n,s){const i=Yn(t,e),r=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Wa(e,i,r,s,o):$a(e,i,r,!1,s,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,h=c.data[u];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,s){const i=Yn(t,e),r=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Wa(e,i,r,s,o):$a(e,i,r,!1,s,o);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,s){const i=Yn(t,e),r=n.axis||"xy",o=n.includeInvisible||!1;return Wa(e,i,r,s,o)},nearest(e,t,n,s){const i=Yn(t,e),r=n.axis||"xy",o=n.includeInvisible||!1;return $a(e,i,r,n.intersect,s,o)},x(e,t,n,s){const i=Yn(t,e);return Oh(e,i,"x",n.intersect,s)},y(e,t,n,s){const i=Yn(t,e);return Oh(e,i,"y",n.intersect,s)}}};const kh=["left","top","right","bottom"];function _i(e,t){return e.filter(n=>n.pos===t)}function Ch(e,t){return e.filter(n=>kh.indexOf(n.pos)===-1&&n.box.axis===t)}function yi(e,t){return e.sort((n,s)=>{const i=t?s:n,r=t?n:s;return i.weight===r.weight?i.index-r.index:i.weight-r.weight})}function Z_(e){const t=[];let n,s,i,r,o,a;for(n=0,s=(e||[]).length;n<s;++n)i=e[n],{position:r,options:{stack:o,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:r,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&r+o,stackWeight:a});return t}function q_(e){const t={};for(const n of e){const{stack:s,pos:i,stackWeight:r}=n;if(!s||!kh.includes(i))continue;const o=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return t}function J_(e,t){const n=q_(e),{vBoxMaxWidth:s,hBoxMaxHeight:i}=t;let r,o,a;for(r=0,o=e.length;r<o;++r){a=e[r];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*s:l&&t.availableWidth,a.height=i):(a.width=s,a.height=u?u*i:l&&t.availableHeight)}return n}function Q_(e){const t=Z_(e),n=yi(t.filter(c=>c.box.fullSize),!0),s=yi(_i(t,"left"),!0),i=yi(_i(t,"right")),r=yi(_i(t,"top"),!0),o=yi(_i(t,"bottom")),a=Ch(t,"x"),l=Ch(t,"y");return{fullSize:n,leftAndTop:s.concat(r),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:_i(t,"chartArea"),vertical:s.concat(i).concat(l),horizontal:r.concat(o).concat(a)}}function Dh(e,t,n,s){return Math.max(e[n],t[n])+Math.max(e[s],t[s])}function Ah(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 ty(e,t,n,s){const{pos:i,box:r}=n,o=e.maxPadding;if(!nt(i)){n.size&&(e[i]-=n.size);const h=s[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?r.height:r.width),n.size=h.size/h.count,e[i]+=n.size}r.getPadding&&Ah(o,r.getPadding());const a=Math.max(0,t.outerWidth-Dh(o,e,"left","right")),l=Math.max(0,t.outerHeight-Dh(o,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function ey(e){const t=e.maxPadding;function n(s){const i=Math.max(t[s]-e[s],0);return e[s]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function ny(e,t){const n=t.maxPadding;function s(i){const r={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{r[o]=Math.max(t[o],n[o])}),r}return s(e?["left","right"]:["top","bottom"])}function xi(e,t,n,s){const i=[];let r,o,a,l,c,u;for(r=0,o=e.length,c=0;r<o;++r){a=e[r],l=a.box,l.update(a.width||t.w,a.height||t.h,ny(a.horizontal,t));const{same:h,other:d}=ty(t,n,a,s);c|=h&&i.length,u=u||d,l.fullSize||i.push(a)}return c&&xi(i,t,n,s)||u}function Vr(e,t,n,s,i){e.top=n,e.left=t,e.right=t+s,e.bottom=n+i,e.width=s,e.height=i}function Ih(e,t,n,s){const i=n.padding;let{x:r,y:o}=t;for(const a of e){const l=a.box,c=s[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const h=t.w*u,d=c.size||l.height;de(c.start)&&(o=c.start),l.fullSize?Vr(l,i.left,o,n.outerWidth-i.right-i.left,d):Vr(l,t.left+c.placed,o,h,d),c.start=o,c.placed+=h,o=l.bottom}else{const h=t.h*u,d=c.size||l.width;de(c.start)&&(r=c.start),l.fullSize?Vr(l,r,i.top,d,n.outerHeight-i.bottom-i.top):Vr(l,r,t.top+c.placed,d,h),c.start=r,c.placed+=h,r=l.right}}t.x=r,t.y=o}var Ft={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(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,s){if(!e)return;const i=Rt(e.options.layout.padding),r=Math.max(t-i.width,0),o=Math.max(n-i.height,0),a=Q_(e.boxes),l=a.vertical,c=a.horizontal;lt(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,b)=>b.box.options&&b.box.options.display===!1?p:p+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/u,hBoxMaxHeight:o/2}),d=Object.assign({},i);Ah(d,Rt(s));const f=Object.assign({maxPadding:d,w:r,h:o,x:i.left,y:i.top},i),m=J_(l.concat(c),h);xi(a.fullSize,f,h,m),xi(l,f,h,m),xi(c,f,h,m)&&xi(l,f,h,m),ey(f),Ih(a.leftAndTop,f,h,m),f.x+=f.w,f.y+=f.h,Ih(a.rightAndBottom,f,h,m),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(a.chartArea,p=>{const b=p.box;Object.assign(b,e.chartArea),b.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Ph{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,s){}removeEventListener(t,n,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,s,i){return n=Math.max(0,n||t.width),s=s||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):s)}}isAttached(t){return!0}updateConfig(t){}}class sy extends Ph{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Br="$chartjs",iy={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Nh=e=>e===null||e==="";function ry(e,t){const n=e.style,s=e.getAttribute("height"),i=e.getAttribute("width");if(e[Br]={initial:{height:s,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Nh(i)){const r=ih(e,"width");r!==void 0&&(e.width=r)}if(Nh(s))if(e.style.height==="")e.height=e.width/(t||2);else{const r=ih(e,"height");r!==void 0&&(e.height=r)}return e}const Lh=l_?{passive:!0}:!1;function oy(e,t,n){e.addEventListener(t,n,Lh)}function ay(e,t,n){e.canvas.removeEventListener(t,n,Lh)}function ly(e,t){const n=iy[e.type]||e.type,{x:s,y:i}=Yn(e,t);return{type:n,chart:t,native:e,x:s!==void 0?s:null,y:i!==void 0?i:null}}function Hr(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function cy(e,t,n){const s=e.canvas,i=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Hr(a.addedNodes,s),o=o&&!Hr(a.removedNodes,s);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function uy(e,t,n){const s=e.canvas,i=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Hr(a.removedNodes,s),o=o&&!Hr(a.addedNodes,s);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const vi=new Map;let Rh=0;function Fh(){const e=window.devicePixelRatio;e!==Rh&&(Rh=e,vi.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function hy(e,t){vi.size||window.addEventListener("resize",Fh),vi.set(e,t)}function dy(e){vi.delete(e),vi.size||window.removeEventListener("resize",Fh)}function fy(e,t,n){const s=e.canvas,i=s&&Ra(s);if(!i)return;const r=Fu((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||r(c,u)});return o.observe(i),hy(e,r),o}function ja(e,t,n){n&&n.disconnect(),t==="resize"&&dy(e)}function my(e,t,n){const s=e.canvas,i=Fu(r=>{e.ctx!==null&&n(ly(r,e))},e);return oy(s,t,i),i}class py extends Ph{acquireContext(t,n){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(ry(t,n),s):null}releaseContext(t){const n=t.canvas;if(!n[Br])return!1;const s=n[Br].initial;["height","width"].forEach(r=>{const o=s[r];rt(o)?n.removeAttribute(r):n.setAttribute(r,o)});const i=s.style||{};return Object.keys(i).forEach(r=>{n.style[r]=i[r]}),n.width=n.width,delete n[Br],!0}addEventListener(t,n,s){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:cy,detach:uy,resize:fy}[n]||my;i[n]=o(t,n,s)}removeEventListener(t,n){const s=t.$proxies||(t.$proxies={}),i=s[n];if(!i)return;({attach:ja,detach:ja,resize:ja}[n]||ay)(t,n,i),s[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,s,i){return a_(t,n,s,i)}isAttached(t){const n=Ra(t);return!!(n&&n.isConnected)}}function gy(e){return!nh()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?sy:py}class we{constructor(){R(this,"active",!1)}tooltipPosition(t){const{x:n,y:s}=this.getProps(["x","y"],t);return{x:n,y:s}}hasValue(){return xs(this.x)&&xs(this.y)}getProps(t,n){const s=this.$animations;if(!n||!s)return this;const i={};return t.forEach(r=>{i[r]=s[r]&&s[r].active()?s[r]._to:this[r]}),i}}R(we,"defaults",{}),R(we,"defaultRoutes");function by(e,t){const n=e.options.ticks,s=_y(e),i=Math.min(n.maxTicksLimit||s,s),r=n.major.enabled?xy(t):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>i)return vy(t,c,r,o/i),c;const u=yy(r,t,i);if(o>0){let h,d;const f=o>1?Math.round((l-a)/(o-1)):null;for(Wr(t,c,u,rt(f)?0:a-f,a),h=0,d=o-1;h<d;h++)Wr(t,c,u,r[h],r[h+1]);return Wr(t,c,u,l,rt(f)?t.length:l+f),c}return Wr(t,c,u),c}function _y(e){const t=e.options.offset,n=e._tickSize(),s=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(s,i))}function yy(e,t,n){const s=Sy(e),i=t.length/n;if(!s)return Math.max(i,1);const r=hb(s);for(let o=0,a=r.length-1;o<a;o++){const l=r[o];if(l>i)return l}return Math.max(i,1)}function xy(e){const t=[];let n,s;for(n=0,s=e.length;n<s;n++)e[n].major&&t.push(n);return t}function vy(e,t,n,s){let i=0,r=n[0],o;for(s=Math.ceil(s),o=0;o<e.length;o++)o===r&&(t.push(e[o]),i++,r=n[i*s])}function Wr(e,t,n,s,i){const r=J(s,0),o=Math.min(J(i,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-s,n=l/Math.floor(l/n)),u=r;u<0;)a++,u=Math.round(r+a*n);for(c=Math.max(r,0);c<o;c++)c===u&&(t.push(e[c]),a++,u=Math.round(r+a*n))}function Sy(e){const t=e.length;let n,s;if(t<2)return!1;for(s=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==s)return!1;return s}const wy=e=>e==="left"?"right":e==="right"?"left":e,zh=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Vh=(e,t)=>Math.min(t||e,e);function Bh(e,t){const n=[],s=e.length/t,i=e.length;let r=0;for(;r<i;r+=s)n.push(e[Math.floor(r)]);return n}function My(e,t,n){const s=e.ticks.length,i=Math.min(t,s-1),r=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(s===1?c=Math.max(l-r,o-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<r-a||l>o+a)))return l}function Ty(e,t){lt(e,n=>{const s=n.gc,i=s.length/2;let r;if(i>t){for(r=0;r<i;++r)delete n.data[s[r]];s.splice(0,i)}})}function Si(e){return e.drawTicks?e.tickLength:0}function Hh(e,t){if(!e.display)return 0;const n=At(e.font,t),s=Rt(e.padding);return(gt(e.text)?e.text.length:1)*n.lineHeight+s.height}function Ey(e,t){return bn(e,{scale:t,type:"scale"})}function Oy(e,t,n){return bn(e,{tick:n,index:t,type:"tick"})}function ky(e,t,n){let s=Oa(e);return(n&&t!=="right"||!n&&t==="right")&&(s=wy(s)),s}function Cy(e,t,n,s){const{top:i,left:r,bottom:o,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let h=0,d,f,m;const p=o-i,b=a-r;if(e.isHorizontal()){if(f=Lt(s,r,a),nt(n)){const y=Object.keys(n)[0],x=n[y];m=u[y].getPixelForValue(x)+p-t}else n==="center"?m=(c.bottom+c.top)/2+p-t:m=zh(e,n,t);d=a-r}else{if(nt(n)){const y=Object.keys(n)[0],x=n[y];f=u[y].getPixelForValue(x)-b+t}else n==="center"?f=(c.left+c.right)/2-b+t:f=zh(e,n,t);m=Lt(s,o,i),h=n==="left"?-St:St}return{titleX:f,titleY:m,maxWidth:d,rotation:h}}class Jn extends we{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:s,_suggestedMax:i}=this;return t=ne(t,Number.POSITIVE_INFINITY),n=ne(n,Number.NEGATIVE_INFINITY),s=ne(s,Number.POSITIVE_INFINITY),i=ne(i,Number.NEGATIVE_INFINITY),{min:ne(t,s),max:ne(n,i),minDefined:vt(t),maxDefined:vt(n)}}getMinMax(t){let{min:n,max:s,minDefined:i,maxDefined:r}=this.getUserBounds(),o;if(i&&r)return{min:n,max:s};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)o=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),r||(s=Math.max(s,o.max));return n=r&&n>s?s:n,s=i&&n>s?n:s,{min:ne(n,ne(s,n)),max:ne(s,ne(n,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){mt(this.options.beforeUpdate,[this])}update(t,n,s){const{beginAtZero:i,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Vb(this,r,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Bh(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=by(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,n,s;this.isHorizontal()?(n=this.left,s=this.right):(n=this.top,s=this.bottom,t=!t),this._startPixel=n,this._endPixel=s,this._reversePixels=t,this._length=s-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){mt(this.options.afterUpdate,[this])}beforeSetDimensions(){mt(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(){mt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),mt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){mt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let s,i,r;for(s=0,i=t.length;s<i;s++)r=t[s],r.label=mt(n.callback,[r.value,s,t],this)}afterTickToLabelConversion(){mt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){mt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,s=Vh(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,r=n.maxRotation;let o=i,a,l,c;if(!this._isVisible()||!n.display||i>=r||s<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),h=u.widest.width,d=u.highest.height,f=It(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/s:f/(s-1),h+6>a&&(a=f/(s-(t.offset?.5:1)),l=this.maxHeight-Si(t.grid)-n.padding-Hh(t.title,this.chart.options.font),c=Math.sqrt(h*h+d*d),o=Ma(Math.min(Math.asin(It((u.highest.height+6)/a,-1,1)),Math.asin(It(l/c,-1,1))-Math.asin(It(d/c,-1,1)))),o=Math.max(i,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){mt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){mt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:s,title:i,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=Hh(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Si(r)+l):(t.height=this.maxHeight,t.width=Si(r)+l),s.display&&this.ticks.length){const{first:c,last:u,widest:h,highest:d}=this._getLabelSizes(),f=s.padding*2,m=ve(this.labelRotation),p=Math.cos(m),b=Math.sin(m);if(a){const y=s.mirror?0:b*h.width+p*d.height;t.height=Math.min(this.maxHeight,t.height+y+f)}else{const y=s.mirror?0:p*h.width+b*d.height;t.width=Math.min(this.maxWidth,t.width+y+f)}this._calculatePadding(c,u,b,p)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,s,i){const{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,f=0;l?c?(d=i*t.width,f=s*n.height):(d=s*t.height,f=i*n.width):r==="start"?f=n.width:r==="end"?d=t.width:r!=="inner"&&(d=t.width/2,f=n.width/2),this.paddingLeft=Math.max((d-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-h+o)*this.width/(this.width-h),0)}else{let u=n.height/2,h=t.height/2;r==="start"?(u=0,h=t.height):r==="end"&&(u=n.height,h=0),this.paddingTop=u+o,this.paddingBottom=h+o}}_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(){mt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,s;for(n=0,s=t.length;n<s;n++)rt(t[n].label)&&(t.splice(n,1),s--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let s=this.ticks;n<s.length&&(s=Bh(s,n)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,s){const{ctx:i,_longestTextCache:r}=this,o=[],a=[],l=Math.floor(n/Vh(n,s));let c=0,u=0,h,d,f,m,p,b,y,x,w,v,S;for(h=0;h<n;h+=l){if(m=t[h].label,p=this._resolveTickFontOptions(h),i.font=b=p.string,y=r[b]=r[b]||{data:{},gc:[]},x=p.lineHeight,w=v=0,!rt(m)&&!gt(m))w=Dr(i,y.data,y.gc,w,m),v=x;else if(gt(m))for(d=0,f=m.length;d<f;++d)S=m[d],!rt(S)&&!gt(S)&&(w=Dr(i,y.data,y.gc,w,S),v+=x);o.push(w),a.push(v),c=Math.max(w,c),u=Math.max(v,u)}Ty(r,n);const C=o.indexOf(c),D=a.indexOf(u),T=L=>({width:o[L]||0,height:a[L]||0});return{first:T(0),last:T(n-1),widest:T(C),highest:T(D),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return mb(this._alignToPixels?$n(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const s=n[t];return s.$context||(s.$context=Oy(this.getContext(),t,s))}return this.$context||(this.$context=Ey(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=ve(this.labelRotation),s=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),r=this._getLabelSizes(),o=t.autoSkipPadding||0,a=r?r.widest.width+o:0,l=r?r.highest.height+o:0;return this.isHorizontal()?l*s>a*i?a/s:l/i:l*i<a*s?l/s:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,s=this.chart,i=this.options,{grid:r,position:o,border:a}=i,l=r.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),d=Si(r),f=[],m=a.setContext(this.getContext()),p=m.display?m.width:0,b=p/2,y=function(Q){return $n(s,Q,p)};let x,w,v,S,C,D,T,L,V,$,G,ht;if(o==="top")x=y(this.bottom),D=this.bottom-d,L=x-b,$=y(t.top)+b,ht=t.bottom;else if(o==="bottom")x=y(this.top),$=t.top,ht=y(t.bottom)-b,D=x+b,L=this.top+d;else if(o==="left")x=y(this.right),C=this.right-d,T=x-b,V=y(t.left)+b,G=t.right;else if(o==="right")x=y(this.left),V=t.left,G=y(t.right)-b,C=x+b,T=this.left+d;else if(n==="x"){if(o==="center")x=y((t.top+t.bottom)/2+.5);else if(nt(o)){const Q=Object.keys(o)[0],j=o[Q];x=y(this.chart.scales[Q].getPixelForValue(j))}$=t.top,ht=t.bottom,D=x+b,L=D+d}else if(n==="y"){if(o==="center")x=y((t.left+t.right)/2);else if(nt(o)){const Q=Object.keys(o)[0],j=o[Q];x=y(this.chart.scales[Q].getPixelForValue(j))}C=x-b,T=C-d,V=t.left,G=t.right}const Pt=J(i.ticks.maxTicksLimit,h),et=Math.max(1,Math.ceil(h/Pt));for(w=0;w<h;w+=et){const Q=this.getContext(w),j=r.setContext(Q),K=a.setContext(Q),dt=j.lineWidth,Fe=j.color,ze=K.dash||[],ae=K.dashOffset,Qt=j.tickWidth,en=j.tickColor,us=j.tickBorderDash||[],hs=j.tickBorderDashOffset;v=My(this,w,l),v!==void 0&&(S=$n(s,v,dt),c?C=T=V=G=S:D=L=$=ht=S,f.push({tx1:C,ty1:D,tx2:T,ty2:L,x1:V,y1:$,x2:G,y2:ht,width:dt,color:Fe,borderDash:ze,borderDashOffset:ae,tickWidth:Qt,tickColor:en,tickBorderDash:us,tickBorderDashOffset:hs}))}return this._ticksLength=h,this._borderValue=x,f}_computeLabelItems(t){const n=this.axis,s=this.options,{position:i,ticks:r}=s,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:h}=r,d=Si(s.grid),f=d+u,m=h?-u:f,p=-ve(this.labelRotation),b=[];let y,x,w,v,S,C,D,T,L,V,$,G,ht="middle";if(i==="top")C=this.bottom-m,D=this._getXAxisLabelAlignment();else if(i==="bottom")C=this.top+m,D=this._getXAxisLabelAlignment();else if(i==="left"){const et=this._getYAxisLabelAlignment(d);D=et.textAlign,S=et.x}else if(i==="right"){const et=this._getYAxisLabelAlignment(d);D=et.textAlign,S=et.x}else if(n==="x"){if(i==="center")C=(t.top+t.bottom)/2+f;else if(nt(i)){const et=Object.keys(i)[0],Q=i[et];C=this.chart.scales[et].getPixelForValue(Q)+f}D=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")S=(t.left+t.right)/2-f;else if(nt(i)){const et=Object.keys(i)[0],Q=i[et];S=this.chart.scales[et].getPixelForValue(Q)}D=this._getYAxisLabelAlignment(d).textAlign}n==="y"&&(l==="start"?ht="top":l==="end"&&(ht="bottom"));const Pt=this._getLabelSizes();for(y=0,x=a.length;y<x;++y){w=a[y],v=w.label;const et=r.setContext(this.getContext(y));T=this.getPixelForTick(y)+r.labelOffset,L=this._resolveTickFontOptions(y),V=L.lineHeight,$=gt(v)?v.length:1;const Q=$/2,j=et.color,K=et.textStrokeColor,dt=et.textStrokeWidth;let Fe=D;o?(S=T,D==="inner"&&(y===x-1?Fe=this.options.reverse?"left":"right":y===0?Fe=this.options.reverse?"right":"left":Fe="center"),i==="top"?c==="near"||p!==0?G=-$*V+V/2:c==="center"?G=-Pt.highest.height/2-Q*V+V:G=-Pt.highest.height+V/2:c==="near"||p!==0?G=V/2:c==="center"?G=Pt.highest.height/2-Q*V:G=Pt.highest.height-$*V,h&&(G*=-1),p!==0&&!et.showLabelBackdrop&&(S+=V/2*Math.sin(p))):(C=T,G=(1-$)*V/2);let ze;if(et.showLabelBackdrop){const ae=Rt(et.backdropPadding),Qt=Pt.heights[y],en=Pt.widths[y];let us=G-ae.top,hs=0-ae.left;switch(ht){case"middle":us-=Qt/2;break;case"bottom":us-=Qt;break}switch(D){case"center":hs-=en/2;break;case"right":hs-=en;break}ze={left:hs,top:us,width:en+ae.width,height:Qt+ae.height,color:et.backdropColor}}b.push({label:v,font:L,textOffset:G,options:{rotation:p,color:j,strokeColor:K,strokeWidth:dt,textAlign:Fe,textBaseline:ht,translation:[S,C],backdrop:ze}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-ve(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:s,mirror:i,padding:r}}=this.options,o=this._getLabelSizes(),a=t+r,l=o.widest.width;let c,u;return n==="left"?i?(u=this.right+r,s==="near"?c="left":s==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,s==="near"?c="right":s==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+r,s==="near"?c="right":s==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,s==="near"?c="left":s==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:s,top:i,width:r,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(s,i,r,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(r=>r.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const a=(l,c,u)=>{!u.width||!u.color||(s.save(),s.lineWidth=u.width,s.strokeStyle=u.color,s.setLineDash(u.borderDash||[]),s.lineDashOffset=u.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(n.display)for(r=0,o=i.length;r<o;++r){const l=i[r];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({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:n,options:{border:s,grid:i}}=this,r=s.setContext(this.getContext()),o=s.display?r.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,h,d;this.isHorizontal()?(c=$n(t,this.left,o)-o/2,u=$n(t,this.right,a)+a/2,h=d=l):(h=$n(t,this.top,o)-o/2,d=$n(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.beginPath(),n.moveTo(c,h),n.lineTo(u,d),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const s=this.ctx,i=this._computeLabelArea();i&&Ar(s,i);const r=this.getLabelItems(t);for(const o of r){const a=o.options,l=o.font,c=o.label,u=o.textOffset;jn(s,c,0,u,l,a)}i&&Ir(s)}drawTitle(){const{ctx:t,options:{position:n,title:s,reverse:i}}=this;if(!s.display)return;const r=At(s.font),o=Rt(s.padding),a=s.align;let l=r.lineHeight/2;n==="bottom"||n==="center"||nt(n)?(l+=o.bottom,gt(s.text)&&(l+=r.lineHeight*(s.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:h,rotation:d}=Cy(this,l,n,a);jn(t,s.text,0,0,r,{color:s.color,maxWidth:h,rotation:d,textAlign:ky(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,s=J(t.grid&&t.grid.z,-1),i=J(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Jn.prototype.draw?[{z:n,draw:r=>{this.draw(r)}}]:[{z:s,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",i=[];let r,o;for(r=0,o=n.length;r<o;++r){const a=n[r];a[s]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return At(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class $r{constructor(t,n,s){this.type=t,this.scope=n,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let s;Iy(n)&&(s=this.register(n));const i=this.items,r=t.id,o=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in i||(i[r]=t,Dy(t,o,s),this.override&&Tt.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,s=t.id,i=this.scope;s in n&&delete n[s],i&&s in Tt[i]&&(delete Tt[i][s],this.override&&delete Wn[s])}}function Dy(e,t,n){const s=se(Object.create(null),[n?Tt.get(n):{},Tt.get(t),e.defaults]);Tt.set(t,s),e.defaultRoutes&&Ay(t,e.defaultRoutes),e.descriptors&&Tt.describe(t,e.descriptors)}function Ay(e,t){Object.keys(t).forEach(n=>{const s=n.split("."),i=s.pop(),r=[e].concat(s).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");Tt.route(r,i,l,a)})}function Iy(e){return"id"in e&&"defaults"in e}class Py{constructor(){this.controllers=new $r(Se,"datasets",!0),this.elements=new $r(we,"elements"),this.plugins=new $r(Object,"plugins"),this.scales=new $r(Jn,"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,n,s){[...n].forEach(i=>{const r=s||this._getRegistryForType(i);s||r.isForType(i)||r===this.plugins&&i.id?this._exec(t,r,i):lt(i,o=>{const a=s||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,s){const i=wa(t);mt(s["before"+i],[],s),n[t](s),mt(s["after"+i],[],s)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const s=this._typedRegistries[n];if(s.isForType(t))return s}return this.plugins}_get(t,n,s){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return i}}var $t=new Py;class Ny{constructor(){this._init=[]}notify(t,n,s,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const r=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(r,t,n,s);return n==="afterDestroy"&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,s,i){i=i||{};for(const r of t){const o=r.plugin,a=o[s],l=[n,i,r.options];if(mt(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){rt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const s=t&&t.config,i=J(s.options&&s.options.plugins,{}),r=Ly(s);return i===!1&&!n?[]:Fy(t,r,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],s=this._cache,i=(r,o)=>r.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,s),t,"stop"),this._notify(i(s,n),t,"start")}}function Ly(e){const t={},n=[],s=Object.keys($t.plugins.items);for(let r=0;r<s.length;r++)n.push($t.getPlugin(s[r]));const i=e.plugins||[];for(let r=0;r<i.length;r++){const o=i[r];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function Ry(e,t){return!t&&e===!1?null:e===!0?{}:e}function Fy(e,{plugins:t,localIds:n},s,i){const r=[],o=e.getContext();for(const a of t){const l=a.id,c=Ry(s[l],i);c!==null&&r.push({plugin:a,options:zy(e.config,{plugin:a,local:n[l]},c,o)})}return r}function zy(e,{plugin:t,local:n},s,i){const r=e.pluginScopeKeys(t),o=e.getOptionScopes(s,r);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ua(e,t){const n=Tt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Vy(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function By(e,t){return e===t?"_index_":"_value_"}function Hy(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function jr(e,t){if(e==="x"||e==="y"||e==="r"||(e=t.axis||Hy(t.position)||e.length>1&&jr(e[0].toLowerCase(),t),e))return e;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function Wy(e,t){const n=Wn[e.type]||{scales:{}},s=t.scales||{},i=Ua(e.type,t),r=Object.create(null);return Object.keys(s).forEach(o=>{const a=s[o];if(!nt(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=jr(o,a),c=By(l,i),u=n.scales||{};r[o]=ai(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||Ua(a,t),u=(Wn[a]||{}).scales||{};Object.keys(u).forEach(h=>{const d=Vy(h,l),f=o[d+"AxisID"]||d;r[f]=r[f]||Object.create(null),ai(r[f],[{axis:d},s[f],u[h]])})}),Object.keys(r).forEach(o=>{const a=r[o];ai(a,[Tt.scales[a.type],Tt.scale])}),r}function Wh(e){const t=e.options||(e.options={});t.plugins=J(t.plugins,{}),t.scales=Wy(e,t)}function $h(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function $y(e){return e=e||{},e.data=$h(e.data),Wh(e),e}const jh=new Map,Uh=new Set;function Ur(e,t){let n=jh.get(e);return n||(n=t(),jh.set(e,n),Uh.add(n)),n}const wi=(e,t,n)=>{const s=mn(t,n);s!==void 0&&e.add(s)};class jy{constructor(t){this._config=$y(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=$h(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(),Wh(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ur(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Ur(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Ur(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,s=this.type;return Ur(`${s}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const s=this._scopeCache;let i=s.get(t);return(!i||n)&&(i=new Map,s.set(t,i)),i}getOptionScopes(t,n,s){const{options:i,type:r}=this,o=this._cachedScopes(t,s),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(h=>wi(l,t,h))),u.forEach(h=>wi(l,i,h)),u.forEach(h=>wi(l,Wn[r]||{},h)),u.forEach(h=>wi(l,Tt,h)),u.forEach(h=>wi(l,Ca,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Uh.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Wn[n]||{},Tt.datasets[n]||{},{type:n},Tt,Ca]}resolveNamedOptions(t,n,s,i=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=Gh(this._resolverCache,t,i);let l=o;if(Gy(o,n)){r.$shared=!1,s=pn(s)?s():s;const c=this.createResolver(t,s,a);l=vs(o,s,c)}for(const c of n)r[c]=l[c];return r}createResolver(t,n,s=[""],i){const{resolver:r}=Gh(this._resolverCache,t,s);return nt(n)?vs(r,n,void 0,i):r}}function Gh(e,t,n){let s=e.get(t);s||(s=new Map,e.set(t,s));const i=n.join();let r=s.get(i);return r||(r={resolver:Pa(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},s.set(i,r)),r}const Uy=e=>nt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||pn(e[n]),!1);function Gy(e,t){const{isScriptable:n,isIndexable:s}=Ku(e);for(const i of t){const r=n(i),o=s(i),a=(o||r)&&e[i];if(r&&(pn(a)||Uy(a))||o&>(a))return!0}return!1}var Yy="4.2.1";const Ky=["top","bottom","left","right","chartArea"];function Yh(e,t){return e==="top"||e==="bottom"||Ky.indexOf(e)===-1&&t==="x"}function Kh(e,t){return function(n,s){return n[e]===s[e]?n[t]-s[t]:n[e]-s[e]}}function Xh(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),mt(n&&n.onComplete,[e],t)}function Xy(e){const t=e.chart,n=t.options.animation;mt(n&&n.onProgress,[e],t)}function Zh(e){return nh()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Gr={},qh=e=>{const t=Zh(e);return Object.values(Gr).filter(n=>n.canvas===t).pop()};function Zy(e,t,n){const s=Object.keys(e);for(const i of s){const r=+i;if(r>=t){const o=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=o)}}}function qy(e,t,n,s){return!n||e.type==="mouseout"?null:s?t:e}function Jy(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}class Xt{static register(...t){$t.add(...t),Jh()}static unregister(...t){$t.remove(...t),Jh()}constructor(t,n){const s=this.config=new jy(n),i=Zh(t),r=qh(i);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 o=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||gy(i)),this.platform.updateConfig(s);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=nb(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,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 Ny,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=_b(h=>this.update(h),o.resizeDelay||0),this._dataChanges=[],Gr[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ze.listen(this,"complete",Xh),Ze.listen(this,"progress",Xy),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:s,height:i,_aspectRatio:r}=this;return rt(t)?n&&r?r:i?s/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return $t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():sh(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Uu(this.canvas,this.ctx),this}stop(){return Ze.stop(this),this}resize(t,n){Ze.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const s=this.options,i=this.canvas,r=s.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,r),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,sh(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),mt(s.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};lt(n,(s,i)=>{s.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,s=this.scales,i=Object.keys(s).reduce((o,a)=>(o[a]=!1,o),{});let r=[];n&&(r=r.concat(Object.keys(n).map(o=>{const a=n[o],l=jr(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),lt(r,o=>{const a=o.options,l=a.id,c=jr(l,a),u=J(a.type,o.dtype);(a.position===void 0||Yh(a.position,c)!==Yh(o.dposition))&&(a.position=o.dposition),i[l]=!0;let h=null;if(l in s&&s[l].type===u)h=s[l];else{const d=$t.getScale(u);h=new d({id:l,type:u,ctx:this.ctx,chart:this}),s[h.id]=h}h.init(a,t)}),lt(i,(o,a)=>{o||delete s[a]}),lt(s,o=>{Ft.configure(this,o,o.options),Ft.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,s=t.length;if(t.sort((i,r)=>i.index-r.index),s>n){for(let i=n;i<s;++i)this._destroyDatasetMeta(i);t.splice(n,s-n)}this._sortedMetasets=t.slice(0).sort(Kh("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((s,i)=>{n.filter(r=>r===s._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let s,i;for(this._removeUnreferencedMetasets(),s=0,i=n.length;s<i;s++){const r=n[s];let o=this.getDatasetMeta(s);const a=r.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(s),o=this.getDatasetMeta(s)),o.type=a,o.indexAxis=r.indexAxis||Ua(a,this.options),o.order=r.order||0,o.index=s,o.label=""+r.label,o.visible=this.isDatasetVisible(s),o.controller)o.controller.updateIndex(s),o.controller.linkScales();else{const l=$t.getController(a),{datasetElementType:c,dataElementType:u}=Tt.datasets[a];Object.assign(l,{dataElementType:$t.getElement(u),datasetElementType:c&&$t.getElement(c)}),o.controller=new l(this,s),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){lt(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!s.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 o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:h}=this.getDatasetMeta(c),d=!i&&r.indexOf(h)===-1;h.buildOrUpdateElements(d),o=Math.max(+h.getMaxOverflow(),o)}o=this._minPadding=s.layout.autoPadding?o:0,this._updateLayout(o),i||lt(r,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Kh("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){lt(this.scales,t=>{Ft.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Ou(n,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:r}of n){const o=s==="_removeElements"?-r:r;Zy(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,s=r=>new Set(t.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),i=s(0);for(let r=1;r<n;r++)if(!Ou(i,s(r)))return;return Array.from(i).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;Ft.update(this,this.width,this.height,t);const n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],lt(this.boxes,i=>{s&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,r)=>{i._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n<s;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,s=this.data.datasets.length;n<s;++n)this._updateDataset(n,pn(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const s=this.getDatasetMeta(t),i={meta:s,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(s.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ze.has(this)?this.attached&&!Ze.running(this)&&Ze.start(this):(this.draw(),Xh({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:i}=this._resizeBeforeDraw;this._resize(s,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,s=[];let i,r;for(i=0,r=n.length;i<r;++i){const o=n[i];(!t||o.visible)&&s.push(o)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,s=t._clip,i=!s.disabled,r=Jy(t)||this.chartArea,o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&Ar(n,{left:s.left===!1?0:r.left-s.left,right:s.right===!1?this.width:r.right+s.right,top:s.top===!1?0:r.top-s.top,bottom:s.bottom===!1?this.height:r.bottom+s.bottom}),t.controller.draw(),i&&Ir(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return fi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,s,i){const r=X_.modes[n];return typeof r=="function"?r(this,t,s,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],s=this._metasets;let i=s.filter(r=>r&&r._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},s.push(i)),i}getContext(){return this.$context||(this.$context=bn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden}setDatasetVisibility(t,n){const s=this.getDatasetMeta(t);s.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,s){const i=s?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,i);de(n)?(r.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),o.update(r,{visible:s}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Ze.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Uu(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Gr[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,n=this.platform,s=(r,o)=>{n.addEventListener(this,r,o),t[r]=o},i=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};lt(this.options.events,r=>s(r,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,s=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),s("resize",r),s("detach",o)};o=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),s("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){lt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},lt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,s){const i=s?"set":"remove";let r,o,a,l;for(n==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],s=t.map(({datasetIndex:r,index:o})=>{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!Mr(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(t,n,s){return this._plugins.notify(this,t,n,s)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,s){const i=this.options.hover,r=(l,c)=>l.filter(u=>!c.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),o=r(n,t),a=s?t:r(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const s={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,i)===!1)return;const r=this._handleEvent(t,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,i),(r||s.changed)&&this.render(),this}_handleEvent(t,n,s){const{_active:i=[],options:r}=this,o=n,a=this._getActiveElements(t,i,s,o),l=lb(t),c=qy(t,this._lastEvent,s,l);s&&(this._lastEvent=null,mt(r.onHover,[t,a,this],this),l&&mt(r.onClick,[t,a,this],this));const u=!Mr(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,s,i){if(t.type==="mouseout")return[];if(!s)return n;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,i)}}R(Xt,"defaults",Tt),R(Xt,"instances",Gr),R(Xt,"overrides",Wn),R(Xt,"registry",$t),R(Xt,"version",Yy),R(Xt,"getChart",qh);function Jh(){return lt(Xt.instances,e=>e._plugins.invalidate())}function Qy(e,t,n){const{startAngle:s,pixelMargin:i,x:r,y:o,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(r,o,a,s-c,n+c),l>i?(c=i/l,e.arc(r,o,l,n+c,s-c,!0)):e.arc(r,o,i,n+St,s-St),e.closePath(),e.clip()}function tx(e){return Ia(e,["outerStart","outerEnd","innerStart","innerEnd"])}function ex(e,t,n,s){const i=tx(e.options.borderRadius),r=(n-t)/2,o=Math.min(r,s*t/2),a=l=>{const c=(n-Math.min(r,l))*s/2;return It(l,0,Math.min(r,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:It(i.innerStart,0,o),innerEnd:It(i.innerEnd,0,o)}}function Ms(e,t,n,s){return{x:n+e*Math.cos(t),y:s+e*Math.sin(t)}}function Yr(e,t,n,s,i,r){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=t,h=Math.max(t.outerRadius+s+n-c,0),d=u>0?u+s+n+c:0;let f=0;const m=i-l;if(s){const et=u>0?u-s:0,Q=h>0?h-s:0,j=(et+Q)/2,K=j!==0?m*j/(j+s):m;f=(m-K)/2}const p=Math.max(.001,m*h-n/yt)/h,b=(m-p)/2,y=l+b+f,x=i-b-f,{outerStart:w,outerEnd:v,innerStart:S,innerEnd:C}=ex(t,d,h,x-y),D=h-w,T=h-v,L=y+w/D,V=x-v/T,$=d+S,G=d+C,ht=y+S/$,Pt=x-C/G;if(e.beginPath(),r){const et=(L+V)/2;if(e.arc(o,a,h,L,et),e.arc(o,a,h,et,V),v>0){const dt=Ms(T,V,o,a);e.arc(dt.x,dt.y,v,V,x+St)}const Q=Ms(G,x,o,a);if(e.lineTo(Q.x,Q.y),C>0){const dt=Ms(G,Pt,o,a);e.arc(dt.x,dt.y,C,x+St,Pt+Math.PI)}const j=(x-C/d+(y+S/d))/2;if(e.arc(o,a,d,x-C/d,j,!0),e.arc(o,a,d,j,y+S/d,!0),S>0){const dt=Ms($,ht,o,a);e.arc(dt.x,dt.y,S,ht+Math.PI,y-St)}const K=Ms(D,y,o,a);if(e.lineTo(K.x,K.y),w>0){const dt=Ms(D,L,o,a);e.arc(dt.x,dt.y,w,y-St,L)}}else{e.moveTo(o,a);const et=Math.cos(L)*h+o,Q=Math.sin(L)*h+a;e.lineTo(et,Q);const j=Math.cos(V)*h+o,K=Math.sin(V)*h+a;e.lineTo(j,K)}e.closePath()}function nx(e,t,n,s,i){const{fullCircles:r,startAngle:o,circumference:a}=t;let l=t.endAngle;if(r){Yr(e,t,n,s,l,i);for(let c=0;c<r;++c)e.fill();isNaN(a)||(l=o+(a%bt||bt))}return Yr(e,t,n,s,l,i),e.fill(),l}function sx(e,t,n,s,i){const{fullCircles:r,startAngle:o,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,h=l.borderAlign==="inner";if(!c)return;h?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let d=t.endAngle;if(r){Yr(e,t,n,s,d,i);for(let f=0;f<r;++f)e.stroke();isNaN(a)||(d=o+(a%bt||bt))}h&&Qy(e,t,d),r||(Yr(e,t,n,s,d,i),e.stroke())}class Qn extends we{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,n,s){const i=this.getProps(["x","y"],s),{angle:r,distance:o}=Iu(i,{x:t,y:n}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),d=this.options.spacing/2,m=J(h,l-a)>=bt||ci(r,a,l),p=Ke(o,c+d,u+d);return m&&p}getCenterPoint(t){const{x:n,y:s,startAngle:i,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+r)/2,h=(o+a+c+l)/2;return{x:n+Math.cos(u)*h,y:s+Math.sin(u)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:s}=this,i=(n.offset||0)/4,r=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>bt?Math.floor(s/bt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*i,Math.sin(a)*i);const l=1-Math.sin(Math.min(yt,s||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,nx(t,this,c,r,o),sx(t,this,c,r,o),t.restore()}}R(Qn,"id","arc"),R(Qn,"defaults",{borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),R(Qn,"defaultRoutes",{backgroundColor:"backgroundColor"});function Qh(e,t,n=t){e.lineCap=J(n.borderCapStyle,t.borderCapStyle),e.setLineDash(J(n.borderDash,t.borderDash)),e.lineDashOffset=J(n.borderDashOffset,t.borderDashOffset),e.lineJoin=J(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=J(n.borderWidth,t.borderWidth),e.strokeStyle=J(n.borderColor,t.borderColor)}function ix(e,t,n){e.lineTo(n.x,n.y)}function rx(e){return e.stepped?Db:e.tension||e.cubicInterpolationMode==="monotone"?Ab:ix}function td(e,t,n={}){const s=e.length,{start:i=0,end:r=s-1}=n,{start:o,end:a}=t,l=Math.max(i,o),c=Math.min(r,a),u=i<o&&r<o||i>a&&r>a;return{count:s,start:l,loop:t.loop,ilen:c<l&&!u?s+c-l:c-l}}function ox(e,t,n,s){const{points:i,options:r}=t,{count:o,start:a,loop:l,ilen:c}=td(i,n,s),u=rx(r);let{move:h=!0,reverse:d}=s||{},f,m,p;for(f=0;f<=c;++f)m=i[(a+(d?c-f:f))%o],!m.skip&&(h?(e.moveTo(m.x,m.y),h=!1):u(e,p,m,d,r.stepped),p=m);return l&&(m=i[(a+(d?c:0))%o],u(e,p,m,d,r.stepped)),!!l}function ax(e,t,n,s){const i=t.points,{count:r,start:o,ilen:a}=td(i,n,s),{move:l=!0,reverse:c}=s||{};let u=0,h=0,d,f,m,p,b,y;const x=v=>(o+(c?a-v:v))%r,w=()=>{p!==b&&(e.lineTo(u,b),e.lineTo(u,p),e.lineTo(u,y))};for(l&&(f=i[x(0)],e.moveTo(f.x,f.y)),d=0;d<=a;++d){if(f=i[x(d)],f.skip)continue;const v=f.x,S=f.y,C=v|0;C===m?(S<p?p=S:S>b&&(b=S),u=(h*u+v)/++h):(w(),e.lineTo(v,S),m=C,h=0,p=b=S),y=S}w()}function Ga(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?ax:ox}function lx(e){return e.stepped?c_:e.tension||e.cubicInterpolationMode==="monotone"?u_:Kn}function cx(e,t,n,s){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,s)&&i.closePath()),Qh(e,t.options),e.stroke(i)}function ux(e,t,n,s){const{segments:i,options:r}=t,o=Ga(t);for(const a of i)Qh(e,r,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+s-1})&&e.closePath(),e.stroke()}const hx=typeof Path2D=="function";function dx(e,t,n,s){hx&&!t.options.segment?cx(e,t,n,s):ux(e,t,n,s)}class yn extends we{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,n){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const i=s.spanGaps?this._loop:this._fullLoop;e_(this._points,s,t,i,n),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=g_(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,s=t.length;return s&&n[t[s-1].end]}interpolate(t,n){const s=this.options,i=t[n],r=this.points,o=uh(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=lx(s);let c,u;for(c=0,u=o.length;c<u;++c){const{start:h,end:d}=o[c],f=r[h],m=r[d];if(f===m){a.push(f);continue}const p=Math.abs((i-f[n])/(m[n]-f[n])),b=l(f,m,p,s.stepped);b[n]=t[n],a.push(b)}return a.length===1?a[0]:a}pathSegment(t,n,s){return Ga(this)(t,this,n,s)}path(t,n,s){const i=this.segments,r=Ga(this);let o=this._loop;n=n||0,s=s||this.points.length-n;for(const a of i)o&=r(t,this,a,{start:n,end:n+s-1});return!!o}draw(t,n,s,i){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),dx(t,this,s,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}R(yn,"id","line"),R(yn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),R(yn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),R(yn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function ed(e,t,n,s){const i=e.options,{[n]:r}=e.getProps([n],s);return Math.abs(t-r)<i.radius+i.hitRadius}class ts extends we{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,n,s){const i=this.options,{x:r,y:o}=this.getProps(["x","y"],s);return Math.pow(t-r,2)+Math.pow(n-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return ed(this,t,"x",n)}inYRange(t,n){return ed(this,t,"y",n)}getCenterPoint(t){const{x:n,y:s}=this.getProps(["x","y"],t);return{x:n,y:s}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const s=n&&t.borderWidth||0;return(n+s)*2}draw(t,n){const s=this.options;this.skip||s.radius<.1||!fi(this,n,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,Aa(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}R(ts,"id","point"),R(ts,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),R(ts,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function nd(e,t){const{x:n,y:s,base:i,width:r,height:o}=e.getProps(["x","y","base","width","height"],t);let a,l,c,u,h;return e.horizontal?(h=o/2,a=Math.min(n,i),l=Math.max(n,i),c=s-h,u=s+h):(h=r/2,a=n-h,l=n+h,c=Math.min(s,i),u=Math.max(s,i)),{left:a,top:c,right:l,bottom:u}}function xn(e,t,n,s){return e?0:It(t,n,s)}function fx(e,t,n){const s=e.options.borderWidth,i=e.borderSkipped,r=Yu(s);return{t:xn(i.top,r.top,0,n),r:xn(i.right,r.right,0,t),b:xn(i.bottom,r.bottom,0,n),l:xn(i.left,r.left,0,t)}}function mx(e,t,n){const{enableBorderRadius:s}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,r=Un(i),o=Math.min(t,n),a=e.borderSkipped,l=s||nt(i);return{topLeft:xn(!l||a.top||a.left,r.topLeft,0,o),topRight:xn(!l||a.top||a.right,r.topRight,0,o),bottomLeft:xn(!l||a.bottom||a.left,r.bottomLeft,0,o),bottomRight:xn(!l||a.bottom||a.right,r.bottomRight,0,o)}}function px(e){const t=nd(e),n=t.right-t.left,s=t.bottom-t.top,i=fx(e,n/2,s/2),r=mx(e,n/2,s/2);return{outer:{x:t.left,y:t.top,w:n,h:s,radius:r},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:s-i.t-i.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,r.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(i.b,i.r))}}}}function Ya(e,t,n,s){const i=t===null,r=n===null,a=e&&!(i&&r)&&nd(e,s);return a&&(i||Ke(t,a.left,a.right))&&(r||Ke(n,a.top,a.bottom))}function gx(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function bx(e,t){e.rect(t.x,t.y,t.w,t.h)}function Ka(e,t,n={}){const s=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,r=(e.x+e.w!==n.x+n.w?t:0)-s,o=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+s,y:e.y+i,w:e.w+r,h:e.h+o,radius:e.radius}}class es extends we{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:n,options:{borderColor:s,backgroundColor:i}}=this,{inner:r,outer:o}=px(this),a=gx(o.radius)?mi:bx;t.save(),(o.w!==r.w||o.h!==r.h)&&(t.beginPath(),a(t,Ka(o,n,r)),t.clip(),a(t,Ka(r,-n,o)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),a(t,Ka(r,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,s){return Ya(this,t,n,s)}inXRange(t,n){return Ya(this,t,null,n)}inYRange(t,n){return Ya(this,null,t,n)}getCenterPoint(t){const{x:n,y:s,base:i,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(n+i)/2:n,y:r?s:(s+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}R(es,"id","bar"),R(es,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),R(es,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var _x=Object.freeze({__proto__:null,ArcElement:Qn,LineElement:yn,PointElement:ts,BarElement:es});const Xa=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],sd=Xa.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function id(e){return Xa[e%Xa.length]}function rd(e){return sd[e%sd.length]}function yx(e,t){return e.borderColor=id(t),e.backgroundColor=rd(t),++t}function xx(e,t){return e.backgroundColor=e.data.map(()=>id(t++)),t}function vx(e,t){return e.backgroundColor=e.data.map(()=>rd(t++)),t}function Sx(e){let t=0;return(n,s)=>{const i=e.getDatasetMeta(s).controller;i instanceof Xn?t=xx(n,t):i instanceof Le?t=vx(n,t):i&&(t=yx(n,t))}}function od(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function wx(e){return e&&(e.borderColor||e.backgroundColor)}var Mx={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:s},options:i}=e.config,{elements:r}=i;if(!n.forceOverride&&(od(s)||wx(i)||r&&od(r)))return;const o=Sx(e);s.forEach(o)}};function Tx(e,t,n,s,i){const r=i.samples||s;if(r>=n)return e.slice(t,t+n);const o=[],a=(n-2)/(r-2);let l=0;const c=t+n-1;let u=t,h,d,f,m,p;for(o[l++]=e[u],h=0;h<r-2;h++){let b=0,y=0,x;const w=Math.floor((h+1)*a)+1+t,v=Math.min(Math.floor((h+2)*a)+1,n)+t,S=v-w;for(x=w;x<v;x++)b+=e[x].x,y+=e[x].y;b/=S,y/=S;const C=Math.floor(h*a)+1+t,D=Math.min(Math.floor((h+1)*a)+1,n)+t,{x:T,y:L}=e[u];for(f=m=-1,x=C;x<D;x++)m=.5*Math.abs((T-b)*(e[x].y-L)-(T-e[x].x)*(y-L)),m>f&&(f=m,d=e[x],p=x);o[l++]=d,u=p}return o[l++]=e[c],o}function Ex(e,t,n,s){let i=0,r=0,o,a,l,c,u,h,d,f,m,p;const b=[],y=t+n-1,x=e[t].x,v=e[y].x-x;for(o=t;o<t+n;++o){a=e[o],l=(a.x-x)/v*s,c=a.y;const S=l|0;if(S===u)c<m?(m=c,h=o):c>p&&(p=c,d=o),i=(r*i+a.x)/++r;else{const C=o-1;if(!rt(h)&&!rt(d)){const D=Math.min(h,d),T=Math.max(h,d);D!==f&&D!==C&&b.push({...e[D],x:i}),T!==f&&T!==C&&b.push({...e[T],x:i})}o>0&&C!==f&&b.push(e[C]),b.push(a),u=S,r=0,m=p=c,h=d=f=o}}return b}function ad(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function ld(e){e.data.datasets.forEach(t=>{ad(t)})}function Ox(e,t){const n=t.length;let s=0,i;const{iScale:r}=e,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(s=It(Xe(t,r.axis,o).lo,0,n-1)),c?i=It(Xe(t,r.axis,a).hi+1,s,n)-s:i=n-s,{start:s,count:i}}var kx={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){ld(e);return}const s=e.width;e.data.datasets.forEach((i,r)=>{const{_data:o,indexAxis:a}=i,l=e.getDatasetMeta(r),c=o||i.data;if(pi([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:h,count:d}=Ox(l,c);const f=n.threshold||4*s;if(d<=f){ad(i);return}rt(o)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let m;switch(n.algorithm){case"lttb":m=Tx(c,h,d,s,n);break;case"min-max":m=Ex(c,h,d,s);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=m})},destroy(e){ld(e)}};function Cx(e,t,n){const s=e.segments,i=e.points,r=t.points,o=[];for(const a of s){let{start:l,end:c}=a;c=qa(l,c,i);const u=Za(n,i[l],i[c],a.loop);if(!t.segments){o.push({source:a,target:u,start:i[l],end:i[c]});continue}const h=uh(t,u);for(const d of h){const f=Za(n,r[d.start],r[d.end],d.loop),m=ch(a,i,f);for(const p of m)o.push({source:p,target:d,start:{[n]:cd(u,f,"start",Math.max)},end:{[n]:cd(u,f,"end",Math.min)}})}}return o}function Za(e,t,n,s){if(s)return;let i=t[e],r=n[e];return e==="angle"&&(i=ie(i),r=ie(r)),{property:e,start:i,end:r}}function Dx(e,t){const{x:n=null,y:s=null}=e||{},i=t.points,r=[];return t.segments.forEach(({start:o,end:a})=>{a=qa(o,a,i);const l=i[o],c=i[a];s!==null?(r.push({x:l.x,y:s}),r.push({x:c.x,y:s})):n!==null&&(r.push({x:n,y:l.y}),r.push({x:n,y:c.y}))}),r}function qa(e,t,n){for(;t>e;t--){const s=n[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function cd(e,t,n,s){return e&&t?s(e[n],t[n]):e?e[n]:t?t[n]:0}function ud(e,t){let n=[],s=!1;return gt(e)?(s=!0,n=e):n=Dx(e,t),n.length?new yn({points:n,options:{tension:0},_loop:s,_fullLoop:s}):null}function hd(e){return e&&e.fill!==!1}function Ax(e,t,n){let i=e[t].fill;const r=[t];let o;if(!n)return i;for(;i!==!1&&r.indexOf(i)===-1;){if(!vt(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;r.push(i),i=o.fill}return!1}function Ix(e,t,n){const s=Rx(e);if(nt(s))return isNaN(s.value)?!1:s;let i=parseFloat(s);return vt(i)&&Math.floor(i)===i?Px(s[0],t,i,n):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Px(e,t,n,s){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=s?!1:n}function Nx(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:nt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Lx(e,t,n){let s;return e==="start"?s=n:e==="end"?s=t.options.reverse?t.min:t.max:nt(e)?s=e.value:s=t.getBaseValue(),s}function Rx(e){const t=e.options,n=t.fill;let s=J(n&&n.target,n);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Fx(e){const{scale:t,index:n,line:s}=e,i=[],r=s.segments,o=s.points,a=zx(t,n);a.push(ud({x:null,y:t.bottom},s));for(let l=0;l<r.length;l++){const c=r[l];for(let u=c.start;u<=c.end;u++)Vx(i,o[u],a)}return new yn({points:i,options:{}})}function zx(e,t){const n=[],s=e.getMatchingVisibleMetas("line");for(let i=0;i<s.length;i++){const r=s[i];if(r.index===t)break;r.hidden||n.unshift(r.dataset)}return n}function Vx(e,t,n){const s=[];for(let i=0;i<n.length;i++){const r=n[i],{first:o,last:a,point:l}=Bx(r,t,"x");if(!(!l||o&&a)){if(o)s.unshift(l);else if(e.push(l),!a)break}}e.push(...s)}function Bx(e,t,n){const s=e.interpolate(t,n);if(!s)return{};const i=s[n],r=e.segments,o=e.points;let a=!1,l=!1;for(let c=0;c<r.length;c++){const u=r[c],h=o[u.start][n],d=o[u.end][n];if(Ke(i,h,d)){a=i===h,l=i===d;break}}return{first:a,last:l,point:s}}class dd{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,s){const{x:i,y:r,radius:o}=this;return n=n||{start:0,end:bt},t.arc(i,r,o,n.end,n.start,!0),!s.bounds}interpolate(t){const{x:n,y:s,radius:i}=this,r=t.angle;return{x:n+Math.cos(r)*i,y:s+Math.sin(r)*i,angle:r}}}function Hx(e){const{chart:t,fill:n,line:s}=e;if(vt(n))return Wx(t,n);if(n==="stack")return Fx(e);if(n==="shape")return!0;const i=$x(e);return i instanceof dd?i:ud(i,s)}function Wx(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function $x(e){return(e.scale||{}).getPointPositionForValue?Ux(e):jx(e)}function jx(e){const{scale:t={},fill:n}=e,s=Nx(n,t);if(vt(s)){const i=t.isHorizontal();return{x:i?s:null,y:i?null:s}}return null}function Ux(e){const{scale:t,fill:n}=e,s=t.options,i=t.getLabels().length,r=s.reverse?t.max:t.min,o=Lx(n,t,r),a=[];if(s.grid.circular){const l=t.getPointPositionForValue(0,r);return new dd({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)a.push(t.getPointPositionForValue(l,o));return a}function Ja(e,t,n){const s=Hx(t),{line:i,scale:r,axis:o}=t,a=i.options,l=a.fill,c=a.backgroundColor,{above:u=c,below:h=c}=l||{};s&&i.points.length&&(Ar(e,n),Gx(e,{line:i,target:s,above:u,below:h,area:n,scale:r,axis:o}),Ir(e))}function Gx(e,t){const{line:n,target:s,above:i,below:r,area:o,scale:a}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&r!==i&&(fd(e,s,o.top),md(e,{line:n,target:s,color:i,scale:a,property:l}),e.restore(),e.save(),fd(e,s,o.bottom)),md(e,{line:n,target:s,color:r,scale:a,property:l}),e.restore()}function fd(e,t,n){const{segments:s,points:i}=t;let r=!0,o=!1;e.beginPath();for(const a of s){const{start:l,end:c}=a,u=i[l],h=i[qa(l,c,i)];r?(e.moveTo(u.x,u.y),r=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(h.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function md(e,t){const{line:n,target:s,property:i,color:r,scale:o}=t,a=Cx(n,s,i);for(const{source:l,target:c,start:u,end:h}of a){const{style:{backgroundColor:d=r}={}}=l,f=s!==!0;e.save(),e.fillStyle=d,Yx(e,o,f&&Za(i,u,h)),e.beginPath();const m=!!n.pathSegment(e,l);let p;if(f){m?e.closePath():pd(e,s,h,i);const b=!!s.pathSegment(e,c,{move:m,reverse:!0});p=m&&b,p||pd(e,s,u,i)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function Yx(e,t,n){const{top:s,bottom:i}=t.chart.chartArea,{property:r,start:o,end:a}=n||{};r==="x"&&(e.beginPath(),e.rect(o,s,a-o,i-s),e.clip())}function pd(e,t,n,s){const i=t.interpolate(n,s);i&&e.lineTo(i.x,i.y)}var Kx={id:"filler",afterDatasetsUpdate(e,t,n){const s=(e.data.datasets||[]).length,i=[];let r,o,a,l;for(o=0;o<s;++o)r=e.getDatasetMeta(o),a=r.dataset,l=null,a&&a.options&&a instanceof yn&&(l={visible:e.isDatasetVisible(o),index:o,fill:Ix(a,o,s),chart:e,axis:r.controller.options.indexAxis,scale:r.vScale,line:a}),r.$filler=l,i.push(l);for(o=0;o<s;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=Ax(i,o,n.propagate))},beforeDraw(e,t,n){const s=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),r=e.chartArea;for(let o=i.length-1;o>=0;--o){const a=i[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),s&&a.fill&&Ja(e.ctx,a,r))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const s=e.getSortedVisibleDatasetMetas();for(let i=s.length-1;i>=0;--i){const r=s[i].$filler;hd(r)&&Ja(e.ctx,r,e.chartArea)}},beforeDatasetDraw(e,t,n){const s=t.meta.$filler;!hd(s)||n.drawTime!=="beforeDatasetDraw"||Ja(e.ctx,s,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const gd=(e,t)=>{let{boxHeight:n=t,boxWidth:s=t}=e;return e.usePointStyle&&(n=Math.min(n,t),s=e.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:n,itemHeight:Math.max(t,n)}},Xx=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class bd extends we{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,n,s){this.maxWidth=t,this.maxHeight=n,this._margins=s,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 n=mt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(s=>t.filter(s,this.chart.data))),t.sort&&(n=n.sort((s,i)=>t.sort(s,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,i=At(s.font),r=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=gd(s,r);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,r,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,s,i){const{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let h=t;r.textAlign="left",r.textBaseline="middle";let d=-1,f=-u;return this.legendItems.forEach((m,p)=>{const b=s+n/2+r.measureText(m.text).width;(p===0||c[c.length-1]+b+2*a>o)&&(h+=u,c[c.length-(p>0?0:1)]=0,f+=u,d++),l[p]={left:0,top:f,row:d,width:b,height:i},c[c.length-1]+=b+a}),h}_fitCols(t,n,s,i){const{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t;let h=a,d=0,f=0,m=0,p=0;return this.legendItems.forEach((b,y)=>{const{itemWidth:x,itemHeight:w}=Zx(s,n,r,b,i);y>0&&f+w+2*a>u&&(h+=d+a,c.push({width:d,height:f}),m+=d+a,p++,d=f=0),l[y]={left:m,top:f,col:p,width:x,height:w},d=Math.max(d,x),f+=w+a}),h+=d,c.push({width:d,height:f}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:s,labels:{padding:i},rtl:r}}=this,o=ws(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=Lt(s,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Lt(s,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+i}else{let a=0,l=Lt(s,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Lt(s,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ar(t,this),this._draw(),Ir(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:s,ctx:i}=this,{align:r,labels:o}=t,a=Tt.color,l=ws(t.rtl,this.left,this.width),c=At(o.font),{padding:u}=o,h=c.size,d=h/2;let f;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:p,itemHeight:b}=gd(o,h),y=function(C,D,T){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;i.save();const L=J(T.lineWidth,1);if(i.fillStyle=J(T.fillStyle,a),i.lineCap=J(T.lineCap,"butt"),i.lineDashOffset=J(T.lineDashOffset,0),i.lineJoin=J(T.lineJoin,"miter"),i.lineWidth=L,i.strokeStyle=J(T.strokeStyle,a),i.setLineDash(J(T.lineDash,[])),o.usePointStyle){const V={radius:p*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:L},$=l.xPlus(C,m/2),G=D+d;Gu(i,V,$,G,o.pointStyleWidth&&m)}else{const V=D+Math.max((h-p)/2,0),$=l.leftForLtr(C,m),G=Un(T.borderRadius);i.beginPath(),Object.values(G).some(ht=>ht!==0)?mi(i,{x:$,y:V,w:m,h:p,radius:G}):i.rect($,V,m,p),i.fill(),L!==0&&i.stroke()}i.restore()},x=function(C,D,T){jn(i,T.text,C,D+b/2,c,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},w=this.isHorizontal(),v=this._computeTitleHeight();w?f={x:Lt(r,this.left+u,this.right-s[0]),y:this.top+u+v,line:0}:f={x:this.left+u,y:Lt(r,this.top+v+u,this.bottom-n[0].height),line:0},rh(this.ctx,t.textDirection);const S=b+u;this.legendItems.forEach((C,D)=>{i.strokeStyle=C.fontColor,i.fillStyle=C.fontColor;const T=i.measureText(C.text).width,L=l.textAlign(C.textAlign||(C.textAlign=o.textAlign)),V=m+d+T;let $=f.x,G=f.y;l.setWidth(this.width),w?D>0&&$+V+u>this.right&&(G=f.y+=S,f.line++,$=f.x=Lt(r,this.left+u,this.right-s[f.line])):D>0&&G+S>this.bottom&&($=f.x=$+n[f.line].width+u,f.line++,G=f.y=Lt(r,this.top+v+u,this.bottom-n[f.line].height));const ht=l.x($);if(y(ht,G,C),$=yb(L,$+m+d,w?$+V:this.right,t.rtl),x(l.x($),G,C),w)f.x+=V+u;else if(typeof C.text!="string"){const Pt=c.lineHeight;f.y+=_d(C,Pt)}else f.y+=S}),oh(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,s=At(n.font),i=Rt(n.padding);if(!n.display)return;const r=ws(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=s.size/2,c=i.top+l;let u,h=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+c,h=Lt(t.align,h,this.right-d);else{const m=this.columnSizes.reduce((p,b)=>Math.max(p,b.height),0);u=c+Lt(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const f=Lt(a,h,h+d);o.textAlign=r.textAlign(Oa(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=s.string,jn(o,n.text,f,u,s)}_computeTitleHeight(){const t=this.options.title,n=At(t.font),s=Rt(t.padding);return t.display?n.lineHeight+s.height:0}_getLegendItemAt(t,n){let s,i,r;if(Ke(t,this.left,this.right)&&Ke(n,this.top,this.bottom)){for(r=this.legendHitBoxes,s=0;s<r.length;++s)if(i=r[s],Ke(t,i.left,i.left+i.width)&&Ke(n,i.top,i.top+i.height))return this.legendItems[s]}return null}handleEvent(t){const n=this.options;if(!Qx(t.type,n))return;const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,r=Xx(i,s);i&&!r&&mt(n.onLeave,[t,i,this],this),this._hoveredItem=s,s&&!r&&mt(n.onHover,[t,s,this],this)}else s&&mt(n.onClick,[t,s,this],this)}}function Zx(e,t,n,s,i){const r=qx(s,e,t,n),o=Jx(i,s,t.lineHeight);return{itemWidth:r,itemHeight:o}}function qx(e,t,n,s){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((r,o)=>r.length>o.length?r:o)),t+n.size/2+s.measureText(i).width}function Jx(e,t,n){let s=e;return typeof t.text!="string"&&(s=_d(t,n)),s}function _d(e,t){const n=e.text?e.text.length+.5:0;return t*n}function Qx(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var t1={id:"legend",_element:bd,start(e,t,n){const s=e.legend=new bd({ctx:e.ctx,options:n,chart:e});Ft.configure(e,s,n),Ft.addBox(e,s)},stop(e){Ft.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const s=e.legend;Ft.configure(e,s,n),s.options=n},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,n){const s=t.datasetIndex,i=n.chart;i.isDatasetVisible(s)?(i.hide(s),t.hidden=!0):(i.show(s),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:n,pointStyle:s,textAlign:i,color:r,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Rt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.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 Qa extends we{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,n){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=gt(s.text)?s.text.length:1;this._padding=Rt(s.padding);const r=i*At(s.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:n,left:s,bottom:i,right:r,options:o}=this,a=o.align;let l=0,c,u,h;return this.isHorizontal()?(u=Lt(a,s,r),h=n+t,c=r-s):(o.position==="left"?(u=s+t,h=Lt(a,i,n),l=yt*-.5):(u=r-t,h=Lt(a,n,i),l=yt*.5),c=i-n),{titleX:u,titleY:h,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const s=At(n.font),r=s.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);jn(t,n.text,0,0,s,{color:n.color,maxWidth:l,rotation:c,textAlign:Oa(n.align),textBaseline:"middle",translation:[o,a]})}}function e1(e,t){const n=new Qa({ctx:e.ctx,options:t,chart:e});Ft.configure(e,n,t),Ft.addBox(e,n),e.titleBlock=n}var n1={id:"title",_element:Qa,start(e,t,n){e1(e,n)},stop(e){const t=e.titleBlock;Ft.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const s=e.titleBlock;Ft.configure(e,s,n),s.options=n},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 Kr=new WeakMap;var s1={id:"subtitle",start(e,t,n){const s=new Qa({ctx:e.ctx,options:n,chart:e});Ft.configure(e,s,n),Ft.addBox(e,s),Kr.set(e,s)},stop(e){Ft.removeBox(e,Kr.get(e)),Kr.delete(e)},beforeUpdate(e,t,n){const s=Kr.get(e);Ft.configure(e,s,n),s.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Mi={average(e){if(!e.length)return!1;let t,n,s=0,i=0,r=0;for(t=0,n=e.length;t<n;++t){const o=e[t].element;if(o&&o.hasValue()){const a=o.tooltipPosition();s+=a.x,i+=a.y,++r}}return{x:s/r,y:i/r}},nearest(e,t){if(!e.length)return!1;let n=t.x,s=t.y,i=Number.POSITIVE_INFINITY,r,o,a;for(r=0,o=e.length;r<o;++r){const l=e[r].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Ta(t,c);u<i&&(i=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,s=l.y}return{x:n,y:s}}};function Re(e,t){return t&&(gt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Je(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
23
|
-
`)>-1?e.split(`
|
|
24
|
-
`):e}function i1(e,t){const{element:n,datasetIndex:s,index:i}=t,r=e.getDatasetMeta(s).controller,{label:o,value:a}=r.getLabelAndValue(i);return{chart:e,label:o,parsed:r.getParsed(i),raw:e.data.datasets[s].data[i],formattedValue:a,dataset:r.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function yd(e,t){const n=e.chart.ctx,{body:s,footer:i,title:r}=e,{boxWidth:o,boxHeight:a}=t,l=At(t.bodyFont),c=At(t.titleFont),u=At(t.footerFont),h=r.length,d=i.length,f=s.length,m=Rt(t.padding);let p=m.height,b=0,y=s.reduce((v,S)=>v+S.before.length+S.lines.length+S.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,h&&(p+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),y){const v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=f*v+(y-f)*l.lineHeight+(y-1)*t.bodySpacing}d&&(p+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let x=0;const w=function(v){b=Math.max(b,n.measureText(v).width+x)};return n.save(),n.font=c.string,lt(e.title,w),n.font=l.string,lt(e.beforeBody.concat(e.afterBody),w),x=t.displayColors?o+2+t.boxPadding:0,lt(s,v=>{lt(v.before,w),lt(v.lines,w),lt(v.after,w)}),x=0,n.font=u.string,lt(e.footer,w),n.restore(),b+=m.width,{width:b,height:p}}function r1(e,t){const{y:n,height:s}=t;return n<s/2?"top":n>e.height-s/2?"bottom":"center"}function o1(e,t,n,s){const{x:i,width:r}=s,o=n.caretSize+n.caretPadding;if(e==="left"&&i+r+o>t.width||e==="right"&&i-r-o<0)return!0}function a1(e,t,n,s){const{x:i,width:r}=n,{width:o,chartArea:{left:a,right:l}}=e;let c="center";return s==="center"?c=i<=(a+l)/2?"left":"right":i<=r/2?c="left":i>=o-r/2&&(c="right"),o1(c,e,t,n)&&(c="center"),c}function xd(e,t,n){const s=n.yAlign||t.yAlign||r1(e,n);return{xAlign:n.xAlign||t.xAlign||a1(e,t,n,s),yAlign:s}}function l1(e,t){let{x:n,width:s}=e;return t==="right"?n-=s:t==="center"&&(n-=s/2),n}function c1(e,t,n){let{y:s,height:i}=e;return t==="top"?s+=n:t==="bottom"?s-=i+n:s-=i/2,s}function vd(e,t,n,s){const{caretSize:i,caretPadding:r,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,c=i+r,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=Un(o);let m=l1(t,a);const p=c1(t,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,d)+i:a==="right"&&(m+=Math.max(h,f)+i),{x:It(m,0,s.width-t.width),y:It(p,0,s.height-t.height)}}function Xr(e,t,n){const s=Rt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-s.right:e.x+s.left}function Sd(e){return Re([],Je(e))}function u1(e,t,n){return bn(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function wd(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Md={beforeTitle:Ye,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return n[t.dataIndex]}return""},afterTitle:Ye,beforeBody:Ye,beforeLabel:Ye,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 n=e.formattedValue;return rt(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Ye,afterBody:Ye,beforeFooter:Ye,footer:Ye,afterFooter:Ye};function Zt(e,t,n,s){const i=e[t].call(n,s);return typeof i>"u"?Md[t].call(n,s):i}class tl extends we{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,s=this.options.setContext(this.getContext()),i=s.enabled&&n.options.animation&&s.animations,r=new mh(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=u1(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:s}=n,i=Zt(s,"beforeTitle",this,t),r=Zt(s,"title",this,t),o=Zt(s,"afterTitle",this,t);let a=[];return a=Re(a,Je(i)),a=Re(a,Je(r)),a=Re(a,Je(o)),a}getBeforeBody(t,n){return Sd(Zt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:s}=n,i=[];return lt(t,r=>{const o={before:[],lines:[],after:[]},a=wd(s,r);Re(o.before,Je(Zt(a,"beforeLabel",this,r))),Re(o.lines,Zt(a,"label",this,r)),Re(o.after,Je(Zt(a,"afterLabel",this,r))),i.push(o)}),i}getAfterBody(t,n){return Sd(Zt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:s}=n,i=Zt(s,"beforeFooter",this,t),r=Zt(s,"footer",this,t),o=Zt(s,"afterFooter",this,t);let a=[];return a=Re(a,Je(i)),a=Re(a,Je(r)),a=Re(a,Je(o)),a}_createItems(t){const n=this._active,s=this.chart.data,i=[],r=[],o=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(i1(this.chart,n[l]));return t.filter&&(a=a.filter((u,h,d)=>t.filter(u,h,d,s))),t.itemSort&&(a=a.sort((u,h)=>t.itemSort(u,h,s))),lt(a,u=>{const h=wd(t.callbacks,u);i.push(Zt(h,"labelColor",this,u)),r.push(Zt(h,"labelPointStyle",this,u)),o.push(Zt(h,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const s=this.options.setContext(this.getContext()),i=this._active;let r,o=[];if(!i.length)this.opacity!==0&&(r={opacity:0});else{const a=Mi[s.position].call(this,i,this._eventPosition);o=this._createItems(s),this.title=this.getTitle(o,s),this.beforeBody=this.getBeforeBody(o,s),this.body=this.getBody(o,s),this.afterBody=this.getAfterBody(o,s),this.footer=this.getFooter(o,s);const l=this._size=yd(this,s),c=Object.assign({},a,l),u=xd(this.chart,s,c),h=vd(s,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,s,i){const r=this.getCaretPosition(t,s,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(t,n,s){const{xAlign:i,yAlign:r}=this,{caretSize:o,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:h}=Un(a),{x:d,y:f}=t,{width:m,height:p}=n;let b,y,x,w,v,S;return r==="center"?(v=f+p/2,i==="left"?(b=d,y=b-o,w=v+o,S=v-o):(b=d+m,y=b+o,w=v-o,S=v+o),x=b):(i==="left"?y=d+Math.max(l,u)+o:i==="right"?y=d+m-Math.max(c,h)-o:y=this.caretX,r==="top"?(w=f,v=w-o,b=y-o,x=y+o):(w=f+p,v=w+o,b=y+o,x=y-o),S=w),{x1:b,x2:y,x3:x,y1:w,y2:v,y3:S}}drawTitle(t,n,s){const i=this.title,r=i.length;let o,a,l;if(r){const c=ws(s.rtl,this.x,this.width);for(t.x=Xr(this,s.titleAlign,s),n.textAlign=c.textAlign(s.titleAlign),n.textBaseline="middle",o=At(s.titleFont),a=s.titleSpacing,n.fillStyle=s.titleColor,n.font=o.string,l=0;l<r;++l)n.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===r&&(t.y+=s.titleMarginBottom-a)}}_drawColorBox(t,n,s,i,r){const o=this.labelColors[s],a=this.labelPointStyles[s],{boxHeight:l,boxWidth:c,boxPadding:u}=r,h=At(r.bodyFont),d=Xr(this,"left",r),f=i.x(d),m=l<h.lineHeight?(h.lineHeight-l)/2:0,p=n.y+m;if(r.usePointStyle){const b={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=i.leftForLtr(f,c)+c/2,x=p+l/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,Aa(t,b,y,x),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Aa(t,b,y,x)}else{t.lineWidth=nt(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const b=i.leftForLtr(f,c-u),y=i.leftForLtr(i.xPlus(f,1),c-u-2),x=Un(o.borderRadius);Object.values(x).some(w=>w!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,mi(t,{x:b,y:p,w:c,h:l,radius:x}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),mi(t,{x:y,y:p+1,w:c-2,h:l-2,radius:x}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(b,p,c,l),t.strokeRect(b,p,c,l),t.fillStyle=o.backgroundColor,t.fillRect(y,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,n,s){const{body:i}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=s,h=At(s.bodyFont);let d=h.lineHeight,f=0;const m=ws(s.rtl,this.x,this.width),p=function(T){n.fillText(T,m.x(t.x+f),t.y+d/2),t.y+=d+r},b=m.textAlign(o);let y,x,w,v,S,C,D;for(n.textAlign=o,n.textBaseline="middle",n.font=h.string,t.x=Xr(this,b,s),n.fillStyle=s.bodyColor,lt(this.beforeBody,p),f=a&&b!=="right"?o==="center"?c/2+u:c+2+u:0,v=0,C=i.length;v<C;++v){for(y=i[v],x=this.labelTextColors[v],n.fillStyle=x,lt(y.before,p),w=y.lines,a&&w.length&&(this._drawColorBox(n,t,v,m,s),d=Math.max(h.lineHeight,l)),S=0,D=w.length;S<D;++S)p(w[S]),d=h.lineHeight;lt(y.after,p)}f=0,d=h.lineHeight,lt(this.afterBody,p),t.y-=r}drawFooter(t,n,s){const i=this.footer,r=i.length;let o,a;if(r){const l=ws(s.rtl,this.x,this.width);for(t.x=Xr(this,s.footerAlign,s),t.y+=s.footerMarginTop,n.textAlign=l.textAlign(s.footerAlign),n.textBaseline="middle",o=At(s.footerFont),n.fillStyle=s.footerColor,n.font=o.string,a=0;a<r;++a)n.fillText(i[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s.footerSpacing}}drawBackground(t,n,s,i){const{xAlign:r,yAlign:o}=this,{x:a,y:l}=t,{width:c,height:u}=s,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:m}=Un(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+h,l),o==="top"&&this.drawCaret(t,n,s,i),n.lineTo(a+c-d,l),n.quadraticCurveTo(a+c,l,a+c,l+d),o==="center"&&r==="right"&&this.drawCaret(t,n,s,i),n.lineTo(a+c,l+u-m),n.quadraticCurveTo(a+c,l+u,a+c-m,l+u),o==="bottom"&&this.drawCaret(t,n,s,i),n.lineTo(a+f,l+u),n.quadraticCurveTo(a,l+u,a,l+u-f),o==="center"&&r==="left"&&this.drawCaret(t,n,s,i),n.lineTo(a,l+h),n.quadraticCurveTo(a,l,a+h,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,s=this.$animations,i=s&&s.x,r=s&&s.y;if(i||r){const o=Mi[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=yd(this,t),l=Object.assign({},o,this._size),c=xd(n,t,l),u=vd(t,l,c,n);(i._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},r={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const o=Rt(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=s,this.drawBackground(r,t,i,n),rh(t,n.textDirection),r.y+=o.top,this.drawTitle(r,t,n),this.drawBody(r,t,n),this.drawFooter(r,t,n),oh(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const s=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),r=!Mr(s,i),o=this._positionChanged(i,n);(r||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,r=this._active||[],o=this._getActiveElements(t,r,n,s),a=this._positionChanged(o,t),l=n||!Mr(o,r)||a;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,s,i){const r=this.options;if(t.type==="mouseout")return[];if(!i)return n;const o=this.chart.getElementsAtEventForMode(t,r.mode,r,s);return r.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:s,caretY:i,options:r}=this,o=Mi[r.position].call(this,t,n);return o!==!1&&(s!==o.x||i!==o.y)}}R(tl,"positioners",Mi);var Td={id:"tooltip",_element:tl,positioners:Mi,afterInit(e,t,n){n&&(e.tooltip=new tl({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,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:Md},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"]},h1=Object.freeze({__proto__:null,Colors:Mx,Decimation:kx,Filler:Kx,Legend:t1,SubTitle:s1,Title:n1,Tooltip:Td});const d1=(e,t,n,s)=>(typeof t=="string"?(n=e.push(t)-1,s.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function f1(e,t,n,s){const i=e.indexOf(t);if(i===-1)return d1(e,t,n,s);const r=e.lastIndexOf(t);return i!==r?n:i}const m1=(e,t)=>e===null?null:It(Math.round(e),0,t);function Ed(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Ts extends Jn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const s=this.getLabels();for(const{index:i,label:r}of n)s[i]===r&&s.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(rt(t))return null;const s=this.getLabels();return n=isFinite(n)&&s[n]===t?n:f1(s,t,J(n,t),this._addedLabels),m1(n,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:s,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),n||(i=this.getLabels().length-1)),this.min=s,this.max=i}buildTicks(){const t=this.min,n=this.max,s=this.options.offset,i=[];let r=this.getLabels();r=t===0&&n===r.length-1?r:r.slice(t,n+1),this._valueRange=Math.max(r.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return Ed.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}R(Ts,"id","category"),R(Ts,"defaults",{ticks:{callback:Ed}});function p1(e,t){const n=[],{bounds:i,step:r,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:h,includeBounds:d}=e,f=r||1,m=u-1,{min:p,max:b}=t,y=!rt(o),x=!rt(a),w=!rt(c),v=(b-p)/(h+1);let S=Cu((b-p)/m/f)*f,C,D,T,L;if(S<1e-14&&!y&&!x)return[{value:p},{value:b}];L=Math.ceil(b/S)-Math.floor(p/S),L>m&&(S=Cu(L*S/m/f)*f),rt(l)||(C=Math.pow(10,l),S=Math.ceil(S*C)/C),i==="ticks"?(D=Math.floor(p/S)*S,T=Math.ceil(b/S)*S):(D=p,T=b),y&&x&&r&&db((a-o)/r,S/1e3)?(L=Math.round(Math.min((a-o)/S,u)),S=(a-o)/L,D=o,T=a):w?(D=y?o:D,T=x?a:T,L=c-1,S=(T-D)/L):(L=(T-D)/S,li(L,Math.round(L),S/1e3)?L=Math.round(L):L=Math.ceil(L));const V=Math.max(Au(S),Au(D));C=Math.pow(10,rt(l)?V:l),D=Math.round(D*C)/C,T=Math.round(T*C)/C;let $=0;for(y&&(d&&D!==o?(n.push({value:o}),D<o&&$++,li(Math.round((D+$*S)*C)/C,o,Od(o,v,e))&&$++):D<o&&$++);$<L;++$)n.push({value:Math.round((D+$*S)*C)/C});return x&&d&&T!==a?n.length&&li(n[n.length-1].value,a,Od(a,v,e))?n[n.length-1].value=a:n.push({value:a}):(!x||T===a)&&n.push({value:T}),n}function Od(e,t,{horizontal:n,minRotation:s}){const i=ve(s),r=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/r,o)}class Zr extends Jn{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,n){return rt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:s}=this.getUserBounds();let{min:i,max:r}=this;const o=l=>i=n?i:l,a=l=>r=s?r:l;if(t){const l=Ne(i),c=Ne(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(i===r){let l=r===0?1:Math.abs(r*.05);a(r+l),t||o(i-l)}this.min=i,this.max=r}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:s}=t,i;return s?(i=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,o=p1(i,r);return t.bounds==="ticks"&&Du(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const i=(s-n)/Math.max(t.length-1,1)/2;n-=i,s+=i}this._startValue=n,this._endValue=s,this._valueRange=s-n}getLabelForValue(t){return hi(t,this.chart.options.locale,this.options.ticks.format)}}class ns extends Zr{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=vt(t)?t:0,this.max=vt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,s=ve(this.options.ticks.minRotation),i=(t?Math.sin(s):Math.cos(s))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}R(ns,"id","linear"),R(ns,"defaults",{ticks:{callback:Cr.formatters.numeric}});const Ti=e=>Math.floor(gn(e)),ss=(e,t)=>Math.pow(10,Ti(e)+t);function kd(e){return e/Math.pow(10,Ti(e))===1}function Cd(e,t,n){const s=Math.pow(10,n),i=Math.floor(e/s);return Math.ceil(t/s)-i}function g1(e,t){const n=t-e;let s=Ti(n);for(;Cd(e,t,s)>10;)s++;for(;Cd(e,t,s)<10;)s--;return Math.min(s,Ti(e))}function b1(e,{min:t,max:n}){t=ne(e.min,t);const s=[],i=Ti(t);let r=g1(t,n),o=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),l=i>r?Math.pow(10,i):0,c=Math.round((t-l)*o)/o,u=Math.floor((t-l)/a/10)*a*10;let h=Math.floor((c-u)/Math.pow(10,r)),d=ne(e.min,Math.round((l+u+h*Math.pow(10,r))*o)/o);for(;d<n;)s.push({value:d,major:kd(d),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(r++,h=2,o=r>=0?1:o),d=Math.round((l+u+h*Math.pow(10,r))*o)/o;const f=ne(e.max,d);return s.push({value:f,major:kd(f),significand:h}),s}class el extends Jn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const s=Zr.prototype.parse.apply(this,[t,n]);if(s===0){this._zero=!0;return}return vt(s)&&s>0?s:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=vt(t)?Math.max(0,t):null,this.max=vt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!vt(this._userMin)&&(this.min=t===ss(this.min,0)?ss(this.min,-1):ss(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let s=this.min,i=this.max;const r=a=>s=t?s:a,o=a=>i=n?i:a;s===i&&(s<=0?(r(1),o(10)):(r(ss(s,-1)),o(ss(i,1)))),s<=0&&r(ss(i,-1)),i<=0&&o(ss(s,1)),this.min=s,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},s=b1(n,this);return t.bounds==="ticks"&&Du(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":hi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=gn(t),this._valueRange=gn(this.max)-gn(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(gn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}R(el,"id","logarithmic"),R(el,"defaults",{ticks:{callback:Cr.formatters.logarithmic,major:{enabled:!0}}});function nl(e){const t=e.ticks;if(t.display&&e.display){const n=Rt(t.backdropPadding);return J(t.font&&t.font.size,Tt.font.size)+n.height}return 0}function _1(e,t,n){return n=gt(n)?n:[n],{w:Cb(e,t.string,n),h:n.length*t.lineHeight}}function Dd(e,t,n,s,i){return e===s||e===i?{start:t-n/2,end:t+n/2}:e<s||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function y1(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},n=Object.assign({},t),s=[],i=[],r=e._pointLabels.length,o=e.options.pointLabels,a=o.centerPointLabels?yt/r:0;for(let l=0;l<r;l++){const c=o.setContext(e.getPointLabelContext(l));i[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+i[l],a),h=At(c.font),d=_1(e.ctx,h,e._pointLabels[l]);s[l]=d;const f=ie(e.getIndexAngle(l)+a),m=Math.round(Ma(f)),p=Dd(m,u.x,d.w,0,180),b=Dd(m,u.y,d.h,90,270);x1(n,t,f,p,b)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=v1(e,s,i)}function x1(e,t,n,s,i){const r=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;s.start<t.l?(a=(t.l-s.start)/r,e.l=Math.min(e.l,t.l-a)):s.end>t.r&&(a=(s.end-t.r)/r,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function v1(e,t,n){const s=[],i=e._pointLabels.length,r=e.options,o=nl(r)/2,a=e.drawingArea,l=r.pointLabels.centerPointLabels?yt/i:0;for(let c=0;c<i;c++){const u=e.getPointPosition(c,a+o+n[c],l),h=Math.round(Ma(ie(u.angle+St))),d=t[c],f=M1(u.y,d.h,h),m=S1(h),p=w1(u.x,d.w,m);s.push({x:u.x,y:f,textAlign:m,left:p,top:f,right:p+d.w,bottom:f+d.h})}return s}function S1(e){return e===0||e===180?"center":e<180?"left":"right"}function w1(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function M1(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function T1(e,t){const{ctx:n,options:{pointLabels:s}}=e;for(let i=t-1;i>=0;i--){const r=s.setContext(e.getPointLabelContext(i)),o=At(r.font),{x:a,y:l,textAlign:c,left:u,top:h,right:d,bottom:f}=e._pointLabelItems[i],{backdropColor:m}=r;if(!rt(m)){const p=Un(r.borderRadius),b=Rt(r.backdropPadding);n.fillStyle=m;const y=u-b.left,x=h-b.top,w=d-u+b.width,v=f-h+b.height;Object.values(p).some(S=>S!==0)?(n.beginPath(),mi(n,{x:y,y:x,w,h:v,radius:p}),n.fill()):n.fillRect(y,x,w,v)}jn(n,e._pointLabels[i],a,l+o.lineHeight/2,o,{color:r.color,textAlign:c,textBaseline:"middle"})}}function Ad(e,t,n,s){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,bt);else{let r=e.getPointPosition(0,t);i.moveTo(r.x,r.y);for(let o=1;o<s;o++)r=e.getPointPosition(o,t),i.lineTo(r.x,r.y)}}function E1(e,t,n,s,i){const r=e.ctx,o=t.circular,{color:a,lineWidth:l}=t;!o&&!s||!a||!l||n<0||(r.save(),r.strokeStyle=a,r.lineWidth=l,r.setLineDash(i.dash),r.lineDashOffset=i.dashOffset,r.beginPath(),Ad(e,n,o,s),r.closePath(),r.stroke(),r.restore())}function O1(e,t,n){return bn(e,{label:n,index:t,type:"pointLabel"})}class Es extends Zr{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=Rt(nl(this.options)/2),n=this.width=this.maxWidth-t.width,s=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+s/2+t.top),this.drawingArea=Math.floor(Math.min(n,s)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=vt(t)&&!isNaN(t)?t:0,this.max=vt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/nl(this.options))}generateTickLabels(t){Zr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,s)=>{const i=mt(this.options.pointLabels.callback,[n,s],this);return i||i===0?i:""}).filter((n,s)=>this.chart.getDataVisibility(s))}fit(){const t=this.options;t.display&&t.pointLabels.display?y1(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,s,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((s-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,s,i))}getIndexAngle(t){const n=bt/(this._pointLabels.length||1),s=this.options.startAngle||0;return ie(t*n+ve(s))}getDistanceFromCenterForValue(t){if(rt(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(rt(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const s=n[t];return O1(this.getContext(),t,s)}}getPointPosition(t,n,s=0){const i=this.getIndexAngle(t)-St+s;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:s,right:i,bottom:r}=this._pointLabelItems[t];return{left:n,top:s,right:i,bottom:r}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const s=this.ctx;s.save(),s.beginPath(),Ad(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),s.closePath(),s.fillStyle=t,s.fill(),s.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:s,grid:i,border:r}=n,o=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&T1(this,o),i.display&&this.ticks.forEach((u,h)=>{if(h!==0){l=this.getDistanceFromCenterForValue(u.value);const d=this.getContext(h),f=i.setContext(d),m=r.setContext(d);E1(this,f,l,o,m)}}),s.display){for(t.save(),a=o-1;a>=0;a--){const u=s.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:d}=u;!d||!h||(t.lineWidth=d,t.strokeStyle=h,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,s=n.ticks;if(!s.display)return;const i=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=s.setContext(this.getContext(l)),u=At(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const h=Rt(c.backdropPadding);t.fillRect(-o/2-h.left,-r-u.size/2-h.top,o+h.width,u.size+h.height)}jn(t,a.label,0,-r,u,{color:c.color})}),t.restore()}drawTitle(){}}R(Es,"id","radialLinear"),R(Es,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Cr.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),R(Es,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),R(Es,"descriptors",{angleLines:{_fallback:"grid"}});const qr={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}},qt=Object.keys(qr);function k1(e,t){return e-t}function Id(e,t){if(rt(t))return null;const n=e._adapter,{parser:s,round:i,isoWeekday:r}=e._parseOpts;let o=t;return typeof s=="function"&&(o=s(o)),vt(o)||(o=typeof s=="string"?n.parse(o,s):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(xs(r)||r===!0)?n.startOf(o,"isoWeek",r):n.startOf(o,i)),+o)}function Pd(e,t,n,s){const i=qt.length;for(let r=qt.indexOf(e);r<i-1;++r){const o=qr[qt[r]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=s)return qt[r]}return qt[i-1]}function C1(e,t,n,s,i){for(let r=qt.length-1;r>=qt.indexOf(n);r--){const o=qt[r];if(qr[o].common&&e._adapter.diff(i,s,o)>=t-1)return o}return qt[n?qt.indexOf(n):0]}function D1(e){for(let t=qt.indexOf(e)+1,n=qt.length;t<n;++t)if(qr[qt[t]].common)return qt[t]}function Nd(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:s,hi:i}=Ea(n,t),r=n[s]>=t?n[s]:n[i];e[r]=!0}}function A1(e,t,n,s){const i=e._adapter,r=+i.startOf(t[0].value,s),o=t[t.length-1].value;let a,l;for(a=r;a<=o;a=+i.add(a,1,s))l=n[a],l>=0&&(t[l].major=!0);return t}function Ld(e,t,n){const s=[],i={},r=t.length;let o,a;for(o=0;o<r;++o)a=t[o],i[a]=o,s.push({value:a,major:!1});return r===0||!n?s:A1(e,s,i,n)}class Ei extends Jn{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,n={}){const s=t.time||(t.time={}),i=this._adapter=new Eh._date(t.adapters.date);i.init(n),ai(s.displayFormats,i.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Id(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,s=t.time.unit||"day";let{min:i,max:r,minDefined:o,maxDefined:a}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(r=Math.max(r,c.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=vt(i)&&!isNaN(i)?i:+n.startOf(Date.now(),s),r=vt(r)&&!isNaN(r)?r:+n.endOf(Date.now(),s)+1,this.min=Math.min(i,r-1),this.max=Math.max(i+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],s=t[t.length-1]),{min:n,max:s}}buildTicks(){const t=this.options,n=t.time,s=t.ticks,i=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const r=this.min,o=this.max,a=gb(i,r,o);return this._unit=n.unit||(s.autoSkip?Pd(n.minUnit,this.min,this.max,this._getLabelCapacity(r)):C1(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:D1(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),Ld(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,s=0,i,r;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?s=r:s=(r-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=It(n,0,o),s=It(s,0,o),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const t=this._adapter,n=this.min,s=this.max,i=this.options,r=i.time,o=r.unit||Pd(r.minUnit,n,s,this._getLabelCapacity(n)),a=J(i.ticks.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=xs(l)||l===!0,u={};let h=n,d,f;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":o),t.diff(s,n,o)>1e5*a)throw new Error(n+" and "+s+" are too far apart with stepSize of "+a+" "+o);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(d=h,f=0;d<s;d=+t.add(d,a,o),f++)Nd(u,d,m);return(d===s||i.bounds==="ticks"||f===1)&&Nd(u,d,m),Object.keys(u).sort((p,b)=>p-b).map(p=>+p)}getLabelForValue(t){const n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(t,s.tooltipFormat):n.format(t,s.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,r=this._unit,o=n||i[r];return this._adapter.format(t,o)}_tickFormatFunction(t,n,s,i){const r=this.options,o=r.ticks.callback;if(o)return mt(o,[t,n,s],this);const a=r.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],h=c&&a[c],d=s[n],f=c&&h&&d&&d.major;return this._adapter.format(t,i||(f?h:u))}generateTickLabels(t){let n,s,i;for(n=0,s=t.length;n<s;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(t){const n=this._offsets,s=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,s=this.ctx.measureText(t).width,i=ve(this.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:s*r+a*o,h:s*o+a*r}}_getLabelCapacity(t){const n=this.options.time,s=n.displayFormats,i=s[n.unit]||s.millisecond,r=this._tickFormatFunction(t,0,Ld(this,[t],this._majorUnit),i),o=this._getLabelSize(r),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,s;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,s=i.length;n<s;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,s;if(t.length)return t;const i=this.getLabels();for(n=0,s=i.length;n<s;++n)t.push(Id(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Lu(t.sort(k1))}}R(Ei,"id","time"),R(Ei,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Jr(e,t,n){let s=0,i=e.length-1,r,o,a,l;n?(t>=e[s].pos&&t<=e[i].pos&&({lo:s,hi:i}=Xe(e,"pos",t)),{pos:r,time:a}=e[s],{pos:o,time:l}=e[i]):(t>=e[s].time&&t<=e[i].time&&({lo:s,hi:i}=Xe(e,"time",t)),{time:r,pos:a}=e[s],{time:o,pos:l}=e[i]);const c=o-r;return c?a+(l-a)*(t-r)/c:a}class sl extends Ei{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Jr(n,this.min),this._tableRange=Jr(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:s}=this,i=[],r=[];let o,a,l,c,u;for(o=0,a=t.length;o<a;++o)c=t[o],c>=n&&c<=s&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:s,pos:1}];for(o=0,a=i.length;o<a;++o)u=i[o+1],l=i[o-1],c=i[o],Math.round((u+l)/2)!==c&&r.push({time:c,pos:o/(a-1)});return r}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),s=this.getLabelTimestamps();return n.length&&s.length?t=this.normalize(n.concat(s)):t=n.length?n:s,t=this._cache.all=t,t}getDecimalForValue(t){return(Jr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,s=this.getDecimalForPixel(t)/n.factor-n.end;return Jr(this._table,s*this._tableRange+this._minPos,!0)}}R(sl,"id","timeseries"),R(sl,"defaults",Ei.defaults);var I1=Object.freeze({__proto__:null,CategoryScale:Ts,LinearScale:ns,LogarithmicScale:el,RadialLinearScale:Es,TimeScale:Ei,TimeSeriesScale:sl});const P1=[j_,_x,h1,I1];Xt.register(...P1);class is extends Error{}class N1 extends is{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class L1 extends is{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class R1 extends is{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Oi extends is{}class Rd extends is{constructor(t){super(`Invalid unit ${t}`)}}class fe extends is{}class vn extends is{constructor(){super("Zone is an abstract class")}}const z="numeric",Me="short",re="long",Qr={year:z,month:z,day:z},Fd={year:z,month:Me,day:z},F1={year:z,month:Me,day:z,weekday:Me},zd={year:z,month:re,day:z},Vd={year:z,month:re,day:z,weekday:re},Bd={hour:z,minute:z},Hd={hour:z,minute:z,second:z},Wd={hour:z,minute:z,second:z,timeZoneName:Me},$d={hour:z,minute:z,second:z,timeZoneName:re},jd={hour:z,minute:z,hourCycle:"h23"},Ud={hour:z,minute:z,second:z,hourCycle:"h23"},Gd={hour:z,minute:z,second:z,hourCycle:"h23",timeZoneName:Me},Yd={hour:z,minute:z,second:z,hourCycle:"h23",timeZoneName:re},Kd={year:z,month:z,day:z,hour:z,minute:z},Xd={year:z,month:z,day:z,hour:z,minute:z,second:z},Zd={year:z,month:Me,day:z,hour:z,minute:z},qd={year:z,month:Me,day:z,hour:z,minute:z,second:z},z1={year:z,month:Me,day:z,weekday:Me,hour:z,minute:z},Jd={year:z,month:re,day:z,hour:z,minute:z,timeZoneName:Me},Qd={year:z,month:re,day:z,hour:z,minute:z,second:z,timeZoneName:Me},tf={year:z,month:re,day:z,weekday:re,hour:z,minute:z,timeZoneName:re},ef={year:z,month:re,day:z,weekday:re,hour:z,minute:z,second:z,timeZoneName:re};class ki{get type(){throw new vn}get name(){throw new vn}get ianaName(){return this.name}get isUniversal(){throw new vn}offsetName(t,n){throw new vn}formatOffset(t,n){throw new vn}offset(t){throw new vn}equals(t){throw new vn}get isValid(){throw new vn}}let il=null;class to extends ki{static get instance(){return il===null&&(il=new to),il}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:s}){return ff(t,n,s)}formatOffset(t,n){return Ii(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let eo={};function V1(e){return eo[e]||(eo[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),eo[e]}const B1={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function H1(e,t){const n=e.format(t).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,r,o,a,l,c,u]=s;return[o,i,r,a,l,c,u]}function W1(e,t){const n=e.formatToParts(t),s=[];for(let i=0;i<n.length;i++){const{type:r,value:o}=n[i],a=B1[r];r==="era"?s[a]=o:it(a)||(s[a]=parseInt(o,10))}return s}let no={};class Qe extends ki{static create(t){return no[t]||(no[t]=new Qe(t)),no[t]}static resetCache(){no={},eo={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Qe.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:s}){return ff(t,n,s,this.name)}formatOffset(t,n){return Ii(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const s=V1(this.name);let[i,r,o,a,l,c,u]=s.formatToParts?W1(s,n):H1(s,n);a==="BC"&&(i=-Math.abs(i)+1);const d=dl({year:i,month:r,day:o,hour:l===24?0:l,minute:c,second:u,millisecond:0});let f=+n;const m=f%1e3;return f-=m>=0?m:1e3+m,(d-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let nf={};function $1(e,t={}){const n=JSON.stringify([e,t]);let s=nf[n];return s||(s=new Intl.ListFormat(e,t),nf[n]=s),s}let rl={};function ol(e,t={}){const n=JSON.stringify([e,t]);let s=rl[n];return s||(s=new Intl.DateTimeFormat(e,t),rl[n]=s),s}let al={};function j1(e,t={}){const n=JSON.stringify([e,t]);let s=al[n];return s||(s=new Intl.NumberFormat(e,t),al[n]=s),s}let ll={};function U1(e,t={}){const{base:n,...s}=t,i=JSON.stringify([e,s]);let r=ll[i];return r||(r=new Intl.RelativeTimeFormat(e,t),ll[i]=r),r}let Ci=null;function G1(){return Ci||(Ci=new Intl.DateTimeFormat().resolvedOptions().locale,Ci)}function Y1(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let s,i;try{s=ol(e).resolvedOptions(),i=e}catch{const l=e.substring(0,n);s=ol(l).resolvedOptions(),i=l}const{numberingSystem:r,calendar:o}=s;return[i,r,o]}}function K1(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function X1(e){const t=[];for(let n=1;n<=12;n++){const s=B.utc(2016,n,1);t.push(e(s))}return t}function Z1(e){const t=[];for(let n=1;n<=7;n++){const s=B.utc(2016,11,13+n);t.push(e(s))}return t}function so(e,t,n,s,i){const r=e.listingMode(n);return r==="error"?null:r==="en"?s(t):i(t)}function q1(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class J1{constructor(t,n,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:i,floor:r,...o}=s;if(!n||Object.keys(o).length>0){const a={useGrouping:!1,...s};s.padTo>0&&(a.minimumIntegerDigits=s.padTo),this.inf=j1(t,a)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):hl(t,3);return kt(n,this.padTo)}}}class Q1{constructor(t,n,s){this.opts=s,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const o=-1*(t.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&Qe.create(a).valid?(i=a,this.dt=t):(i="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,i=t.zone.name):(i="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const r={...this.opts};r.timeZone=r.timeZone||i,this.dtf=ol(n,r)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:s}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class tv{constructor(t,n,s){this.opts={style:"long",...s},!n&&hf()&&(this.rtf=U1(t,s))}format(t,n){return this.rtf?this.rtf.format(t,n):bv(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}class _t{static fromOpts(t){return _t.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,n,s,i=!1){const r=t||Ot.defaultLocale,o=r||(i?"en-US":G1()),a=n||Ot.defaultNumberingSystem,l=s||Ot.defaultOutputCalendar;return new _t(o,a,l,r)}static resetCache(){Ci=null,rl={},al={},ll={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:s}={}){return _t.create(t,n,s)}constructor(t,n,s,i){const[r,o,a]=Y1(t);this.locale=r,this.numberingSystem=n||o||null,this.outputCalendar=s||a||null,this.intl=K1(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=q1(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:_t.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1,s=!0){return so(this,t,s,gf,()=>{const i=n?{month:t,day:"numeric"}:{month:t},r=n?"format":"standalone";return this.monthsCache[r][t]||(this.monthsCache[r][t]=X1(o=>this.extract(o,i,"month"))),this.monthsCache[r][t]})}weekdays(t,n=!1,s=!0){return so(this,t,s,yf,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},r=n?"format":"standalone";return this.weekdaysCache[r][t]||(this.weekdaysCache[r][t]=Z1(o=>this.extract(o,i,"weekday"))),this.weekdaysCache[r][t]})}meridiems(t=!0){return so(this,void 0,t,()=>xf,()=>{if(!this.meridiemCache){const n={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[B.utc(2016,11,13,9),B.utc(2016,11,13,19)].map(s=>this.extract(s,n,"dayperiod"))}return this.meridiemCache})}eras(t,n=!0){return so(this,t,n,vf,()=>{const s={era:t};return this.eraCache[t]||(this.eraCache[t]=[B.utc(-40,1,1),B.utc(2017,1,1)].map(i=>this.extract(i,s,"era"))),this.eraCache[t]})}extract(t,n,s){const i=this.dtFormatter(t,n),r=i.formatToParts(),o=r.find(a=>a.type.toLowerCase()===s);return o?o.value:null}numberFormatter(t={}){return new J1(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new Q1(t,this.intl,n)}relFormatter(t={}){return new tv(this.intl,this.isEnglish(),t)}listFormatter(t={}){return $1(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let cl=null;class jt extends ki{static get utcInstance(){return cl===null&&(cl=new jt(0)),cl}static instance(t){return t===0?jt.utcInstance:new jt(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new jt(ao(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ii(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ii(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Ii(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class ev extends ki{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Sn(e,t){if(it(e)||e===null)return t;if(e instanceof ki)return e;if(nv(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?to.instance:n==="utc"||n==="gmt"?jt.utcInstance:jt.parseSpecifier(n)||Qe.create(e)}else return rs(e)?jt.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new ev(e)}let sf=()=>Date.now(),rf="system",of=null,af=null,lf=null,cf=60,uf;class Ot{static get now(){return sf}static set now(t){sf=t}static set defaultZone(t){rf=t}static get defaultZone(){return Sn(rf,to.instance)}static get defaultLocale(){return of}static set defaultLocale(t){of=t}static get defaultNumberingSystem(){return af}static set defaultNumberingSystem(t){af=t}static get defaultOutputCalendar(){return lf}static set defaultOutputCalendar(t){lf=t}static get twoDigitCutoffYear(){return cf}static set twoDigitCutoffYear(t){cf=t%100}static get throwOnInvalid(){return uf}static set throwOnInvalid(t){uf=t}static resetCaches(){_t.resetCache(),Qe.resetCache()}}function it(e){return typeof e>"u"}function rs(e){return typeof e=="number"}function io(e){return typeof e=="number"&&e%1===0}function nv(e){return typeof e=="string"}function sv(e){return Object.prototype.toString.call(e)==="[object Date]"}function hf(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function iv(e){return Array.isArray(e)?e:[e]}function df(e,t,n){if(e.length!==0)return e.reduce((s,i)=>{const r=[t(i),i];return s&&n(s[0],r[0])===s[0]?s:r},null)[1]}function rv(e,t){return t.reduce((n,s)=>(n[s]=e[s],n),{})}function Os(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tn(e,t,n){return io(e)&&e>=t&&e<=n}function ov(e,t){return e-t*Math.floor(e/t)}function kt(e,t=2){const n=e<0;let s;return n?s="-"+(""+-e).padStart(t,"0"):s=(""+e).padStart(t,"0"),s}function wn(e){if(!(it(e)||e===null||e===""))return parseInt(e,10)}function os(e){if(!(it(e)||e===null||e===""))return parseFloat(e)}function ul(e){if(!(it(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function hl(e,t,n=!1){const s=10**t;return(n?Math.trunc:Math.round)(e*s)/s}function Di(e){return e%4===0&&(e%100!==0||e%400===0)}function Ai(e){return Di(e)?366:365}function ro(e,t){const n=ov(t-1,12)+1,s=e+(t-n)/12;return n===2?Di(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function dl(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function oo(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,s=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return t===4||s===3?53:52}function fl(e){return e>99?e:e>Ot.twoDigitCutoffYear?1900+e:2e3+e}function ff(e,t,n,s=null){const i=new Date(e),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(r.timeZone=s);const o={timeZoneName:t,...r},a=new Intl.DateTimeFormat(n,o).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function ao(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const s=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-s:s;return n*60+i}function mf(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new fe(`Invalid unit value ${e}`);return t}function lo(e,t){const n={};for(const s in e)if(Os(e,s)){const i=e[s];if(i==null)continue;n[t(s)]=mf(i)}return n}function Ii(e,t){const n=Math.trunc(Math.abs(e/60)),s=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${kt(n,2)}:${kt(s,2)}`;case"narrow":return`${i}${n}${s>0?`:${s}`:""}`;case"techie":return`${i}${kt(n,2)}${kt(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function co(e){return rv(e,["hour","minute","second","millisecond"])}const av=["January","February","March","April","May","June","July","August","September","October","November","December"],pf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],lv=["J","F","M","A","M","J","J","A","S","O","N","D"];function gf(e){switch(e){case"narrow":return[...lv];case"short":return[...pf];case"long":return[...av];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const bf=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],_f=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],cv=["M","T","W","T","F","S","S"];function yf(e){switch(e){case"narrow":return[...cv];case"short":return[..._f];case"long":return[...bf];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const xf=["AM","PM"],uv=["Before Christ","Anno Domini"],hv=["BC","AD"],dv=["B","A"];function vf(e){switch(e){case"narrow":return[...dv];case"short":return[...hv];case"long":return[...uv];default:return null}}function fv(e){return xf[e.hour<12?0:1]}function mv(e,t){return yf(t)[e.weekday-1]}function pv(e,t){return gf(t)[e.month-1]}function gv(e,t){return vf(t)[e.year<0?0:1]}function bv(e,t,n="always",s=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&r){const h=e==="days";switch(t){case 1:return h?"tomorrow":`next ${i[e][0]}`;case-1:return h?"yesterday":`last ${i[e][0]}`;case 0:return h?"today":`this ${i[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,c=i[e],u=s?l?c[1]:c[2]||c[1]:l?i[e][0]:e;return o?`${a} ${u} ago`:`in ${a} ${u}`}function Sf(e,t){let n="";for(const s of e)s.literal?n+=s.val:n+=t(s.val);return n}const _v={D:Qr,DD:Fd,DDD:zd,DDDD:Vd,t:Bd,tt:Hd,ttt:Wd,tttt:$d,T:jd,TT:Ud,TTT:Gd,TTTT:Yd,f:Kd,ff:Zd,fff:Jd,ffff:tf,F:Xd,FF:qd,FFF:Qd,FFFF:ef};class zt{static create(t,n={}){return new zt(t,n)}static parseFormat(t){let n=null,s="",i=!1;const r=[];for(let o=0;o<t.length;o++){const a=t.charAt(o);a==="'"?(s.length>0&&r.push({literal:i||/^\s+$/.test(s),val:s}),n=null,s="",i=!i):i||a===n?s+=a:(s.length>0&&r.push({literal:/^\s+$/.test(s),val:s}),s=a,n=a)}return s.length>0&&r.push({literal:i||/^\s+$/.test(s),val:s}),r}static macroTokenToFormatOpts(t){return _v[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}formatDateTime(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).format()}formatDateTimeParts(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).formatToParts()}formatInterval(t,n={}){return this.loc.dtFormatter(t.start,{...this.opts,...n}).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return kt(t,n);const s={...this.opts};return n>0&&(s.padTo=n),this.loc.numberFormatter(s).format(t)}formatDateTimeFromString(t,n){const s=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",r=(f,m)=>this.loc.extract(t,f,m),o=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>s?fv(t):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,m)=>s?pv(t,f):r(m?{month:f}:{month:f,day:"numeric"},"month"),c=(f,m)=>s?mv(t,f):r(m?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),u=f=>{const m=zt.macroTokenToFormatOpts(f);return m?this.formatWithSystemDefault(t,m):f},h=f=>s?gv(t,f):r({era:f},"era"),d=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return i?r({day:"numeric"},"day"):this.num(t.day);case"dd":return i?r({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return i?r({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return i?r({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?r({month:"numeric"},"month"):this.num(t.month);case"MM":return i?r({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?r({year:"numeric"},"year"):this.num(t.year);case"yy":return i?r({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return i?r({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return i?r({year:"numeric"},"year"):this.num(t.year,6);case"G":return h("short");case"GG":return h("long");case"GGGGG":return h("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(f)}};return Sf(zt.parseFormat(n),d)}formatDurationFromString(t,n){const s=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=l=>c=>{const u=s(c);return u?this.num(l.get(u),c.length):c},r=zt.parseFormat(n),o=r.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),a=t.shiftTo(...o.map(s).filter(l=>l));return Sf(r,i(a))}}class Te{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const wf=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ks(...e){const t=e.reduce((n,s)=>n+s.source,"");return RegExp(`^${t}$`)}function Cs(...e){return t=>e.reduce(([n,s,i],r)=>{const[o,a,l]=r(t,i);return[{...n,...o},a||s,l]},[{},null,1]).slice(0,2)}function Ds(e,...t){if(e==null)return[null,null];for(const[n,s]of t){const i=n.exec(e);if(i)return s(i)}return[null,null]}function Mf(...e){return(t,n)=>{const s={};let i;for(i=0;i<e.length;i++)s[e[i]]=wn(t[n+i]);return[s,null,n+i]}}const Tf=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,yv=`(?:${Tf.source}?(?:\\[(${wf.source})\\])?)?`,ml=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ef=RegExp(`${ml.source}${yv}`),pl=RegExp(`(?:T${Ef.source})?`),xv=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,vv=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Sv=/(\d{4})-?(\d{3})/,wv=Mf("weekYear","weekNumber","weekDay"),Mv=Mf("year","ordinal"),Tv=/(\d{4})-(\d\d)-(\d\d)/,Of=RegExp(`${ml.source} ?(?:${Tf.source}|(${wf.source}))?`),Ev=RegExp(`(?: ${Of.source})?`);function As(e,t,n){const s=e[t];return it(s)?n:wn(s)}function Ov(e,t){return[{year:As(e,t),month:As(e,t+1,1),day:As(e,t+2,1)},null,t+3]}function Is(e,t){return[{hours:As(e,t,0),minutes:As(e,t+1,0),seconds:As(e,t+2,0),milliseconds:ul(e[t+3])},null,t+4]}function Pi(e,t){const n=!e[t]&&!e[t+1],s=ao(e[t+1],e[t+2]),i=n?null:jt.instance(s);return[{},i,t+3]}function Ni(e,t){const n=e[t]?Qe.create(e[t]):null;return[{},n,t+1]}const kv=RegExp(`^T?${ml.source}$`),Cv=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Dv(e){const[t,n,s,i,r,o,a,l,c]=e,u=t[0]==="-",h=l&&l[0]==="-",d=(f,m=!1)=>f!==void 0&&(m||f&&u)?-f:f;return[{years:d(os(n)),months:d(os(s)),weeks:d(os(i)),days:d(os(r)),hours:d(os(o)),minutes:d(os(a)),seconds:d(os(l),l==="-0"),milliseconds:d(ul(c),h)}]}const Av={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function gl(e,t,n,s,i,r,o){const a={year:t.length===2?fl(wn(t)):wn(t),month:pf.indexOf(n)+1,day:wn(s),hour:wn(i),minute:wn(r)};return o&&(a.second=wn(o)),e&&(a.weekday=e.length>3?bf.indexOf(e)+1:_f.indexOf(e)+1),a}const Iv=/^(?:(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\d)(\d\d)))$/;function Pv(e){const[,t,n,s,i,r,o,a,l,c,u,h]=e,d=gl(t,i,s,n,r,o,a);let f;return l?f=Av[l]:c?f=0:f=ao(u,h),[d,new jt(f)]}function Nv(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Lv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Rv=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Fv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function kf(e){const[,t,n,s,i,r,o,a]=e;return[gl(t,i,s,n,r,o,a),jt.utcInstance]}function zv(e){const[,t,n,s,i,r,o,a]=e;return[gl(t,a,n,s,i,r,o),jt.utcInstance]}const Vv=ks(xv,pl),Bv=ks(vv,pl),Hv=ks(Sv,pl),Wv=ks(Ef),Cf=Cs(Ov,Is,Pi,Ni),$v=Cs(wv,Is,Pi,Ni),jv=Cs(Mv,Is,Pi,Ni),Uv=Cs(Is,Pi,Ni);function Gv(e){return Ds(e,[Vv,Cf],[Bv,$v],[Hv,jv],[Wv,Uv])}function Yv(e){return Ds(Nv(e),[Iv,Pv])}function Kv(e){return Ds(e,[Lv,kf],[Rv,kf],[Fv,zv])}function Xv(e){return Ds(e,[Cv,Dv])}const Zv=Cs(Is);function qv(e){return Ds(e,[kv,Zv])}const Jv=ks(Tv,Ev),Qv=ks(Of),tS=Cs(Is,Pi,Ni);function eS(e){return Ds(e,[Jv,Cf],[Qv,tS])}const nS="Invalid Duration",Df={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},sS={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Df},me=146097/400,Ps=146097/4800,iS={years:{quarters:4,months:12,weeks:me/7,days:me,hours:me*24,minutes:me*24*60,seconds:me*24*60*60,milliseconds:me*24*60*60*1e3},quarters:{months:3,weeks:me/28,days:me/4,hours:me*24/4,minutes:me*24*60/4,seconds:me*24*60*60/4,milliseconds:me*24*60*60*1e3/4},months:{weeks:Ps/7,days:Ps,hours:Ps*24,minutes:Ps*24*60,seconds:Ps*24*60*60,milliseconds:Ps*24*60*60*1e3},...Df},as=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],rS=as.slice(0).reverse();function Mn(e,t,n=!1){const s={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new ot(s)}function oS(e){return e<0?Math.floor(e):Math.ceil(e)}function Af(e,t,n,s,i){const r=e[i][n],o=t[n]/r,a=Math.sign(o)===Math.sign(s[i]),l=!a&&s[i]!==0&&Math.abs(o)<=1?oS(o):Math.trunc(o);s[i]+=l,t[n]-=l*r}function aS(e,t){rS.reduce((n,s)=>it(t[s])?n:(n&&Af(e,t,n,t,s),s),null)}function lS(e){const t={};for(const[n,s]of Object.entries(e))s!==0&&(t[n]=s);return t}class ot{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let s=n?iS:sS;t.matrix&&(s=t.matrix),this.values=t.values,this.loc=t.loc||_t.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(t,n){return ot.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new fe(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new ot({values:lo(t,ot.normalizeUnit),loc:_t.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(rs(t))return ot.fromMillis(t);if(ot.isDuration(t))return t;if(typeof t=="object")return ot.fromObject(t);throw new fe(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[s]=Xv(t);return s?ot.fromObject(s,n):ot.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[s]=qv(t);return s?ot.fromObject(s,n):ot.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new fe("need to specify a reason the Duration is invalid");const s=t instanceof Te?t:new Te(t,n);if(Ot.throwOnInvalid)throw new R1(s);return new ot({invalid:s})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Rd(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const s={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?zt.create(this.loc,s).formatDurationFromString(this,t):nS}toHuman(t={}){const n=as.map(s=>{const i=this.values[s];return it(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:s.slice(0,-1)}).format(i)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=hl(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();if(n<0||n>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const s=this.shiftTo("hours","minutes","seconds","milliseconds");let i=t.format==="basic"?"hhmm":"hh:mm";(!t.suppressSeconds||s.seconds!==0||s.milliseconds!==0)&&(i+=t.format==="basic"?"ss":":ss",(!t.suppressMilliseconds||s.milliseconds!==0)&&(i+=".SSS"));let r=s.toFormat(i);return t.includePrefix&&(r="T"+r),r}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=ot.fromDurationLike(t),s={};for(const i of as)(Os(n.values,i)||Os(this.values,i))&&(s[i]=n.get(i)+this.get(i));return Mn(this,{values:s},!0)}minus(t){if(!this.isValid)return this;const n=ot.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const s of Object.keys(this.values))n[s]=mf(t(this.values[s],s));return Mn(this,{values:n},!0)}get(t){return this[ot.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...lo(t,ot.normalizeUnit)};return Mn(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:s,matrix:i}={}){const o={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:i,conversionAccuracy:s};return Mn(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return aS(this.matrix,t),Mn(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=lS(this.normalize().shiftToAll().toObject());return Mn(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>ot.normalizeUnit(o));const n={},s={},i=this.toObject();let r;for(const o of as)if(t.indexOf(o)>=0){r=o;let a=0;for(const c in s)a+=this.matrix[c][o]*s[c],s[c]=0;rs(i[o])&&(a+=i[o]);const l=Math.trunc(a);n[o]=l,s[o]=(a*1e3-l*1e3)/1e3;for(const c in i)as.indexOf(c)>as.indexOf(o)&&Af(this.matrix,i,c,n,o)}else rs(i[o])&&(s[o]=i[o]);for(const o in s)s[o]!==0&&(n[r]+=o===r?s[o]:s[o]/this.matrix[r][o]);return Mn(this,{values:n},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Mn(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(s,i){return s===void 0||s===0?i===void 0||i===0:s===i}for(const s of as)if(!n(this.values[s],t.values[s]))return!1;return!0}}const Ns="Invalid Interval";function cS(e,t){return!e||!e.isValid?wt.invalid("missing or invalid start"):!t||!t.isValid?wt.invalid("missing or invalid end"):t<e?wt.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class wt{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new fe("need to specify a reason the Interval is invalid");const s=t instanceof Te?t:new Te(t,n);if(Ot.throwOnInvalid)throw new L1(s);return new wt({invalid:s})}static fromDateTimes(t,n){const s=Fi(t),i=Fi(n),r=cS(s,i);return r??new wt({start:s,end:i})}static after(t,n){const s=ot.fromDurationLike(n),i=Fi(t);return wt.fromDateTimes(i,i.plus(s))}static before(t,n){const s=ot.fromDurationLike(n),i=Fi(t);return wt.fromDateTimes(i.minus(s),i)}static fromISO(t,n){const[s,i]=(t||"").split("/",2);if(s&&i){let r,o;try{r=B.fromISO(s,n),o=r.isValid}catch{o=!1}let a,l;try{a=B.fromISO(i,n),l=a.isValid}catch{l=!1}if(o&&l)return wt.fromDateTimes(r,a);if(o){const c=ot.fromISO(i,n);if(c.isValid)return wt.after(r,c)}else if(l){const c=ot.fromISO(s,n);if(c.isValid)return wt.before(a,c)}}return wt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds"){if(!this.isValid)return NaN;const n=this.start.startOf(t),s=this.end.startOf(t);return Math.floor(s.diff(n,t).get(t))+(s.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?wt.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Fi).filter(o=>this.contains(o)).sort(),s=[];let{s:i}=this,r=0;for(;i<this.e;){const o=n[r]||this.e,a=+o>+this.e?this.e:o;s.push(wt.fromDateTimes(i,a)),i=a,r+=1}return s}splitBy(t){const n=ot.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s}=this,i=1,r;const o=[];for(;s<this.e;){const a=this.start.plus(n.mapUnits(l=>l*i));r=+a>+this.e?this.e:a,o.push(wt.fromDateTimes(s,r)),s=r,i+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,s=this.e<t.e?this.e:t.e;return n>=s?null:wt.fromDateTimes(n,s)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,s=this.e>t.e?this.e:t.e;return wt.fromDateTimes(n,s)}static merge(t){const[n,s]=t.sort((i,r)=>i.s-r.s).reduce(([i,r],o)=>r?r.overlaps(o)||r.abutsStart(o)?[i,r.union(o)]:[i.concat([r]),o]:[i,o],[[],null]);return s&&n.push(s),n}static xor(t){let n=null,s=0;const i=[],r=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...r),a=o.sort((l,c)=>l.time-c.time);for(const l of a)s+=l.type==="s"?1:-1,s===1?n=l.time:(n&&+n!=+l.time&&i.push(wt.fromDateTimes(n,l.time)),n=null);return wt.merge(i)}difference(...t){return wt.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Ns}toLocaleString(t=Qr,n={}){return this.isValid?zt.create(this.s.loc.clone(n),t).formatInterval(this):Ns}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Ns}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ns}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Ns}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Ns}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):ot.invalid(this.invalidReason)}mapEndpoints(t){return wt.fromDateTimes(t(this.s),t(this.e))}}class uo{static hasDST(t=Ot.defaultZone){const n=B.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Qe.isValidZone(t)}static normalizeZone(t){return Sn(t,Ot.defaultZone)}static months(t="long",{locale:n=null,numberingSystem:s=null,locObj:i=null,outputCalendar:r="gregory"}={}){return(i||_t.create(n,s,r)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:s=null,locObj:i=null,outputCalendar:r="gregory"}={}){return(i||_t.create(n,s,r)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:s=null,locObj:i=null}={}){return(i||_t.create(n,s,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:s=null,locObj:i=null}={}){return(i||_t.create(n,s,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return _t.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return _t.create(n,null,"gregory").eras(t)}static features(){return{relative:hf()}}}function If(e,t){const n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(t)-n(e);return Math.floor(ot.fromMillis(s).as("days"))}function uS(e,t,n){const s=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=If(l,c);return(u-u%7)/7}],["days",If]],i={},r=e;let o,a;for(const[l,c]of s)n.indexOf(l)>=0&&(o=l,i[l]=c(e,t),a=r.plus(i),a>t?(i[l]--,e=r.plus(i)):e=a);return[e,i,a,o]}function hS(e,t,n,s){let[i,r,o,a]=uS(e,t,n);const l=t-i,c=n.filter(h=>["hours","minutes","seconds","milliseconds"].indexOf(h)>=0);c.length===0&&(o<t&&(o=i.plus({[a]:1})),o!==i&&(r[a]=(r[a]||0)+l/(o-i)));const u=ot.fromObject(r,s);return c.length>0?ot.fromMillis(l,s).shiftTo(...c).plus(u):u}const bl={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Pf={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},dS=bl.hanidec.replace(/[\[|\]]/g,"").split("");function fS(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const s=e.charCodeAt(n);if(e[n].search(bl.hanidec)!==-1)t+=dS.indexOf(e[n]);else for(const i in Pf){const[r,o]=Pf[i];s>=r&&s<=o&&(t+=s-r)}}return parseInt(t,10)}else return t}function Ee({numberingSystem:e},t=""){return new RegExp(`${bl[e||"latn"]}${t}`)}const mS="missing Intl.DateTimeFormat.formatToParts support";function at(e,t=n=>n){return{regex:e,deser:([n])=>t(fS(n))}}const Nf=`[ ${String.fromCharCode(160)}]`,Lf=new RegExp(Nf,"g");function pS(e){return e.replace(/\./g,"\\.?").replace(Lf,Nf)}function Rf(e){return e.replace(/\./g,"").replace(Lf," ").toLowerCase()}function Oe(e,t){return e===null?null:{regex:RegExp(e.map(pS).join("|")),deser:([n])=>e.findIndex(s=>Rf(n)===Rf(s))+t}}function Ff(e,t){return{regex:e,deser:([,n,s])=>ao(n,s),groups:t}}function ho(e){return{regex:e,deser:([t])=>t}}function gS(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function bS(e,t){const n=Ee(t),s=Ee(t,"{2}"),i=Ee(t,"{3}"),r=Ee(t,"{4}"),o=Ee(t,"{6}"),a=Ee(t,"{1,2}"),l=Ee(t,"{1,3}"),c=Ee(t,"{1,6}"),u=Ee(t,"{1,9}"),h=Ee(t,"{2,4}"),d=Ee(t,"{4,6}"),f=b=>({regex:RegExp(gS(b.val)),deser:([y])=>y,literal:!0}),p=(b=>{if(e.literal)return f(b);switch(b.val){case"G":return Oe(t.eras("short",!1),0);case"GG":return Oe(t.eras("long",!1),0);case"y":return at(c);case"yy":return at(h,fl);case"yyyy":return at(r);case"yyyyy":return at(d);case"yyyyyy":return at(o);case"M":return at(a);case"MM":return at(s);case"MMM":return Oe(t.months("short",!0,!1),1);case"MMMM":return Oe(t.months("long",!0,!1),1);case"L":return at(a);case"LL":return at(s);case"LLL":return Oe(t.months("short",!1,!1),1);case"LLLL":return Oe(t.months("long",!1,!1),1);case"d":return at(a);case"dd":return at(s);case"o":return at(l);case"ooo":return at(i);case"HH":return at(s);case"H":return at(a);case"hh":return at(s);case"h":return at(a);case"mm":return at(s);case"m":return at(a);case"q":return at(a);case"qq":return at(s);case"s":return at(a);case"ss":return at(s);case"S":return at(l);case"SSS":return at(i);case"u":return ho(u);case"uu":return ho(a);case"uuu":return at(n);case"a":return Oe(t.meridiems(),0);case"kkkk":return at(r);case"kk":return at(h,fl);case"W":return at(a);case"WW":return at(s);case"E":case"c":return at(n);case"EEE":return Oe(t.weekdays("short",!1,!1),1);case"EEEE":return Oe(t.weekdays("long",!1,!1),1);case"ccc":return Oe(t.weekdays("short",!0,!1),1);case"cccc":return Oe(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Ff(new RegExp(`([+-]${a.source})(?::(${s.source}))?`),2);case"ZZZ":return Ff(new RegExp(`([+-]${a.source})(${s.source})?`),2);case"z":return ho(/[a-z_+-/]{1,256}?/i);case" ":return ho(/[^\S\n\r]/);default:return f(b)}})(e)||{invalidReason:mS};return p.token=e,p}const _S={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function yS(e,t){const{type:n,value:s}=e;if(n==="literal"){const o=/^\s+$/.test(s);return{literal:!o,val:o?" ":s}}const i=t[n];let r=_S[n];if(typeof r=="object"&&(r=r[i]),r)return{literal:!1,val:r}}function xS(e){return[`^${e.map(n=>n.regex).reduce((n,s)=>`${n}(${s.source})`,"")}$`,e]}function vS(e,t,n){const s=e.match(t);if(s){const i={};let r=1;for(const o in n)if(Os(n,o)){const a=n[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(i[a.token.val[0]]=a.deser(s.slice(r,r+l))),r+=l}return[s,i]}else return[s,{}]}function SS(e){const t=r=>{switch(r){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,s;return it(e.z)||(n=Qe.create(e.z)),it(e.Z)||(n||(n=new jt(e.Z)),s=e.Z),it(e.q)||(e.M=(e.q-1)*3+1),it(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),it(e.u)||(e.S=ul(e.u)),[Object.keys(e).reduce((r,o)=>{const a=t(o);return a&&(r[a]=e[o]),r},{}),n,s]}let _l=null;function wS(){return _l||(_l=B.fromMillis(1555555555555)),_l}function MS(e,t){if(e.literal)return e;const n=zt.macroTokenToFormatOpts(e.val),s=Bf(n,t);return s==null||s.includes(void 0)?e:s}function zf(e,t){return Array.prototype.concat(...e.map(n=>MS(n,t)))}function Vf(e,t,n){const s=zf(zt.parseFormat(n),e),i=s.map(o=>bS(o,e)),r=i.find(o=>o.invalidReason);if(r)return{input:t,tokens:s,invalidReason:r.invalidReason};{const[o,a]=xS(i),l=RegExp(o,"i"),[c,u]=vS(t,l,a),[h,d,f]=u?SS(u):[null,null,void 0];if(Os(u,"a")&&Os(u,"H"))throw new Oi("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:s,regex:l,rawMatches:c,matches:u,result:h,zone:d,specificOffset:f}}}function TS(e,t,n){const{result:s,zone:i,specificOffset:r,invalidReason:o}=Vf(e,t,n);return[s,i,r,o]}function Bf(e,t){return e?zt.create(t,e).formatDateTimeParts(wS()).map(i=>yS(i,e)):null}const Hf=[0,31,59,90,120,151,181,212,243,273,304,334],Wf=[0,31,60,91,121,152,182,213,244,274,305,335];function pe(e,t){return new Te("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function $f(e,t,n){const s=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const i=s.getUTCDay();return i===0?7:i}function jf(e,t,n){return n+(Di(e)?Wf:Hf)[t-1]}function Uf(e,t){const n=Di(e)?Wf:Hf,s=n.findIndex(r=>r<t),i=t-n[s];return{month:s+1,day:i}}function yl(e){const{year:t,month:n,day:s}=e,i=jf(t,n,s),r=$f(t,n,s);let o=Math.floor((i-r+10)/7),a;return o<1?(a=t-1,o=oo(a)):o>oo(t)?(a=t+1,o=1):a=t,{weekYear:a,weekNumber:o,weekday:r,...co(e)}}function Gf(e){const{weekYear:t,weekNumber:n,weekday:s}=e,i=$f(t,1,4),r=Ai(t);let o=n*7+s-i-3,a;o<1?(a=t-1,o+=Ai(a)):o>r?(a=t+1,o-=Ai(t)):a=t;const{month:l,day:c}=Uf(a,o);return{year:a,month:l,day:c,...co(e)}}function xl(e){const{year:t,month:n,day:s}=e,i=jf(t,n,s);return{year:t,ordinal:i,...co(e)}}function Yf(e){const{year:t,ordinal:n}=e,{month:s,day:i}=Uf(t,n);return{year:t,month:s,day:i,...co(e)}}function ES(e){const t=io(e.weekYear),n=tn(e.weekNumber,1,oo(e.weekYear)),s=tn(e.weekday,1,7);return t?n?s?!1:pe("weekday",e.weekday):pe("week",e.week):pe("weekYear",e.weekYear)}function OS(e){const t=io(e.year),n=tn(e.ordinal,1,Ai(e.year));return t?n?!1:pe("ordinal",e.ordinal):pe("year",e.year)}function Kf(e){const t=io(e.year),n=tn(e.month,1,12),s=tn(e.day,1,ro(e.year,e.month));return t?n?s?!1:pe("day",e.day):pe("month",e.month):pe("year",e.year)}function Xf(e){const{hour:t,minute:n,second:s,millisecond:i}=e,r=tn(t,0,23)||t===24&&n===0&&s===0&&i===0,o=tn(n,0,59),a=tn(s,0,59),l=tn(i,0,999);return r?o?a?l?!1:pe("millisecond",i):pe("second",s):pe("minute",n):pe("hour",t)}const vl="Invalid DateTime",Zf=864e13;function fo(e){return new Te("unsupported zone",`the zone "${e.name}" is not supported`)}function Sl(e){return e.weekData===null&&(e.weekData=yl(e.c)),e.weekData}function Li(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new B({...n,...t,old:n})}function qf(e,t,n){let s=e-t*60*1e3;const i=n.offset(s);if(t===i)return[s,t];s-=(i-t)*60*1e3;const r=n.offset(s);return i===r?[s,i]:[e-Math.min(i,r)*60*1e3,Math.max(i,r)]}function Jf(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function mo(e,t,n){return qf(dl(e),t,n)}function Qf(e,t){const n=e.o,s=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,r={...e.c,year:s,month:i,day:Math.min(e.c.day,ro(s,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=ot.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=dl(r);let[l,c]=qf(a,n,e.zone);return o!==0&&(l+=o,c=e.zone.offset(l)),{ts:l,o:c}}function Ri(e,t,n,s,i,r){const{setZone:o,zone:a}=n;if(e&&Object.keys(e).length!==0||t){const l=t||a,c=B.fromObject(e,{...n,zone:l,specificOffset:r});return o?c:c.setZone(a)}else return B.invalid(new Te("unparsable",`the input "${i}" can't be parsed as ${s}`))}function po(e,t,n=!0){return e.isValid?zt.create(_t.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function wl(e,t){const n=e.c.year>9999||e.c.year<0;let s="";return n&&e.c.year>=0&&(s+="+"),s+=kt(e.c.year,n?6:4),t?(s+="-",s+=kt(e.c.month),s+="-",s+=kt(e.c.day)):(s+=kt(e.c.month),s+=kt(e.c.day)),s}function tm(e,t,n,s,i,r){let o=kt(e.c.hour);return t?(o+=":",o+=kt(e.c.minute),(e.c.second!==0||!n)&&(o+=":")):o+=kt(e.c.minute),(e.c.second!==0||!n)&&(o+=kt(e.c.second),(e.c.millisecond!==0||!s)&&(o+=".",o+=kt(e.c.millisecond,3))),i&&(e.isOffsetFixed&&e.offset===0&&!r?o+="Z":e.o<0?(o+="-",o+=kt(Math.trunc(-e.o/60)),o+=":",o+=kt(Math.trunc(-e.o%60))):(o+="+",o+=kt(Math.trunc(e.o/60)),o+=":",o+=kt(Math.trunc(e.o%60)))),r&&(o+="["+e.zone.ianaName+"]"),o}const em={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},kS={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},CS={ordinal:1,hour:0,minute:0,second:0,millisecond:0},nm=["year","month","day","hour","minute","second","millisecond"],DS=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],AS=["year","ordinal","hour","minute","second","millisecond"];function sm(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Rd(e);return t}function im(e,t){const n=Sn(t.zone,Ot.defaultZone),s=_t.fromObject(t),i=Ot.now();let r,o;if(it(e.year))r=i;else{for(const c of nm)it(e[c])&&(e[c]=em[c]);const a=Kf(e)||Xf(e);if(a)return B.invalid(a);const l=n.offset(i);[r,o]=mo(e,l,n)}return new B({ts:r,zone:n,loc:s,o})}function rm(e,t,n){const s=it(n.round)?!0:n.round,i=(o,a)=>(o=hl(o,s||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(o,a)),r=o=>n.calendary?t.hasSame(e,o)?0:t.startOf(o).diff(e.startOf(o),o).get(o):t.diff(e,o).get(o);if(n.unit)return i(r(n.unit),n.unit);for(const o of n.units){const a=r(o);if(Math.abs(a)>=1)return i(a,o)}return i(e>t?-0:0,n.units[n.units.length-1])}function om(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}class B{constructor(t){const n=t.zone||Ot.defaultZone;let s=t.invalid||(Number.isNaN(t.ts)?new Te("invalid input"):null)||(n.isValid?null:fo(n));this.ts=it(t.ts)?Ot.now():t.ts;let i=null,r=null;if(!s)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[i,r]=[t.old.c,t.old.o];else{const a=n.offset(this.ts);i=Jf(this.ts,a),s=Number.isNaN(i.year)?new Te("invalid input"):null,i=s?null:i,r=s?null:a}this._zone=n,this.loc=t.loc||_t.create(),this.invalid=s,this.weekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}static now(){return new B({})}static local(){const[t,n]=om(arguments),[s,i,r,o,a,l,c]=n;return im({year:s,month:i,day:r,hour:o,minute:a,second:l,millisecond:c},t)}static utc(){const[t,n]=om(arguments),[s,i,r,o,a,l,c]=n;return t.zone=jt.utcInstance,im({year:s,month:i,day:r,hour:o,minute:a,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const s=sv(t)?t.valueOf():NaN;if(Number.isNaN(s))return B.invalid("invalid input");const i=Sn(n.zone,Ot.defaultZone);return i.isValid?new B({ts:s,zone:i,loc:_t.fromObject(n)}):B.invalid(fo(i))}static fromMillis(t,n={}){if(rs(t))return t<-Zf||t>Zf?B.invalid("Timestamp out of range"):new B({ts:t,zone:Sn(n.zone,Ot.defaultZone),loc:_t.fromObject(n)});throw new fe(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(rs(t))return new B({ts:t*1e3,zone:Sn(n.zone,Ot.defaultZone),loc:_t.fromObject(n)});throw new fe("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const s=Sn(n.zone,Ot.defaultZone);if(!s.isValid)return B.invalid(fo(s));const i=Ot.now(),r=it(n.specificOffset)?s.offset(i):n.specificOffset,o=lo(t,sm),a=!it(o.ordinal),l=!it(o.year),c=!it(o.month)||!it(o.day),u=l||c,h=o.weekYear||o.weekNumber,d=_t.fromObject(n);if((u||a)&&h)throw new Oi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&a)throw new Oi("Can't mix ordinal dates with month/day");const f=h||o.weekday&&!u;let m,p,b=Jf(i,r);f?(m=DS,p=kS,b=yl(b)):a?(m=AS,p=CS,b=xl(b)):(m=nm,p=em);let y=!1;for(const T of m){const L=o[T];it(L)?y?o[T]=p[T]:o[T]=b[T]:y=!0}const x=f?ES(o):a?OS(o):Kf(o),w=x||Xf(o);if(w)return B.invalid(w);const v=f?Gf(o):a?Yf(o):o,[S,C]=mo(v,r,s),D=new B({ts:S,zone:s,o:C,loc:d});return o.weekday&&u&&t.weekday!==D.weekday?B.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${D.toISO()}`):D}static fromISO(t,n={}){const[s,i]=Gv(t);return Ri(s,i,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[s,i]=Yv(t);return Ri(s,i,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[s,i]=Kv(t);return Ri(s,i,n,"HTTP",n)}static fromFormat(t,n,s={}){if(it(t)||it(n))throw new fe("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:r=null}=s,o=_t.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0}),[a,l,c,u]=TS(o,t,n);return u?B.invalid(u):Ri(a,l,s,`format ${n}`,t,c)}static fromString(t,n,s={}){return B.fromFormat(t,n,s)}static fromSQL(t,n={}){const[s,i]=eS(t);return Ri(s,i,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new fe("need to specify a reason the DateTime is invalid");const s=t instanceof Te?t:new Te(t,n);if(Ot.throwOnInvalid)throw new N1(s);return new B({invalid:s})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const s=Bf(t,_t.fromObject(n));return s?s.map(i=>i?i.val:null).join(""):null}static expandFormat(t,n={}){return zf(zt.parseFormat(t),_t.fromObject(n)).map(i=>i.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Sl(this).weekYear:NaN}get weekNumber(){return this.isValid?Sl(this).weekNumber:NaN}get weekday(){return this.isValid?Sl(this).weekday:NaN}get ordinal(){return this.isValid?xl(this.c).ordinal:NaN}get monthShort(){return this.isValid?uo.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?uo.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?uo.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?uo.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Di(this.year)}get daysInMonth(){return ro(this.year,this.month)}get daysInYear(){return this.isValid?Ai(this.year):NaN}get weeksInWeekYear(){return this.isValid?oo(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:s,calendar:i}=zt.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:s,outputCalendar:i}}toUTC(t=0,n={}){return this.setZone(jt.instance(t),n)}toLocal(){return this.setZone(Ot.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:s=!1}={}){if(t=Sn(t,Ot.defaultZone),t.equals(this.zone))return this;if(t.isValid){let i=this.ts;if(n||s){const r=t.offset(this.ts),o=this.toObject();[i]=mo(o,r,t)}return Li(this,{ts:i,zone:t})}else return B.invalid(fo(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:s}={}){const i=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:s});return Li(this,{loc:i})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=lo(t,sm),s=!it(n.weekYear)||!it(n.weekNumber)||!it(n.weekday),i=!it(n.ordinal),r=!it(n.year),o=!it(n.month)||!it(n.day),a=r||o,l=n.weekYear||n.weekNumber;if((a||i)&&l)throw new Oi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&i)throw new Oi("Can't mix ordinal dates with month/day");let c;s?c=Gf({...yl(this.c),...n}):it(n.ordinal)?(c={...this.toObject(),...n},it(n.day)&&(c.day=Math.min(ro(c.year,c.month),c.day))):c=Yf({...xl(this.c),...n});const[u,h]=mo(c,this.o,this.zone);return Li(this,{ts:u,o:h})}plus(t){if(!this.isValid)return this;const n=ot.fromDurationLike(t);return Li(this,Qf(this,n))}minus(t){if(!this.isValid)return this;const n=ot.fromDurationLike(t).negate();return Li(this,Qf(this,n))}startOf(t){if(!this.isValid)return this;const n={},s=ot.normalizeUnit(t);switch(s){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(s==="weeks"&&(n.weekday=1),s==="quarters"){const i=Math.ceil(this.month/3);n.month=(i-1)*3+1}return this.set(n)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,n={}){return this.isValid?zt.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):vl}toLocaleString(t=Qr,n={}){return this.isValid?zt.create(this.loc.clone(n),t).formatDateTime(this):vl}toLocaleParts(t={}){return this.isValid?zt.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:s=!1,includeOffset:i=!0,extendedZone:r=!1}={}){if(!this.isValid)return null;const o=t==="extended";let a=wl(this,o);return a+="T",a+=tm(this,o,n,s,i,r),a}toISODate({format:t="extended"}={}){return this.isValid?wl(this,t==="extended"):null}toISOWeekDate(){return po(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:s=!0,includePrefix:i=!1,extendedZone:r=!1,format:o="extended"}={}){return this.isValid?(i?"T":"")+tm(this,o==="extended",n,t,s,r):null}toRFC2822(){return po(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return po(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?wl(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:s=!0}={}){let i="HH:mm:ss.SSS";return(n||t)&&(s&&(i+=" "),n?i+="z":t&&(i+="ZZ")),po(this,i,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():vl}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",s={}){if(!this.isValid||!t.isValid)return ot.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...s},r=iv(n).map(ot.normalizeUnit),o=t.valueOf()>this.valueOf(),a=o?this:t,l=o?t:this,c=hS(a,l,r,i);return o?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(B.now(),t,n)}until(t){return this.isValid?wt.fromDateTimes(this,t):this}hasSame(t,n){if(!this.isValid)return!1;const s=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n)<=s&&s<=i.endOf(n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||B.fromObject({},{zone:this.zone}),s=t.padding?this<n?-t.padding:t.padding:0;let i=["years","months","days","hours","minutes","seconds"],r=t.unit;return Array.isArray(t.unit)&&(i=t.unit,r=void 0),rm(n,this.plus(s),{...t,numeric:"always",units:i,unit:r})}toRelativeCalendar(t={}){return this.isValid?rm(t.base||B.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(B.isDateTime))throw new fe("min requires all arguments be DateTimes");return df(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(B.isDateTime))throw new fe("max requires all arguments be DateTimes");return df(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,s={}){const{locale:i=null,numberingSystem:r=null}=s,o=_t.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0});return Vf(o,t,n)}static fromStringExplain(t,n,s={}){return B.fromFormatExplain(t,n,s)}static get DATE_SHORT(){return Qr}static get DATE_MED(){return Fd}static get DATE_MED_WITH_WEEKDAY(){return F1}static get DATE_FULL(){return zd}static get DATE_HUGE(){return Vd}static get TIME_SIMPLE(){return Bd}static get TIME_WITH_SECONDS(){return Hd}static get TIME_WITH_SHORT_OFFSET(){return Wd}static get TIME_WITH_LONG_OFFSET(){return $d}static get TIME_24_SIMPLE(){return jd}static get TIME_24_WITH_SECONDS(){return Ud}static get TIME_24_WITH_SHORT_OFFSET(){return Gd}static get TIME_24_WITH_LONG_OFFSET(){return Yd}static get DATETIME_SHORT(){return Kd}static get DATETIME_SHORT_WITH_SECONDS(){return Xd}static get DATETIME_MED(){return Zd}static get DATETIME_MED_WITH_SECONDS(){return qd}static get DATETIME_MED_WITH_WEEKDAY(){return z1}static get DATETIME_FULL(){return Jd}static get DATETIME_FULL_WITH_SECONDS(){return Qd}static get DATETIME_HUGE(){return tf}static get DATETIME_HUGE_WITH_SECONDS(){return ef}}function Fi(e){if(B.isDateTime(e))return e;if(e&&e.valueOf&&rs(e.valueOf()))return B.fromJSDate(e);if(e&&typeof e=="object")return B.fromObject(e);throw new fe(`Unknown datetime argument: ${e}, of type ${typeof e}`)}/*!
|
|
25
|
-
* chartjs-adapter-luxon v1.3.1
|
|
26
|
-
* https://www.chartjs.org
|
|
27
|
-
* (c) 2023 chartjs-adapter-luxon Contributors
|
|
28
|
-
* Released under the MIT license
|
|
29
|
-
*/const IS={datetime:B.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:B.TIME_WITH_SECONDS,minute:B.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};Eh._date.override({_id:"luxon",_create:function(e){return B.fromMillis(e,this.options)},init(e){this.options.locale||(this.options.locale=e.locale)},formats:function(){return IS},parse:function(e,t){const n=this.options,s=typeof e;return e===null||s==="undefined"?null:(s==="number"?e=this._create(e):s==="string"?typeof t=="string"?e=B.fromFormat(e,t,n):e=B.fromISO(e,n):e instanceof Date?e=B.fromJSDate(e,n):s==="object"&&!(e instanceof B)&&(e=B.fromObject(e,n)),e.isValid?e.valueOf():null)},format:function(e,t){const n=this._create(e);return typeof t=="string"?n.toFormat(t):n.toLocaleString(t)},add:function(e,t,n){const s={};return s[n]=t,this._create(e).plus(s).valueOf()},diff:function(e,t,n){return this._create(e).diff(this._create(t)).as(n).valueOf()},startOf:function(e,t,n){if(t==="isoWeek"){n=Math.trunc(Math.min(Math.max(0,n),6));const s=this._create(e);return s.minus({days:(s.weekday-n+7)%7}).startOf("day").valueOf()}return t?this._create(e).startOf(t).valueOf():e},endOf:function(e,t){return this._create(e).endOf(t).valueOf()}});function PS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ml={},NS={get exports(){return Ml},set exports(e){Ml=e}},am={};function ge(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var LS=ge;ge.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},ge.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},ge.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var s=this;return this._timer=setTimeout(function(){s._attempts++,s._operationTimeoutCb&&(s._timeout=setTimeout(function(){s._operationTimeoutCb(s._attempts)},s._operationTimeout),s._options.unref&&s._timeout.unref()),s._fn(s._attempts)},n),this._options.unref&&this._timer.unref(),!0},ge.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},ge.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},ge.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},ge.prototype.start=ge.prototype.try,ge.prototype.errors=function(){return this._errors},ge.prototype.attempts=function(){return this._attempts},ge.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,s=0;s<this._errors.length;s++){var i=this._errors[s],r=i.message,o=(e[r]||0)+1;e[r]=o,o>=n&&(t=i,n=o)}return t},function(e){var t=LS;e.operation=function(n){var s=e.timeouts(n);return new t(s,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(n){if(n instanceof Array)return[].concat(n);var s={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)s[i]=n[i];if(s.minTimeout>s.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<s.retries;o++)r.push(this.createTimeout(o,s));return n&&n.forever&&!r.length&&r.push(this.createTimeout(o,s)),r.sort(function(a,l){return a-l}),r},e.createTimeout=function(n,s){var i=s.randomize?Math.random()+1:1,r=Math.round(i*Math.max(s.minTimeout,1)*Math.pow(s.factor,n));return r=Math.min(r,s.maxTimeout),r},e.wrap=function(n,s,i){if(s instanceof Array&&(i=s,s=null),!i){i=[];for(var r in n)typeof n[r]=="function"&&i.push(r)}for(var o=0;o<i.length;o++){var a=i[o],l=n[a];n[a]=function(u){var h=e.operation(s),d=Array.prototype.slice.call(arguments,1),f=d.pop();d.push(function(m){h.retry(m)||(m&&(arguments[0]=h.mainError()),f.apply(this,arguments))}),h.attempt(function(){u.apply(n,d)})}.bind(n,l),n[a].options=s}}}(am),function(e){e.exports=am}(NS);const RS=PS(Ml),FS=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed"]);class lm extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const zS=(e,t,n)=>{const s=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=s,e},VS=e=>FS.has(e),cm=e=>globalThis.DOMException===void 0?new Error(e):new DOMException(e);async function BS(e,t){return new Promise((n,s)=>{t={onFailedAttempt(){},retries:10,...t};const i=RS.operation(t);i.attempt(async r=>{try{n(await e(r))}catch(o){if(!(o instanceof Error)){s(new TypeError(`Non-error was thrown: "${o}". You should only throw errors.`));return}if(o instanceof lm)i.stop(),s(o.originalError);else if(o instanceof TypeError&&!VS(o.message))i.stop(),s(o);else{zS(o,r,t);try{await t.onFailedAttempt(o)}catch(a){s(a);return}i.retry(o)||s(i.mainError())}}}),t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",()=>{i.stop();const r=t.signal.reason===void 0?cm("The operation was aborted."):t.signal.reason;s(r instanceof Error?r:cm(r))},{once:!0})})}const go={errorBarLineWidth:{v:[1,3]},errorBarColor:{v:["#2c2c2c","#1f1f1f"]},errorBarWhiskerLineWidth:{v:[1,3]},errorBarWhiskerRatio:{v:[.2,.25]},errorBarWhiskerSize:{v:[20,24]},errorBarWhiskerColor:{v:["#2c2c2c","#1f1f1f"]}},Tl={_scriptable:!0,_indexable:e=>e!=="v"},um=Object.keys(go);function El(e,t){const n=Array.isArray(e)?e:[e],s=Array.isArray(t)?t:[t];if(n.length===s.length)return n.map((r,o)=>[r,s[o]]);const i=Math.max(n.length,s.length);return Array(i).map((r,o)=>[n[o%n.length],s[o%s.length]])}function Jt(e,t){if(typeof e=="string"||typeof e=="number")return e;const n=Array.isArray(e)?e:e.v;return n[t%n.length]}function Ol(e,t,n){const s=Jt(t.errorBarWhiskerRatio,n);return e!=null&&s>0?e*s*.5:Jt(t.errorBarWhiskerSize,n)*.5}function HS(e,t,n,s,i){i.save(),i.translate(e.x,0);const r=El(t??e.y,n??e.y);r.reverse().forEach(([o,a],l)=>{const c=r.length-l-1,u=Ol(e.width,s,c);i.lineWidth=Jt(s.errorBarLineWidth,c),i.strokeStyle=Jt(s.errorBarColor,c),i.beginPath(),i.moveTo(0,o),i.lineTo(0,a),i.stroke(),i.lineWidth=Jt(s.errorBarWhiskerLineWidth,c),i.strokeStyle=Jt(s.errorBarWhiskerColor,c),i.beginPath(),i.moveTo(-u,o),i.lineTo(u,o),i.moveTo(-u,a),i.lineTo(u,a),i.stroke()}),i.restore()}function WS(e,t,n,s,i){i.save(),i.translate(0,e.y);const r=El(t??e.x,n??e.x);r.reverse().forEach(([o,a],l)=>{const c=r.length-l-1,u=Ol(e.height,s,c);i.lineWidth=Jt(s.errorBarLineWidth,c),i.strokeStyle=Jt(s.errorBarColor,c),i.beginPath(),i.moveTo(o,0),i.lineTo(a,0),i.stroke(),i.lineWidth=Jt(s.errorBarWhiskerLineWidth,c),i.strokeStyle=Jt(s.errorBarWhiskerColor,c),i.beginPath(),i.moveTo(o,-u),i.lineTo(o,u),i.moveTo(a,-u),i.lineTo(a,u),i.stroke()}),i.restore()}function hm(e,t){var n,s,i,r;const o=e.getProps(["x","y","width","height","xMin","xMax","yMin","yMax"]);(o.xMin!=null||o.xMax!=null)&&WS(o,(n=o.xMin)!==null&&n!==void 0?n:null,(s=o.xMax)!==null&&s!==void 0?s:null,e.options,t),(o.yMin!=null||o.yMax!=null)&&HS(o,(i=o.yMin)!==null&&i!==void 0?i:null,(r=o.yMax)!==null&&r!==void 0?r:null,e.options,t)}function $S(e,t,n,s,i){i.save(),i.translate(e.x,e.y);const r=(e.startAngle+e.endAngle)/2,o=Math.cos(r),a=Math.sin(r),l={x:-a,y:o},c=Math.sqrt(l.x*l.x+l.y*l.y);l.x/=c,l.y/=c;const u=El(t??e.outerRadius,n??e.outerRadius);u.reverse().forEach(([h,d],f)=>{const m=u.length-f-1,p=h*o,b=h*a,y=d*o,x=d*a,w=Ol(null,s,m),v=l.x*w,S=l.y*w;i.lineWidth=Jt(s.errorBarLineWidth,m),i.strokeStyle=Jt(s.errorBarColor,m),i.beginPath(),i.moveTo(p,b),i.lineTo(y,x),i.stroke(),i.lineWidth=Jt(s.errorBarWhiskerLineWidth,m),i.strokeStyle=Jt(s.errorBarWhiskerColor,m),i.beginPath(),i.moveTo(p+v,b+S),i.lineTo(p-v,b-S),i.moveTo(y+v,x+S),i.lineTo(y-v,x-S),i.stroke()}),i.restore()}function jS(e,t){const n=e.getProps(["x","y","startAngle","endAngle","rMin","rMax","outerRadius"]);(n.rMin!=null||n.rMax!=null)&&$S(n,n.rMin,n.rMax,e.options,t)}class Ls extends es{draw(t){super.draw(t),hm(this,t)}}Ls.id="barWithErrorBar",Ls.defaults={...es.defaults,...go},Ls.defaultRoutes=es.defaultRoutes,Ls.descriptors=Tl;class oe extends ts{draw(t,n){super.draw.call(this,t,n),hm(this,t)}}oe.id="pointWithErrorBar",oe.defaults={...ts.defaults,...go},oe.defaultRoutes=ts.defaultRoutes,oe.descriptors=Tl;class Rs extends Qn{draw(t){super.draw(t),jS(this,t)}}Rs.id="arcWithErrorBar",Rs.defaults={...Qn.defaults,...go},Rs.defaultRoutes=Qn.defaultRoutes,Rs.descriptors=Tl;const kl=["xMin","xMax","yMin","yMax"];function dm(e){return e?kl.slice(0,2):kl.slice(2)}function zi(e,t,n,s,i){const r=[`${s.axis}Min`,`${s.axis}Max`],o=s.getBasePixel();for(const a of r){const l=t[a];Array.isArray(l)?e[a]=l.map(c=>i?o:s.getPixelForValue(c,n)):typeof l=="number"?e[a]=i?o:s.getPixelForValue(l,n):e[a]=null}}function US(e,t,n,s,i){const r=i.animation,o=[`${n.axis}Min`,`${n.axis}Max`],a=l=>{const c=n.getDistanceFromCenterForValue(l),u=r.animateScale?0:c;return s?u:c};for(const l of o){const c=t[l];Array.isArray(c)?e[l]=c.map(a):typeof c=="number"?e[l]=a(c):e[l]=null}}function Cl(e){return Array.isArray(e)?e.slice().reverse():e}function fm(e){const t=dm(e.element.horizontal),n=Td.defaults.callbacks.label.call(this,e),s=e.chart.data.datasets[e.datasetIndex].data[e.dataIndex];return s==null||t.every(i=>s[i]==null)?n:`${n} (${Cl(s[t[0]])} .. ${s[t[1]]})`}function GS(e){const t=e.chart.data.datasets[e.datasetIndex].data[e.dataIndex],n=(s,i)=>{const r=dm(i);return t==null||r.every(o=>t[o]==null)?s:`${s} [${Cl(t[r[0]])} .. ${t[r[1]]}]`};return`(${n(e.label,!0)}, ${n(e.parsed.y,!1)})`}function YS(e){const t=Le.overrides.plugins.tooltip.callbacks.label.call(this,e),n=e.chart.data.datasets[e.datasetIndex].data[e.dataIndex],s=["rMin","rMax"];return n==null||s.every(i=>n[i]==null)?t:`${t} [${Cl(n[s[0]])} .. ${n[s[1]]}]`}const mm={color(e,t,n){const s=e||"transparent",i=t||"transparent";if(s===i)return t;const r=kr(s),o=r.valid&&kr(i);return o&&o.valid?o.mix(r,n).hexString():t},number(e,t,n){return e===t?t:e+(t-e)*n}};function pm(e,t,n,s,i){if(typeof e===s&&typeof t===s)return i(e,t,n);if(Array.isArray(e)&&Array.isArray(t))return e.map((o,a)=>i(o,t[a],n));const r=o=>o&&Array.isArray(o.v);return r(e)&&r(t)?{v:e.v.map((o,a)=>i(o,t.v[a],n))}:t}function KS(e,t,n){return pm(e,t,n,"number",mm.number)}function XS(e,t,n){return pm(e,t,n,"string",mm.color)}const bo={animations:{numberArray:{fn:KS,properties:kl.concat(um.filter(e=>!e.endsWith("Color")),["rMin","rMax"])},colorArray:{fn:XS,properties:um.filter(e=>e.endsWith("Color"))}}};function _o(e,t){const{axis:n}=e;e.axis=`${n}MinMin`;const{min:s}=t(e);e.axis=`${n}MaxMax`;const{max:i}=t(e);return e.axis=n,{min:s,max:i}}function gm(e,t,n){return Array.isArray(t)?n(e,...t):typeof t=="number"?n(e,t):e}function Fs(e,t,n,s,i){const r=typeof t=="string"?t:t.axis,o=`${r}Min`,a=`${r}Max`,l=`${r}MinMin`,c=`${r}MaxMax`;for(let u=0;u<i;u+=1){const h=u+s,d=e[u];d[o]=typeof n[h]=="object"?n[h][o]:null,d[a]=typeof n[h]=="object"?n[h][a]:null,d[l]=gm(d[r],d[o],Math.min),d[c]=gm(d[r],d[a],Math.max)}}function bm(e,t,n,s){const{axis:i}=t,r=t.getLabels();for(let o=0;o<s;o+=1){const a=o+n,l=e[o];l[i]=t.parse(r[a],a)}}function yo(e,t,n,s=[],i=[]){$t.addControllers(n),Array.isArray(s)?$t.addElements(...s):$t.addElements(s),Array.isArray(i)?$t.addScales(...i):$t.addScales(i);const r=t;return r.type=e,r}class zs extends _n{getMinMax(t,n){return _o(t,s=>super.getMinMax(s,n))}parsePrimitiveData(t,n,s,i){const r=super.parsePrimitiveData(t,n,s,i);return this.parseErrorData(r,t,n,s,i),r}parseObjectData(t,n,s,i){const r=super.parseObjectData(t,n,s,i);return this.parseErrorData(r,t,n,s,i),r}parseErrorData(t,n,s,i,r){Fs(t,n.vScale,s,i,r),bm(t,n.iScale,i,r)}updateElement(t,n,s,i){typeof n=="number"&&zi(s,this.getParsed(n),n,this._cachedMeta.vScale,i==="reset"),super.updateElement(t,n,s,i)}}zs.id="barWithErrorBars",zs.defaults=se({},[_n.defaults,bo,{dataElementType:Ls.id}]),zs.overrides=se({},[_n.overrides,{plugins:{tooltip:{callbacks:{label:fm}}}}]),zs.defaultRoutes=_n.defaultRoutes;class ZS extends Xt{constructor(t,n){super(t,yo("barWithErrorBars",n,zs,Ls,[ns,Ts]))}}ZS.id=zs.id;const _m=["linear","logarithmic","time","timeseries"];class ls extends qe{getMinMax(t,n){return _o(t,s=>super.getMinMax(s,n))}parsePrimitiveData(t,n,s,i){const r=super.parsePrimitiveData(t,n,s,i);return this.parseErrorData(r,t,n,s,i),r}parseObjectData(t,n,s,i){const r=super.parseObjectData(t,n,s,i);return this.parseErrorData(r,t,n,s,i),r}parseErrorData(t,n,s,i,r){Fs(t,n.vScale,s,i,r);const o=n.iScale;_m.includes(o.type)?Fs(t,n.iScale,s,i,r):bm(t,n.iScale,i,r)}updateElement(t,n,s,i){t instanceof oe&&typeof n=="number"&&this.updateElementScale(n,s,i),super.updateElement(t,n,s,i)}updateElementScale(t,n,s){zi(n,this.getParsed(t),t,this._cachedMeta.vScale,s==="reset");const i=this._cachedMeta.iScale;_m.includes(i.type)&&zi(n,this.getParsed(t),t,this._cachedMeta.iScale,s==="reset")}updateElements(t,n,s,i){const r=i==="reset",a=this.chart._animationsDisabled||r||i==="none";if(super.updateElements(t,n,s,i),!!a)for(let l=n;l<n+s;++l){const c=t[l];c instanceof oe&&this.updateElementScale(l,c,i)}}}ls.id="lineWithErrorBars",ls.defaults=se({},[qe.defaults,bo,{dataElementType:oe.id}]),ls.overrides=se({},[qe.overrides,{plugins:{tooltip:{callbacks:{label:fm}}}}]),ls.defaultRoutes=qe.defaultRoutes;class ym extends Xt{constructor(t,n){super(t,yo("lineWithErrorBars",n,ls,oe,[ns,Ts]))}}ym.id=ls.id;class cs extends Zn{getMinMax(t,n){return _o(t,s=>super.getMinMax(s,n))}parsePrimitiveData(t,n,s,i){const r=super.parsePrimitiveData(t,n,s,i);return this.parseErrorData(r,t,n,s,i),r}parseObjectData(t,n,s,i){const r=super.parseObjectData(t,n,s,i);return this.parseErrorData(r,t,n,s,i),r}parseErrorData(t,n,s,i,r){Fs(t,n.xScale,s,i,r),Fs(t,n.yScale,s,i,r)}updateElement(t,n,s,i){t instanceof oe&&typeof n=="number"&&this.updateElementScale(n,s,i),super.updateElement(t,n,s,i)}updateElementScale(t,n,s){zi(n,this.getParsed(t),t,this._cachedMeta.xScale,s==="reset"),zi(n,this.getParsed(t),t,this._cachedMeta.yScale,s==="reset")}updateElements(t,n,s,i){const r=i==="reset",a=this.chart._animationsDisabled||r||i==="none";if(super.updateElements(t,n,s,i),!!a)for(let l=n;l<n+s;++l){const c=t[l];c instanceof oe&&this.updateElementScale(l,c,i)}}}cs.id="scatterWithErrorBars",cs.defaults=se({},[Zn.defaults,bo,{dataElementType:oe.id}]),cs.overrides=se({},[Zn.overrides,{plugins:{tooltip:{callbacks:{label:GS}}}}]),cs.defaultRoutes=qe.defaultRoutes;class xm extends Xt{constructor(t,n){super(t,yo("scatterWithErrorBars",n,cs,oe,[ns]))}}xm.id=cs.id;class Vs extends Le{getMinMaxImpl(t){const n=this._cachedMeta,s={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return n.data.forEach((i,r)=>{const o=this.getParsed(r)[t.axis];Number.isNaN(o)||!this.chart.getDataVisibility(r)||(o<s.min&&(s.min=o),o>s.max&&(s.max=o))}),s}getMinMax(t){return _o(t,n=>this.getMinMaxImpl(n))}countVisibleElements(){const t=this._cachedMeta;return t.data.reduce((n,s,i)=>!Number.isNaN(t._parsed[i].r)&&this.chart.getDataVisibility(i)?n+1:n,0)}parsePrimitiveData(t,n,s,i){const r=super.parsePrimitiveData(t,n,s,i);return this.parseErrorData(r,t,n,s,i),r}parseObjectData(t,n,s,i){const r=super.parseObjectData(t,n,s,i);return this.parseErrorData(r,t,n,s,i),r}parseErrorData(t,n,s,i,r){const o=n.rScale;for(let a=0;a<r;a+=1){const l=a+i,c=s[l],u=o.parse(c[o.axis],l);t[a]={[o.axis]:u}}Fs(t,o,s,i,r)}updateElement(t,n,s,i){typeof n=="number"&&US(s,this.getParsed(n),this._cachedMeta.rScale,i==="reset",this.chart.options),super.updateElement(t,n,s,i)}updateElements(t,n,s,i){const r=this.chart.scales.r,o=r.getDistanceFromCenterForValue;r.getDistanceFromCenterForValue=function(l){return typeof l=="number"?o.call(this,l):o.call(this,l.r)},super.updateElements(t,n,s,i),r.getDistanceFromCenterForValue=o}}Vs.id="polarAreaWithErrorBars",Vs.defaults=se({},[Le.defaults,bo,{dataElementType:Rs.id}]),Vs.overrides=se({},[Le.overrides,{plugins:{tooltip:{callbacks:{label:YS}}}}]),Vs.defaultRoutes=Le.defaultRoutes;class qS extends Xt{constructor(t,n){super(t,yo("polarAreaWithErrorBars",n,Vs,Rs,[Es]))}}qS.id=Vs.id,Xt.register(ls,ym,oe,xm,cs,ns,Ts);class JS{constructor(t,n){R(this,"chart");R(this,"startTime");R(this,"endTime");R(this,"timeAggregation");R(this,"options");R(this,"chartOptions");R(this,"dataStorage");R(this,"status");R(this,"activeFields");this.chart=t,this.options=n,this.startTime=B.now().minus(n.timeInterval),this.endTime=B.now(),n.startTime&&n.endTime&&(this.startTime=B.fromISO(n.startTime).setZone("UTC"),this.endTime=B.fromISO(n.endTime).setZone("UTC")),this.options.timeAggregation&&(this.timeAggregation=this.options.timeAggregation),this.options.retries=this.options.retries?this.options.retries:5,this.options.normalize=this.options.normalize?this.options.normalize:!1,this.options.showMinMax=this.options.showMinMax?this.options.showMinMax:!1,this.dataStorage={},this.options.features.forEach((s,i)=>this.dataStorage[i]={}),this.status="ready",this.chartOptions={scales:{x:{type:"time",min:this.startTime.toISODate(),max:this.endTime.toISODate(),ticks:{minRotation:0,maxRotation:0}}},interaction:{axis:"x",mode:"nearest",intersect:!1},plugins:{legend:{labels:{usePointStyle:!0,pointStyle:"rect",padding:5,sort:(s,i)=>s.text.localeCompare(i.text)},position:"right",onClick:(s,i)=>{if(i.hidden)this.setActiveFields([...this.activeFields,i.text]);else{const r=this.activeFields.indexOf(i.text),o=this.activeFields;o.splice(r,1),this.setActiveFields(o)}}},tooltip:{callbacks:{title:s=>{var r;return((r=s[0])==null?void 0:r.raw).x.toISODate()},label:s=>{const i=s.raw;return`${s.dataset.label}: ↔ ${i.y.toPrecision(3)}; ↓ ${i.yMin.toPrecision(3)}, ↑ ${i.yMax.toPrecision(3)}`}}}}}}checkLoadingStatus(){const t=document.getElementById("loadingIndicator");let n=!1;Object.keys(this.dataStorage).forEach((s,i)=>{Object.keys(this.dataStorage[i]).forEach(r=>{this.dataStorage[i][r].status==="fetching"&&(n=!0)})}),t.className=n?"loader":"loader hidden"}fetchSignals(t,n,s){const i=this.options.features[t].map(c=>`feature=${c}`).join("&"),r=`${n?"&start_date="+n.toISODate():""}${s?"&end_date="+s.toISODate():""}`,o=`${this.options.endpoint}?source=${this.options.source}&${i}${r}`,a=this.options.geometry;async function l(){const c=await fetch(o,{headers:{"Content-Type":"application/json; charset=utf-8"},method:"POST",mode:"cors",body:JSON.stringify({geometry:a})});if(c.status===404)throw new lm(c.statusText);if(c.status!==200)throw Error(c.statusText);return c}return BS(l,{onFailedAttempt:c=>{console.log(`Attempt ${c.attemptNumber} failed. There are ${c.retriesLeft} retries left.`)},retries:this.options.retries}).then(function(c){return c.json()})}updateChart(){this.checkLoadingStatus(),this.chart.options=this.chartOptions;const t=[];this.options.features.flat().forEach((n,s)=>{let i=-1;if(this.options.features.forEach((r,o)=>{r.includes(n)&&(i=o)}),i!==-1){let r=[];Object.keys(this.dataStorage[i]).forEach(h=>{const d=this.dataStorage[i][h];d.status==="finished"?Object.keys(d.data).length!==0&&Object.keys(d.data).includes(n)&&r.push(...d.data[n]):r.push({date:"missing"})});let o=!1,a=Number.MIN_VALUE,l=Number.MAX_VALUE,c=r.map(h=>{let d={};if(h&&h.date!=="missing"){const f=h.basicStats;this.options.showMinMax?(l=f.min<l?f.min:l,a=f.max>a?f.max:a):(l=f.mean<l?f.mean:l,a=f.mean>a?f.mean:a),d={x:B.fromISO(h.date).setZone("UTC"),y:h.basicStats.mean,yMin:h.basicStats.min,yMax:h.basicStats.max},o=!0}return d});if(o&&this.timeAggregation){a=Number.MIN_VALUE,l=Number.MAX_VALUE;const h=[];let d=0,f=B.fromObject({year:this.startTime.year,month:this.startTime.month,day:this.startTime.day});for(;f<this.endTime;){let m=0,p=0,b=0;for(;d<c.length&&(Object.keys(c[d]).length===0||c[d].x<f);)d++;const y=d;for(;d<c.length&&(Object.keys(c[d]).length===0||c[d].x<f.plus(this.timeAggregation));){const v=c[d];m+=v.y,p+=v.yMin,b+=v.yMax,d++}const w=d-y;if(w>0){const v=m/w,S=p/w,C=b/w;this.options.showMinMax?(l=S<l?S:l,a=C>a?C:a):(l=v<l?v:l,a=v>a?v:a),h.push({x:f,y:v,yMin:S,yMax:C})}f=f.plus(this.timeAggregation)}c=h}o&&this.options.normalize&&(c=c.map(h=>(h.y=(h.y-l)/(a-l),h.yMin=(h.yMin-l)/(a-l),h.yMax=(h.yMax-l)/(a-l),h)));let u={type:"line",label:n,data:c,hidden:!this.activeFields.includes(n)};if(this.options.showMinMax&&(u={type:"lineWithErrorBars",label:n,data:c,hidden:!this.activeFields.includes(n),errorBarWhiskerLineWidth:2,errorBarColor:"#00000000"}),this.options.colors&&this.options.colors.length>=s){const h=this.options.colors[s];u.backgroundColor=h,u.borderColor=h,this.options.showMinMax&&(u={type:"lineWithErrorBars",label:n,data:c,hidden:!this.activeFields.includes(n),errorBarWhiskerLineWidth:2,errorBarColor:"#00000000",errorBarWhiskerColor:h,errorBarWhiskerSize:10,backgroundColor:h,borderColor:h})}t.push(u)}}),this.chart.data={datasets:t},this.chart.update("none")}retrieveMissingData(){const t=[];this.activeFields.forEach(i=>{this.options.features.forEach((r,o)=>{r.includes(i)&&!t.includes(o)&&t.push(o)})});let n=B.fromObject({year:this.endTime.year,month:this.endTime.month}).plus({month:1}).minus({second:1});const s=B.fromObject({year:this.startTime.year,month:this.startTime.month}).plus({month:1}).minus({second:1});for(;n>s;){const i=n.toFormat("yyyyMM");t.forEach(r=>{if(!(i in this.dataStorage[r])){const o=this.fetchSignals(r,B.fromObject({year:n.year,month:n.month}),B.fromObject({year:n.year,month:n.month}).plus({month:1}).minus({second:1})).then(a=>{this.dataStorage[r][i].data=a,this.dataStorage[r][i].status="finished",this.updateChart()}).catch(()=>{this.dataStorage[r][i].status="failed",this.updateChart()});this.dataStorage[r][i]={request:o,status:"fetching"}}}),n=n.minus({months:1})}}triggerCSVDownload(){const t=[],n=[],s=this.activeFields;s.forEach((l,c)=>{let u=-1;if(this.options.features.forEach((h,d)=>{h.includes(l)&&(u=d)}),u!==-1){let h=[];Object.keys(this.dataStorage[u]).forEach(d=>{const f=this.dataStorage[u][d];f.status==="finished"&&Object.keys(f.data).length!==0&&Object.keys(f.data).includes(l)&&h.push(...f.data[l])}),h.length>0&&(n.push(s[c]),t.push(h))}});const i={};n.forEach((l,c)=>{t[c].forEach(u=>{i[u.date]||(i[u.date]={}),i[u.date][l]=u.basicStats})});let r="time,";const o=n.map(l=>[l,`${l}_max`,`${l}_min`]);r+=o.flat().join(","),r+=`
|
|
30
|
-
`,Object.keys(i).forEach(l=>{const c=[l];n.forEach(u=>{const h=i[l][u]?i[l][u]:null;h!=null?c.push(h.mean,h.max,h.min):c.push("","","")}),r+=c.join(","),r+=`
|
|
31
|
-
`});var a=document.createElement("a");a.href="data:text/csv;charset=utf-8,"+encodeURI(r),a.target="_blank",a.download="chart_data.csv",a.click()}setGeometry(t){this.dataStorage={},this.options.features.forEach((n,s)=>this.dataStorage[s]={}),this.options.geometry=t,this.retrieveMissingData(),this.updateChart()}setActiveFields(t){this.activeFields=t,this.retrieveMissingData(),this.updateChart()}setTimeInterval(t,n){this.startTime=t,this.endTime=n,this.chartOptions.scales.x.min=t.toISODate(),this.chartOptions.scales.x.max=n.toISODate(),this.retrieveMissingData(),this.updateChart()}setNormalize(t){this.options.normalize=t,this.updateChart()}setShowMinMax(t){this.options.showMinMax=t,this.updateChart()}setTimeAggregation(t){this.timeAggregation=t,this.updateChart()}}class QS{constructor(t,n,s,i){R(this,"element");R(this,"sdm");R(this,"sdmOptions");R(this,"options");this.element=t,this.sdm=n,this.options=i,this.sdmOptions=s,this.generateTimeAggregationOptions(),this.addNormalizeCheckbox(),this.addShowMinMax(),this.addCSVDownload(),this.generateTimeSelectionOptions();const r=document.createElement("span");r.id="loadingIndicator",r.className="loader hidden",this.element.appendChild(r)}removeStartEndInputs(){const t=document.getElementById("startInput"),n=document.getElementById("endInput"),s=document.getElementById("setTime");t&&n&&s&&(t.remove(),n.remove(),s.remove())}addStartEndInputs(){const t=document.createElement("input");t.id="startInput",t.size=8,t.value=this.sdm.startTime.toISODate();const n=document.createElement("input");n.id="endInput",n.size=8,n.value=this.sdm.endTime.toISODate(),this.element.appendChild(t),this.element.appendChild(n);var s=document.createElement("button");s.id="setTime",s.textContent="ok",this.element.appendChild(s),s.addEventListener("click",()=>{const i=B.fromISO(t.value),r=B.fromISO(n.value);i.isValid&&r.isValid?(this.sdm.setTimeInterval(i,r),this.removeStartEndInputs()):(t.className=i.isValid?"":"parsingError",n.className=r.isValid?"":"parsingError")})}addNormalizeCheckbox(){var t=document.createElement("input");t.type="checkbox",t.id="normalize",t.value="normalize",t.checked=this.sdmOptions.normalize;var n=document.createElement("label");n.htmlFor="normalize",n.appendChild(document.createTextNode("normalize")),this.element.appendChild(n),this.element.appendChild(t),t.addEventListener("change",()=>{this.sdm.setNormalize(t.checked)})}addShowMinMax(){var t=document.createElement("input");t.type="checkbox",t.id="showMinMax",t.value="showMinMax",t.checked=this.sdmOptions.showMinMax;var n=document.createElement("label");n.htmlFor="showMinMax",n.appendChild(document.createTextNode("show min/max")),this.element.appendChild(n),this.element.appendChild(t),t.addEventListener("change",()=>{this.sdm.setShowMinMax(t.checked)})}addCSVDownload(){var t=document.createElement("button");t.id="csvDownload",t.textContent="download csv",this.element.appendChild(t),t.addEventListener("click",()=>{this.sdm.triggerCSVDownload()})}generateTimeSelectionOptions(){const t=[{text:"3 months back",value:"month-3"},{text:"6 months back",value:"month-6"},{text:"1 year back",value:"year-1"},{text:"2 years back",value:"year-2"},{text:"3 years back",value:"year-3"},{text:"custom",value:"custom"}],n=document.createElement("select");t.forEach(s=>{const i=document.createElement("option");i.text=s.text,i.value=s.value,n.appendChild(i)}),this.element.appendChild(n),n.addEventListener("change",s=>{const i=B.now(),[r,o]=s.target.value.split("-");switch(this.removeStartEndInputs(),r){case"month":this.sdm.setTimeInterval(i.minus({month:Number(o)}),i);break;case"year":this.sdm.setTimeInterval(i.minus({year:Number(o)}),i);break;case"custom":this.addStartEndInputs();break}})}generateTimeAggregationOptions(){const t=[{text:"no aggregation",value:"none"},{text:"1 week",value:"week-1"},{text:"2 weeks",value:"week-2"},{text:"1 month",value:"month-1"},{text:"3 months",value:"month-3"},{text:"6 months",value:"month-6"}],n=document.createElement("select");t.forEach(i=>{const r=document.createElement("option");r.text=i.text,r.value=i.value,n.appendChild(r)}),this.element.appendChild(n),n.addEventListener("change",i=>{const[r,o]=i.target.value.split("-");switch(r){case"none":this.sdm.setTimeAggregation(null);break;case"week":this.sdm.setTimeAggregation({week:Number(o)});break;case"month":this.sdm.setTimeAggregation({month:Number(o)});break;case"year":this.sdm.setTimeAggregation({year:Number(o)});break}});const s=document.createElement("span");s.id="loadingIndicator",s.className="loader hidden",this.element.appendChild(s)}}const tw=k0(((e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n})(Pc({__name:"Chart.ce",props:["data","options","signalsdata","signalsendpoint"],setup(e){const t=e,n=ac(null),s=ac(null);let i,r=null;qo(()=>{i=new Xt(n.value,{data:{labels:[],datasets:[]},plugins:[{id:"selectionLineHighlight",afterDraw:a=>{if(a&&a.tooltip){const l=a.tooltip.getActiveElements();if(l!=null&&l.length){let c=l[0].element.x,u=a.scales.y,h=a.ctx;h.save(),h.beginPath(),h.moveTo(c,u.top),h.lineTo(c,u.bottom),h.lineWidth=1,h.strokeStyle="rgba(0, 0, 255, 0.4)",h.stroke(),h.restore()}}}}]}),setTimeout(()=>{t.data&&(i.data=JSON.parse(t.data)),t.signalsdata&&(i.data={datasets:Object.entries(JSON.parse(t.signalsdata)).map(([a,l])=>({type:"line",label:a,data:l}))}),t.options&&(i.options=JSON.parse(t.options)),t.signalsendpoint&&o(JSON.parse(t.signalsendpoint)),i.update("none")},0)});const o=a=>{r=new JS(i,a),new QS(s.value,r,a),r.setActiveFields(a.active)};return(a,l)=>(Vg(),Wg(ue,null,[yr("div",{ref_key:"chartControls",ref:s,id:"controls",class:"controls","data-cy":"controls"},null,512),yr("canvas",{ref_key:"chartCanvas",ref:n,id:"chart",class:"chart","data-cy":"chart"},null,512)],64))}}),[["styles",[`*{font-family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif";font-size:.95em}label{margin-top:2.5px}html,body{margin:0;padding:0}html,body,.chart{width:100%;height:100%}.hidden{visibility:hidden}.loader{position:absolute;top:5px;right:30px;width:24px;height:24px;border-radius:50%;display:inline-block;border-top:4px solid #000;border-right:4px solid transparent;box-sizing:border-box;animation:rotation 1s linear infinite}.loader:after{content:"";box-sizing:border-box;position:absolute;left:0;top:0;width:24px;height:24px;border-radius:50%;border-left:4px solid #004170;border-bottom:4px solid transparent;animation:rotation .5s linear infinite reverse}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#controls{position:absolute;width:100%;display:flex;gap:5px;flex-direction:row}.parsingError{background-color:#ff6d6d}#chart{padding-top:30px}
|
|
32
|
-
`]],["__file","/home/silvester/git/elements/elements/chart/src/Chart.ce.vue"]]));customElements.define("eox-chart",tw)});
|