HumanBreak/assets/common-c65e5ee3.js
2023-05-17 12:17:37 +00:00

21 lines
242 KiB
JavaScript

var Nr=Object.defineProperty;var Vr=(i,t,e)=>t in i?Nr(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var A=(i,t,e)=>(Vr(i,typeof t!="symbol"?t+"":t,e),e);var Hr=Object.defineProperty,jr=(i,t,e)=>t in i?Hr(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,F=(i,t,e)=>(jr(i,typeof t!="symbol"?t+"":t,e),e);let Ze=[];const _o=i=>{for(const t of Ze)if(t.status==="running")try{for(const e of t.funcs)e(i-t.startTime)}catch(e){t.destroy(),console.error(e)}requestAnimationFrame(_o)};requestAnimationFrame(_o);class Wr{constructor(){F(this,"funcs",[]),F(this,"status","stop"),F(this,"startTime",0),this.status="running",Ze.push(this),requestAnimationFrame(t=>this.startTime=t)}add(t,e=!1){return e?this.funcs.unshift(t):this.funcs.push(t),this}remove(t){const e=this.funcs.findIndex(n=>n===t);if(e===-1)throw new ReferenceError("You are going to remove nonexistent ticker function.");return this.funcs.splice(e,1),this}clear(){this.funcs=[]}destroy(){this.clear(),this.stop()}stop(){this.status="stop",Ze=Ze.filter(t=>t!==this)}}class wo{constructor(){F(this,"timing"),F(this,"relation","absolute"),F(this,"easeTime",0),F(this,"applying",{}),F(this,"getTime",Date.now),F(this,"ticker",new Wr),F(this,"value",{}),F(this,"listener",{}),this.timing=t=>t}async all(){if(Object.values(this.applying).every(t=>t===!0))throw new ReferenceError("There is no animates to be waited.");await new Promise(t=>{const e=()=>{Object.values(this.applying).every(n=>n===!1)&&(this.unlisten("end",e),t("all animated."))};this.listen("end",e)})}async n(t){const e=Object.values(this.applying).filter(s=>s===!0).length;if(e<t)throw new ReferenceError(`You are trying to wait ${t} animate, but there are only ${e} animate animating.`);let n=0;await new Promise(s=>{const o=()=>{n++,n===t&&(this.unlisten("end",o),s(`${t} animated.`))};this.listen("end",o)})}async w(t){if(this.applying[t]===!1)throw new ReferenceError(`The ${t} animate is not animating.`);await new Promise(e=>{const n=()=>{this.applying[t]===!1&&(this.unlisten("end",n),e(`${t} animated.`))};this.listen("end",n)})}listen(t,e){var n;(n=this.listener)[t]!=null||(n[t]=[]),this.listener[t].push(e)}unlisten(t,e){const n=this.listener[t].findIndex(s=>s===e);if(n===-1)throw new ReferenceError("You are trying to remove a nonexistent listener.");this.listener[t].splice(n,1)}hook(...t){const e=Object.entries(this.listener).filter(n=>t.includes(n[0]));for(const[n,s]of e)for(const o of s)o(this,n)}}function Gi(i){return i!=null}async function mf(i){return new Promise(t=>setTimeout(t,i))}class bf extends wo{constructor(){super(),F(this,"shakeTiming"),F(this,"path"),F(this,"multiTiming"),F(this,"value",{}),F(this,"size",1),F(this,"angle",0),F(this,"targetValue",{system:{move:[0,0],moveAs:[0,0],resize:0,rotate:0,shake:0,"@@bind":[]},custom:{}}),F(this,"animateFn",{system:{move:[()=>0,()=>0],moveAs:()=>0,resize:()=>0,rotate:()=>0,shake:()=>0,"@@bind":()=>0},custom:{}}),F(this,"ox",0),F(this,"oy",0),F(this,"sx",0),F(this,"sy",0),F(this,"bindInfo",[]),this.timing=t=>t,this.shakeTiming=t=>t,this.multiTiming=t=>[t,t],this.path=t=>[t,t],this.applying={move:!1,scale:!1,rotate:!1,shake:!1},this.ticker.add(()=>{const{running:t}=this.listener;if(Gi(t))for(const e of t)e(this,"running")})}get x(){return this.ox+this.sx}get y(){return this.oy+this.sy}mode(t,e=!1){return typeof t(0)=="number"?e?this.shakeTiming=t:this.timing=t:this.multiTiming=t,this}time(t){return this.easeTime=t,this}relative(){return this.relation="relative",this}absolute(){return this.relation="absolute",this}bind(...t){return this.applying["@@bind"]===!0&&this.end(!1,"@@bind"),this.bindInfo=t,this}unbind(){return this.applying["@@bind"]===!0&&this.end(!1,"@@bind"),this.bindInfo=[],this}move(t,e){return this.applying.move&&this.end(!0,"move"),this.applySys("ox",t,"move"),this.applySys("oy",e,"move"),this}rotate(t){return this.applySys("angle",t,"rotate"),this}scale(t){return this.applySys("size",t,"resize"),this}shake(t,e){this.applying.shake===!0&&this.end(!0,"shake"),this.applying.shake=!0;const{easeTime:n,shakeTiming:s}=this,o=this.getTime();this.hook("start","shakestart");const r=()=>{const a=this.getTime()-o;a>n&&(this.ticker.remove(r),this.applying.shake=!1,this.sx=0,this.sy=0,this.hook("end","shakeend"));const l=a/n,c=s(l);this.sx=c*t,this.sy=c*e};return this.ticker.add(r),this.animateFn.system.shake=r,this}moveAs(t){this.applying.moveAs&&this.end(!0,"moveAs"),this.applying.moveAs=!0,this.path=t;const{easeTime:e,relation:n,timing:s}=this,o=this.getTime(),[r,a]=[this.x,this.y],[l,c]=(()=>{if(n==="absolute")return t(1);{const[u,d]=t(1);return[r+u,a+d]}})();this.hook("start","movestart");const h=()=>{const u=this.getTime()-o;if(u>e){this.end(!0,"moveAs");return}const d=u/e,[f,p]=t(s(d));n==="absolute"?(this.ox=f,this.oy=p):(this.ox=r+f,this.oy=a+p)};return this.ticker.add(h,!0),this.animateFn.system.moveAs=h,this.targetValue.system.moveAs=[l,c],this}register(t,e){if(typeof this.value[t]=="number")return this.error(`Property ${t} has been regietered twice.`,"reregister");this.value[t]=e,this.applying[t]=!1}apply(t,e,n=!1){this.applying[t]===!0&&this.end(!1,t),t in this.value||this.error(`You are trying to execute nonexistent property ${t}.`),this.applying[t]=!0;const s=this.value[t],o=this.getTime(),{timing:r,relation:a,easeTime:l}=this,c=a==="absolute"?e-s:e;this.hook("start");const h=()=>{const u=this.getTime()-o;if(u>l){this.end(!1,t);return}const d=u/l,f=r(d);this.value[t]=s+f*c};return this.ticker.add(h,n),this.animateFn.custom[t]=h,this.targetValue.custom[t]=c+s,this}applyMulti(t=!1){this.applying["@@bind"]===!0&&this.end(!1,"@@bind"),this.applying["@@bind"]=!0;const e=this.bindInfo,n=e.map(h=>this.value[h]),s=this.getTime(),{multiTiming:o,relation:r,easeTime:a}=this,l=o(1);if(l.length!==n.length)throw new TypeError(`The number of binded animate attributes and timing function returns's length does not match. binded: ${e.length}, timing: ${l.length}`);this.hook("start");const c=()=>{const h=this.getTime()-s;if(h>a){this.end(!1,"@@bind");return}const u=h/a,d=o(u);e.forEach((f,p)=>{r==="absolute"?this.value[f]=d[p]:this.value[f]=n[p]+d[p]})};return this.ticker.add(c,t),this.animateFn.custom["@@bind"]=c,this.targetValue.system["@@bind"]=l,this}applySys(t,e,n){n!=="move"&&this.applying[n]===!0&&this.end(!0,n),this.applying[n]=!0;const s=this[t],o=this.getTime(),r=this.timing,a=this.relation,l=this.easeTime,c=a==="absolute"?e-s:e;this.hook("start",`${n}start`);const h=()=>{const u=this.getTime()-o;if(u>l){this.end(!0,n);return}const d=u/l,f=r(d);this[t]=s+c*f,t!=="oy"&&this.hook(n)};this.ticker.add(h,!0),t==="ox"?this.animateFn.system.move[0]=h:t==="oy"?this.animateFn.system.move[1]=h:this.animateFn.system[n]=h,n==="move"?(t==="ox"&&(this.targetValue.system.move[0]=c+s),t==="oy"&&(this.targetValue.system.move[1]=c+s)):n!=="shake"&&(this.targetValue.system[n]=c+s)}error(t,e){throw e==="repeat"?new Error(`Cannot execute the same animation twice. Info: ${t}`):e==="reregister"?new Error(`Cannot register a animated property twice. Info: ${t}`):new Error(t)}end(t,e){if(t===!0)if(this.applying[e]=!1,e==="move"?(this.ticker.remove(this.animateFn.system.move[0]),this.ticker.remove(this.animateFn.system.move[1])):e==="moveAs"?this.ticker.remove(this.animateFn.system.moveAs):e==="@@bind"?this.ticker.remove(this.animateFn.system["@@bind"]):this.ticker.remove(this.animateFn.system[e]),e==="move"){const[n,s]=this.targetValue.system.move;this.ox=n,this.oy=s,this.hook("moveend","end")}else if(e==="moveAs"){const[n,s]=this.targetValue.system.moveAs;this.ox=n,this.oy=s,this.hook("moveend","end")}else e==="rotate"?(this.angle=this.targetValue.system.rotate,this.hook("rotateend","end")):e==="resize"?(this.size=this.targetValue.system.resize,this.hook("resizeend","end")):e==="@@bind"?this.bindInfo.forEach((n,s)=>{this.value[n]=this.targetValue.system["@@bind"][s]}):(this.sx=0,this.sy=0,this.hook("shakeend","end"));else this.applying[e]=!1,this.ticker.remove(this.animateFn.custom[e]),this.value[e]=this.targetValue.custom[e],this.hook("end")}}class xf extends wo{constructor(){super(),F(this,"now",{}),F(this,"target",{}),F(this,"transitionFn",{}),F(this,"value"),F(this,"handleSet",(t,e,n)=>(this.transition(e,n),!0)),F(this,"handleGet",(t,e)=>this.now[e]),this.timing=t=>t,this.value=new Proxy(this.target,{set:this.handleSet,get:this.handleGet})}mode(t){return this.timing=t,this}time(t){return this.easeTime=t,this}relative(){return this.relation="relative",this}absolute(){return this.relation="absolute",this}transition(t,e){if(e===this.target[t])return this;if(!Gi(this.now[t]))return this.now[t]=e,this;this.applying[t]&&this.end(t,!0),this.applying[t]=!0,this.hook("start");const n=this.getTime(),s=this.easeTime,o=this.timing,r=this.now[t],a=e+(this.relation==="absolute"?0:r),l=a-r;this.target[t]=a;const c=()=>{const h=this.getTime()-n;h>=s&&this.end(t);const u=h/s;this.now[t]=o(u)*l+r,this.hook("running")};return this.transitionFn[t]=c,this.ticker.add(c),this}end(t,e=!1){const n=this.transitionFn[t];if(!Gi(n))throw new ReferenceError(`You are trying to end an ended transition: ${t}`);this.ticker.remove(this.transitionFn[t]),delete this.transitionFn[t],this.applying[t]=!1,this.hook("end"),e||(this.now[t]=this.target[t])}}const Ji=(...i)=>i.reduce((t,e)=>t+e,0),Ri=i=>{if(i===0)return 1;let t=i;for(;i>1;)i--,t*=i;return t},vo=(i,t)=>Math.round(Ri(t)/(Ri(i)*Ri(t-i))),Qe=(i,t,e=n=>1-t(1-n))=>i==="in"?t:i==="out"?e:i==="in-out"?n=>n<.5?t(n*2)/2:.5+e((n-.5)*2)/2:n=>n<.5?e(n*2)/2:.5+t((n-.5)*2)/2,Ur=Math.cosh(2),$r=Math.acosh(2),Yr=Math.tanh(3);function yf(){return i=>i}function _f(...i){const t=[0].concat(i);t.push(1);const e=t.length,n=Array(e).fill(0).map((s,o)=>vo(o,e-1));return s=>{const o=n.map((r,a)=>r*t[a]*(1-s)**(e-a-1)*s**a);return Ji(...o)}}function wf(i,t){if(!Number.isInteger(i))throw new TypeError("The first parameter of power timing function only allow integer.");return Qe(t,e=>e**i)}function vf(i,t){if(i==="sin")return Qe(t,e=>(Math.cosh(e*2)-1)/(Ur-1));if(i==="tan"){const e=n=>Math.tanh(n*3)*1/Yr;return Qe(t,n=>1-e(1-n),e)}if(i==="sec"){const e=n=>1/Math.cosh(n);return Qe(t,n=>1-(e(n*$r)-.5)*2)}throw new TypeError("Unexpected parameters are delivered in hyper timing function.")}function Sf(i,t,...e){const n=[i].concat(e);n.push(t);const s=n.length,o=Array(s).fill(0).map((r,a)=>vo(a,s-1));return r=>{const a=o.map((c,h)=>c*n[h][0]*(1-r)**(s-h-1)*r**h),l=o.map((c,h)=>c*n[h][1]*(1-r)**(s-h-1)*r**h);return[Ji(...a),Ji(...l)]}}function kf(i){return i==null}function So(i,t){return function(){return i.apply(t,arguments)}}const{toString:Xr}=Object.prototype,{getPrototypeOf:yn}=Object,vi=(i=>t=>{const e=Xr.call(t);return i[e]||(i[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),mt=i=>(i=i.toLowerCase(),t=>vi(t)===i),Si=i=>t=>typeof t===i,{isArray:ie}=Array,ke=Si("undefined");function qr(i){return i!==null&&!ke(i)&&i.constructor!==null&&!ke(i.constructor)&&at(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}const ko=mt("ArrayBuffer");function Kr(i){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(i):t=i&&i.buffer&&ko(i.buffer),t}const Gr=Si("string"),at=Si("function"),Mo=Si("number"),ki=i=>i!==null&&typeof i=="object",Jr=i=>i===!0||i===!1,ti=i=>{if(vi(i)!=="object")return!1;const t=yn(i);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)},Zr=mt("Date"),Qr=mt("File"),ta=mt("Blob"),ea=mt("FileList"),ia=i=>ki(i)&&at(i.pipe),na=i=>{let t;return i&&(typeof FormData=="function"&&i instanceof FormData||at(i.append)&&((t=vi(i))==="formdata"||t==="object"&&at(i.toString)&&i.toString()==="[object FormData]"))},sa=mt("URLSearchParams"),oa=i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Re(i,t,{allOwnKeys:e=!1}={}){if(i===null||typeof i>"u")return;let n,s;if(typeof i!="object"&&(i=[i]),ie(i))for(n=0,s=i.length;n<s;n++)t.call(null,i[n],n,i);else{const o=e?Object.getOwnPropertyNames(i):Object.keys(i),r=o.length;let a;for(n=0;n<r;n++)a=o[n],t.call(null,i[a],a,i)}}function Ao(i,t){t=t.toLowerCase();const e=Object.keys(i);let n=e.length,s;for(;n-- >0;)if(s=e[n],t===s.toLowerCase())return s;return null}const Oo=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Po=i=>!ke(i)&&i!==Oo;function Zi(){const{caseless:i}=Po(this)&&this||{},t={},e=(n,s)=>{const o=i&&Ao(t,s)||s;ti(t[o])&&ti(n)?t[o]=Zi(t[o],n):ti(n)?t[o]=Zi({},n):ie(n)?t[o]=n.slice():t[o]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&Re(arguments[n],e);return t}const ra=(i,t,e,{allOwnKeys:n}={})=>(Re(t,(s,o)=>{e&&at(s)?i[o]=So(s,e):i[o]=s},{allOwnKeys:n}),i),aa=i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),la=(i,t,e,n)=>{i.prototype=Object.create(t.prototype,n),i.prototype.constructor=i,Object.defineProperty(i,"super",{value:t.prototype}),e&&Object.assign(i.prototype,e)},ca=(i,t,e,n)=>{let s,o,r;const a={};if(t=t||{},i==null)return t;do{for(s=Object.getOwnPropertyNames(i),o=s.length;o-- >0;)r=s[o],(!n||n(r,i,t))&&!a[r]&&(t[r]=i[r],a[r]=!0);i=e!==!1&&yn(i)}while(i&&(!e||e(i,t))&&i!==Object.prototype);return t},ha=(i,t,e)=>{i=String(i),(e===void 0||e>i.length)&&(e=i.length),e-=t.length;const n=i.indexOf(t,e);return n!==-1&&n===e},ua=i=>{if(!i)return null;if(ie(i))return i;let t=i.length;if(!Mo(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=i[t];return e},da=(i=>t=>i&&t instanceof i)(typeof Uint8Array<"u"&&yn(Uint8Array)),fa=(i,t)=>{const n=(i&&i[Symbol.iterator]).call(i);let s;for(;(s=n.next())&&!s.done;){const o=s.value;t.call(i,o[0],o[1])}},pa=(i,t)=>{let e;const n=[];for(;(e=i.exec(t))!==null;)n.push(e);return n},ga=mt("HTMLFormElement"),ma=i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,s){return n.toUpperCase()+s}),Hn=(({hasOwnProperty:i})=>(t,e)=>i.call(t,e))(Object.prototype),ba=mt("RegExp"),To=(i,t)=>{const e=Object.getOwnPropertyDescriptors(i),n={};Re(e,(s,o)=>{t(s,o,i)!==!1&&(n[o]=s)}),Object.defineProperties(i,n)},xa=i=>{To(i,(t,e)=>{if(at(i)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=i[e];if(at(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},ya=(i,t)=>{const e={},n=s=>{s.forEach(o=>{e[o]=!0})};return ie(i)?n(i):n(String(i).split(t)),e},_a=()=>{},wa=(i,t)=>(i=+i,Number.isFinite(i)?i:t),Li="abcdefghijklmnopqrstuvwxyz",jn="0123456789",Do={DIGIT:jn,ALPHA:Li,ALPHA_DIGIT:Li+Li.toUpperCase()+jn},va=(i=16,t=Do.ALPHA_DIGIT)=>{let e="";const{length:n}=t;for(;i--;)e+=t[Math.random()*n|0];return e};function Sa(i){return!!(i&&at(i.append)&&i[Symbol.toStringTag]==="FormData"&&i[Symbol.iterator])}const ka=i=>{const t=new Array(10),e=(n,s)=>{if(ki(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[s]=n;const o=ie(n)?[]:{};return Re(n,(r,a)=>{const l=e(r,s+1);!ke(l)&&(o[a]=l)}),t[s]=void 0,o}}return n};return e(i,0)},Ma=mt("AsyncFunction"),Aa=i=>i&&(ki(i)||at(i))&&at(i.then)&&at(i.catch),M={isArray:ie,isArrayBuffer:ko,isBuffer:qr,isFormData:na,isArrayBufferView:Kr,isString:Gr,isNumber:Mo,isBoolean:Jr,isObject:ki,isPlainObject:ti,isUndefined:ke,isDate:Zr,isFile:Qr,isBlob:ta,isRegExp:ba,isFunction:at,isStream:ia,isURLSearchParams:sa,isTypedArray:da,isFileList:ea,forEach:Re,merge:Zi,extend:ra,trim:oa,stripBOM:aa,inherits:la,toFlatObject:ca,kindOf:vi,kindOfTest:mt,endsWith:ha,toArray:ua,forEachEntry:fa,matchAll:pa,isHTMLForm:ga,hasOwnProperty:Hn,hasOwnProp:Hn,reduceDescriptors:To,freezeMethods:xa,toObjectSet:ya,toCamelCase:ma,noop:_a,toFiniteNumber:wa,findKey:Ao,global:Oo,isContextDefined:Po,ALPHABET:Do,generateString:va,isSpecCompliantForm:Sa,toJSONObject:ka,isAsyncFn:Ma,isThenable:Aa};function R(i,t,e,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=i,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),n&&(this.request=n),s&&(this.response=s)}M.inherits(R,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Co=R.prototype,Eo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(i=>{Eo[i]={value:i}});Object.defineProperties(R,Eo);Object.defineProperty(Co,"isAxiosError",{value:!0});R.from=(i,t,e,n,s,o)=>{const r=Object.create(Co);return M.toFlatObject(i,r,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),R.call(r,i.message,t,e,n,s),r.cause=i,r.name=i.name,o&&Object.assign(r,o),r};const Oa=null;function Qi(i){return M.isPlainObject(i)||M.isArray(i)}function Ro(i){return M.endsWith(i,"[]")?i.slice(0,-2):i}function Wn(i,t,e){return i?i.concat(t).map(function(s,o){return s=Ro(s),!e&&o?"["+s+"]":s}).join(e?".":""):t}function Pa(i){return M.isArray(i)&&!i.some(Qi)}const Ta=M.toFlatObject(M,{},null,function(t){return/^is[A-Z]/.test(t)});function Mi(i,t,e){if(!M.isObject(i))throw new TypeError("target must be an object");t=t||new FormData,e=M.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!M.isUndefined(m[g])});const n=e.metaTokens,s=e.visitor||h,o=e.dots,r=e.indexes,l=(e.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(s))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(M.isDate(p))return p.toISOString();if(!l&&M.isBlob(p))throw new R("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(p)||M.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function h(p,g,m){let b=p;if(p&&!m&&typeof p=="object"){if(M.endsWith(g,"{}"))g=n?g:g.slice(0,-2),p=JSON.stringify(p);else if(M.isArray(p)&&Pa(p)||(M.isFileList(p)||M.endsWith(g,"[]"))&&(b=M.toArray(p)))return g=Ro(g),b.forEach(function(k,w){!(M.isUndefined(k)||k===null)&&t.append(r===!0?Wn([g],w,o):r===null?g:g+"[]",c(k))}),!1}return Qi(p)?!0:(t.append(Wn(m,g,o),c(p)),!1)}const u=[],d=Object.assign(Ta,{defaultVisitor:h,convertValue:c,isVisitable:Qi});function f(p,g){if(!M.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));u.push(p),M.forEach(p,function(b,x){(!(M.isUndefined(b)||b===null)&&s.call(t,b,M.isString(x)?x.trim():x,g,d))===!0&&f(b,g?g.concat(x):[x])}),u.pop()}}if(!M.isObject(i))throw new TypeError("data must be an object");return f(i),t}function Un(i){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function _n(i,t){this._pairs=[],i&&Mi(i,this,t)}const Lo=_n.prototype;Lo.append=function(t,e){this._pairs.push([t,e])};Lo.toString=function(t){const e=t?function(n){return t.call(this,n,Un)}:Un;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function Da(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Fo(i,t,e){if(!t)return i;const n=e&&e.encode||Da,s=e&&e.serialize;let o;if(s?o=s(t,e):o=M.isURLSearchParams(t)?t.toString():new _n(t,e).toString(n),o){const r=i.indexOf("#");r!==-1&&(i=i.slice(0,r)),i+=(i.indexOf("?")===-1?"?":"&")+o}return i}class Ca{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){M.forEach(this.handlers,function(n){n!==null&&t(n)})}}const $n=Ca,Io={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ea=typeof URLSearchParams<"u"?URLSearchParams:_n,Ra=typeof FormData<"u"?FormData:null,La=typeof Blob<"u"?Blob:null,Fa=(()=>{let i;return typeof navigator<"u"&&((i=navigator.product)==="ReactNative"||i==="NativeScript"||i==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Ia=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),pt={isBrowser:!0,classes:{URLSearchParams:Ea,FormData:Ra,Blob:La},isStandardBrowserEnv:Fa,isStandardBrowserWebWorkerEnv:Ia,protocols:["http","https","file","blob","url","data"]};function za(i,t){return Mi(i,new pt.classes.URLSearchParams,Object.assign({visitor:function(e,n,s,o){return pt.isNode&&M.isBuffer(e)?(this.append(n,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Ba(i){return M.matchAll(/\w+|\[(\w*)]/g,i).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Na(i){const t={},e=Object.keys(i);let n;const s=e.length;let o;for(n=0;n<s;n++)o=e[n],t[o]=i[o];return t}function zo(i){function t(e,n,s,o){let r=e[o++];const a=Number.isFinite(+r),l=o>=e.length;return r=!r&&M.isArray(s)?s.length:r,l?(M.hasOwnProp(s,r)?s[r]=[s[r],n]:s[r]=n,!a):((!s[r]||!M.isObject(s[r]))&&(s[r]=[]),t(e,n,s[r],o)&&M.isArray(s[r])&&(s[r]=Na(s[r])),!a)}if(M.isFormData(i)&&M.isFunction(i.entries)){const e={};return M.forEachEntry(i,(n,s)=>{t(Ba(n),s,e,0)}),e}return null}const Va={"Content-Type":void 0};function Ha(i,t,e){if(M.isString(i))try{return(t||JSON.parse)(i),M.trim(i)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(i)}const Ai={transitional:Io,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",s=n.indexOf("application/json")>-1,o=M.isObject(t);if(o&&M.isHTMLForm(t)&&(t=new FormData(t)),M.isFormData(t))return s&&s?JSON.stringify(zo(t)):t;if(M.isArrayBuffer(t)||M.isBuffer(t)||M.isStream(t)||M.isFile(t)||M.isBlob(t))return t;if(M.isArrayBufferView(t))return t.buffer;if(M.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return za(t,this.formSerializer).toString();if((a=M.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Mi(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||s?(e.setContentType("application/json",!1),Ha(t)):t}],transformResponse:[function(t){const e=this.transitional||Ai.transitional,n=e&&e.forcedJSONParsing,s=this.responseType==="json";if(t&&M.isString(t)&&(n&&!this.responseType||s)){const r=!(e&&e.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(r)throw a.name==="SyntaxError"?R.from(a,R.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};M.forEach(["delete","get","head"],function(t){Ai.headers[t]={}});M.forEach(["post","put","patch"],function(t){Ai.headers[t]=M.merge(Va)});const wn=Ai,ja=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Wa=i=>{const t={};let e,n,s;return i&&i.split(`
`).forEach(function(r){s=r.indexOf(":"),e=r.substring(0,s).trim().toLowerCase(),n=r.substring(s+1).trim(),!(!e||t[e]&&ja[e])&&(e==="set-cookie"?t[e]?t[e].push(n):t[e]=[n]:t[e]=t[e]?t[e]+", "+n:n)}),t},Yn=Symbol("internals");function ae(i){return i&&String(i).trim().toLowerCase()}function ei(i){return i===!1||i==null?i:M.isArray(i)?i.map(ei):String(i)}function Ua(i){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=e.exec(i);)t[n[1]]=n[2];return t}const $a=i=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());function Fi(i,t,e,n,s){if(M.isFunction(n))return n.call(this,t,e);if(s&&(t=e),!!M.isString(t)){if(M.isString(n))return t.indexOf(n)!==-1;if(M.isRegExp(n))return n.test(t)}}function Ya(i){return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}function Xa(i,t){const e=M.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(i,n+e,{value:function(s,o,r){return this[n].call(this,t,s,o,r)},configurable:!0})})}class Oi{constructor(t){t&&this.set(t)}set(t,e,n){const s=this;function o(a,l,c){const h=ae(l);if(!h)throw new Error("header name must be a non-empty string");const u=M.findKey(s,h);(!u||s[u]===void 0||c===!0||c===void 0&&s[u]!==!1)&&(s[u||l]=ei(a))}const r=(a,l)=>M.forEach(a,(c,h)=>o(c,h,l));return M.isPlainObject(t)||t instanceof this.constructor?r(t,e):M.isString(t)&&(t=t.trim())&&!$a(t)?r(Wa(t),e):t!=null&&o(e,t,n),this}get(t,e){if(t=ae(t),t){const n=M.findKey(this,t);if(n){const s=this[n];if(!e)return s;if(e===!0)return Ua(s);if(M.isFunction(e))return e.call(this,s,n);if(M.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ae(t),t){const n=M.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||Fi(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let s=!1;function o(r){if(r=ae(r),r){const a=M.findKey(n,r);a&&(!e||Fi(n,n[a],a,e))&&(delete n[a],s=!0)}}return M.isArray(t)?t.forEach(o):o(t),s}clear(t){const e=Object.keys(this);let n=e.length,s=!1;for(;n--;){const o=e[n];(!t||Fi(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const e=this,n={};return M.forEach(this,(s,o)=>{const r=M.findKey(n,o);if(r){e[r]=ei(s),delete e[o];return}const a=t?Ya(o):String(o).trim();a!==o&&delete e[o],e[a]=ei(s),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return M.forEach(this,(n,s)=>{n!=null&&n!==!1&&(e[s]=t&&M.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[Yn]=this[Yn]={accessors:{}}).accessors,s=this.prototype;function o(r){const a=ae(r);n[a]||(Xa(s,r),n[a]=!0)}return M.isArray(t)?t.forEach(o):o(t),this}}Oi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);M.freezeMethods(Oi.prototype);M.freezeMethods(Oi);const kt=Oi;function Ii(i,t){const e=this||wn,n=t||e,s=kt.from(n.headers);let o=n.data;return M.forEach(i,function(a){o=a.call(e,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Bo(i){return!!(i&&i.__CANCEL__)}function Le(i,t,e){R.call(this,i==null?"canceled":i,R.ERR_CANCELED,t,e),this.name="CanceledError"}M.inherits(Le,R,{__CANCEL__:!0});function qa(i,t,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?i(e):t(new R("Request failed with status code "+e.status,[R.ERR_BAD_REQUEST,R.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}const Ka=pt.isStandardBrowserEnv?function(){return{write:function(e,n,s,o,r,a){const l=[];l.push(e+"="+encodeURIComponent(n)),M.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),M.isString(o)&&l.push("path="+o),M.isString(r)&&l.push("domain="+r),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Ga(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}function Ja(i,t){return t?i.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):i}function No(i,t){return i&&!Ga(t)?Ja(i,t):t}const Za=pt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function s(o){let r=o;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return n=s(window.location.href),function(r){const a=M.isString(r)?s(r):r;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function Qa(i){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return t&&t[1]||""}function tl(i,t){i=i||10;const e=new Array(i),n=new Array(i);let s=0,o=0,r;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),h=n[o];r||(r=c),e[s]=l,n[s]=c;let u=o,d=0;for(;u!==s;)d+=e[u++],u=u%i;if(s=(s+1)%i,s===o&&(o=(o+1)%i),c-r<t)return;const f=h&&c-h;return f?Math.round(d*1e3/f):void 0}}function Xn(i,t){let e=0;const n=tl(50,250);return s=>{const o=s.loaded,r=s.lengthComputable?s.total:void 0,a=o-e,l=n(a),c=o<=r;e=o;const h={loaded:o,total:r,progress:r?o/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&c?(r-o)/l:void 0,event:s};h[t?"download":"upload"]=!0,i(h)}}const el=typeof XMLHttpRequest<"u",il=el&&function(i){return new Promise(function(e,n){let s=i.data;const o=kt.from(i.headers).normalize(),r=i.responseType;let a;function l(){i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}M.isFormData(s)&&(pt.isStandardBrowserEnv||pt.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(i.auth){const f=i.auth.username||"",p=i.auth.password?unescape(encodeURIComponent(i.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+p))}const h=No(i.baseURL,i.url);c.open(i.method.toUpperCase(),Fo(h,i.params,i.paramsSerializer),!0),c.timeout=i.timeout;function u(){if(!c)return;const f=kt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),g={data:!r||r==="text"||r==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:f,config:i,request:c};qa(function(b){e(b),l()},function(b){n(b),l()},g),c=null}if("onloadend"in c?c.onloadend=u:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(u)},c.onabort=function(){c&&(n(new R("Request aborted",R.ECONNABORTED,i,c)),c=null)},c.onerror=function(){n(new R("Network Error",R.ERR_NETWORK,i,c)),c=null},c.ontimeout=function(){let p=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const g=i.transitional||Io;i.timeoutErrorMessage&&(p=i.timeoutErrorMessage),n(new R(p,g.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,i,c)),c=null},pt.isStandardBrowserEnv){const f=(i.withCredentials||Za(h))&&i.xsrfCookieName&&Ka.read(i.xsrfCookieName);f&&o.set(i.xsrfHeaderName,f)}s===void 0&&o.setContentType(null),"setRequestHeader"in c&&M.forEach(o.toJSON(),function(p,g){c.setRequestHeader(g,p)}),M.isUndefined(i.withCredentials)||(c.withCredentials=!!i.withCredentials),r&&r!=="json"&&(c.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&c.addEventListener("progress",Xn(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Xn(i.onUploadProgress)),(i.cancelToken||i.signal)&&(a=f=>{c&&(n(!f||f.type?new Le(null,i,c):f),c.abort(),c=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const d=Qa(h);if(d&&pt.protocols.indexOf(d)===-1){n(new R("Unsupported protocol "+d+":",R.ERR_BAD_REQUEST,i));return}c.send(s||null)})},ii={http:Oa,xhr:il};M.forEach(ii,(i,t)=>{if(i){try{Object.defineProperty(i,"name",{value:t})}catch(e){}Object.defineProperty(i,"adapterName",{value:t})}});const nl={getAdapter:i=>{i=M.isArray(i)?i:[i];const{length:t}=i;let e,n;for(let s=0;s<t&&(e=i[s],!(n=M.isString(e)?ii[e.toLowerCase()]:e));s++);if(!n)throw n===!1?new R(`Adapter ${e} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(M.hasOwnProp(ii,e)?`Adapter '${e}' is not available in the build`:`Unknown adapter '${e}'`);if(!M.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:ii};function zi(i){if(i.cancelToken&&i.cancelToken.throwIfRequested(),i.signal&&i.signal.aborted)throw new Le(null,i)}function qn(i){return zi(i),i.headers=kt.from(i.headers),i.data=Ii.call(i,i.transformRequest),["post","put","patch"].indexOf(i.method)!==-1&&i.headers.setContentType("application/x-www-form-urlencoded",!1),nl.getAdapter(i.adapter||wn.adapter)(i).then(function(n){return zi(i),n.data=Ii.call(i,i.transformResponse,n),n.headers=kt.from(n.headers),n},function(n){return Bo(n)||(zi(i),n&&n.response&&(n.response.data=Ii.call(i,i.transformResponse,n.response),n.response.headers=kt.from(n.response.headers))),Promise.reject(n)})}const Kn=i=>i instanceof kt?i.toJSON():i;function Zt(i,t){t=t||{};const e={};function n(c,h,u){return M.isPlainObject(c)&&M.isPlainObject(h)?M.merge.call({caseless:u},c,h):M.isPlainObject(h)?M.merge({},h):M.isArray(h)?h.slice():h}function s(c,h,u){if(M.isUndefined(h)){if(!M.isUndefined(c))return n(void 0,c,u)}else return n(c,h,u)}function o(c,h){if(!M.isUndefined(h))return n(void 0,h)}function r(c,h){if(M.isUndefined(h)){if(!M.isUndefined(c))return n(void 0,c)}else return n(void 0,h)}function a(c,h,u){if(u in t)return n(c,h);if(u in i)return n(void 0,c)}const l={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(c,h)=>s(Kn(c),Kn(h),!0)};return M.forEach(Object.keys(Object.assign({},i,t)),function(h){const u=l[h]||s,d=u(i[h],t[h],h);M.isUndefined(d)&&u!==a||(e[h]=d)}),e}const Vo="1.4.0",vn={};["object","boolean","number","function","string","symbol"].forEach((i,t)=>{vn[i]=function(n){return typeof n===i||"a"+(t<1?"n ":" ")+i}});const Gn={};vn.transitional=function(t,e,n){function s(o,r){return"[Axios v"+Vo+"] Transitional option '"+o+"'"+r+(n?". "+n:"")}return(o,r,a)=>{if(t===!1)throw new R(s(r," has been removed"+(e?" in "+e:"")),R.ERR_DEPRECATED);return e&&!Gn[r]&&(Gn[r]=!0,console.warn(s(r," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(o,r,a):!0}};function sl(i,t,e){if(typeof i!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);const n=Object.keys(i);let s=n.length;for(;s-- >0;){const o=n[s],r=t[o];if(r){const a=i[o],l=a===void 0||r(a,o,i);if(l!==!0)throw new R("option "+o+" must be "+l,R.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new R("Unknown option "+o,R.ERR_BAD_OPTION)}}const tn={assertOptions:sl,validators:vn},Mt=tn.validators;class fi{constructor(t){this.defaults=t,this.interceptors={request:new $n,response:new $n}}request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Zt(this.defaults,e);const{transitional:n,paramsSerializer:s,headers:o}=e;n!==void 0&&tn.assertOptions(n,{silentJSONParsing:Mt.transitional(Mt.boolean),forcedJSONParsing:Mt.transitional(Mt.boolean),clarifyTimeoutError:Mt.transitional(Mt.boolean)},!1),s!=null&&(M.isFunction(s)?e.paramsSerializer={serialize:s}:tn.assertOptions(s,{encode:Mt.function,serialize:Mt.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let r;r=o&&M.merge(o.common,o[e.method]),r&&M.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),e.headers=kt.concat(r,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(e)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let h,u=0,d;if(!l){const p=[qn.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),d=p.length,h=Promise.resolve(e);u<d;)h=h.then(p[u++],p[u++]);return h}d=a.length;let f=e;for(u=0;u<d;){const p=a[u++],g=a[u++];try{f=p(f)}catch(m){g.call(this,m);break}}try{h=qn.call(this,f)}catch(p){return Promise.reject(p)}for(u=0,d=c.length;u<d;)h=h.then(c[u++],c[u++]);return h}getUri(t){t=Zt(this.defaults,t);const e=No(t.baseURL,t.url);return Fo(e,t.params,t.paramsSerializer)}}M.forEach(["delete","get","head","options"],function(t){fi.prototype[t]=function(e,n){return this.request(Zt(n||{},{method:t,url:e,data:(n||{}).data}))}});M.forEach(["post","put","patch"],function(t){function e(n){return function(o,r,a){return this.request(Zt(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}fi.prototype[t]=e(),fi.prototype[t+"Form"]=e(!0)});const ni=fi;class Sn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(o){e=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const r=new Promise(a=>{n.subscribe(a),o=a}).then(s);return r.cancel=function(){n.unsubscribe(o)},r},t(function(o,r,a){n.reason||(n.reason=new Le(o,r,a),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}static source(){let t;return{token:new Sn(function(s){t=s}),cancel:t}}}const ol=Sn;function rl(i){return function(e){return i.apply(null,e)}}function al(i){return M.isObject(i)&&i.isAxiosError===!0}const en={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(en).forEach(([i,t])=>{en[t]=i});const ll=en;function Ho(i){const t=new ni(i),e=So(ni.prototype.request,t);return M.extend(e,ni.prototype,t,{allOwnKeys:!0}),M.extend(e,t,null,{allOwnKeys:!0}),e.create=function(s){return Ho(Zt(i,s))},e}const q=Ho(wn);q.Axios=ni;q.CanceledError=Le;q.CancelToken=ol;q.isCancel=Bo;q.VERSION=Vo;q.toFormData=Mi;q.AxiosError=R;q.Cancel=q.CanceledError;q.all=function(t){return Promise.all(t)};q.spread=rl;q.isAxiosError=al;q.mergeConfig=Zt;q.AxiosHeaders=kt;q.formToJSON=i=>zo(M.isHTMLForm(i)?new FormData(i):i);q.HttpStatusCode=ll;q.default=q;const Mf=q;var kn={exports:{}};kn.exports;(function(i){var t=function(){var e=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function r(l,c){if(!o[l]){o[l]={};for(var h=0;h<l.length;h++)o[l][l.charAt(h)]=h}return o[l][c]}var a={compressToBase64:function(l){if(l==null)return"";var c=a._compress(l,6,function(h){return n.charAt(h)});switch(c.length%4){default:case 0:return c;case 1:return c+"===";case 2:return c+"==";case 3:return c+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:a._decompress(l.length,32,function(c){return r(n,l.charAt(c))})},compressToUTF16:function(l){return l==null?"":a._compress(l,15,function(c){return e(c+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:a._decompress(l.length,16384,function(c){return l.charCodeAt(c)-32})},compressToUint8Array:function(l){for(var c=a.compress(l),h=new Uint8Array(c.length*2),u=0,d=c.length;u<d;u++){var f=c.charCodeAt(u);h[u*2]=f>>>8,h[u*2+1]=f%256}return h},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var c=new Array(l.length/2),h=0,u=c.length;h<u;h++)c[h]=l[h*2]*256+l[h*2+1];var d=[];return c.forEach(function(f){d.push(e(f))}),a.decompress(d.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":a._compress(l,6,function(c){return s.charAt(c)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),a._decompress(l.length,32,function(c){return r(s,l.charAt(c))}))},compress:function(l){return a._compress(l,16,function(c){return e(c)})},_compress:function(l,c,h){if(l==null)return"";var u,d,f={},p={},g="",m="",b="",x=2,k=3,w=2,_=[],y=0,v=0,S;for(S=0;S<l.length;S+=1)if(g=l.charAt(S),Object.prototype.hasOwnProperty.call(f,g)||(f[g]=k++,p[g]=!0),m=b+g,Object.prototype.hasOwnProperty.call(f,m))b=m;else{if(Object.prototype.hasOwnProperty.call(p,b)){if(b.charCodeAt(0)<256){for(u=0;u<w;u++)y=y<<1,v==c-1?(v=0,_.push(h(y)),y=0):v++;for(d=b.charCodeAt(0),u=0;u<8;u++)y=y<<1|d&1,v==c-1?(v=0,_.push(h(y)),y=0):v++,d=d>>1}else{for(d=1,u=0;u<w;u++)y=y<<1|d,v==c-1?(v=0,_.push(h(y)),y=0):v++,d=0;for(d=b.charCodeAt(0),u=0;u<16;u++)y=y<<1|d&1,v==c-1?(v=0,_.push(h(y)),y=0):v++,d=d>>1}x--,x==0&&(x=Math.pow(2,w),w++),delete p[b]}else for(d=f[b],u=0;u<w;u++)y=y<<1|d&1,v==c-1?(v=0,_.push(h(y)),y=0):v++,d=d>>1;x--,x==0&&(x=Math.pow(2,w),w++),f[m]=k++,b=String(g)}if(b!==""){if(Object.prototype.hasOwnProperty.call(p,b)){if(b.charCodeAt(0)<256){for(u=0;u<w;u++)y=y<<1,v==c-1?(v=0,_.push(h(y)),y=0):v++;for(d=b.charCodeAt(0),u=0;u<8;u++)y=y<<1|d&1,v==c-1?(v=0,_.push(h(y)),y=0):v++,d=d>>1}else{for(d=1,u=0;u<w;u++)y=y<<1|d,v==c-1?(v=0,_.push(h(y)),y=0):v++,d=0;for(d=b.charCodeAt(0),u=0;u<16;u++)y=y<<1|d&1,v==c-1?(v=0,_.push(h(y)),y=0):v++,d=d>>1}x--,x==0&&(x=Math.pow(2,w),w++),delete p[b]}else for(d=f[b],u=0;u<w;u++)y=y<<1|d&1,v==c-1?(v=0,_.push(h(y)),y=0):v++,d=d>>1;x--,x==0&&(x=Math.pow(2,w),w++)}for(d=2,u=0;u<w;u++)y=y<<1|d&1,v==c-1?(v=0,_.push(h(y)),y=0):v++,d=d>>1;for(;;)if(y=y<<1,v==c-1){_.push(h(y));break}else v++;return _.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(c){return l.charCodeAt(c)})},_decompress:function(l,c,h){var u=[],d=4,f=4,p=3,g="",m=[],b,x,k,w,_,y,v,S={val:h(0),position:c,index:1};for(b=0;b<3;b+=1)u[b]=b;for(k=0,_=Math.pow(2,2),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;switch(k){case 0:for(k=0,_=Math.pow(2,8),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;v=e(k);break;case 1:for(k=0,_=Math.pow(2,16),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;v=e(k);break;case 2:return""}for(u[3]=v,x=v,m.push(v);;){if(S.index>l)return"";for(k=0,_=Math.pow(2,p),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;switch(v=k){case 0:for(k=0,_=Math.pow(2,8),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;u[f++]=e(k),v=f-1,d--;break;case 1:for(k=0,_=Math.pow(2,16),y=1;y!=_;)w=S.val&S.position,S.position>>=1,S.position==0&&(S.position=c,S.val=h(S.index++)),k|=(w>0?1:0)*y,y<<=1;u[f++]=e(k),v=f-1,d--;break;case 2:return m.join("")}if(d==0&&(d=Math.pow(2,p),p++),u[v])g=u[v];else if(v===f)g=x+x.charAt(0);else return null;m.push(g),u[f++]=x+g.charAt(0),d--,x=g,d==0&&(d=Math.pow(2,p),p++)}}};return a}();i!=null?i.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(kn);var Af=kn.exports;/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*/function Fe(i){return i+.5|0}const At=(i,t,e)=>Math.max(Math.min(i,e),t);function fe(i){return At(Fe(i*2.55),0,255)}function Dt(i){return At(Fe(i*255),0,255)}function _t(i){return At(Fe(i/2.55)/100,0,1)}function Jn(i){return At(Fe(i*100),0,100)}const rt={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},nn=[..."0123456789ABCDEF"],cl=i=>nn[i&15],hl=i=>nn[(i&240)>>4]+nn[i&15],Ne=i=>(i&240)>>4===(i&15),ul=i=>Ne(i.r)&&Ne(i.g)&&Ne(i.b)&&Ne(i.a);function dl(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&rt[i[1]]*17,g:255&rt[i[2]]*17,b:255&rt[i[3]]*17,a:t===5?rt[i[4]]*17:255}:(t===7||t===9)&&(e={r:rt[i[1]]<<4|rt[i[2]],g:rt[i[3]]<<4|rt[i[4]],b:rt[i[5]]<<4|rt[i[6]],a:t===9?rt[i[7]]<<4|rt[i[8]]:255})),e}const fl=(i,t)=>i<255?t(i):"";function pl(i){var t=ul(i)?cl:hl;return i?"#"+t(i.r)+t(i.g)+t(i.b)+fl(i.a,t):void 0}const gl=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function jo(i,t,e){const n=t*Math.min(e,1-e),s=(o,r=(o+i/30)%12)=>e-n*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function ml(i,t,e){const n=(s,o=(s+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function bl(i,t,e){const n=jo(i,1,.5);let s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)n[s]*=1-t-e,n[s]+=t;return n}function xl(i,t,e,n,s){return i===s?(t-e)/n+(t<e?6:0):t===s?(e-i)/n+2:(i-t)/n+4}function Mn(i){const e=i.r/255,n=i.g/255,s=i.b/255,o=Math.max(e,n,s),r=Math.min(e,n,s),a=(o+r)/2;let l,c,h;return o!==r&&(h=o-r,c=a>.5?h/(2-o-r):h/(o+r),l=xl(e,n,s,h,o),l=l*60+.5),[l|0,c||0,a]}function An(i,t,e,n){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,n)).map(Dt)}function On(i,t,e){return An(jo,i,t,e)}function yl(i,t,e){return An(bl,i,t,e)}function _l(i,t,e){return An(ml,i,t,e)}function Wo(i){return(i%360+360)%360}function wl(i){const t=gl.exec(i);let e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?fe(+t[5]):Dt(+t[5]));const s=Wo(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?n=yl(s,o,r):t[1]==="hsv"?n=_l(s,o,r):n=On(s,o,r),{r:n[0],g:n[1],b:n[2],a:e}}function vl(i,t){var e=Mn(i);e[0]=Wo(e[0]+t),e=On(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Sl(i){if(!i)return;const t=Mn(i),e=t[0],n=Jn(t[1]),s=Jn(t[2]);return i.a<255?`hsla(${e}, ${n}%, ${s}%, ${_t(i.a)})`:`hsl(${e}, ${n}%, ${s}%)`}const Zn={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"},Qn={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 kl(){const i={},t=Object.keys(Qn),e=Object.keys(Zn);let n,s,o,r,a;for(n=0;n<t.length;n++){for(r=a=t[n],s=0;s<e.length;s++)o=e[s],a=a.replace(o,Zn[o]);o=parseInt(Qn[r],16),i[a]=[o>>16&255,o>>8&255,o&255]}return i}let Ve;function Ml(i){Ve||(Ve=kl(),Ve.transparent=[0,0,0,0]);const t=Ve[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Al=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ol(i){const t=Al.exec(i);let e=255,n,s,o;if(t){if(t[7]!==n){const r=+t[7];e=t[8]?fe(r):At(r*255,0,255)}return n=+t[1],s=+t[3],o=+t[5],n=255&(t[2]?fe(n):At(n,0,255)),s=255&(t[4]?fe(s):At(s,0,255)),o=255&(t[6]?fe(o):At(o,0,255)),{r:n,g:s,b:o,a:e}}}function Pl(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${_t(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Bi=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Kt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Tl(i,t,e){const n=Kt(_t(i.r)),s=Kt(_t(i.g)),o=Kt(_t(i.b));return{r:Dt(Bi(n+e*(Kt(_t(t.r))-n))),g:Dt(Bi(s+e*(Kt(_t(t.g))-s))),b:Dt(Bi(o+e*(Kt(_t(t.b))-o))),a:i.a+e*(t.a-i.a)}}function He(i,t,e){if(i){let n=Mn(i);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=On(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function Uo(i,t){return i&&Object.assign(t||{},i)}function ts(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=Dt(i[3]))):(t=Uo(i,{r:0,g:0,b:0,a:1}),t.a=Dt(t.a)),t}function Dl(i){return i.charAt(0)==="r"?Ol(i):wl(i)}class Me{constructor(t){if(t instanceof Me)return t;const e=typeof t;let n;e==="object"?n=ts(t):e==="string"&&(n=dl(t)||Ml(t)||Dl(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Uo(this._rgb);return t&&(t.a=_t(t.a)),t}set rgb(t){this._rgb=ts(t)}rgbString(){return this._valid?Pl(this._rgb):void 0}hexString(){return this._valid?pl(this._rgb):void 0}hslString(){return this._valid?Sl(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,s=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,l=n.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=r*n.a+(1-r)*s.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=Tl(this._rgb,t._rgb,e)),this}clone(){return new Me(this.rgb)}alpha(t){return this._rgb.a=Dt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Fe(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.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 He(this._rgb,2,t),this}darken(t){return He(this._rgb,2,-t),this}saturate(t){return He(this._rgb,1,t),this}desaturate(t){return He(this._rgb,1,-t),this}rotate(t){return vl(this._rgb,t),this}}/*!
* Chart.js v4.3.0
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/function bt(){}const Cl=(()=>{let i=0;return()=>i++})();function L(i){return i===null||typeof i>"u"}function N(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function C(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function W(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function st(i,t){return W(i)?i:t}function P(i,t){return typeof i>"u"?t:i}const El=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,$o=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function B(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function I(i,t,e,n){let s,o,r;if(N(i))if(o=i.length,n)for(s=o-1;s>=0;s--)t.call(e,i[s],s);else for(s=0;s<o;s++)t.call(e,i[s],s);else if(C(i))for(r=Object.keys(i),o=r.length,s=0;s<o;s++)t.call(e,i[r[s]],r[s])}function pi(i,t){let e,n,s,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,n=i.length;e<n;++e)if(s=i[e],o=t[e],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function gi(i){if(N(i))return i.map(gi);if(C(i)){const t=Object.create(null),e=Object.keys(i),n=e.length;let s=0;for(;s<n;++s)t[e[s]]=gi(i[e[s]]);return t}return i}function Yo(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Rl(i,t,e,n){if(!Yo(i))return;const s=t[i],o=e[i];C(s)&&C(o)?Ae(s,o,n):t[i]=gi(o)}function Ae(i,t,e){const n=N(t)?t:[t],s=n.length;if(!C(i))return i;e=e||{};const o=e.merger||Rl;let r;for(let a=0;a<s;++a){if(r=n[a],!C(r))continue;const l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],i,r,e)}return i}function ye(i,t){return Ae(i,t,{merger:Ll})}function Ll(i,t,e){if(!Yo(i))return;const n=t[i],s=e[i];C(n)&&C(s)?ye(n,s):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=gi(s))}const es={"":i=>i,x:i=>i.x,y:i=>i.y};function Fl(i){const t=i.split("."),e=[];let n="";for(const s of t)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function Il(i){const t=Fl(i);return e=>{for(const n of t){if(n==="")break;e=e&&e[n]}return e}}function Ct(i,t){return(es[t]||(es[t]=Il(t)))(i)}function Pn(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Oe=i=>typeof i<"u",Et=i=>typeof i=="function",is=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function zl(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const j=Math.PI,V=2*j,Bl=V+j,mi=Number.POSITIVE_INFINITY,Nl=j/180,U=j/2,Lt=j/4,ns=j*2/3,Ot=Math.log10,gt=Math.sign;function _e(i,t,e){return Math.abs(i-t)<e}function ss(i){const t=Math.round(i);i=_e(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(Ot(i))),n=i/e;return(n<=1?1:n<=2?2:n<=5?5:10)*e}function Vl(i){const t=[],e=Math.sqrt(i);let n;for(n=1;n<e;n++)i%n===0&&(t.push(n),t.push(i/n));return e===(e|0)&&t.push(e),t.sort((s,o)=>s-o).pop(),t}function Qt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Hl(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Xo(i,t,e){let n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ct(i){return i*(j/180)}function Tn(i){return i*(180/j)}function os(i){if(!W(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function qo(i,t){const e=t.x-i.x,n=t.y-i.y,s=Math.sqrt(e*e+n*n);let o=Math.atan2(n,e);return o<-.5*j&&(o+=V),{angle:o,distance:s}}function sn(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function jl(i,t){return(i-t+Bl)%V-j}function ot(i){return(i%V+V)%V}function Pe(i,t,e,n){const s=ot(i),o=ot(t),r=ot(e),a=ot(o-s),l=ot(r-s),c=ot(s-o),h=ot(s-r);return s===o||s===r||n&&o===r||a>l&&c<h}function K(i,t,e){return Math.max(t,Math.min(e,i))}function Wl(i){return K(i,-32768,32767)}function wt(i,t,e,n=1e-6){return i>=Math.min(t,e)-n&&i<=Math.max(t,e)+n}function Dn(i,t,e){e=e||(r=>i[r]<t);let n=i.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,e(o)?s=o:n=o;return{lo:s,hi:n}}const vt=(i,t,e,n)=>Dn(i,e,n?s=>{const o=i[s][t];return o<e||o===e&&i[s+1][t]===e}:s=>i[s][t]<e),Ul=(i,t,e)=>Dn(i,e,n=>i[n][t]>=e);function $l(i,t,e){let n=0,s=i.length;for(;n<s&&i[n]<t;)n++;for(;s>n&&i[s-1]>e;)s--;return n>0||s<i.length?i.slice(n,s):i}const Ko=["push","pop","shift","splice","unshift"];function Yl(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Ko.forEach(e=>{const n="_onData"+Pn(e),s=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...o)}),r}})})}function rs(i,t){const e=i._chartjs;if(!e)return;const n=e.listeners,s=n.indexOf(t);s!==-1&&n.splice(s,1),!(n.length>0)&&(Ko.forEach(o=>{delete i[o]}),delete i._chartjs)}function Go(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Jo=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function Zo(i,t){let e=[],n=!1;return function(...s){e=s,n||(n=!0,Jo.call(window,()=>{n=!1,i.apply(t,e)}))}}function Xl(i,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(i,t,n)):i.apply(this,n),t}}const Cn=i=>i==="start"?"left":i==="end"?"right":"center",Z=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,ql=(i,t,e,n)=>i===(n?"left":"right")?e:i==="center"?(t+e)/2:t;function Qo(i,t,e){const n=t.length;let s=0,o=n;if(i._sorted){const{iScale:r,_parsed:a}=i,l=r.axis,{min:c,max:h,minDefined:u,maxDefined:d}=r.getUserBounds();u&&(s=K(Math.min(vt(a,r.axis,c).lo,e?n:vt(t,l,r.getPixelForValue(c)).lo),0,n-1)),d?o=K(Math.max(vt(a,r.axis,h,!0).hi+1,e?0:vt(t,l,r.getPixelForValue(h),!0).hi+1),s,n)-s:o=n-s}return{start:s,count:o}}function tr(i){const{xScale:t,yScale:e,_scaleRanges:n}=i,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!n)return i._scaleRanges=s,!0;const o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,s),o}const je=i=>i===0||i===1,as=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*V/e)),ls=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*V/e)+1,we={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*U)+1,easeOutSine:i=>Math.sin(i*U),easeInOutSine:i=>-.5*(Math.cos(j*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>je(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>je(i)?i:as(i,.075,.3),easeOutElastic:i=>je(i)?i:ls(i,.075,.3),easeInOutElastic(i){return je(i)?i:i<.5?.5*as(i*2,.1125,.45):.5+.5*ls(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-we.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?we.easeInBounce(i*2)*.5:we.easeOutBounce(i*2-1)*.5+.5};function En(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function cs(i){return En(i)?i:new Me(i)}function Ni(i){return En(i)?i:new Me(i).saturate(.5).darken(.1).hexString()}const Kl=["x","y","borderWidth","radius","tension"],Gl=["color","borderColor","backgroundColor"];function Jl(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Gl},numbers:{type:"number",properties:Kl}}),i.describe("animations",{_fallback:"animation"}),i.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 Zl(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const hs=new Map;function Ql(i,t){t=t||{};const e=i+JSON.stringify(t);let n=hs.get(e);return n||(n=new Intl.NumberFormat(i,t),hs.set(e,n)),n}function Ie(i,t,e){return Ql(t,e).format(i)}const er={values(i){return N(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const n=this.chart.options.locale;let s,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=tc(i,e)}const r=Ot(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Ie(i,n,l)},logarithmic(i,t,e){if(i===0)return"0";const n=e[t].significand||i/Math.pow(10,Math.floor(Ot(i)));return[1,2,3,5,10,15].includes(n)||t>.8*e.length?er.numeric.call(this,i,t,e):""}};function tc(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Pi={formatters:er};function ec(i){i.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,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Pi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ut=Object.create(null),on=Object.create(null);function ve(i,t){if(!t)return i;const e=t.split(".");for(let n=0,s=e.length;n<s;++n){const o=e[n];i=i[o]||(i[o]=Object.create(null))}return i}function Vi(i,t,e){return typeof t=="string"?Ae(ve(i,t),e):Ae(ve(i,""),t)}class ic{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.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=(n,s)=>Ni(s.backgroundColor),this.hoverBorderColor=(n,s)=>Ni(s.borderColor),this.hoverColor=(n,s)=>Ni(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Vi(this,t,e)}get(t){return ve(this,t)}describe(t,e){return Vi(on,t,e)}override(t,e){return Vi(Ut,t,e)}route(t,e,n,s){const o=ve(this,t),r=ve(this,n),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[s];return C(l)?Object.assign({},c,l):P(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var $=new ic({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Jl,Zl,ec]);function nc(i){return!i||L(i.size)||L(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function bi(i,t,e,n,s){let o=t[s];return o||(o=t[s]=i.measureText(s).width,e.push(s)),o>n&&(n=o),n}function sc(i,t,e,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(s=n.data={},o=n.garbageCollect=[],n.font=t),i.save(),i.font=t;let r=0;const a=e.length;let l,c,h,u,d;for(l=0;l<a;l++)if(u=e[l],u!=null&&!N(u))r=bi(i,s,o,r,u);else if(N(u))for(c=0,h=u.length;c<h;c++)d=u[c],d!=null&&!N(d)&&(r=bi(i,s,o,r,d));i.restore();const f=o.length/2;if(f>e.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return r}function Ft(i,t,e){const n=i.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*n)/n+s}function us(i,t){t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore()}function rn(i,t,e,n){ir(i,t,e,n,null)}function ir(i,t,e,n,s){let o,r,a,l,c,h,u,d;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*Nl;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,n),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),f){default:s?i.ellipse(e,n,s/2,g,0,0,V):i.arc(e,n,g,0,V),i.closePath();break;case"triangle":h=s?s/2:g,i.moveTo(e+Math.sin(m)*h,n-Math.cos(m)*g),m+=ns,i.lineTo(e+Math.sin(m)*h,n-Math.cos(m)*g),m+=ns,i.lineTo(e+Math.sin(m)*h,n-Math.cos(m)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(m+Lt)*l,u=Math.cos(m+Lt)*(s?s/2-c:l),a=Math.sin(m+Lt)*l,d=Math.sin(m+Lt)*(s?s/2-c:l),i.arc(e-u,n-a,c,m-j,m-U),i.arc(e+d,n-r,c,m-U,m),i.arc(e+u,n+a,c,m,m+U),i.arc(e-d,n+r,c,m+U,m+j),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=s?s/2:l,i.rect(e-h,n-l,2*h,2*l);break}m+=Lt;case"rectRot":u=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(s?s/2:g),i.moveTo(e-u,n-a),i.lineTo(e+d,n-r),i.lineTo(e+u,n+a),i.lineTo(e-d,n+r),i.closePath();break;case"crossRot":m+=Lt;case"cross":u=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(s?s/2:g),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+d,n-r),i.lineTo(e-d,n+r);break;case"star":u=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(s?s/2:g),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+d,n-r),i.lineTo(e-d,n+r),m+=Lt,u=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(s?s/2:g),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+d,n-r),i.lineTo(e-d,n+r);break;case"line":r=s?s/2:Math.cos(m)*g,a=Math.sin(m)*g,i.moveTo(e-r,n-a),i.lineTo(e+r,n+a);break;case"dash":i.moveTo(e,n),i.lineTo(e+Math.cos(m)*(s?s/2:g),n+Math.sin(m)*g);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function St(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function Ti(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function Di(i){i.restore()}function oc(i,t,e,n,s){if(!t)return i.lineTo(e.x,e.y);if(s==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else s==="after"!=!!n?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function rc(i,t,e,n){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?e.cp2x:e.cp1x,n?e.cp2y:e.cp1y,e.x,e.y)}function ac(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),L(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function lc(i,t,e,n,s){if(s.strikethrough||s.underline){const o=i.measureText(n),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=s.decorationWidth||2,i.moveTo(r,h),i.lineTo(a,h),i.stroke()}}function cc(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function $t(i,t,e,n,s,o={}){const r=N(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=s.string,ac(i,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&cc(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),L(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,n,o.maxWidth)),i.fillText(c,e,n,o.maxWidth),lc(i,e,n,c,o),n+=Number(s.lineHeight);i.restore()}function Te(i,t){const{x:e,y:n,w:s,h:o,radius:r}=t;i.arc(e+r.topLeft,n+r.topLeft,r.topLeft,-U,j,!0),i.lineTo(e,n+o-r.bottomLeft),i.arc(e+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,j,U,!0),i.lineTo(e+s-r.bottomRight,n+o),i.arc(e+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,U,0,!0),i.lineTo(e+s,n+r.topRight),i.arc(e+s-r.topRight,n+r.topRight,r.topRight,0,-U,!0),i.lineTo(e+r.topLeft,n)}const hc=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,uc=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function dc(i,t){const e=(""+i).match(hc);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const fc=i=>+i||0;function Rn(i,t){const e={},n=C(t),s=n?Object.keys(t):t,o=C(i)?n?r=>P(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of s)e[r]=fc(o(r));return e}function nr(i){return Rn(i,{top:"y",right:"x",bottom:"y",left:"x"})}function jt(i){return Rn(i,["topLeft","topRight","bottomLeft","bottomRight"])}function tt(i){const t=nr(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function X(i,t){i=i||{},t=t||$.font;let e=P(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=P(i.style,t.style);n&&!(""+n).match(uc)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:P(i.family,t.family),lineHeight:dc(P(i.lineHeight,t.lineHeight),e),size:e,style:n,weight:P(i.weight,t.weight),string:""};return s.string=nc(s),s}function pe(i,t,e,n){let s=!0,o,r,a;for(o=0,r=i.length;o<r;++o)if(a=i[o],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),s=!1),e!==void 0&&N(a)&&(a=a[e%a.length],s=!1),a!==void 0))return n&&!s&&(n.cacheable=!1),a}function pc(i,t,e){const{min:n,max:s}=i,o=$o(t,(s-n)/2),r=(a,l)=>e&&a===0?0:a+l;return{min:r(n,-Math.abs(o)),max:r(s,o)}}function Rt(i,t){return Object.assign(Object.create(i),t)}function Ln(i,t=[""],e,n,s=()=>i[0]){const o=e||i;typeof n>"u"&&(n=ar("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:s,override:a=>Ln([a,...i],t,o,n)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return or(a,l,()=>vc(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return fs(a).includes(l)},ownKeys(a){return fs(a)},set(a,l,c){const h=a._storage||(a._storage=s());return a[l]=h[l]=c,delete a._keys,!0}})}function te(i,t,e,n){const s={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:sr(i,n),setContext:o=>te(i,o,e,n),override:o=>te(i.override(o),t,e,n)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return or(o,r,()=>mc(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function sr(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:s=t.allKeys}=i;return{allKeys:s,scriptable:e,indexable:n,isScriptable:Et(e)?e:()=>e,isIndexable:Et(n)?n:()=>n}}const gc=(i,t)=>i?i+Pn(t):t,Fn=(i,t)=>C(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function or(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const n=e();return i[t]=n,n}function mc(i,t,e){const{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=i;let a=n[t];return Et(a)&&r.isScriptable(t)&&(a=bc(t,a,i,e)),N(a)&&a.length&&(a=xc(t,a,i,r.isIndexable)),Fn(t,a)&&(a=te(a,s,o&&o[t],r)),a}function bc(i,t,e,n){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||n);return a.delete(i),Fn(i,l)&&(l=In(s._scopes,s,i,l)),l}function xc(i,t,e,n){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&n(i))return t[o.index%t.length];if(C(t[0])){const l=t,c=s._scopes.filter(h=>h!==l);t=[];for(const h of l){const u=In(c,s,i,h);t.push(te(u,o,r&&r[i],a))}}return t}function rr(i,t,e){return Et(i)?i(t,e):i}const yc=(i,t)=>i===!0?t:typeof i=="string"?Ct(t,i):void 0;function _c(i,t,e,n,s){for(const o of t){const r=yc(e,o);if(r){i.add(r);const a=rr(r._fallback,e,s);if(typeof a<"u"&&a!==e&&a!==n)return a}else if(r===!1&&typeof n<"u"&&e!==n)return null}return!1}function In(i,t,e,n){const s=t._rootScopes,o=rr(t._fallback,e,n),r=[...i,...s],a=new Set;a.add(n);let l=ds(a,r,e,o||e,n);return l===null||typeof o<"u"&&o!==e&&(l=ds(a,r,o,l,n),l===null)?!1:Ln(Array.from(a),[""],s,o,()=>wc(t,e,n))}function ds(i,t,e,n,s){for(;e;)e=_c(i,t,e,n,s);return e}function wc(i,t,e){const n=i._getTarget();t in n||(n[t]={});const s=n[t];return N(s)&&C(e)?e:s||{}}function vc(i,t,e,n){let s;for(const o of t)if(s=ar(gc(o,i),e),typeof s<"u")return Fn(i,s)?In(e,n,i,s):s}function ar(i,t){for(const e of t){if(!e)continue;const n=e[i];if(typeof n<"u")return n}}function fs(i){let t=i._keys;return t||(t=i._keys=Sc(i._scopes)),t}function Sc(i){const t=new Set;for(const e of i)for(const n of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(n);return Array.from(t)}function lr(i,t,e,n){const{iScale:s}=i,{key:o="r"}=this._parsing,r=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+e,h=t[c],r[a]={r:s.parse(Ct(h,o),c)};return r}const kc=Number.EPSILON||1e-14,ee=(i,t)=>t<i.length&&!i[t].skip&&i[t],cr=i=>i==="x"?"y":"x";function Mc(i,t,e,n){const s=i.skip?t:i,o=t,r=e.skip?t:e,a=sn(o,s),l=sn(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(r.x-s.x),y:o.y-u*(r.y-s.y)},next:{x:o.x+d*(r.x-s.x),y:o.y+d*(r.y-s.y)}}}function Ac(i,t,e){const n=i.length;let s,o,r,a,l,c=ee(i,0);for(let h=0;h<n-1;++h)if(l=c,c=ee(i,h+1),!(!l||!c)){if(_e(t[h],0,kc)){e[h]=e[h+1]=0;continue}s=e[h]/t[h],o=e[h+1]/t[h],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),e[h]=s*r*t[h],e[h+1]=o*r*t[h])}}function Oc(i,t,e="x"){const n=cr(e),s=i.length;let o,r,a,l=ee(i,0);for(let c=0;c<s;++c){if(r=a,a=l,l=ee(i,c+1),!a)continue;const h=a[e],u=a[n];r&&(o=(h-r[e])/3,a[`cp1${e}`]=h-o,a[`cp1${n}`]=u-o*t[c]),l&&(o=(l[e]-h)/3,a[`cp2${e}`]=h+o,a[`cp2${n}`]=u+o*t[c])}}function Pc(i,t="x"){const e=cr(t),n=i.length,s=Array(n).fill(0),o=Array(n);let r,a,l,c=ee(i,0);for(r=0;r<n;++r)if(a=l,l=c,c=ee(i,r+1),!!l){if(c){const h=c[t]-l[t];s[r]=h!==0?(c[e]-l[e])/h:0}o[r]=a?c?gt(s[r-1])!==gt(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}Ac(i,s,o),Oc(i,o,t)}function We(i,t,e){return Math.max(Math.min(i,e),t)}function Tc(i,t){let e,n,s,o,r,a=St(i[0],t);for(e=0,n=i.length;e<n;++e)r=o,o=a,a=e<n-1&&St(i[e+1],t),o&&(s=i[e],r&&(s.cp1x=We(s.cp1x,t.left,t.right),s.cp1y=We(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=We(s.cp2x,t.left,t.right),s.cp2y=We(s.cp2y,t.top,t.bottom)))}function Dc(i,t,e,n,s){let o,r,a,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Pc(i,s);else{let c=n?i[i.length-1]:i[0];for(o=0,r=i.length;o<r;++o)a=i[o],l=Mc(c,a,i[Math.min(o+1,r-(n?0:1))%r],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&&Tc(i,e)}function hr(){return typeof window<"u"&&typeof document<"u"}function zn(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function xi(i,t,e){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*t.parentNode[e])):n=i,n}const Ci=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Cc(i,t){return Ci(i).getPropertyValue(t)}const Ec=["top","right","bottom","left"];function Wt(i,t,e){const n={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=Ec[s];n[o]=parseFloat(i[t+"-"+o+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Rc=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Lc(i,t){const e=i.touches,n=e&&e.length?e[0]:i,{offsetX:s,offsetY:o}=n;let r=!1,a,l;if(Rc(s,o,i.target))a=s,l=o;else{const c=t.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function Bt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:n}=t,s=Ci(e),o=s.boxSizing==="border-box",r=Wt(s,"padding"),a=Wt(s,"border","width"),{x:l,y:c,box:h}=Lc(i,e),u=r.left+(h&&a.left),d=r.top+(h&&a.top);let{width:f,height:p}=t;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-u)/f*e.width/n),y:Math.round((c-d)/p*e.height/n)}}function Fc(i,t,e){let n,s;if(t===void 0||e===void 0){const o=zn(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=Ci(o),l=Wt(a,"border","width"),c=Wt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,n=xi(a.maxWidth,o,"clientWidth"),s=xi(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:n||mi,maxHeight:s||mi}}const Ue=i=>Math.round(i*10)/10;function Ic(i,t,e,n){const s=Ci(i),o=Wt(s,"margin"),r=xi(s.maxWidth,i,"clientWidth")||mi,a=xi(s.maxHeight,i,"clientHeight")||mi,l=Fc(i,t,e);let{width:c,height:h}=l;if(s.boxSizing==="content-box"){const d=Wt(s,"border","width"),f=Wt(s,"padding");c-=f.width+d.width,h-=f.height+d.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?c/n:h-o.height),c=Ue(Math.min(c,r,l.maxWidth)),h=Ue(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Ue(c/2)),(t!==void 0||e!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,c=Ue(Math.floor(h*n))),{width:c,height:h}}function ps(i,t,e){const n=t||1,s=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||r.height!==s||r.width!==o?(i.currentDevicePixelRatio=n,r.height=s,r.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}const zc=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}return i}();function gs(i,t){const e=Cc(i,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Nt(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Bc(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:n==="middle"?e<.5?i.y:t.y:n==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function Nc(i,t,e,n){const s={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=Nt(i,s,e),a=Nt(s,o,e),l=Nt(o,t,e),c=Nt(r,a,e),h=Nt(a,l,e);return Nt(c,h,e)}const Vc=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},Hc=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Jt(i,t,e){return i?Vc(t,e):Hc()}function ur(i,t){let e,n;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=n)}function dr(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function fr(i){return i==="angle"?{between:Pe,compare:jl,normalize:ot}:{between:wt,compare:(t,e)=>t-e,normalize:t=>t}}function ms({start:i,end:t,count:e,loop:n,style:s}){return{start:i%e,end:t%e,loop:n&&(t-i+1)%e===0,style:s}}function jc(i,t,e){const{property:n,start:s,end:o}=e,{between:r,normalize:a}=fr(n),l=t.length;let{start:c,end:h,loop:u}=i,d,f;if(u){for(c+=l,h+=l,d=0,f=l;d<f&&r(a(t[c%l][n]),s,o);++d)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:u,style:i.style}}function pr(i,t,e){if(!e)return[i];const{property:n,start:s,end:o}=e,r=t.length,{compare:a,between:l,normalize:c}=fr(n),{start:h,end:u,loop:d,style:f}=jc(i,t,e),p=[];let g=!1,m=null,b,x,k;const w=()=>l(s,k,b)&&a(s,k)!==0,_=()=>a(o,b)===0||l(o,k,b),y=()=>g||w(),v=()=>!g||_();for(let S=h,O=h;S<=u;++S)x=t[S%r],!x.skip&&(b=c(x[n]),b!==k&&(g=l(b,s,o),m===null&&y()&&(m=a(b,s)===0?S:O),m!==null&&v()&&(p.push(ms({start:m,end:S,loop:d,count:r,style:f})),m=null),O=S,k=b));return m!==null&&p.push(ms({start:m,end:u,loop:d,count:r,style:f})),p}function gr(i,t){const e=[],n=i.segments;for(let s=0;s<n.length;s++){const o=pr(n[s],i.points,t);o.length&&e.push(...o)}return e}function Wc(i,t,e,n){let s=0,o=t-1;if(e&&!n)for(;s<t&&!i[s].skip;)s++;for(;s<t&&i[s].skip;)s++;for(s%=t,e&&(o+=s);o>s&&i[o%t].skip;)o--;return o%=t,{start:s,end:o}}function Uc(i,t,e,n){const s=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%s];c.skip||c.stop?a.skip||(n=!1,o.push({start:t%s,end:(l-1)%s,loop:n}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%s,end:r%s,loop:n}),o}function $c(i,t){const e=i.points,n=i.options.spanGaps,s=e.length;if(!s)return[];const o=!!i._loop,{start:r,end:a}=Wc(e,s,o,n);if(n===!0)return bs(i,[{start:r,end:a,loop:o}],e,t);const l=a<r?a+s:a,c=!!i._fullLoop&&r===0&&a===s-1;return bs(i,Uc(e,r,l,c),e,t)}function bs(i,t,e,n){return!n||!n.setContext||!e?t:Yc(i,t,e,n)}function Yc(i,t,e,n){const s=i._chart.getContext(),o=xs(i.options),{_datasetIndex:r,options:{spanGaps:a}}=i,l=e.length,c=[];let h=o,u=t[0].start,d=u;function f(p,g,m,b){const x=a?-1:1;if(p!==g){for(p+=l;e[p%l].skip;)p-=x;for(;e[g%l].skip;)g+=x;p%l!==g%l&&(c.push({start:p%l,end:g%l,loop:m,style:b}),h=b,u=g%l)}}for(const p of t){u=a?u:p.start;let g=e[u%l],m;for(d=u+1;d<=p.end;d++){const b=e[d%l];m=xs(n.setContext(Rt(s,{type:"segment",p0:g,p1:b,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:r}))),Xc(m,h)&&f(u,d-1,p.loop,h),g=b,h=m}u<d-1&&f(u,d-1,p.loop,h)}return c}function xs(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Xc(i,t){if(!t)return!1;const e=[],n=function(s,o){return En(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,n)!==JSON.stringify(t,n)}/*!
* Chart.js v4.3.0
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/class qc{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,s){const o=e.listeners[s],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(n-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Jo.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const o=n.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,n,t,"progress")),o.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var xt=new qc;const ys="transparent",Kc={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const n=cs(i||ys),s=n.valid&&cs(t||ys);return s&&s.valid?s.mix(n,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Gc{constructor(t,e,n,s){const o=e[n];s=pe([t.to,s,o,t.from]);const r=pe([t.from,o,s]);this._active=!0,this._fn=t.fn||Kc[t.type||typeof r],this._easing=we[t.easing]||we.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const s=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=pe([t.to,e,s,t.from]),this._from=pe([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e<n),!this._active){this._target[s]=a,this._notify(!0);return}if(e<0){this._target[s]=o;return}l=e/n%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][e]()}}class mr{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!C(t))return;const e=Object.keys($.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!C(o))return;const r={};for(const a of e)r[a]=o[a];(N(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!n.has(a))&&n.set(a,r)})})}_animateOptions(t,e){const n=e.options,s=Zc(t,n);if(!s)return[];const o=this._createAnimations(s,n);return n.$shared&&Jc(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,e){const n=this._properties,s=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,e));continue}const h=e[c];let u=o[c];const d=n.get(c);if(u)if(d&&u.active()){u.update(d,h,a);continue}else u.cancel();if(!d||!d.duration){t[c]=h;continue}o[c]=u=new Gc(d,t,c,h),s.push(u)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const n=this._createAnimations(t,e);if(n.length)return xt.add(this._chart,n),!0}}function Jc(i,t){const e=[],n=Object.keys(t);for(let s=0;s<n.length;s++){const o=i[n[s]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Zc(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function _s(i,t){const e=i&&i.options||{},n=e.reverse,s=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:n?o:s,end:n?s:o}}function Qc(i,t,e){if(e===!1)return!1;const n=_s(i,e),s=_s(t,e);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function th(i){let t,e,n,s;return C(i)?(t=i.top,e=i.right,n=i.bottom,s=i.left):t=e=n=s=i,{top:t,right:e,bottom:n,left:s,disabled:i===!1}}function br(i,t){const e=[],n=i._getSortedDatasetMetas(t);let s,o;for(s=0,o=n.length;s<o;++s)e.push(n[s].index);return e}function ws(i,t,e,n={}){const s=i.keys,o=n.mode==="single";let r,a,l,c;if(t!==null){for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===e){if(n.all)continue;break}c=i.values[l],W(c)&&(o||t===0||gt(t)===gt(c))&&(t+=c)}return t}}function eh(i){const t=Object.keys(i),e=new Array(t.length);let n,s,o;for(n=0,s=t.length;n<s;++n)o=t[n],e[n]={x:o,y:i[o]};return e}function vs(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function ih(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function nh(i){const{min:t,max:e,minDefined:n,maxDefined:s}=i.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function sh(i,t,e){const n=i[t]||(i[t]={});return n[e]||(n[e]={})}function Ss(i,t,e,n){for(const s of t.getMatchingVisibleMetas(n).reverse()){const o=i[s.index];if(e&&o>0||!e&&o<0)return s.index}return null}function ks(i,t){const{chart:e,_cachedMeta:n}=i,s=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,h=ih(o,r,n),u=t.length;let d;for(let f=0;f<u;++f){const p=t[f],{[l]:g,[c]:m}=p,b=p._stacks||(p._stacks={});d=b[c]=sh(s,h,g),d[a]=m,d._top=Ss(d,r,!0,n.type),d._bottom=Ss(d,r,!1,n.type);const x=d._visualValues||(d._visualValues={});x[a]=m}}function Hi(i,t){const e=i.scales;return Object.keys(e).filter(n=>e[n].axis===t).shift()}function oh(i,t){return Rt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function rh(i,t,e){return Rt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function le(i,t){const e=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){t=t||i._parsed;for(const s of t){const o=s._stacks;if(!o||o[n]===void 0||o[n][e]===void 0)return;delete o[n][e],o[n]._visualValues!==void 0&&o[n]._visualValues[e]!==void 0&&delete o[n]._visualValues[e]}}}const ji=i=>i==="reset"||i==="none",Ms=(i,t)=>t?i:Object.assign({},i),ah=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:br(e,!0),values:null};class ht{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=vs(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&&le(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),s=(u,d,f,p)=>u==="x"?d:u==="r"?p:f,o=e.xAxisID=P(n.xAxisID,Hi(t,"x")),r=e.yAxisID=P(n.yAxisID,Hi(t,"y")),a=e.rAxisID=P(n.rAxisID,Hi(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,o,r,a),h=e.vAxisID=s(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&rs(this._data,this),t._stacked&&le(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(C(e))this._data=eh(e);else if(n!==e){if(n){rs(n,this);const s=this._cachedMeta;le(s),s._parsed=[]}e&&Object.isExtensible(e)&&Yl(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let s=!1;this._dataCheck();const o=e._stacked;e._stacked=vs(e.vScale,e),e.stack!==n.stack&&(s=!0,le(e),e.stack=n.stack),this._resyncElements(t),(s||o!==e._stacked)&&ks(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:s}=this,{iScale:o,_stacked:r}=n,a=o.axis;let l=t===0&&e===s.length?!0:n._sorted,c=t>0&&n._parsed[t-1],h,u,d;if(this._parsing===!1)n._parsed=s,n._sorted=!0,d=s;else{N(s[t])?d=this.parseArrayData(n,s,t,e):C(s[t])?d=this.parseObjectData(n,s,t,e):d=this.parsePrimitiveData(n,s,t,e);const f=()=>u[a]===null||c&&u[a]<c[a];for(h=0;h<e;++h)n._parsed[h+t]=u=d[h],l&&(f()&&(l=!1),c=u);n._sorted=l}r&&ks(this,d)}parsePrimitiveData(t,e,n,s){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),h=o===r,u=new Array(s);let d,f,p;for(d=0,f=s;d<f;++d)p=d+n,u[d]={[a]:h||o.parse(c[p],p),[l]:r.parse(e[p],p)};return u}parseArrayData(t,e,n,s){const{xScale:o,yScale:r}=t,a=new Array(s);let l,c,h,u;for(l=0,c=s;l<c;++l)h=l+n,u=e[h],a[l]={x:o.parse(u[0],h),y:r.parse(u[1],h)};return a}parseObjectData(t,e,n,s){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let h,u,d,f;for(h=0,u=s;h<u;++h)d=h+n,f=e[d],c[h]={x:o.parse(Ct(f,a),d),y:r.parse(Ct(f,l),d)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const s=this.chart,o=this._cachedMeta,r=e[t.axis],a={keys:br(s,!0),values:e._stacks[t.axis]._visualValues};return ws(a,r,o.index,{mode:n})}updateRangeFromParsed(t,e,n,s){const o=n[e.axis];let r=o===null?NaN:o;const a=s&&n._stacks[e.axis];s&&a&&(s.values=a,r=ws(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const n=this._cachedMeta,s=n._parsed,o=n._sorted&&t===n.iScale,r=s.length,a=this._getOtherScale(t),l=ah(e,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:u}=nh(a);let d,f;function p(){f=s[d];const g=f[a.axis];return!W(f[t.axis])||h>g||u<g}for(d=0;d<r&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),o));++d);if(o){for(d=r-1;d>=0;--d)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let s,o,r;for(s=0,o=e.length;s<o;++s)r=e[s][t.axis],W(r)&&n.push(r);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,s=e.vScale,o=this.getParsed(t);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=th(P(this.options.clip,Qc(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,s=n.data||[],o=e.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let h;for(n.dataset&&n.dataset.draw(t,o,a,l),h=a;h<a+l;++h){const u=s[h];u.hidden||(u.active&&c?r.push(u):u.draw(t,o))}for(h=0;h<r.length;++h)r[h].draw(t,o)}getStyle(t,e){const n=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=rh(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=oh(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const s=e==="active",o=this._cachedDataOpts,r=t+"-"+e,a=o[r],l=this.enableOptionSharing&&Oe(n);if(a)return Ms(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),u=s?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(this.getDataset(),h),f=Object.keys($.elements[t]),p=()=>this.getContext(n,s,e),g=c.resolveNamedOptions(d,f,p,u);return g.$shared&&(g.$shared=l,o[r]=Object.freeze(Ms(g,l))),g}_resolveAnimations(t,e,n){const s=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(s.options.animation!==!1){const h=this.chart.config,u=h.datasetAnimationScopeKeys(this._type,e),d=h.getOptionScopes(this.getDataset(),u);l=h.createResolver(d,this.getContext(t,n,e))}const c=new mr(s,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ji(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(n),r=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,n),{sharedOptions:o,includeOptions:r}}updateElement(t,e,n,s){ji(s)?Object.assign(t,n):this._resolveAnimations(e,s).update(t,n)}updateSharedOptions(t,e,n){t&&!ji(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,s){t.active=s;const o=this.getStyle(e,s);this._resolveAnimations(e,n,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=n.length,o=e.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,e,n=!0){const s=this._cachedMeta,o=s.data,r=t+e;let a;const l=c=>{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,e),n&&this.updateElements(o,t,e,"reset")}updateElements(t,e,n,s){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const s=n._parsed.splice(t,e);n._stacked&&le(n,s)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,s]=t;this[e](n,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}A(ht,"defaults",{}),A(ht,"datasetElementType",null),A(ht,"dataElementType",null);function lh(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let n=[];for(let s=0,o=e.length;s<o;s++)n=n.concat(e[s].controller.getAllParsedValues(i));i._cache.$bar=Go(n.sort((s,o)=>s-o))}return i._cache.$bar}function ch(i){const t=i.iScale,e=lh(t,i.type);let n=t._length,s,o,r,a;const l=()=>{r===32767||r===-32768||(Oe(a)&&(n=Math.min(n,Math.abs(r-a)||n)),a=r)};for(s=0,o=e.length;s<o;++s)r=t.getPixelForValue(e[s]),l();for(a=void 0,s=0,o=t.ticks.length;s<o;++s)r=t.getPixelForTick(s),l();return n}function hh(i,t,e,n){const s=e.barThickness;let o,r;return L(s)?(o=t.min*e.categoryPercentage,r=e.barPercentage):(o=s*n,r=1),{chunk:o/n,ratio:r,start:t.pixels[i]-o/2}}function uh(i,t,e,n){const s=t.pixels,o=s[i];let r=i>0?s[i-1]:null,a=i<s.length-1?s[i+1]:null;const l=e.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:e.barPercentage,start:c}}function dh(i,t,e,n){const s=e.parse(i[0],n),o=e.parse(i[1],n),r=Math.min(s,o),a=Math.max(s,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:o,min:r,max:a}}function xr(i,t,e,n){return N(i)?dh(i,t,e,n):t[e.axis]=e.parse(i,n),t}function As(i,t,e,n){const s=i.iScale,o=i.vScale,r=s.getLabels(),a=s===o,l=[];let c,h,u,d;for(c=e,h=e+n;c<h;++c)d=t[c],u={},u[s.axis]=a||s.parse(r[c],c),l.push(xr(d,u,o,c));return l}function Wi(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function fh(i,t,e){return i!==0?gt(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function ph(i){let t,e,n,s,o;return i.horizontal?(t=i.base>i.x,e="left",n="right"):(t=i.base<i.y,e="bottom",n="top"),t?(s="end",o="start"):(s="start",o="end"),{start:e,end:n,reverse:t,top:s,bottom:o}}function gh(i,t,e,n){let s=t.borderSkipped;const o={};if(!s){i.borderSkipped=o;return}if(s===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:h}=ph(i);s==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===n?s=c:(e._bottom||0)===n?s=h:(o[Os(h,r,a,l)]=!0,s=c)),o[Os(s,r,a,l)]=!0,i.borderSkipped=o}function Os(i,t,e,n){return n?(i=mh(i,t,e),i=Ps(i,e,t)):i=Ps(i,t,e),i}function mh(i,t,e){return i===t?e:i===e?t:i}function Ps(i,t,e){return i==="start"?t:i==="end"?e:i}function bh(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}class si extends ht{parsePrimitiveData(t,e,n,s){return As(t,e,n,s)}parseArrayData(t,e,n,s){return As(t,e,n,s)}parseObjectData(t,e,n,s){const{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,h=r.axis==="x"?a:l,u=[];let d,f,p,g;for(d=n,f=n+s;d<f;++d)g=e[d],p={},p[o.axis]=o.parse(Ct(g,c),d),u.push(xr(Ct(g,h),p,r,d));return u}updateRangeFromParsed(t,e,n,s){super.updateRangeFromParsed(t,e,n,s);const o=n._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:s}=e,o=this.getParsed(t),r=o._custom,a=Wi(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,s){const o=s==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),h=this._getRuler(),{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,s);for(let f=e;f<e+n;f++){const p=this.getParsed(f),g=o||L(p[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),b=(p._stacks||{})[a.axis],x={horizontal:c,base:g.base,enableBorderRadius:!b||Wi(p._custom)||r===b._top||r===b._bottom,x:c?g.head:m.center,y:c?m.center:g.head,height:c?m.size:Math.abs(g.size),width:c?Math.abs(g.size):m.size};d&&(x.options=u||this.resolveDataElementOptions(f,t[f].active?"active":s));const k=x.options||t[f].options;gh(x,k,b,r),bh(x,k,h.ratio),this.updateElement(t[f],f,x,s)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,s=n.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=n.options.stacked,r=[],a=l=>{const c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(L(h)||isNaN(h))return!0};for(const l of s)if(!(e!==void 0&&a(l))&&((o===!1||r.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&r.push(l.stack),l.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const s=this._getStacks(t,n),o=e!==void 0?s.indexOf(e):-1;return o===-1?s.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,s=[];let o,r;for(o=0,r=e.data.length;o<r;++o)s.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const a=t.barThickness;return{min:a||ch(e),pixels:s,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:s},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,h=Wi(c);let u=l[e.axis],d=0,f=n?this.applyStack(e,l,n):u,p,g;f!==u&&(d=f-u,f=u),h&&(u=c.barStart,f=c.barEnd-c.barStart,u!==0&&gt(u)!==gt(c.barEnd)&&(d=0),d+=u);const m=!L(o)&&!h?o:d;let b=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(d+f):p=b,g=p-b,Math.abs(g)<r){g=fh(g,e,a)*r,u===a&&(b-=g/2);const x=e.getPixelForDecimal(0),k=e.getPixelForDecimal(1),w=Math.min(x,k),_=Math.max(x,k);b=Math.max(Math.min(b,_),w),p=b+g,n&&!h&&(l._stacks[e.axis]._visualValues[s]=e.getValueForPixel(p)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){const x=gt(g)*e.getLineWidthForValue(a)/2;b+=x,g-=x}return{size:g,base:b,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){const n=e.scale,s=this.options,o=s.skipNull,r=P(s.maxBarThickness,1/0);let a,l;if(e.grouped){const c=o?this._getStackCount(t):e.stackCount,h=s.barThickness==="flex"?uh(t,e,s,c):hh(t,e,s,c),u=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=h.start+h.chunk*u+h.chunk/2,l=Math.min(r,h.chunk*h.ratio)}else a=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(r,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,s=n.length;let o=0;for(;o<s;++o)this.getParsed(o)[e.axis]!==null&&n[o].draw(this._ctx)}}A(si,"id","bar"),A(si,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),A(si,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class oi extends ht{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,s){const o=super.parsePrimitiveData(t,e,n,s);for(let r=0;r<o.length;r++)o[r]._custom=this.resolveDataElementOptions(r+n).radius;return o}parseArrayData(t,e,n,s){const o=super.parseArrayData(t,e,n,s);for(let r=0;r<o.length;r++){const a=e[n+r];o[r]._custom=P(a[2],this.resolveDataElementOptions(r+n).radius)}return o}parseObjectData(t,e,n,s){const o=super.parseObjectData(t,e,n,s);for(let r=0;r<o.length;r++){const a=e[n+r];o[r]._custom=P(a&&a.r&&+a.r,this.resolveDataElementOptions(r+n).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=o.getLabelForValue(r.y),c=r._custom;return{label:n[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,s){const o=s==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,s),h=r.axis,u=a.axis;for(let d=e;d<e+n;d++){const f=t[d],p=!o&&this.getParsed(d),g={},m=g[h]=o?r.getPixelForDecimal(.5):r.getPixelForValue(p[h]),b=g[u]=o?a.getBasePixel():a.getPixelForValue(p[u]);g.skip=isNaN(m)||isNaN(b),c&&(g.options=l||this.resolveDataElementOptions(d,f.active?"active":s),o&&(g.options.radius=0)),this.updateElement(f,d,g,s)}}resolveDataElementOptions(t,e){const n=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const o=s.radius;return e!=="active"&&(s.radius=0),s.radius+=P(n&&n._custom,o),s}}A(oi,"id","bubble"),A(oi,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),A(oi,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function xh(i,t,e){let n=1,s=1,o=0,r=0;if(t<V){const a=i,l=a+t,c=Math.cos(a),h=Math.sin(a),u=Math.cos(l),d=Math.sin(l),f=(k,w,_)=>Pe(k,a,l,!0)?1:Math.max(w,w*e,_,_*e),p=(k,w,_)=>Pe(k,a,l,!0)?-1:Math.min(w,w*e,_,_*e),g=f(0,c,u),m=f(U,h,d),b=p(j,c,u),x=p(j+U,h,d);n=(g-b)/2,s=(m-x)/2,o=-(g+b)/2,r=-(m+x)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}class Ht extends ht{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let o=l=>+n[l];if(C(n[t])){const{key:l="value"}=this._parsing;o=c=>+Ct(n[c],l)}let r,a;for(r=t,a=t+e;r<a;++r)s._parsed[r]=o(r)}}_getRotation(){return ct(this.options.rotation-90)}_getCircumference(){return ct(this.options.circumference)}_getRotationExtents(){let t=V,e=-V;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const s=this.chart.getDatasetMeta(n).controller,o=s._getRotation(),r=s._getCircumference();t=Math.min(t,o),e=Math.max(e,o+r)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,s=this._cachedMeta,o=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-r)/2,0),l=Math.min(El(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:h,rotation:u}=this._getRotationExtents(),{ratioX:d,ratioY:f,offsetX:p,offsetY:g}=xh(u,h,l),m=(n.width-r)/d,b=(n.height-r)/f,x=Math.max(Math.min(m,b)/2,0),k=$o(this.options.radius,x),w=Math.max(k*l,0),_=(k-w)/this._getVisibleDatasetWeightTotal();this.offsetX=p*k,this.offsetY=g*k,s.total=this.calculateTotal(),this.outerRadius=k-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const n=this.options,s=this._cachedMeta,o=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/V)}updateElements(t,e,n,s){const o=s==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,h=(a.left+a.right)/2,u=(a.top+a.bottom)/2,d=o&&c.animateScale,f=d?0:this.innerRadius,p=d?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(e,s);let b=this._getRotation(),x;for(x=0;x<e;++x)b+=this._circumference(x,o);for(x=e;x<e+n;++x){const k=this._circumference(x,o),w=t[x],_={x:h+this.offsetX,y:u+this.offsetY,startAngle:b,endAngle:b+k,circumference:k,outerRadius:p,innerRadius:f};m&&(_.options=g||this.resolveDataElementOptions(x,w.active?"active":s)),b+=k,this.updateElement(w,x,_,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n=0,s;for(s=0;s<e.length;s++){const o=t._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(n+=Math.abs(o))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?V*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Ie(e._parsed[t],n.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const n=this.chart;let s,o,r,a,l;if(!t){for(s=0,o=n.data.datasets.length;s<o;++s)if(n.isDatasetVisible(s)){r=n.getDatasetMeta(s),t=r.data,a=r.controller;break}}if(!t)return 0;for(s=0,o=t.length;s<o;++s)l=a.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,s=t.length;n<s;++n){const o=this.resolveDataElementOptions(n);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(P(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}A(Ht,"id","doughnut"),A(Ht,"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"}),A(Ht,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),A(Ht,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}});class ri extends ht{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:s=[],_dataset:o}=e,r=this.chart._animationsDisabled;let{start:a,count:l}=Qo(e,s,r);this._drawStart=a,this._drawCount=l,tr(e)&&(a=0,l=s.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,e,n,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,s),d=r.axis,f=a.axis,{spanGaps:p,segment:g}=this.options,m=Qt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||s==="none",x=e+n,k=t.length;let w=e>0&&this.getParsed(e-1);for(let _=0;_<k;++_){const y=t[_],v=b?y:{};if(_<e||_>=x){v.skip=!0;continue}const S=this.getParsed(_),O=L(S[f]),T=v[d]=r.getPixelForValue(S[d],_),D=v[f]=o||O?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,S,l):S[f],_);v.skip=isNaN(T)||isNaN(D)||O,v.stop=_>0&&Math.abs(S[d]-w[d])>m,g&&(v.parsed=S,v.raw=c.data[_]),u&&(v.options=h||this.resolveDataElementOptions(_,y.active?"active":s)),b||this.updateElement(y,_,v,s),w=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return n;const o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(n,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}A(ri,"id","line"),A(ri,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),A(ri,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Se extends ht{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Ie(e._parsed[t].r,n.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,n,s){return lr.bind(this)(t,e,n,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(s/2,0),r=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),a=(o-r)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,n,s){const o=s==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,u=c.yCenter,d=c.getIndexAngle(0)-.5*j;let f=d,p;const g=360/this.countVisibleElements();for(p=0;p<e;++p)f+=this._computeAngle(p,s,g);for(p=e;p<e+n;p++){const m=t[p];let b=f,x=f+this._computeAngle(p,s,g),k=r.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;f=x,o&&(l.animateScale&&(k=0),l.animateRotate&&(b=x=d));const w={x:h,y:u,innerRadius:0,outerRadius:k,startAngle:b,endAngle:x,options:this.resolveDataElementOptions(p,m.active?"active":s)};this.updateElement(m,p,w,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((n,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?ct(this.resolveDataElementOptions(t,e).angle||n):0}}A(Se,"id","polarArea"),A(Se,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),A(Se,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class an extends Ht{}A(an,"id","pie"),A(an,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ai extends ht{getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,s){return lr.bind(this)(t,e,n,s)}update(t){const e=this._cachedMeta,n=e.dataset,s=e.data||[],o=e.iScale.getLabels();if(n.points=s,t!=="resize"){const r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===s.length,options:r};this.updateElement(n,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,n,s){const o=this._cachedMeta.rScale,r=s==="reset";for(let a=e;a<e+n;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":s),h=o.getPointPositionForValue(a,this.getParsed(a).r),u=r?o.xCenter:h.x,d=r?o.yCenter:h.y,f={x:u,y:d,angle:h.angle,skip:isNaN(u)||isNaN(d),options:c};this.updateElement(l,a,f,s)}}}A(ai,"id","radar"),A(ai,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),A(ai,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class li extends ht{getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=o.getLabelForValue(r.y);return{label:n[t]||"",value:"("+a+", "+l+")"}}update(t){const e=this._cachedMeta,{data:n=[]}=e,s=this.chart._animationsDisabled;let{start:o,count:r}=Qo(e,n,s);if(this._drawStart=o,this._drawCount=r,tr(e)&&(o=0,r=n.length),this.options.showLine){const{dataset:a,_dataset:l}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=n;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:c},t)}this.updateElements(n,o,r,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,h=this.resolveDataElementOptions(e,s),u=this.getSharedOptions(h),d=this.includeOptions(s,u),f=r.axis,p=a.axis,{spanGaps:g,segment:m}=this.options,b=Qt(g)?g:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||o||s==="none";let k=e>0&&this.getParsed(e-1);for(let w=e;w<e+n;++w){const _=t[w],y=this.getParsed(w),v=x?_:{},S=L(y[p]),O=v[f]=r.getPixelForValue(y[f],w),T=v[p]=o||S?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,y,l):y[p],w);v.skip=isNaN(O)||isNaN(T)||S,v.stop=w>0&&Math.abs(y[f]-k[f])>b,m&&(v.parsed=y,v.raw=c.data[w]),d&&(v.options=u||this.resolveDataElementOptions(w,_.active?"active":s)),x||this.updateElement(_,w,v,s),k=y}this.updateSharedOptions(u,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let l=e.length-1;l>=0;--l)a=Math.max(a,e[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const n=t.dataset,s=n.options&&n.options.borderWidth||0;if(!e.length)return s;const o=e[0].size(this.resolveDataElementOptions(0)),r=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,o,r)/2}}A(li,"id","scatter"),A(li,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),A(li,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var yh=Object.freeze({__proto__:null,BarController:si,BubbleController:oi,DoughnutController:Ht,LineController:ri,PieController:an,PolarAreaController:Se,RadarController:ai,ScatterController:li});function It(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Bn{constructor(t){A(this,"options");this.options=t||{}}static override(t){Object.assign(Bn.prototype,t)}init(){}formats(){return It()}parse(){return It()}format(){return It()}add(){return It()}diff(){return It()}startOf(){return It()}endOf(){return It()}}var _h={_date:Bn};function wh(i,t,e,n){const{controller:s,data:o,_sorted:r}=i,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?Ul:vt;if(n){if(s._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const u=l(o,t,e-h),d=l(o,t,e+h);return{lo:u.lo,hi:d.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function ze(i,t,e,n,s){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:h}=o[a],{lo:u,hi:d}=wh(o[a],t,r,s);for(let f=u;f<=d;++f){const p=h[f];p.skip||n(p,c,f)}}}function vh(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(n,s){const o=t?Math.abs(n.x-s.x):0,r=e?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function Ui(i,t,e,n,s){const o=[];return!s&&!i.isPointInArea(t)||ze(i,e,t,function(a,l,c){!s&&!St(a,i.chartArea,0)||a.inRange(t.x,t.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Sh(i,t,e,n){let s=[];function o(r,a,l){const{startAngle:c,endAngle:h}=r.getProps(["startAngle","endAngle"],n),{angle:u}=qo(r,{x:t.x,y:t.y});Pe(u,c,h)&&s.push({element:r,datasetIndex:a,index:l})}return ze(i,e,t,o),s}function kh(i,t,e,n,s,o){let r=[];const a=vh(e);let l=Number.POSITIVE_INFINITY;function c(h,u,d){const f=h.inRange(t.x,t.y,s);if(n&&!f)return;const p=h.getCenterPoint(s);if(!(!!o||i.isPointInArea(p))&&!f)return;const m=a(t,p);m<l?(r=[{element:h,datasetIndex:u,index:d}],l=m):m===l&&r.push({element:h,datasetIndex:u,index:d})}return ze(i,e,t,c),r}function $i(i,t,e,n,s,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!n?Sh(i,t,e,s):kh(i,t,e,n,s,o)}function Ts(i,t,e,n,s){const o=[],r=e==="x"?"inXRange":"inYRange";let a=!1;return ze(i,e,t,(l,c,h)=>{l[r](t[e],s)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,s))}),n&&!a?[]:o}var Mh={evaluateInteractionItems:ze,modes:{index(i,t,e,n){const s=Bt(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?Ui(i,s,o,n,r):$i(i,s,o,!1,n,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,u=c.data[h];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,n){const s=Bt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?Ui(i,s,o,n,r):$i(i,s,o,!1,n,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point(i,t,e,n){const s=Bt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return Ui(i,s,o,n,r)},nearest(i,t,e,n){const s=Bt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return $i(i,s,o,e.intersect,n,r)},x(i,t,e,n){const s=Bt(t,i);return Ts(i,s,"x",e.intersect,n)},y(i,t,e,n){const s=Bt(t,i);return Ts(i,s,"y",e.intersect,n)}}};const yr=["left","top","right","bottom"];function ce(i,t){return i.filter(e=>e.pos===t)}function Ds(i,t){return i.filter(e=>yr.indexOf(e.pos)===-1&&e.box.axis===t)}function he(i,t){return i.sort((e,n)=>{const s=t?n:e,o=t?e:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Ah(i){const t=[];let e,n,s,o,r,a;for(e=0,n=(i||[]).length;e<n;++e)s=i[e],{position:o,options:{stack:r,stackWeight:a=1}}=s,t.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return t}function Oh(i){const t={};for(const e of i){const{stack:n,pos:s,stackWeight:o}=e;if(!n||!yr.includes(s))continue;const r=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function Ph(i,t){const e=Oh(i),{vBoxMaxWidth:n,hBoxMaxHeight:s}=t;let o,r,a;for(o=0,r=i.length;o<r;++o){a=i[o];const{fullSize:l}=a.box,c=e[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*n:l&&t.availableWidth,a.height=s):(a.width=n,a.height=h?h*s:l&&t.availableHeight)}return e}function Th(i){const t=Ah(i),e=he(t.filter(c=>c.box.fullSize),!0),n=he(ce(t,"left"),!0),s=he(ce(t,"right")),o=he(ce(t,"top"),!0),r=he(ce(t,"bottom")),a=Ds(t,"x"),l=Ds(t,"y");return{fullSize:e,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:ce(t,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function Cs(i,t,e,n){return Math.max(i[e],t[e])+Math.max(i[n],t[n])}function _r(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Dh(i,t,e,n){const{pos:s,box:o}=e,r=i.maxPadding;if(!C(s)){e.size&&(i[s]-=e.size);const u=n[e.stack]||{size:0,count:1};u.size=Math.max(u.size,e.horizontal?o.height:o.width),e.size=u.size/u.count,i[s]+=e.size}o.getPadding&&_r(r,o.getPadding());const a=Math.max(0,t.outerWidth-Cs(r,i,"left","right")),l=Math.max(0,t.outerHeight-Cs(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Ch(i){const t=i.maxPadding;function e(n){const s=Math.max(t[n]-i[n],0);return i[n]+=s,s}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Eh(i,t){const e=t.maxPadding;function n(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return n(i?["left","right"]:["top","bottom"])}function ge(i,t,e,n){const s=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o<r;++o){a=i[o],l=a.box,l.update(a.width||t.w,a.height||t.h,Eh(a.horizontal,t));const{same:u,other:d}=Dh(t,e,a,n);c|=u&&s.length,h=h||d,l.fullSize||s.push(a)}return c&&ge(s,t,e,n)||h}function $e(i,t,e,n,s){i.top=e,i.left=t,i.right=t+n,i.bottom=e+s,i.width=n,i.height=s}function Es(i,t,e,n){const s=e.padding;let{x:o,y:r}=t;for(const a of i){const l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const u=t.w*h,d=c.size||l.height;Oe(c.start)&&(r=c.start),l.fullSize?$e(l,s.left,r,e.outerWidth-s.right-s.left,d):$e(l,t.left+c.placed,r,u,d),c.start=r,c.placed+=u,r=l.bottom}else{const u=t.h*h,d=c.size||l.width;Oe(c.start)&&(o=c.start),l.fullSize?$e(l,o,s.top,d,e.outerHeight-s.bottom-s.top):$e(l,o,t.top+c.placed,d,u),c.start=o,c.placed+=u,o=l.right}}t.x=o,t.y=r}var Q={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,n){if(!i)return;const s=tt(i.options.layout.padding),o=Math.max(t-s.width,0),r=Math.max(e-s.height,0),a=Th(i.boxes),l=a.vertical,c=a.horizontal;I(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),d=Object.assign({},s);_r(d,tt(n));const f=Object.assign({maxPadding:d,w:o,h:r,x:s.left,y:s.top},s),p=Ph(l.concat(c),u);ge(a.fullSize,f,u,p),ge(l,f,u,p),ge(c,f,u,p)&&ge(l,f,u,p),Ch(f),Es(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Es(a.rightAndBottom,f,u,p),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},I(a.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class wr{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,s){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):n)}}isAttached(t){return!0}updateConfig(t){}}class Rh extends wr{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ci="$chartjs",Lh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Rs=i=>i===null||i==="";function Fh(i,t){const e=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[ci]={initial:{height:n,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Rs(s)){const o=gs(i,"width");o!==void 0&&(i.width=o)}if(Rs(n))if(i.style.height==="")i.height=i.width/(t||2);else{const o=gs(i,"height");o!==void 0&&(i.height=o)}return i}const vr=zc?{passive:!0}:!1;function Ih(i,t,e){i.addEventListener(t,e,vr)}function zh(i,t,e){i.canvas.removeEventListener(t,e,vr)}function Bh(i,t){const e=Lh[i.type]||i.type,{x:n,y:s}=Bt(i,t);return{type:e,chart:t,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function yi(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function Nh(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||yi(a.addedNodes,n),r=r&&!yi(a.removedNodes,n);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function Vh(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||yi(a.removedNodes,n),r=r&&!yi(a.addedNodes,n);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const De=new Map;let Ls=0;function Sr(){const i=window.devicePixelRatio;i!==Ls&&(Ls=i,De.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Hh(i,t){De.size||window.addEventListener("resize",Sr),De.set(i,t)}function jh(i){De.delete(i),De.size||window.removeEventListener("resize",Sr)}function Wh(i,t,e){const n=i.canvas,s=n&&zn(n);if(!s)return;const o=Zo((a,l)=>{const c=s.clientWidth;e(a,l),c<s.clientWidth&&e()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(s),Hh(i,o),r}function Yi(i,t,e){e&&e.disconnect(),t==="resize"&&jh(i)}function Uh(i,t,e){const n=i.canvas,s=Zo(o=>{i.ctx!==null&&e(Bh(o,i))},i);return Ih(n,t,s),s}class $h extends wr{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(Fh(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[ci])return!1;const n=e[ci].initial;["height","width"].forEach(o=>{const r=n[o];L(r)?e.removeAttribute(o):e.setAttribute(o,r)});const s=n.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[ci],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),r={attach:Nh,detach:Vh,resize:Wh}[e]||Uh;s[e]=r(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),s=n[e];if(!s)return;({attach:Yi,detach:Yi,resize:Yi}[e]||zh)(t,e,s),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,s){return Ic(t,e,n,s)}isAttached(t){const e=zn(t);return!!(e&&e.isConnected)}}function Yh(i){return!hr()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Rh:$h}class ut{constructor(){A(this,"x");A(this,"y");A(this,"active",!1);A(this,"options");A(this,"$animations")}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return Qt(this.x)&&Qt(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const s={};return t.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}}A(ut,"defaults",{}),A(ut,"defaultRoutes");function Xh(i,t){const e=i.options.ticks,n=qh(i),s=Math.min(e.maxTicksLimit||n,n),o=e.major.enabled?Gh(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return Jh(t,c,o,r/s),c;const h=Kh(o,t,s);if(r>0){let u,d;const f=r>1?Math.round((l-a)/(r-1)):null;for(Ye(t,c,h,L(f)?0:a-f,a),u=0,d=r-1;u<d;u++)Ye(t,c,h,o[u],o[u+1]);return Ye(t,c,h,l,L(f)?t.length:l+f),c}return Ye(t,c,h),c}function qh(i){const t=i.options.offset,e=i._tickSize(),n=i._length/e+(t?0:1),s=i._maxLength/e;return Math.floor(Math.min(n,s))}function Kh(i,t,e){const n=Zh(i),s=t.length/e;if(!n)return Math.max(s,1);const o=Vl(n);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>s)return l}return Math.max(s,1)}function Gh(i){const t=[];let e,n;for(e=0,n=i.length;e<n;e++)i[e].major&&t.push(e);return t}function Jh(i,t,e,n){let s=0,o=e[0],r;for(n=Math.ceil(n),r=0;r<i.length;r++)r===o&&(t.push(i[r]),s++,o=e[s*n])}function Ye(i,t,e,n,s){const o=P(n,0),r=Math.min(P(s,i.length),i.length);let a=0,l,c,h;for(e=Math.ceil(e),s&&(l=s-n,e=l/Math.floor(l/e)),h=o;h<0;)a++,h=Math.round(o+a*e);for(c=Math.max(o,0);c<r;c++)c===h&&(t.push(i[c]),a++,h=Math.round(o+a*e))}function Zh(i){const t=i.length;let e,n;if(t<2)return!1;for(n=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==n)return!1;return n}const Qh=i=>i==="left"?"right":i==="right"?"left":i,Fs=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,Is=(i,t)=>Math.min(t||i,i);function zs(i,t){const e=[],n=i.length/t,s=i.length;let o=0;for(;o<s;o+=n)e.push(i[Math.floor(o)]);return e}function tu(i,t,e){const n=i.ticks.length,s=Math.min(t,n-1),o=i._startPixel,r=i._endPixel,a=1e-6;let l=i.getPixelForTick(s),c;if(!(e&&(n===1?c=Math.max(l-o,r-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<o-a||l>r+a)))return l}function eu(i,t){I(i,e=>{const n=e.gc,s=n.length/2;let o;if(s>t){for(o=0;o<s;++o)delete e.data[n[o]];n.splice(0,s)}})}function ue(i){return i.drawTicks?i.tickLength:0}function Bs(i,t){if(!i.display)return 0;const e=X(i.font,t),n=tt(i.padding);return(N(i.text)?i.text.length:1)*e.lineHeight+n.height}function iu(i,t){return Rt(i,{scale:t,type:"scale"})}function nu(i,t,e){return Rt(i,{tick:e,index:t,type:"tick"})}function su(i,t,e){let n=Cn(i);return(e&&t!=="right"||!e&&t==="right")&&(n=Qh(n)),n}function ou(i,t,e,n){const{top:s,left:o,bottom:r,right:a,chart:l}=i,{chartArea:c,scales:h}=l;let u=0,d,f,p;const g=r-s,m=a-o;if(i.isHorizontal()){if(f=Z(n,o,a),C(e)){const b=Object.keys(e)[0],x=e[b];p=h[b].getPixelForValue(x)+g-t}else e==="center"?p=(c.bottom+c.top)/2+g-t:p=Fs(i,e,t);d=a-o}else{if(C(e)){const b=Object.keys(e)[0],x=e[b];f=h[b].getPixelForValue(x)-m+t}else e==="center"?f=(c.left+c.right)/2-m+t:f=Fs(i,e,t);p=Z(n,r,s),u=e==="left"?-U:U}return{titleX:f,titleY:p,maxWidth:d,rotation:u}}class Yt extends ut{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:s}=this;return t=st(t,Number.POSITIVE_INFINITY),e=st(e,Number.NEGATIVE_INFINITY),n=st(n,Number.POSITIVE_INFINITY),s=st(s,Number.NEGATIVE_INFINITY),{min:st(t,n),max:st(e,s),minDefined:W(t),maxDefined:W(e)}}getMinMax(t){let{min:e,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:e,max:n};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),s||(e=Math.min(e,r.min)),o||(n=Math.max(n,r.max));return e=o&&e>n?n:e,n=s&&e>n?e:n,{min:st(e,st(n,e)),max:st(n,st(e,n))}}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(){B(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=pc(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?zs(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=Xh(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,n;this.isHorizontal()?(e=this.left,n=this.right):(e=this.top,n=this.bottom,t=!t),this._startPixel=e,this._endPixel=n,this._reversePixels=t,this._length=n-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){B(this.options.afterUpdate,[this])}beforeSetDimensions(){B(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(){B(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),B(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){B(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n],o.label=B(e.callback,[o.value,n,t],this)}afterTickToLabelConversion(){B(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){B(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=Is(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,o=e.maxRotation;let r=s,a,l,c;if(!this._isVisible()||!e.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),u=h.widest.width,d=h.highest.height,f=K(this.chart.width-u,0,this.maxWidth);a=t.offset?this.maxWidth/n:f/(n-1),u+6>a&&(a=f/(n-(t.offset?.5:1)),l=this.maxHeight-ue(t.grid)-e.padding-Bs(t.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),r=Tn(Math.min(Math.asin(K((h.highest.height+6)/a,-1,1)),Math.asin(K(l/c,-1,1))-Math.asin(K(d/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){B(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){B(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=Bs(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=ue(o)+l):(t.height=this.maxHeight,t.width=ue(o)+l),n.display&&this.ticks.length){const{first:c,last:h,widest:u,highest:d}=this._getLabelSizes(),f=n.padding*2,p=ct(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=n.mirror?0:m*u.width+g*d.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=n.mirror?0:g*u.width+m*d.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,s){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,f=0;l?c?(d=s*t.width,f=n*e.height):(d=n*t.height,f=s*e.width):o==="start"?f=e.width:o==="end"?d=t.width:o!=="inner"&&(d=t.width/2,f=e.width/2),this.paddingLeft=Math.max((d-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-u+r)*this.width/(this.width-u),0)}else{let h=e.height/2,u=t.height/2;o==="start"?(h=0,u=t.height):o==="end"&&(h=e.height,u=0),this.paddingTop=h+r,this.paddingBottom=u+r}}_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(){B(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e<n;e++)L(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=zs(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:s,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(e/Is(e,n));let c=0,h=0,u,d,f,p,g,m,b,x,k,w,_;for(u=0;u<e;u+=l){if(p=t[u].label,g=this._resolveTickFontOptions(u),s.font=m=g.string,b=o[m]=o[m]||{data:{},gc:[]},x=g.lineHeight,k=w=0,!L(p)&&!N(p))k=bi(s,b.data,b.gc,k,p),w=x;else if(N(p))for(d=0,f=p.length;d<f;++d)_=p[d],!L(_)&&!N(_)&&(k=bi(s,b.data,b.gc,k,_),w+=x);r.push(k),a.push(w),c=Math.max(k,c),h=Math.max(w,h)}eu(o,e);const y=r.indexOf(c),v=a.indexOf(h),S=O=>({width:r[O]||0,height:a[O]||0});return{first:S(0),last:S(e-1),widest:S(y),highest:S(v),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Wl(this._alignToPixels?Ft(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=nu(this.getContext(),t,n))}return this.$context||(this.$context=iu(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=ct(this.labelRotation),n=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*n>a*s?a/n:l/s:l*s<a*n?l/n:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),d=ue(o),f=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(H){return Ft(n,H,g)};let x,k,w,_,y,v,S,O,T,D,E,G;if(r==="top")x=b(this.bottom),v=this.bottom-d,O=x-m,D=b(t.top)+m,G=t.bottom;else if(r==="bottom")x=b(this.top),D=t.top,G=b(t.bottom)-m,v=x+m,O=this.top+d;else if(r==="left")x=b(this.right),y=this.right-d,S=x-m,T=b(t.left)+m,E=t.right;else if(r==="right")x=b(this.left),T=t.left,E=b(t.right)-m,y=x+m,S=this.left+d;else if(e==="x"){if(r==="center")x=b((t.top+t.bottom)/2+.5);else if(C(r)){const H=Object.keys(r)[0],Y=r[H];x=b(this.chart.scales[H].getPixelForValue(Y))}D=t.top,G=t.bottom,v=x+m,O=v+d}else if(e==="y"){if(r==="center")x=b((t.left+t.right)/2);else if(C(r)){const H=Object.keys(r)[0],Y=r[H];x=b(this.chart.scales[H].getPixelForValue(Y))}y=x-m,S=y-d,T=t.left,E=t.right}const nt=P(s.ticks.maxTicksLimit,u),z=Math.max(1,Math.ceil(u/nt));for(k=0;k<u;k+=z){const H=this.getContext(k),Y=o.setContext(H),lt=a.setContext(H),J=Y.lineWidth,Xt=Y.color,Be=lt.dash||[],qt=lt.dashOffset,ne=Y.tickWidth,se=Y.tickColor,oe=Y.tickBorderDash||[],re=Y.tickBorderDashOffset;w=tu(this,k,l),w!==void 0&&(_=Ft(n,w,J),c?y=S=T=E=_:v=O=D=G=_,f.push({tx1:y,ty1:v,tx2:S,ty2:O,x1:T,y1:D,x2:E,y2:G,width:J,color:Xt,borderDash:Be,borderDashOffset:qt,tickWidth:ne,tickColor:se,tickBorderDash:oe,tickBorderDashOffset:re}))}return this._ticksLength=u,this._borderValue=x,f}_computeLabelItems(t){const e=this.axis,n=this.options,{position:s,ticks:o}=n,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:u}=o,d=ue(n.grid),f=d+h,p=u?-h:f,g=-ct(this.labelRotation),m=[];let b,x,k,w,_,y,v,S,O,T,D,E,G="middle";if(s==="top")y=this.bottom-p,v=this._getXAxisLabelAlignment();else if(s==="bottom")y=this.top+p,v=this._getXAxisLabelAlignment();else if(s==="left"){const z=this._getYAxisLabelAlignment(d);v=z.textAlign,_=z.x}else if(s==="right"){const z=this._getYAxisLabelAlignment(d);v=z.textAlign,_=z.x}else if(e==="x"){if(s==="center")y=(t.top+t.bottom)/2+f;else if(C(s)){const z=Object.keys(s)[0],H=s[z];y=this.chart.scales[z].getPixelForValue(H)+f}v=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")_=(t.left+t.right)/2-f;else if(C(s)){const z=Object.keys(s)[0],H=s[z];_=this.chart.scales[z].getPixelForValue(H)}v=this._getYAxisLabelAlignment(d).textAlign}e==="y"&&(l==="start"?G="top":l==="end"&&(G="bottom"));const nt=this._getLabelSizes();for(b=0,x=a.length;b<x;++b){k=a[b],w=k.label;const z=o.setContext(this.getContext(b));S=this.getPixelForTick(b)+o.labelOffset,O=this._resolveTickFontOptions(b),T=O.lineHeight,D=N(w)?w.length:1;const H=D/2,Y=z.color,lt=z.textStrokeColor,J=z.textStrokeWidth;let Xt=v;r?(_=S,v==="inner"&&(b===x-1?Xt=this.options.reverse?"left":"right":b===0?Xt=this.options.reverse?"right":"left":Xt="center"),s==="top"?c==="near"||g!==0?E=-D*T+T/2:c==="center"?E=-nt.highest.height/2-H*T+T:E=-nt.highest.height+T/2:c==="near"||g!==0?E=T/2:c==="center"?E=nt.highest.height/2-H*T:E=nt.highest.height-D*T,u&&(E*=-1),g!==0&&!z.showLabelBackdrop&&(_+=T/2*Math.sin(g))):(y=S,E=(1-D)*T/2);let Be;if(z.showLabelBackdrop){const qt=tt(z.backdropPadding),ne=nt.heights[b],se=nt.widths[b];let oe=E-qt.top,re=0-qt.left;switch(G){case"middle":oe-=ne/2;break;case"bottom":oe-=ne;break}switch(v){case"center":re-=se/2;break;case"right":re-=se;break}Be={left:re,top:oe,width:se+qt.width,height:ne+qt.height,color:z.backdropColor}}m.push({label:w,font:O,textOffset:E,options:{rotation:g,color:Y,strokeColor:lt,strokeWidth:J,textAlign:Xt,textBaseline:G,translation:[_,y],backdrop:Be}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ct(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,h;return e==="left"?s?(h=this.right+o,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?s?(h=this.left+o,n==="near"?c="right":n==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,n==="near"?c="left":n==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:s,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,s,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(e.display)for(o=0,r=s.length;o<r;++o){const l=s[o];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.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:e,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),r=n.display?o.width:0;if(!r)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,u,d;this.isHorizontal()?(c=Ft(t,this.left,r)-r/2,h=Ft(t,this.right,a)+a/2,u=d=l):(u=Ft(t,this.top,r)-r/2,d=Ft(t,this.bottom,a)+a/2,c=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,u),e.lineTo(h,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,s=this._computeLabelArea();s&&Ti(n,s);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,h=r.textOffset;$t(n,c,0,h,l,a)}s&&Di(n)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:s}}=this;if(!n.display)return;const o=X(n.font),r=tt(n.padding),a=n.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||C(e)?(l+=r.bottom,N(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=r.top;const{titleX:c,titleY:h,maxWidth:u,rotation:d}=ou(this,l,e,a);$t(t,n.text,0,0,o,{color:n.color,maxWidth:u,rotation:d,textAlign:su(a,e,s),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=P(t.grid&&t.grid.z,-1),s=P(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Yt.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[];let o,r;for(o=0,r=e.length;o<r;++o){const a=e[o];a[n]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return X(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Xe{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;lu(e)&&(n=this.register(e));const s=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,ru(t,r,n),this.override&&$.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,s=this.scope;n in e&&delete e[n],s&&n in $[s]&&(delete $[s][n],this.override&&delete Ut[n])}}function ru(i,t,e){const n=Ae(Object.create(null),[e?$.get(e):{},$.get(t),i.defaults]);$.set(t,n),i.defaultRoutes&&au(t,i.defaultRoutes),i.descriptors&&$.describe(t,i.descriptors)}function au(i,t){Object.keys(t).forEach(e=>{const n=e.split("."),s=n.pop(),o=[i].concat(n).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");$.route(o,s,l,a)})}function lu(i){return"id"in i&&"defaults"in i}class cu{constructor(){this.controllers=new Xe(ht,"datasets",!0),this.elements=new Xe(ut,"elements"),this.plugins=new Xe(Object,"plugins"),this.scales=new Xe(Yt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(s=>{const o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):I(s,r=>{const a=n||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,n){const s=Pn(t);B(n["before"+s],[],n),e[t](n),B(n["after"+s],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return s}}var ft=new cu;class hu{constructor(){this._init=[]}notify(t,e,n,s){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(o,t,e,n);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,n,s){s=s||{};for(const o of t){const r=o.plugin,a=r[n],l=[e,s,o.options];if(B(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){L(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,s=P(n.options&&n.options.plugins,{}),o=uu(n);return s===!1&&!e?[]:fu(t,o,s,e)}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(e,n),t,"stop"),this._notify(s(n,e),t,"start")}}function uu(i){const t={},e=[],n=Object.keys(ft.plugins.items);for(let o=0;o<n.length;o++)e.push(ft.getPlugin(n[o]));const s=i.plugins||[];for(let o=0;o<s.length;o++){const r=s[o];e.indexOf(r)===-1&&(e.push(r),t[r.id]=!0)}return{plugins:e,localIds:t}}function du(i,t){return!t&&i===!1?null:i===!0?{}:i}function fu(i,{plugins:t,localIds:e},n,s){const o=[],r=i.getContext();for(const a of t){const l=a.id,c=du(n[l],s);c!==null&&o.push({plugin:a,options:pu(i.config,{plugin:a,local:e[l]},c,r)})}return o}function pu(i,{plugin:t,local:e},n,s){const o=i.pluginScopeKeys(t),r=i.getOptionScopes(n,o);return e&&t.defaults&&r.push(t.defaults),i.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ln(i,t){const e=$.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function gu(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function mu(i,t){return i===t?"_index_":"_value_"}function Ns(i){if(i==="x"||i==="y"||i==="r")return i}function bu(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function cn(i,...t){if(Ns(i))return i;for(const e of t){const n=e.axis||bu(e.position)||i.length>1&&Ns(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function Vs(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function xu(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(e.length)return Vs(i,"x",e[0])||Vs(i,"y",e[0])}return{}}function yu(i,t){const e=Ut[i.type]||{scales:{}},n=t.scales||{},s=ln(i.type,t),o=Object.create(null);return Object.keys(n).forEach(r=>{const a=n[r];if(!C(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=cn(r,a,xu(r,i),$.scales[a.type]),c=mu(l,s),h=e.scales||{};o[r]=ye(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||ln(a,t),h=(Ut[a]||{}).scales||{};Object.keys(h).forEach(u=>{const d=gu(u,l),f=r[d+"AxisID"]||d;o[f]=o[f]||Object.create(null),ye(o[f],[{axis:d},n[f],h[u]])})}),Object.keys(o).forEach(r=>{const a=o[r];ye(a,[$.scales[a.type],$.scale])}),o}function kr(i){const t=i.options||(i.options={});t.plugins=P(t.plugins,{}),t.scales=yu(i,t)}function Mr(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function _u(i){return i=i||{},i.data=Mr(i.data),kr(i),i}const Hs=new Map,Ar=new Set;function qe(i,t){let e=Hs.get(i);return e||(e=t(),Hs.set(i,e),Ar.add(e)),e}const de=(i,t,e)=>{const n=Ct(t,e);n!==void 0&&i.add(n)};class wu{constructor(t){this._config=_u(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=Mr(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(),kr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return qe(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return qe(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return qe(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,n=this.type;return qe(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let s=n.get(t);return(!s||e)&&(s=new Map,n.set(t,s)),s}getOptionScopes(t,e,n){const{options:s,type:o}=this,r=this._cachedScopes(t,n),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(u=>de(l,t,u))),h.forEach(u=>de(l,s,u)),h.forEach(u=>de(l,Ut[o]||{},u)),h.forEach(u=>de(l,$,u)),h.forEach(u=>de(l,on,u))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ar.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ut[e]||{},$.datasets[e]||{},{type:e},$,on]}resolveNamedOptions(t,e,n,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=js(this._resolverCache,t,s);let l=r;if(Su(r,e)){o.$shared=!1,n=Et(n)?n():n;const c=this.createResolver(t,n,a);l=te(r,n,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,n=[""],s){const{resolver:o}=js(this._resolverCache,t,n);return C(e)?te(o,e,void 0,s):o}}function js(i,t,e){let n=i.get(t);n||(n=new Map,i.set(t,n));const s=e.join();let o=n.get(s);return o||(o={resolver:Ln(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},n.set(s,o)),o}const vu=i=>C(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||Et(i[e]),!1);function Su(i,t){const{isScriptable:e,isIndexable:n}=sr(i);for(const s of t){const o=e(s),r=n(s),a=(r||o)&&i[s];if(o&&(Et(a)||vu(a))||r&&N(a))return!0}return!1}var ku="4.3.0";const Mu=["top","bottom","left","right","chartArea"];function Ws(i,t){return i==="top"||i==="bottom"||Mu.indexOf(i)===-1&&t==="x"}function Us(i,t){return function(e,n){return e[i]===n[i]?e[t]-n[t]:e[i]-n[i]}}function $s(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),B(e&&e.onComplete,[i],t)}function Au(i){const t=i.chart,e=t.options.animation;B(e&&e.onProgress,[i],t)}function Or(i){return hr()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const hi={},Ys=i=>{const t=Or(i);return Object.values(hi).filter(e=>e.canvas===t).pop()};function Ou(i,t,e){const n=Object.keys(i);for(const s of n){const o=+s;if(o>=t){const r=i[s];delete i[s],(e>0||o>t)&&(i[o+e]=r)}}}function Pu(i,t,e,n){return!e||i.type==="mouseout"?null:n?t:i}function Tu(i){const{xScale:t,yScale:e}=i;if(t&&e)return{left:t.left,right:t.right,top:e.top,bottom:e.bottom}}class Vt{static register(...t){ft.add(...t),Xs()}static unregister(...t){ft.remove(...t),Xs()}constructor(t,e){const n=this.config=new wu(e),s=Or(t),o=Ys(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Yh(s)),this.platform.updateConfig(n);const a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Cl(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,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 hu,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Xl(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],hi[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}xt.listen(this,"complete",$s),xt.listen(this,"progress",Au),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:s,_aspectRatio:o}=this;return L(t)?e&&o?o:s?n/s: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 ft}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ps(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return us(this.canvas,this.ctx),this}stop(){return xt.stop(this),this}resize(t,e){xt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,s=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,e,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,ps(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),B(n.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};I(e,(n,s)=>{n.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,s=Object.keys(n).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=cn(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),I(o,r=>{const a=r.options,l=a.id,c=cn(l,a),h=P(a.type,r.dtype);(a.position===void 0||Ws(a.position,c)!==Ws(r.dposition))&&(a.position=r.dposition),s[l]=!0;let u=null;if(l in n&&n[l].type===h)u=n[l];else{const d=ft.getScale(h);u=new d({id:l,type:h,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(a,t)}),I(s,(r,a)=>{r||delete n[a]}),I(n,r=>{Q.configure(this,r,r.options),Q.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((s,o)=>s.index-o.index),n>e){for(let s=e;s<n;++s)this._destroyDatasetMeta(s);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(Us("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((n,s)=>{e.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,s;for(this._removeUnreferencedMetasets(),n=0,s=e.length;n<s;n++){const o=e[n];let r=this.getDatasetMeta(n);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(n),r=this.getDatasetMeta(n)),r.type=a,r.indexAxis=o.indexAxis||ln(a,this.options),r.order=o.order||0,r.index=n,r.label=""+o.label,r.visible=this.isDatasetVisible(n),r.controller)r.controller.updateIndex(n),r.controller.linkScales();else{const l=ft.getController(a),{datasetElementType:c,dataElementType:h}=$.datasets[a];Object.assign(l,{dataElementType:ft.getElement(h),datasetElementType:c&&ft.getElement(c)}),r.controller=new l(this,n),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){I(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:u}=this.getDatasetMeta(c),d=!s&&o.indexOf(u)===-1;u.buildOrUpdateElements(d),r=Math.max(+u.getMaxOverflow(),r)}r=this._minPadding=n.layout.autoPadding?r:0,this._updateLayout(r),s||I(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Us("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){I(this.scales,t=>{Q.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!is(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:s,count:o}of e){const r=n==="_removeElements"?-o:o;Ou(t,s,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=n(0);for(let o=1;o<e;o++)if(!is(s,n(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Q.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],I(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e<n;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Et(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),s={meta:n,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(n.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(xt.has(this)?this.attached&&!xt.running(this)&&xt.start(this):(this.draw(),$s({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:s}=this._resizeBeforeDraw;this._resize(n,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let s,o;for(s=0,o=e.length;s<o;++s){const r=e[s];(!t||r.visible)&&n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,s=!n.disabled,o=Tu(t)||this.chartArea,r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&Ti(e,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),t.controller.draw(),s&&Di(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return St(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,s){const o=Mh.modes[e];return typeof o=="function"?o(this,t,n,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let s=n.filter(o=>o&&o._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=Rt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const s=n?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,s);Oe(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),r.update(o,{visible:n}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),xt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),us(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete hi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(o,r)=>{e.addEventListener(this,o,r),t[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};I(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){I(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},I(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const s=n?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!pi(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){const s=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(u=>h.datasetIndex===u.datasetIndex&&h.index===u.index)),r=o(e,t),a=n?t:o(t,e);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;const o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:s=[],options:o}=this,r=e,a=this._getActiveElements(t,s,n,r),l=zl(t),c=Pu(t,this._lastEvent,n,l);n&&(this._lastEvent=null,B(o.onHover,[t,a,this],this),l&&B(o.onClick,[t,a,this],this));const h=!pi(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=c,h}_getActiveElements(t,e,n,s){if(t.type==="mouseout")return[];if(!n)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}}A(Vt,"defaults",$),A(Vt,"instances",hi),A(Vt,"overrides",Ut),A(Vt,"registry",ft),A(Vt,"version",ku),A(Vt,"getChart",Ys);function Xs(){return I(Vt.instances,i=>i._plugins.invalidate())}function Du(i,t,e){const{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=t;let c=s/a;i.beginPath(),i.arc(o,r,a,n-c,e+c),l>s?(c=s/l,i.arc(o,r,l,e+c,n-c,!0)):i.arc(o,r,s,e+U,n-U),i.closePath(),i.clip()}function Cu(i){return Rn(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Eu(i,t,e,n){const s=Cu(i.options.borderRadius),o=(e-t)/2,r=Math.min(o,n*t/2),a=l=>{const c=(e-Math.min(o,l))*n/2;return K(l,0,Math.min(o,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:K(s.innerStart,0,r),innerEnd:K(s.innerEnd,0,r)}}function Gt(i,t,e,n){return{x:e+i*Math.cos(t),y:n+i*Math.sin(t)}}function _i(i,t,e,n,s,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,u=Math.max(t.outerRadius+n+e-c,0),d=h>0?h+n+e+c:0;let f=0;const p=s-l;if(n){const z=h>0?h-n:0,H=u>0?u-n:0,Y=(z+H)/2,lt=Y!==0?p*Y/(Y+n):p;f=(p-lt)/2}const g=Math.max(.001,p*u-e/j)/u,m=(p-g)/2,b=l+m+f,x=s-m-f,{outerStart:k,outerEnd:w,innerStart:_,innerEnd:y}=Eu(t,d,u,x-b),v=u-k,S=u-w,O=b+k/v,T=x-w/S,D=d+_,E=d+y,G=b+_/D,nt=x-y/E;if(i.beginPath(),o){const z=(O+T)/2;if(i.arc(r,a,u,O,z),i.arc(r,a,u,z,T),w>0){const J=Gt(S,T,r,a);i.arc(J.x,J.y,w,T,x+U)}const H=Gt(E,x,r,a);if(i.lineTo(H.x,H.y),y>0){const J=Gt(E,nt,r,a);i.arc(J.x,J.y,y,x+U,nt+Math.PI)}const Y=(x-y/d+(b+_/d))/2;if(i.arc(r,a,d,x-y/d,Y,!0),i.arc(r,a,d,Y,b+_/d,!0),_>0){const J=Gt(D,G,r,a);i.arc(J.x,J.y,_,G+Math.PI,b-U)}const lt=Gt(v,b,r,a);if(i.lineTo(lt.x,lt.y),k>0){const J=Gt(v,O,r,a);i.arc(J.x,J.y,k,b-U,O)}}else{i.moveTo(r,a);const z=Math.cos(O)*u+r,H=Math.sin(O)*u+a;i.lineTo(z,H);const Y=Math.cos(T)*u+r,lt=Math.sin(T)*u+a;i.lineTo(Y,lt)}i.closePath()}function Ru(i,t,e,n,s){const{fullCircles:o,startAngle:r,circumference:a}=t;let l=t.endAngle;if(o){_i(i,t,e,n,l,s);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=r+(a%V||V))}return _i(i,t,e,n,l,s),i.fill(),l}function Lu(i,t,e,n,s){const{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:u,borderDashOffset:d}=l,f=l.borderAlign==="inner";if(!c)return;i.setLineDash(u||[]),i.lineDashOffset=d,f?(i.lineWidth=c*2,i.lineJoin=h||"round"):(i.lineWidth=c,i.lineJoin=h||"bevel");let p=t.endAngle;if(o){_i(i,t,e,n,p,s);for(let g=0;g<o;++g)i.stroke();isNaN(a)||(p=r+(a%V||V))}f&&Du(i,t,p),o||(_i(i,t,e,n,p,s),i.stroke())}class me extends ut{constructor(e){super();A(this,"circumference");A(this,"endAngle");A(this,"fullCircles");A(this,"innerRadius");A(this,"outerRadius");A(this,"pixelMargin");A(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,s){const o=this.getProps(["x","y"],s),{angle:r,distance:a}=qo(o,{x:e,y:n}),{startAngle:l,endAngle:c,innerRadius:h,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,g=P(d,c-l)>=V||Pe(r,l,c),m=wt(a,h+f,u+f);return g&&m}getCenterPoint(e){const{x:n,y:s,startAngle:o,endAngle:r,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:h}=this.options,u=(o+r)/2,d=(a+l+h+c)/2;return{x:n+Math.cos(u)*d,y:s+Math.sin(u)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,o=(n.offset||0)/4,r=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>V?Math.floor(s/V):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(j,s||0)),h=o*c;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,Ru(e,this,h,r,a),Lu(e,this,h,r,a),e.restore()}}A(me,"id","arc"),A(me,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),A(me,"defaultRoutes",{backgroundColor:"backgroundColor"}),A(me,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Pr(i,t,e=t){i.lineCap=P(e.borderCapStyle,t.borderCapStyle),i.setLineDash(P(e.borderDash,t.borderDash)),i.lineDashOffset=P(e.borderDashOffset,t.borderDashOffset),i.lineJoin=P(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=P(e.borderWidth,t.borderWidth),i.strokeStyle=P(e.borderColor,t.borderColor)}function Fu(i,t,e){i.lineTo(e.x,e.y)}function Iu(i){return i.stepped?oc:i.tension||i.cubicInterpolationMode==="monotone"?rc:Fu}function Tr(i,t,e={}){const n=i.length,{start:s=0,end:o=n-1}=e,{start:r,end:a}=t,l=Math.max(s,r),c=Math.min(o,a),h=s<r&&o<r||s>a&&o>a;return{count:n,start:l,loop:t.loop,ilen:c<l&&!h?n+c-l:c-l}}function zu(i,t,e,n){const{points:s,options:o}=t,{count:r,start:a,loop:l,ilen:c}=Tr(s,e,n),h=Iu(o);let{move:u=!0,reverse:d}=n||{},f,p,g;for(f=0;f<=c;++f)p=s[(a+(d?c-f:f))%r],!p.skip&&(u?(i.moveTo(p.x,p.y),u=!1):h(i,g,p,d,o.stepped),g=p);return l&&(p=s[(a+(d?c:0))%r],h(i,g,p,d,o.stepped)),!!l}function Bu(i,t,e,n){const s=t.points,{count:o,start:r,ilen:a}=Tr(s,e,n),{move:l=!0,reverse:c}=n||{};let h=0,u=0,d,f,p,g,m,b;const x=w=>(r+(c?a-w:w))%o,k=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(f=s[x(0)],i.moveTo(f.x,f.y)),d=0;d<=a;++d){if(f=s[x(d)],f.skip)continue;const w=f.x,_=f.y,y=w|0;y===p?(_<g?g=_:_>m&&(m=_),h=(u*h+w)/++u):(k(),i.lineTo(w,_),p=y,u=0,g=m=_),b=_}k()}function hn(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Bu:zu}function Nu(i){return i.stepped?Bc:i.tension||i.cubicInterpolationMode==="monotone"?Nc:Nt}function Vu(i,t,e,n){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,n)&&s.closePath()),Pr(i,t.options),i.stroke(s)}function Hu(i,t,e,n){const{segments:s,options:o}=t,r=hn(t);for(const a of s)Pr(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+n-1})&&i.closePath(),i.stroke()}const ju=typeof Path2D=="function";function Wu(i,t,e,n){ju&&!t.options.segment?Vu(i,t,e,n):Hu(i,t,e,n)}class Pt extends ut{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const s=n.spanGaps?this._loop:this._fullLoop;Dc(this._points,n,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=$c(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,s=t[e],o=this.points,r=gr(this,{property:e,start:s,end:s});if(!r.length)return;const a=[],l=Nu(n);let c,h;for(c=0,h=r.length;c<h;++c){const{start:u,end:d}=r[c],f=o[u],p=o[d];if(f===p){a.push(f);continue}const g=Math.abs((s-f[e])/(p[e]-f[e])),m=l(f,p,g,n.stepped);m[e]=t[e],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,e,n){return hn(this)(t,this,e,n)}path(t,e,n){const s=this.segments,o=hn(this);let r=this._loop;e=e||0,n=n||this.points.length-e;for(const a of s)r&=o(t,this,a,{start:e,end:e+n-1});return!!r}draw(t,e,n,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Wu(t,this,n,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}A(Pt,"id","line"),A(Pt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),A(Pt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),A(Pt,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function qs(i,t,e,n){const s=i.options,{[e]:o}=i.getProps([e],n);return Math.abs(t-o)<s.radius+s.hitRadius}class ui extends ut{constructor(e){super();A(this,"parsed");A(this,"skip");A(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){const o=this.options,{x:r,y:a}=this.getProps(["x","y"],s);return Math.pow(e-r,2)+Math.pow(n-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,n){return qs(this,e,"x",n)}inYRange(e,n){return qs(this,e,"y",n)}getCenterPoint(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){const s=this.options;this.skip||s.radius<.1||!St(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,rn(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}A(ui,"id","point"),A(ui,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),A(ui,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Dr(i,t){const{x:e,y:n,base:s,width:o,height:r}=i.getProps(["x","y","base","width","height"],t);let a,l,c,h,u;return i.horizontal?(u=r/2,a=Math.min(e,s),l=Math.max(e,s),c=n-u,h=n+u):(u=o/2,a=e-u,l=e+u,c=Math.min(n,s),h=Math.max(n,s)),{left:a,top:c,right:l,bottom:h}}function Tt(i,t,e,n){return i?0:K(t,e,n)}function Uu(i,t,e){const n=i.options.borderWidth,s=i.borderSkipped,o=nr(n);return{t:Tt(s.top,o.top,0,e),r:Tt(s.right,o.right,0,t),b:Tt(s.bottom,o.bottom,0,e),l:Tt(s.left,o.left,0,t)}}function $u(i,t,e){const{enableBorderRadius:n}=i.getProps(["enableBorderRadius"]),s=i.options.borderRadius,o=jt(s),r=Math.min(t,e),a=i.borderSkipped,l=n||C(s);return{topLeft:Tt(!l||a.top||a.left,o.topLeft,0,r),topRight:Tt(!l||a.top||a.right,o.topRight,0,r),bottomLeft:Tt(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:Tt(!l||a.bottom||a.right,o.bottomRight,0,r)}}function Yu(i){const t=Dr(i),e=t.right-t.left,n=t.bottom-t.top,s=Uu(i,e/2,n/2),o=$u(i,e/2,n/2);return{outer:{x:t.left,y:t.top,w:e,h:n,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Xi(i,t,e,n){const s=t===null,o=e===null,a=i&&!(s&&o)&&Dr(i,n);return a&&(s||wt(t,a.left,a.right))&&(o||wt(e,a.top,a.bottom))}function Xu(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function qu(i,t){i.rect(t.x,t.y,t.w,t.h)}function qi(i,t,e={}){const n=i.x!==e.x?-t:0,s=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-n,r=(i.y+i.h!==e.y+e.h?t:0)-s;return{x:i.x+n,y:i.y+s,w:i.w+o,h:i.h+r,radius:i.radius}}class di extends ut{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:r}=Yu(this),a=Xu(r.radius)?Te:qu;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,qi(r,e,o)),t.clip(),a(t,qi(o,-e,r)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,qi(o,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,n){return Xi(this,t,e,n)}inXRange(t,e){return Xi(this,t,null,e)}inYRange(t,e){return Xi(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+s)/2:e,y:o?n:(n+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}A(di,"id","bar"),A(di,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),A(di,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Ku=Object.freeze({__proto__:null,ArcElement:me,BarElement:di,LineElement:Pt,PointElement:ui});const un=["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)"],Ks=un.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Cr(i){return un[i%un.length]}function Er(i){return Ks[i%Ks.length]}function Gu(i,t){return i.borderColor=Cr(t),i.backgroundColor=Er(t),++t}function Ju(i,t){return i.backgroundColor=i.data.map(()=>Cr(t++)),t}function Zu(i,t){return i.backgroundColor=i.data.map(()=>Er(t++)),t}function Qu(i){let t=0;return(e,n)=>{const s=i.getDatasetMeta(n).controller;s instanceof Ht?t=Ju(e,t):s instanceof Se?t=Zu(e,t):s&&(t=Gu(e,t))}}function Gs(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function td(i){return i&&(i.borderColor||i.backgroundColor)}var ed={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;const{data:{datasets:n},options:s}=i.config,{elements:o}=s;if(!e.forceOverride&&(Gs(n)||td(s)||o&&Gs(o)))return;const r=Qu(i);n.forEach(r)}};function id(i,t,e,n,s){const o=s.samples||n;if(o>=e)return i.slice(t,t+e);const r=[],a=(e-2)/(o-2);let l=0;const c=t+e-1;let h=t,u,d,f,p,g;for(r[l++]=i[h],u=0;u<o-2;u++){let m=0,b=0,x;const k=Math.floor((u+1)*a)+1+t,w=Math.min(Math.floor((u+2)*a)+1,e)+t,_=w-k;for(x=k;x<w;x++)m+=i[x].x,b+=i[x].y;m/=_,b/=_;const y=Math.floor(u*a)+1+t,v=Math.min(Math.floor((u+1)*a)+1,e)+t,{x:S,y:O}=i[h];for(f=p=-1,x=y;x<v;x++)p=.5*Math.abs((S-m)*(i[x].y-O)-(S-i[x].x)*(b-O)),p>f&&(f=p,d=i[x],g=x);r[l++]=d,h=g}return r[l++]=i[c],r}function nd(i,t,e,n){let s=0,o=0,r,a,l,c,h,u,d,f,p,g;const m=[],b=t+e-1,x=i[t].x,w=i[b].x-x;for(r=t;r<t+e;++r){a=i[r],l=(a.x-x)/w*n,c=a.y;const _=l|0;if(_===h)c<p?(p=c,u=r):c>g&&(g=c,d=r),s=(o*s+a.x)/++o;else{const y=r-1;if(!L(u)&&!L(d)){const v=Math.min(u,d),S=Math.max(u,d);v!==f&&v!==y&&m.push({...i[v],x:s}),S!==f&&S!==y&&m.push({...i[S],x:s})}r>0&&y!==f&&m.push(i[y]),m.push(a),h=_,o=0,p=g=c,u=d=f=r}}return m}function Rr(i){if(i._decimated){const t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Js(i){i.data.datasets.forEach(t=>{Rr(t)})}function sd(i,t){const e=t.length;let n=0,s;const{iScale:o}=i,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=K(vt(t,o.axis,r).lo,0,e-1)),c?s=K(vt(t,o.axis,a).hi+1,n,e)-n:s=e-n,{start:n,count:s}}var od={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Js(i);return}const n=i.width;i.data.datasets.forEach((s,o)=>{const{_data:r,indexAxis:a}=s,l=i.getDatasetMeta(o),c=r||s.data;if(pe([a,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const h=i.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||i.options.parsing)return;let{start:u,count:d}=sd(l,c);const f=e.threshold||4*n;if(d<=f){Rr(s);return}L(r)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(e.algorithm){case"lttb":p=id(c,u,d,n,e);break;case"min-max":p=nd(c,u,d,n);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=p})},destroy(i){Js(i)}};function rd(i,t,e){const n=i.segments,s=i.points,o=t.points,r=[];for(const a of n){let{start:l,end:c}=a;c=Nn(l,c,s);const h=dn(e,s[l],s[c],a.loop);if(!t.segments){r.push({source:a,target:h,start:s[l],end:s[c]});continue}const u=gr(t,h);for(const d of u){const f=dn(e,o[d.start],o[d.end],d.loop),p=pr(a,s,f);for(const g of p)r.push({source:g,target:d,start:{[e]:Zs(h,f,"start",Math.max)},end:{[e]:Zs(h,f,"end",Math.min)}})}}return r}function dn(i,t,e,n){if(n)return;let s=t[i],o=e[i];return i==="angle"&&(s=ot(s),o=ot(o)),{property:i,start:s,end:o}}function ad(i,t){const{x:e=null,y:n=null}=i||{},s=t.points,o=[];return t.segments.forEach(({start:r,end:a})=>{a=Nn(r,a,s);const l=s[r],c=s[a];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function Nn(i,t,e){for(;t>i;t--){const n=e[t];if(!isNaN(n.x)&&!isNaN(n.y))break}return t}function Zs(i,t,e,n){return i&&t?n(i[e],t[e]):i?i[e]:t?t[e]:0}function Lr(i,t){let e=[],n=!1;return N(i)?(n=!0,e=i):e=ad(i,t),e.length?new Pt({points:e,options:{tension:0},_loop:n,_fullLoop:n}):null}function Qs(i){return i&&i.fill!==!1}function ld(i,t,e){let s=i[t].fill;const o=[t];let r;if(!e)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!W(s))return s;if(r=i[s],!r)return!1;if(r.visible)return s;o.push(s),s=r.fill}return!1}function cd(i,t,e){const n=fd(i);if(C(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return W(s)&&Math.floor(s)===s?hd(n[0],t,s,e):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function hd(i,t,e,n){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=n?!1:e}function ud(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:C(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function dd(i,t,e){let n;return i==="start"?n=e:i==="end"?n=t.options.reverse?t.min:t.max:C(i)?n=i.value:n=t.getBaseValue(),n}function fd(i){const t=i.options,e=t.fill;let n=P(e&&e.target,e);return n===void 0&&(n=!!t.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function pd(i){const{scale:t,index:e,line:n}=i,s=[],o=n.segments,r=n.points,a=gd(t,e);a.push(Lr({x:null,y:t.bottom},n));for(let l=0;l<o.length;l++){const c=o[l];for(let h=c.start;h<=c.end;h++)md(s,r[h],a)}return new Pt({points:s,options:{}})}function gd(i,t){const e=[],n=i.getMatchingVisibleMetas("line");for(let s=0;s<n.length;s++){const o=n[s];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function md(i,t,e){const n=[];for(let s=0;s<e.length;s++){const o=e[s],{first:r,last:a,point:l}=bd(o,t,"x");if(!(!l||r&&a)){if(r)n.unshift(l);else if(i.push(l),!a)break}}i.push(...n)}function bd(i,t,e){const n=i.interpolate(t,e);if(!n)return{};const s=n[e],o=i.segments,r=i.points;let a=!1,l=!1;for(let c=0;c<o.length;c++){const h=o[c],u=r[h.start][e],d=r[h.end][e];if(wt(s,u,d)){a=s===u,l=s===d;break}}return{first:a,last:l,point:n}}class Fr{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){const{x:s,y:o,radius:r}=this;return e=e||{start:0,end:V},t.arc(s,o,r,e.end,e.start,!0),!n.bounds}interpolate(t){const{x:e,y:n,radius:s}=this,o=t.angle;return{x:e+Math.cos(o)*s,y:n+Math.sin(o)*s,angle:o}}}function xd(i){const{chart:t,fill:e,line:n}=i;if(W(e))return yd(t,e);if(e==="stack")return pd(i);if(e==="shape")return!0;const s=_d(i);return s instanceof Fr?s:Lr(s,n)}function yd(i,t){const e=i.getDatasetMeta(t);return e&&i.isDatasetVisible(t)?e.dataset:null}function _d(i){return(i.scale||{}).getPointPositionForValue?vd(i):wd(i)}function wd(i){const{scale:t={},fill:e}=i,n=ud(e,t);if(W(n)){const s=t.isHorizontal();return{x:s?n:null,y:s?null:n}}return null}function vd(i){const{scale:t,fill:e}=i,n=t.options,s=t.getLabels().length,o=n.reverse?t.max:t.min,r=dd(e,t,o),a=[];if(n.grid.circular){const l=t.getPointPositionForValue(0,o);return new Fr({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(r)})}for(let l=0;l<s;++l)a.push(t.getPointPositionForValue(l,r));return a}function Ki(i,t,e){const n=xd(t),{line:s,scale:o,axis:r}=t,a=s.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&s.points.length&&(Ti(i,e),Sd(i,{line:s,target:n,above:h,below:u,area:e,scale:o,axis:r}),Di(i))}function Sd(i,t){const{line:e,target:n,above:s,below:o,area:r,scale:a}=t,l=e._loop?"angle":t.axis;i.save(),l==="x"&&o!==s&&(to(i,n,r.top),eo(i,{line:e,target:n,color:s,scale:a,property:l}),i.restore(),i.save(),to(i,n,r.bottom)),eo(i,{line:e,target:n,color:o,scale:a,property:l}),i.restore()}function to(i,t,e){const{segments:n,points:s}=t;let o=!0,r=!1;i.beginPath();for(const a of n){const{start:l,end:c}=a,h=s[l],u=s[Nn(l,c,s)];o?(i.moveTo(h.x,h.y),o=!1):(i.lineTo(h.x,e),i.lineTo(h.x,h.y)),r=!!t.pathSegment(i,a,{move:r}),r?i.closePath():i.lineTo(u.x,e)}i.lineTo(t.first().x,e),i.closePath(),i.clip()}function eo(i,t){const{line:e,target:n,property:s,color:o,scale:r}=t,a=rd(e,n,s);for(const{source:l,target:c,start:h,end:u}of a){const{style:{backgroundColor:d=o}={}}=l,f=n!==!0;i.save(),i.fillStyle=d,kd(i,r,f&&dn(s,h,u)),i.beginPath();const p=!!e.pathSegment(i,l);let g;if(f){p?i.closePath():io(i,n,u,s);const m=!!n.pathSegment(i,c,{move:p,reverse:!0});g=p&&m,g||io(i,n,h,s)}i.closePath(),i.fill(g?"evenodd":"nonzero"),i.restore()}}function kd(i,t,e){const{top:n,bottom:s}=t.chart.chartArea,{property:o,start:r,end:a}=e||{};o==="x"&&(i.beginPath(),i.rect(r,n,a-r,s-n),i.clip())}function io(i,t,e,n){const s=t.interpolate(e,n);s&&i.lineTo(s.x,s.y)}var Md={id:"filler",afterDatasetsUpdate(i,t,e){const n=(i.data.datasets||[]).length,s=[];let o,r,a,l;for(r=0;r<n;++r)o=i.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof Pt&&(l={visible:i.isDatasetVisible(r),index:r,fill:cd(a,r,n),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,s.push(l);for(r=0;r<n;++r)l=s[r],!(!l||l.fill===!1)&&(l.fill=ld(s,r,e.propagate))},beforeDraw(i,t,e){const n=e.drawTime==="beforeDraw",s=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let r=s.length-1;r>=0;--r){const a=s[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),n&&a.fill&&Ki(i.ctx,a,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const n=i.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){const o=n[s].$filler;Qs(o)&&Ki(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const n=t.meta.$filler;!Qs(n)||e.drawTime!=="beforeDatasetDraw"||Ki(i.ctx,n,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const no=(i,t)=>{let{boxHeight:e=t,boxWidth:n=t}=i;return i.usePointStyle&&(e=Math.min(e,t),n=i.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},Ad=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class so extends ut{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=B(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,s)=>t.sort(n,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,s=X(n.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=no(n,o);let c,h;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,s){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+a;let u=t;o.textAlign="left",o.textBaseline="middle";let d=-1,f=-h;return this.legendItems.forEach((p,g)=>{const m=n+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(u+=h,c[c.length-(g>0?0:1)]=0,f+=h,d++),l[g]={left:0,top:f,row:d,width:m,height:s},c[c.length-1]+=m+a}),u}_fitCols(t,e,n,s){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let u=a,d=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:x,itemHeight:k}=Od(n,e,o,m,s);b>0&&f+k+2*a>h&&(u+=d+a,c.push({width:d,height:f}),p+=d+a,g++,d=f=0),l[b]={left:p,top:f,col:g,width:x,height:k},d=Math.max(d,x),f+=k+a}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:s},rtl:o}}=this,r=Jt(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Z(n,this.left+s,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=Z(n,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=Z(n,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=Z(n,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ti(t,this),this._draw(),Di(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:s}=this,{align:o,labels:r}=t,a=$.color,l=Jt(t.rtl,this.left,this.width),c=X(r.font),{padding:h}=r,u=c.size,d=u/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=no(r,u),b=function(y,v,S){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;s.save();const O=P(S.lineWidth,1);if(s.fillStyle=P(S.fillStyle,a),s.lineCap=P(S.lineCap,"butt"),s.lineDashOffset=P(S.lineDashOffset,0),s.lineJoin=P(S.lineJoin,"miter"),s.lineWidth=O,s.strokeStyle=P(S.strokeStyle,a),s.setLineDash(P(S.lineDash,[])),r.usePointStyle){const T={radius:g*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:O},D=l.xPlus(y,p/2),E=v+d;ir(s,T,D,E,r.pointStyleWidth&&p)}else{const T=v+Math.max((u-g)/2,0),D=l.leftForLtr(y,p),E=jt(S.borderRadius);s.beginPath(),Object.values(E).some(G=>G!==0)?Te(s,{x:D,y:T,w:p,h:g,radius:E}):s.rect(D,T,p,g),s.fill(),O!==0&&s.stroke()}s.restore()},x=function(y,v,S){$t(s,S.text,y,v+m/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},k=this.isHorizontal(),w=this._computeTitleHeight();k?f={x:Z(o,this.left+h,this.right-n[0]),y:this.top+h+w,line:0}:f={x:this.left+h,y:Z(o,this.top+w+h,this.bottom-e[0].height),line:0},ur(this.ctx,t.textDirection);const _=m+h;this.legendItems.forEach((y,v)=>{s.strokeStyle=y.fontColor,s.fillStyle=y.fontColor;const S=s.measureText(y.text).width,O=l.textAlign(y.textAlign||(y.textAlign=r.textAlign)),T=p+d+S;let D=f.x,E=f.y;l.setWidth(this.width),k?v>0&&D+T+h>this.right&&(E=f.y+=_,f.line++,D=f.x=Z(o,this.left+h,this.right-n[f.line])):v>0&&E+_>this.bottom&&(D=f.x=D+e[f.line].width+h,f.line++,E=f.y=Z(o,this.top+w+h,this.bottom-e[f.line].height));const G=l.x(D);if(b(G,E,y),D=ql(O,D+p+d,k?D+T:this.right,t.rtl),x(l.x(D),E,y),k)f.x+=T+h;else if(typeof y.text!="string"){const nt=c.lineHeight;f.y+=Ir(y,nt)}else f.y+=_}),dr(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=X(e.font),s=tt(e.padding);if(!e.display)return;const o=Jt(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=n.size/2,c=s.top+l;let h,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+c,u=Z(t.align,u,this.right-d);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+Z(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=Z(a,u,u+d);r.textAlign=o.textAlign(Cn(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=n.string,$t(r,e.text,f,h,n)}_computeTitleHeight(){const t=this.options.title,e=X(t.font),n=tt(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,s,o;if(wt(t,this.left,this.right)&&wt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],wt(t,s.left,s.left+s.width)&&wt(e,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(t){const e=this.options;if(!Dd(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=Ad(s,n);s&&!o&&B(e.onLeave,[t,s,this],this),this._hoveredItem=n,n&&!o&&B(e.onHover,[t,n,this],this)}else n&&B(e.onClick,[t,n,this],this)}}function Od(i,t,e,n,s){const o=Pd(n,i,t,e),r=Td(s,n,t.lineHeight);return{itemWidth:o,itemHeight:r}}function Pd(i,t,e,n){let s=i.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),t+e.size/2+n.measureText(s).width}function Td(i,t,e){let n=i;return typeof t.text!="string"&&(n=Ir(t,e)),n}function Ir(i,t){const e=i.text?i.text.length+.5:0;return t*e}function Dd(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Cd={id:"legend",_element:so,start(i,t,e){const n=i.legend=new so({ctx:i.ctx,options:e,chart:i});Q.configure(i,n,e),Q.addBox(i,n)},stop(i){Q.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const n=i.legend;Q.configure(i,n,e),n.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const n=t.datasetIndex,s=e.chart;s.isDatasetVisible(n)?(s.hide(n),t.hidden=!0):(s.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=tt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Vn extends ut{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const s=N(n.text)?n.text.length:1;this._padding=tt(n.padding);const o=s*X(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:n,bottom:s,right:o,options:r}=this,a=r.align;let l=0,c,h,u;return this.isHorizontal()?(h=Z(a,n,o),u=e+t,c=o-n):(r.position==="left"?(h=n+t,u=Z(a,s,e),l=j*-.5):(h=o-t,u=Z(a,e,s),l=j*.5),c=s-e),{titleX:h,titleY:u,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=X(e.font),o=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);$t(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:Cn(e.align),textBaseline:"middle",translation:[r,a]})}}function Ed(i,t){const e=new Vn({ctx:i.ctx,options:t,chart:i});Q.configure(i,e,t),Q.addBox(i,e),i.titleBlock=e}var Rd={id:"title",_element:Vn,start(i,t,e){Ed(i,e)},stop(i){const t=i.titleBlock;Q.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const n=i.titleBlock;Q.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ke=new WeakMap;var Ld={id:"subtitle",start(i,t,e){const n=new Vn({ctx:i.ctx,options:e,chart:i});Q.configure(i,n,e),Q.addBox(i,n),Ke.set(i,n)},stop(i){Q.removeBox(i,Ke.get(i)),Ke.delete(i)},beforeUpdate(i,t,e){const n=Ke.get(i);Q.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const be={average(i){if(!i.length)return!1;let t,e,n=0,s=0,o=0;for(t=0,e=i.length;t<e;++t){const r=i[t].element;if(r&&r.hasValue()){const a=r.tooltipPosition();n+=a.x,s+=a.y,++o}}return{x:n/o,y:s/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,n=t.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;o<r;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=sn(t,c);h<s&&(s=h,a=l)}}if(a){const l=a.tooltipPosition();e=l.x,n=l.y}return{x:e,y:n}}};function dt(i,t){return t&&(N(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function yt(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
`)>-1?i.split(`
`):i}function Fd(i,t){const{element:e,datasetIndex:n,index:s}=t,o=i.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:i,label:r,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:e}}function oo(i,t){const e=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=X(t.bodyFont),c=X(t.titleFont),h=X(t.footerFont),u=o.length,d=s.length,f=n.length,p=tt(t.padding);let g=p.height,m=0,b=n.reduce((w,_)=>w+_.before.length+_.lines.length+_.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),b){const w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=f*w+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}d&&(g+=t.footerMarginTop+d*h.lineHeight+(d-1)*t.footerSpacing);let x=0;const k=function(w){m=Math.max(m,e.measureText(w).width+x)};return e.save(),e.font=c.string,I(i.title,k),e.font=l.string,I(i.beforeBody.concat(i.afterBody),k),x=t.displayColors?r+2+t.boxPadding:0,I(n,w=>{I(w.before,k),I(w.lines,k),I(w.after,k)}),x=0,e.font=h.string,I(i.footer,k),e.restore(),m+=p.width,{width:m,height:g}}function Id(i,t){const{y:e,height:n}=t;return e<n/2?"top":e>i.height-n/2?"bottom":"center"}function zd(i,t,e,n){const{x:s,width:o}=n,r=e.caretSize+e.caretPadding;if(i==="left"&&s+o+r>t.width||i==="right"&&s-o-r<0)return!0}function Bd(i,t,e,n){const{x:s,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return n==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),zd(c,i,t,e)&&(c="center"),c}function ro(i,t,e){const n=e.yAlign||t.yAlign||Id(i,e);return{xAlign:e.xAlign||t.xAlign||Bd(i,t,e,n),yAlign:n}}function Nd(i,t){let{x:e,width:n}=i;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function Vd(i,t,e){let{y:n,height:s}=i;return t==="top"?n+=e:t==="bottom"?n-=s+e:n-=s/2,n}function ao(i,t,e,n){const{caretSize:s,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=s+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=jt(r);let p=Nd(t,a);const g=Vd(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(h,d)+s:a==="right"&&(p+=Math.max(u,f)+s),{x:K(p,0,n.width-t.width),y:K(g,0,n.height-t.height)}}function Ge(i,t,e){const n=tt(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-n.right:i.x+n.left}function lo(i){return dt([],yt(i))}function Hd(i,t,e){return Rt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function co(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const zr={beforeTitle:bt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return e[t.dataIndex]}return""},afterTitle:bt,beforeBody:bt,beforeLabel:bt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return L(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:bt,afterBody:bt,beforeFooter:bt,footer:bt,afterFooter:bt};function et(i,t,e,n){const s=i[t].call(e,n);return typeof s>"u"?zr[t].call(e,n):s}class fn extends ut{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&e.options.animation&&n.animations,o=new mr(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Hd(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:n}=e,s=et(n,"beforeTitle",this,t),o=et(n,"title",this,t),r=et(n,"afterTitle",this,t);let a=[];return a=dt(a,yt(s)),a=dt(a,yt(o)),a=dt(a,yt(r)),a}getBeforeBody(t,e){return lo(et(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,s=[];return I(t,o=>{const r={before:[],lines:[],after:[]},a=co(n,o);dt(r.before,yt(et(a,"beforeLabel",this,o))),dt(r.lines,et(a,"label",this,o)),dt(r.after,yt(et(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(t,e){return lo(et(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,s=et(n,"beforeFooter",this,t),o=et(n,"footer",this,t),r=et(n,"afterFooter",this,t);let a=[];return a=dt(a,yt(s)),a=dt(a,yt(o)),a=dt(a,yt(r)),a}_createItems(t){const e=this._active,n=this.chart.data,s=[],o=[],r=[];let a=[],l,c;for(l=0,c=e.length;l<c;++l)a.push(Fd(this.chart,e[l]));return t.filter&&(a=a.filter((h,u,d)=>t.filter(h,u,d,n))),t.itemSort&&(a=a.sort((h,u)=>t.itemSort(h,u,n))),I(a,h=>{const u=co(t.callbacks,h);s.push(et(u,"labelColor",this,h)),o.push(et(u,"labelPointStyle",this,h)),r.push(et(u,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const n=this.options.setContext(this.getContext()),s=this._active;let o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const a=be[n.position].call(this,s,this._eventPosition);r=this._createItems(n),this.title=this.getTitle(r,n),this.beforeBody=this.getBeforeBody(r,n),this.body=this.getBody(r,n),this.afterBody=this.getAfterBody(r,n),this.footer=this.getFooter(r,n);const l=this._size=oo(this,n),c=Object.assign({},a,l),h=ro(this.chart,n,c),u=ao(n,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,s){const o=this.getCaretPosition(t,n,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,n){const{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:u}=jt(a),{x:d,y:f}=t,{width:p,height:g}=e;let m,b,x,k,w,_;return o==="center"?(w=f+g/2,s==="left"?(m=d,b=m-r,k=w+r,_=w-r):(m=d+p,b=m+r,k=w-r,_=w+r),x=m):(s==="left"?b=d+Math.max(l,h)+r:s==="right"?b=d+p-Math.max(c,u)-r:b=this.caretX,o==="top"?(k=f,w=k-r,m=b-r,x=b+r):(k=f+g,w=k+r,m=b+r,x=b-r),_=k),{x1:m,x2:b,x3:x,y1:k,y2:w,y3:_}}drawTitle(t,e,n){const s=this.title,o=s.length;let r,a,l;if(o){const c=Jt(n.rtl,this.x,this.width);for(t.x=Ge(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",r=X(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=r.string,l=0;l<o;++l)e.fillText(s[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,e,n,s,o){const r=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,h=X(o.bodyFont),u=Ge(this,"left",o),d=s.x(u),f=l<h.lineHeight?(h.lineHeight-l)/2:0,p=e.y+f;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=s.leftForLtr(d,c)+c/2,b=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,rn(t,g,m,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,rn(t,g,m,b)}else{t.lineWidth=C(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const g=s.leftForLtr(d,c),m=s.leftForLtr(s.xPlus(d,1),c-2),b=jt(r.borderRadius);Object.values(b).some(x=>x!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Te(t,{x:g,y:p,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Te(t,{x:m,y:p+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=n,u=X(n.bodyFont);let d=u.lineHeight,f=0;const p=Jt(n.rtl,this.x,this.width),g=function(S){e.fillText(S,p.x(t.x+f),t.y+d/2),t.y+=d+o},m=p.textAlign(r);let b,x,k,w,_,y,v;for(e.textAlign=r,e.textBaseline="middle",e.font=u.string,t.x=Ge(this,m,n),e.fillStyle=n.bodyColor,I(this.beforeBody,g),f=a&&m!=="right"?r==="center"?c/2+h:c+2+h:0,w=0,y=s.length;w<y;++w){for(b=s[w],x=this.labelTextColors[w],e.fillStyle=x,I(b.before,g),k=b.lines,a&&k.length&&(this._drawColorBox(e,t,w,p,n),d=Math.max(u.lineHeight,l)),_=0,v=k.length;_<v;++_)g(k[_]),d=u.lineHeight;I(b.after,g)}f=0,d=u.lineHeight,I(this.afterBody,g),t.y-=o}drawFooter(t,e,n){const s=this.footer,o=s.length;let r,a;if(o){const l=Jt(n.rtl,this.x,this.width);for(t.x=Ge(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=l.textAlign(n.footerAlign),e.textBaseline="middle",r=X(n.footerFont),e.fillStyle=n.footerColor,e.font=r.string,a=0;a<o;++a)e.fillText(s[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+n.footerSpacing}}drawBackground(t,e,n,s){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:h}=n,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=jt(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(a+u,l),r==="top"&&this.drawCaret(t,e,n,s),e.lineTo(a+c-d,l),e.quadraticCurveTo(a+c,l,a+c,l+d),r==="center"&&o==="right"&&this.drawCaret(t,e,n,s),e.lineTo(a+c,l+h-p),e.quadraticCurveTo(a+c,l+h,a+c-p,l+h),r==="bottom"&&this.drawCaret(t,e,n,s),e.lineTo(a+f,l+h),e.quadraticCurveTo(a,l+h,a,l+h-f),r==="center"&&o==="left"&&this.drawCaret(t,e,n,s),e.lineTo(a,l+u),e.quadraticCurveTo(a,l,a+u,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,s=n&&n.x,o=n&&n.y;if(s||o){const r=be[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=oo(this,t),l=Object.assign({},r,this._size),c=ro(e,t,l),h=ao(t,l,c,e);(s._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const r=tt(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,s,e),ur(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),dr(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,s=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}}),o=!pi(n,s),r=this._positionChanged(s,e);(o||r)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,n),a=this._positionChanged(r,t),l=e||!pi(r,o)||a;return l&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return e;const r=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:n,caretY:s,options:o}=this,r=be[o.position].call(this,t,e);return r!==!1&&(n!==r.x||s!==r.y)}}A(fn,"positioners",be);var jd={id:"tooltip",_element:fn,positioners:be,afterInit(i,t,e){e&&(i.tooltip=new fn({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,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:zr},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Wd=Object.freeze({__proto__:null,Colors:ed,Decimation:od,Filler:Md,Legend:Cd,SubTitle:Ld,Title:Rd,Tooltip:jd});const Ud=(i,t,e,n)=>(typeof t=="string"?(e=i.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function $d(i,t,e,n){const s=i.indexOf(t);if(s===-1)return Ud(i,t,e,n);const o=i.lastIndexOf(t);return s!==o?e:s}const Yd=(i,t)=>i===null?null:K(Math.round(i),0,t);function ho(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class pn extends Yt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const n=this.getLabels();for(const{index:s,label:o}of e)n[s]===o&&n.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(L(t))return null;const n=this.getLabels();return e=isFinite(e)&&n[e]===t?e:$d(n,t,P(e,t),this._addedLabels),Yd(e,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),e||(s=this.getLabels().length-1)),this.min=n,this.max=s}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,s=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let r=t;r<=e;r++)s.push({value:r});return s}getLabelForValue(t){return ho.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}A(pn,"id","category"),A(pn,"defaults",{ticks:{callback:ho}});function Xd(i,t){const e=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:u,includeBounds:d}=i,f=o||1,p=h-1,{min:g,max:m}=t,b=!L(r),x=!L(a),k=!L(c),w=(m-g)/(u+1);let _=ss((m-g)/p/f)*f,y,v,S,O;if(_<1e-14&&!b&&!x)return[{value:g},{value:m}];O=Math.ceil(m/_)-Math.floor(g/_),O>p&&(_=ss(O*_/p/f)*f),L(l)||(y=Math.pow(10,l),_=Math.ceil(_*y)/y),s==="ticks"?(v=Math.floor(g/_)*_,S=Math.ceil(m/_)*_):(v=g,S=m),b&&x&&o&&Hl((a-r)/o,_/1e3)?(O=Math.round(Math.min((a-r)/_,h)),_=(a-r)/O,v=r,S=a):k?(v=b?r:v,S=x?a:S,O=c-1,_=(S-v)/O):(O=(S-v)/_,_e(O,Math.round(O),_/1e3)?O=Math.round(O):O=Math.ceil(O));const T=Math.max(os(_),os(v));y=Math.pow(10,L(l)?T:l),v=Math.round(v*y)/y,S=Math.round(S*y)/y;let D=0;for(b&&(d&&v!==r?(e.push({value:r}),v<r&&D++,_e(Math.round((v+D*_)*y)/y,r,uo(r,w,i))&&D++):v<r&&D++);D<O;++D){const E=Math.round((v+D*_)*y)/y;if(x&&E>a)break;e.push({value:E})}return x&&d&&S!==a?e.length&&_e(e[e.length-1].value,a,uo(a,w,i))?e[e.length-1].value=a:e.push({value:a}):(!x||S===a)&&e.push({value:S}),e}function uo(i,t,{horizontal:e,minRotation:n}){const s=ct(n),o=(e?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}class wi extends Yt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return L(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:o}=this;const r=l=>s=e?s:l,a=l=>o=n?o:l;if(t){const l=gt(s),c=gt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:n}=t,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const s={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=Xd(s,o);return t.bounds==="ticks"&&Xo(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const s=(n-e)/Math.max(t.length-1,1)/2;e-=s,n+=s}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Ie(t,this.chart.options.locale,this.options.ticks.format)}}class gn extends wi{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?t:0,this.max=W(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=ct(this.options.ticks.minRotation),s=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}A(gn,"id","linear"),A(gn,"defaults",{ticks:{callback:Pi.formatters.numeric}});const Ce=i=>Math.floor(Ot(i)),zt=(i,t)=>Math.pow(10,Ce(i)+t);function fo(i){return i/Math.pow(10,Ce(i))===1}function po(i,t,e){const n=Math.pow(10,e),s=Math.floor(i/n);return Math.ceil(t/n)-s}function qd(i,t){const e=t-i;let n=Ce(e);for(;po(i,t,n)>10;)n++;for(;po(i,t,n)<10;)n--;return Math.min(n,Ce(i))}function Kd(i,{min:t,max:e}){t=st(i.min,t);const n=[],s=Ce(t);let o=qd(t,e),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((t-l)*r)/r,h=Math.floor((t-l)/a/10)*a*10;let u=Math.floor((c-h)/Math.pow(10,o)),d=st(i.min,Math.round((l+h+u*Math.pow(10,o))*r)/r);for(;d<e;)n.push({value:d,major:fo(d),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,r=o>=0?1:r),d=Math.round((l+h+u*Math.pow(10,o))*r)/r;const f=st(i.max,d);return n.push({value:f,major:fo(f),significand:u}),n}class mn extends Yt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=wi.prototype.parse.apply(this,[t,e]);if(n===0){this._zero=!0;return}return W(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?Math.max(0,t):null,this.max=W(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!W(this._userMin)&&(this.min=t===zt(this.min,0)?zt(this.min,-1):zt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,s=this.max;const o=a=>n=t?n:a,r=a=>s=e?s:a;n===s&&(n<=0?(o(1),r(10)):(o(zt(n,-1)),r(zt(s,1)))),n<=0&&o(zt(s,-1)),s<=0&&r(zt(n,1)),this.min=n,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},n=Kd(e,this);return t.bounds==="ticks"&&Xo(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":Ie(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ot(t),this._valueRange=Ot(this.max)-Ot(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ot(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}A(mn,"id","logarithmic"),A(mn,"defaults",{ticks:{callback:Pi.formatters.logarithmic,major:{enabled:!0}}});function bn(i){const t=i.ticks;if(t.display&&i.display){const e=tt(t.backdropPadding);return P(t.font&&t.font.size,$.font.size)+e.height}return 0}function Gd(i,t,e){return e=N(e)?e:[e],{w:sc(i,t.string,e),h:e.length*t.lineHeight}}function go(i,t,e,n,s){return i===n||i===s?{start:t-e/2,end:t+e/2}:i<n||i>s?{start:t-e,end:t}:{start:t,end:t+e}}function Jd(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),n=[],s=[],o=i._pointLabels.length,r=i.options.pointLabels,a=r.centerPointLabels?j/o:0;for(let l=0;l<o;l++){const c=r.setContext(i.getPointLabelContext(l));s[l]=c.padding;const h=i.getPointPosition(l,i.drawingArea+s[l],a),u=X(c.font),d=Gd(i.ctx,u,i._pointLabels[l]);n[l]=d;const f=ot(i.getIndexAngle(l)+a),p=Math.round(Tn(f)),g=go(p,h.x,d.w,0,180),m=go(p,h.y,d.h,90,270);Zd(e,t,f,g,m)}i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=ef(i,n,s)}function Zd(i,t,e,n,s){const o=Math.abs(Math.sin(e)),r=Math.abs(Math.cos(e));let a=0,l=0;n.start<t.l?(a=(t.l-n.start)/o,i.l=Math.min(i.l,t.l-a)):n.end>t.r&&(a=(n.end-t.r)/o,i.r=Math.max(i.r,t.r+a)),s.start<t.t?(l=(t.t-s.start)/r,i.t=Math.min(i.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/r,i.b=Math.max(i.b,t.b+l))}function Qd(i,t,e){const n=i.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=e,l=i.getPointPosition(t,n+s+r,o),c=Math.round(Tn(ot(l.angle+U))),h=of(l.y,a.h,c),u=nf(c),d=sf(l.x,a.w,u);return{visible:!0,x:l.x,y:h,textAlign:u,left:d,top:h,right:d+a.w,bottom:h+a.h}}function tf(i,t){if(!t)return!0;const{left:e,top:n,right:s,bottom:o}=i;return!(St({x:e,y:n},t)||St({x:e,y:o},t)||St({x:s,y:n},t)||St({x:s,y:o},t))}function ef(i,t,e){const n=[],s=i._pointLabels.length,o=i.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:bn(o)/2,additionalAngle:r?j/s:0};let c;for(let h=0;h<s;h++){l.padding=e[h],l.size=t[h];const u=Qd(i,h,l);n.push(u),a==="auto"&&(u.visible=tf(u,c),u.visible&&(c=u))}return n}function nf(i){return i===0||i===180?"center":i<180?"left":"right"}function sf(i,t,e){return e==="right"?i-=t:e==="center"&&(i-=t/2),i}function of(i,t,e){return e===90||e===270?i-=t/2:(e>270||e<90)&&(i-=t),i}function rf(i,t,e){const{left:n,top:s,right:o,bottom:r}=e,{backdropColor:a}=t;if(!L(a)){const l=jt(t.borderRadius),c=tt(t.backdropPadding);i.fillStyle=a;const h=n-c.left,u=s-c.top,d=o-n+c.width,f=r-s+c.height;Object.values(l).some(p=>p!==0)?(i.beginPath(),Te(i,{x:h,y:u,w:d,h:f,radius:l}),i.fill()):i.fillRect(h,u,d,f)}}function af(i,t){const{ctx:e,options:{pointLabels:n}}=i;for(let s=t-1;s>=0;s--){const o=i._pointLabelItems[s];if(!o.visible)continue;const r=n.setContext(i.getPointLabelContext(s));rf(e,r,o);const a=X(r.font),{x:l,y:c,textAlign:h}=o;$t(e,i._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:h,textBaseline:"middle"})}}function Br(i,t,e,n){const{ctx:s}=i;if(e)s.arc(i.xCenter,i.yCenter,t,0,V);else{let o=i.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let r=1;r<n;r++)o=i.getPointPosition(r,t),s.lineTo(o.x,o.y)}}function lf(i,t,e,n,s){const o=i.ctx,r=t.circular,{color:a,lineWidth:l}=t;!r&&!n||!a||!l||e<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),Br(i,e,r,n),o.closePath(),o.stroke(),o.restore())}function cf(i,t,e){return Rt(i,{label:e,index:t,type:"pointLabel"})}class xe extends wi{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=tt(bn(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=W(t)&&!isNaN(t)?t:0,this.max=W(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/bn(this.options))}generateTickLabels(t){wi.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,n)=>{const s=B(this.options.pointLabels.callback,[e,n],this);return s||s===0?s:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jd(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,s))}getIndexAngle(t){const e=V/(this._pointLabels.length||1),n=this.options.startAngle||0;return ot(t*e+ct(n))}getDistanceFromCenterForValue(t){if(L(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(L(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return cf(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const s=this.getIndexAngle(t)-U+n;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:s,bottom:o}=this._pointLabelItems[t];return{left:e,top:n,right:s,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),Br(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:s,border:o}=e,r=this._pointLabels.length;let a,l,c;if(e.pointLabels.display&&af(this,r),s.display&&this.ticks.forEach((h,u)=>{if(u!==0){l=this.getDistanceFromCenterForValue(h.value);const d=this.getContext(u),f=s.setContext(d),p=o.setContext(d);lf(this,f,l,r,p)}}),n.display){for(t.save(),a=r-1;a>=0;a--){const h=n.setContext(this.getPointLabelContext(a)),{color:u,lineWidth:d}=h;!d||!u||(t.lineWidth=d,t.strokeStyle=u,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.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,e=this.options,n=e.ticks;if(!n.display)return;const s=this.getIndexAngle(0);let o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!e.reverse)return;const c=n.setContext(this.getContext(l)),h=X(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const u=tt(c.backdropPadding);t.fillRect(-r/2-u.left,-o-h.size/2-u.top,r+u.width,h.size+u.height)}$t(t,a.label,0,-o,h,{color:c.color})}),t.restore()}drawTitle(){}}A(xe,"id","radialLinear"),A(xe,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Pi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),A(xe,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),A(xe,"descriptors",{angleLines:{_fallback:"grid"}});const Ei={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}},it=Object.keys(Ei);function hf(i,t){return i-t}function mo(i,t){if(L(t))return null;const e=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts;let r=t;return typeof n=="function"&&(r=n(r)),W(r)||(r=typeof n=="string"?e.parse(r,n):e.parse(r)),r===null?null:(s&&(r=s==="week"&&(Qt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,s)),+r)}function bo(i,t,e,n){const s=it.length;for(let o=it.indexOf(i);o<s-1;++o){const r=Ei[it[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((e-t)/(a*r.size))<=n)return it[o]}return it[s-1]}function uf(i,t,e,n,s){for(let o=it.length-1;o>=it.indexOf(e);o--){const r=it[o];if(Ei[r].common&&i._adapter.diff(s,n,r)>=t-1)return r}return it[e?it.indexOf(e):0]}function df(i){for(let t=it.indexOf(i)+1,e=it.length;t<e;++t)if(Ei[it[t]].common)return it[t]}function xo(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:n,hi:s}=Dn(e,t),o=e[n]>=t?e[n]:e[s];i[o]=!0}}function ff(i,t,e,n){const s=i._adapter,o=+s.startOf(t[0].value,n),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=e[a],l>=0&&(t[l].major=!0);return t}function yo(i,t,e){const n=[],s={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],s[a]=r,n.push({value:a,major:!1});return o===0||!e?n:ff(i,n,s,e)}class Ee extends Yt{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const n=t.time||(t.time={}),s=this._adapter=new _h._date(t.adapters.date);s.init(e),ye(n.displayFormats,s.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:mo(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:s,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=W(s)&&!isNaN(s)?s:+e.startOf(Date.now(),n),o=W(o)&&!isNaN(o)?o:+e.endOf(Date.now(),n)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,s=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,r=this.max,a=$l(s,o,r);return this._unit=e.unit||(n.autoSkip?bo(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):uf(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:df(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),yo(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,n=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=K(e,0,r),n=K(n,0,r),this._offsets={start:e,end:n,factor:1/(e+1+n)}}_generate(){const t=this._adapter,e=this.min,n=this.max,s=this.options,o=s.time,r=o.unit||bo(o.minUnit,e,n,this._getLabelCapacity(e)),a=P(s.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Qt(l)||l===!0,h={};let u=e,d,f;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":r),t.diff(n,e,r)>1e5*a)throw new Error(e+" and "+n+" are too far apart with stepSize of "+a+" "+r);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(d=u,f=0;d<n;d=+t.add(d,a,r),f++)xo(h,d,p);return(d===n||s.bounds==="ticks"||f===1)&&xo(h,d,p),Object.keys(h).sort((g,m)=>g-m).map(g=>+g)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,o=this._unit,r=e||s[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,n,s){const o=this.options,r=o.ticks.callback;if(r)return B(r,[t,e,n],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],u=c&&a[c],d=n[e],f=c&&u&&d&&d.major;return this._adapter.format(t,s||(f?u:h))}generateTickLabels(t){let e,n,s;for(e=0,n=t.length;e<n;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,s=ct(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*r,h:n*r+a*o}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,s=n[e.unit]||n.millisecond,o=this._tickFormatFunction(t,0,yo(this,[t],this._majorUnit),s),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,n;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,n=s.length;e<n;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const s=this.getLabels();for(e=0,n=s.length;e<n;++e)t.push(mo(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Go(t.sort(hf))}}A(Ee,"id","time"),A(Ee,"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 Je(i,t,e){let n=0,s=i.length-1,o,r,a,l;e?(t>=i[n].pos&&t<=i[s].pos&&({lo:n,hi:s}=vt(i,"pos",t)),{pos:o,time:a}=i[n],{pos:r,time:l}=i[s]):(t>=i[n].time&&t<=i[s].time&&({lo:n,hi:s}=vt(i,"time",t)),{time:o,pos:a}=i[n],{time:r,pos:l}=i[s]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class xn extends Ee{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Je(e,this.min),this._tableRange=Je(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,s=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r<a;++r)c=t[r],c>=e&&c<=n&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(r=0,a=s.length;r<a;++r)h=s[r+1],l=s[r-1],c=s[r],Math.round((h+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?t=this.normalize(e.concat(n)):t=e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Je(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return Je(this._table,n*this._tableRange+this._minPos,!0)}}A(xn,"id","timeseries"),A(xn,"defaults",Ee.defaults);var pf=Object.freeze({__proto__:null,CategoryScale:pn,LinearScale:gn,LogarithmicScale:mn,RadialLinearScale:xe,TimeScale:Ee,TimeSeriesScale:xn});const Of=[yh,Ku,Wd,pf];export{Vt as C,vf as G,Sf as H,Wr as I,yf as O,mf as R,bf as Y,Mf as a,wf as b,kf as i,xf as j,Af as l,_f as q,Of as r};