System.register(["./antdv-legacy-069f5173.js"],(function(t,e){"use strict";var n;return{setters:[t=>{n=t.c}],execute:function(){t({G:function(t,e){if("sin"===t)return f(e,(t=>(Math.cosh(2*t)-1)/(d-1)));if("tan"===t){const t=t=>1*Math.tanh(3*t)/g;return f(e,(e=>1-t(1-e)),t)}if("sec"===t){const t=t=>1/Math.cosh(t);return f(e,(e=>1-2*(t(e*p)-.5)))}throw new TypeError("Unexpected parameters are delivered in hyper timing function.")},H:function(t,e,...n){const i=[t].concat(n);i.push(e);const r=i.length,s=Array(r).fill(0).map(((t,e)=>u(e,r-1)));return t=>{const e=s.map(((e,n)=>e*i[n][0]*(1-t)**(r-n-1)*t**n)),n=s.map(((e,n)=>e*i[n][1]*(1-t)**(r-n-1)*t**n));return[c(...e),c(...n)]}},O:function(){return t=>t},R:async function(t){return new Promise((e=>setTimeout(e,t)))},c:function(t,e){if(!Number.isInteger(t))throw new TypeError("The first parameter of power timing function only allow integer.");return f(e,(e=>e**t))},q:function(...t){const e=[0].concat(t);e.push(1);const n=e.length,i=Array(n).fill(0).map(((t,e)=>u(e,n-1)));return t=>{const r=i.map(((i,r)=>i*e[r]*(1-t)**(n-r-1)*t**r));return c(...r)}}});var e=Object.defineProperty,i=(t,n,i)=>(((t,n,i)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i})(t,"symbol"!=typeof n?n+"":n,i),i);let r=[];const s=t=>{for(const n of r)if("running"===n.status)try{for(const e of n.funcs)e(t-n.startTime)}catch(e){n.destroy(),console.error(e)}requestAnimationFrame(s)};requestAnimationFrame(s);class o{constructor(){i(this,"funcs",[]),i(this,"status","stop"),i(this,"startTime",0),this.status="running",r.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((e=>e===t));if(-1===e)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",r=r.filter((t=>t!==this))}}t("I",o);class a{constructor(){i(this,"timing"),i(this,"relation","absolute"),i(this,"easeTime",0),i(this,"applying",{}),i(this,"getTime",Date.now),i(this,"ticker",new o),i(this,"value",{}),i(this,"listener",{}),this.timing=t=>t}async all(){if(Object.values(this.applying).every((t=>!0===t)))throw new ReferenceError("There is no animates to be waited.");await new Promise((t=>{const e=()=>{Object.values(this.applying).every((t=>!1===t))&&(this.unlisten("end",e),t("all animated."))};this.listen("end",e)}))}async n(t){const e=Object.values(this.applying).filter((t=>!0===t)).length;if(e{const i=()=>{n++,n===t&&(this.unlisten("end",i),e(`${t} animated.`))};this.listen("end",i)}))}async w(t){if(!1===this.applying[t])throw new ReferenceError(`The ${t} animate is not animating.`);await new Promise((e=>{const n=()=>{!1===this.applying[t]&&(this.unlisten("end",n),e(`${t} animated.`))};this.listen("end",n)}))}listen(t,e){var n;null!=(n=this.listener)[t]||(n[t]=[]),this.listener[t].push(e)}unlisten(t,e){const n=this.listener[t].findIndex((t=>t===e));if(-1===n)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((e=>t.includes(e[0])));for(const[n,i]of e)for(const t of i)t(this,n)}}function l(t){return null!=t}t("Y",class extends a{constructor(){super(),i(this,"shakeTiming"),i(this,"path"),i(this,"multiTiming"),i(this,"value",{}),i(this,"size",1),i(this,"angle",0),i(this,"targetValue",{system:{move:[0,0],moveAs:[0,0],resize:0,rotate:0,shake:0,"@@bind":[]},custom:{}}),i(this,"animateFn",{system:{move:[()=>0,()=>0],moveAs:()=>0,resize:()=>0,rotate:()=>0,shake:()=>0,"@@bind":()=>0},custom:{}}),i(this,"ox",0),i(this,"oy",0),i(this,"sx",0),i(this,"sy",0),i(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(l(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"number"==typeof t(0)?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!0===this.applying["@@bind"]&&this.end(!1,"@@bind"),this.bindInfo=t,this}unbind(){return!0===this.applying["@@bind"]&&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){!0===this.applying.shake&&this.end(!0,"shake"),this.applying.shake=!0;const{easeTime:n,shakeTiming:i}=this,r=this.getTime();this.hook("start","shakestart");const s=()=>{const o=this.getTime()-r;o>n&&(this.ticker.remove(s),this.applying.shake=!1,this.sx=0,this.sy=0,this.hook("end","shakeend"));const a=i(o/n);this.sx=a*t,this.sy=a*e};return this.ticker.add(s),this.animateFn.system.shake=s,this}moveAs(t){this.applying.moveAs&&this.end(!0,"moveAs"),this.applying.moveAs=!0,this.path=t;const{easeTime:e,relation:n,timing:i}=this,r=this.getTime(),[s,o]=[this.x,this.y],[a,l]=(()=>{if("absolute"===n)return t(1);{const[e,n]=t(1);return[s+e,o+n]}})();this.hook("start","movestart");const c=()=>{const a=this.getTime()-r;if(a>e)return void this.end(!0,"moveAs");const l=a/e,[c,h]=t(i(l));"absolute"===n?(this.ox=c,this.oy=h):(this.ox=s+c,this.oy=o+h)};return this.ticker.add(c,!0),this.animateFn.system.moveAs=c,this.targetValue.system.moveAs=[a,l],this}register(t,e){if("number"==typeof this.value[t])return this.error(`Property ${t} has been regietered twice.`,"reregister");this.value[t]=e,this.applying[t]=!1}apply(t,e,n=!1){!0===this.applying[t]&&this.end(!1,t),t in this.value||this.error(`You are trying to execute nonexistent property ${t}.`),this.applying[t]=!0;const i=this.value[t],r=this.getTime(),{timing:s,relation:o,easeTime:a}=this,l="absolute"===o?e-i:e;this.hook("start");const c=()=>{const e=this.getTime()-r;if(e>a)return void this.end(!1,t);const n=s(e/a);this.value[t]=i+n*l};return this.ticker.add(c,n),this.animateFn.custom[t]=c,this.targetValue.custom[t]=l+i,this}applyMulti(t=!1){!0===this.applying["@@bind"]&&this.end(!1,"@@bind"),this.applying["@@bind"]=!0;const e=this.bindInfo,n=e.map((t=>this.value[t])),i=this.getTime(),{multiTiming:r,relation:s,easeTime:o}=this,a=r(1);if(a.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: ${a.length}`);this.hook("start");const l=()=>{const t=this.getTime()-i;if(t>o)return void this.end(!1,"@@bind");const a=r(t/o);e.forEach(((t,e)=>{this.value[t]="absolute"===s?a[e]:n[e]+a[e]}))};return this.ticker.add(l,t),this.animateFn.custom["@@bind"]=l,this.targetValue.system["@@bind"]=a,this}applySys(t,e,n){"move"!==n&&!0===this.applying[n]&&this.end(!0,n),this.applying[n]=!0;const i=this[t],r=this.getTime(),s=this.timing,o=this.relation,a=this.easeTime,l="absolute"===o?e-i:e;this.hook("start",`${n}start`);const c=()=>{const e=this.getTime()-r;if(e>a)return void this.end(!0,n);const o=s(e/a);this[t]=i+l*o,"oy"!==t&&this.hook(n)};this.ticker.add(c,!0),"ox"===t?this.animateFn.system.move[0]=c:"oy"===t?this.animateFn.system.move[1]=c:this.animateFn.system[n]=c,"move"===n?("ox"===t&&(this.targetValue.system.move[0]=l+i),"oy"===t&&(this.targetValue.system.move[1]=l+i)):"shake"!==n&&(this.targetValue.system[n]=l+i)}error(t,e){throw"repeat"===e?new Error(`Cannot execute the same animation twice. Info: ${t}`):"reregister"===e?new Error(`Cannot register a animated property twice. Info: ${t}`):new Error(t)}end(t,e){if(!0===t)if(this.applying[e]=!1,"move"===e?(this.ticker.remove(this.animateFn.system.move[0]),this.ticker.remove(this.animateFn.system.move[1])):"moveAs"===e?this.ticker.remove(this.animateFn.system.moveAs):"@@bind"===e?this.ticker.remove(this.animateFn.system["@@bind"]):this.ticker.remove(this.animateFn.system[e]),"move"===e){const[t,e]=this.targetValue.system.move;this.ox=t,this.oy=e,this.hook("moveend","end")}else if("moveAs"===e){const[t,e]=this.targetValue.system.moveAs;this.ox=t,this.oy=e,this.hook("moveend","end")}else"rotate"===e?(this.angle=this.targetValue.system.rotate,this.hook("rotateend","end")):"resize"===e?(this.size=this.targetValue.system.resize,this.hook("resizeend","end")):"@@bind"===e?this.bindInfo.forEach(((t,e)=>{this.value[t]=this.targetValue.system["@@bind"][e]})):(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")}}),t("j",class extends a{constructor(){super(),i(this,"now",{}),i(this,"target",{}),i(this,"transitionFn",{}),i(this,"value"),i(this,"handleSet",((t,e,n)=>(this.transition(e,n),!0))),i(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(!l(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(),i=this.easeTime,r=this.timing,s=this.now[t],o=e+("absolute"===this.relation?0:s),a=o-s;this.target[t]=o;const c=()=>{const e=this.getTime()-n;e>=i&&this.end(t);const o=e/i;this.now[t]=r(o)*a+s,this.hook("running")};return this.transitionFn[t]=c,this.ticker.add(c),this}end(t,e=!1){if(!l(this.transitionFn[t]))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 c=(...t)=>t.reduce(((t,e)=>t+e),0),h=t=>{if(0===t)return 1;let e=t;for(;t>1;)e*=--t;return e},u=(t,e)=>Math.round(h(e)/(h(t)*h(e-t))),f=(t,e,n=(t=>1-e(1-t)))=>"in"===t?e:"out"===t?n:"in-out"===t?t=>t<.5?e(2*t)/2:.5+n(2*(t-.5))/2:t=>t<.5?n(2*t)/2:.5+e(2*(t-.5))/2,d=Math.cosh(2),p=Math.acosh(2),g=Math.tanh(3);var m=t("l",{}),b={get exports(){return m},set exports(e){t("l",m=e)}};function _(t,e){return function(){return t.apply(e,arguments)}} /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ !function(t,e){(function(){var i,r="Expected a function",s="__lodash_hash_undefined__",o="__lodash_placeholder__",a=16,l=32,c=64,h=128,u=256,f=1/0,d=9007199254740991,p=NaN,g=4294967295,m=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",l],["partialRight",c],["rearg",u]],b="[object Arguments]",_="[object Array]",y="[object Boolean]",x="[object Date]",v="[object Error]",w="[object Function]",k="[object GeneratorFunction]",M="[object Map]",S="[object Number]",O="[object Object]",A="[object Promise]",P="[object RegExp]",E="[object Set]",T="[object String]",C="[object Symbol]",D="[object WeakMap]",R="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",F="[object Float64Array]",z="[object Int8Array]",j="[object Int16Array]",B="[object Int32Array]",N="[object Uint8Array]",V="[object Uint8ClampedArray]",W="[object Uint16Array]",H="[object Uint32Array]",U=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,K=RegExp(q.source),J=RegExp(X.source),G=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(it.source),st=/^\s+/,ot=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ut=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,gt=/^[-+]0x[0-9a-f]+$/i,mt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,xt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,kt="\\ud800-\\udfff",Mt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",Ot="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",Pt="\\ufe0e\\ufe0f",Et="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tt="['’]",Ct="["+kt+"]",Dt="["+Et+"]",Rt="["+Mt+"]",Lt="\\d+",It="["+St+"]",Ft="["+Ot+"]",zt="[^"+kt+Et+Lt+St+Ot+At+"]",jt="\\ud83c[\\udffb-\\udfff]",Bt="[^"+kt+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Vt="[\\ud800-\\udbff][\\udc00-\\udfff]",Wt="["+At+"]",Ht="\\u200d",Ut="(?:"+Ft+"|"+zt+")",$t="(?:"+Wt+"|"+zt+")",Yt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Xt="(?:"+Rt+"|"+jt+")?",Kt="["+Pt+"]?",Jt=Kt+Xt+"(?:"+Ht+"(?:"+[Bt,Nt,Vt].join("|")+")"+Kt+Xt+")*",Gt="(?:"+[It,Nt,Vt].join("|")+")"+Jt,Zt="(?:"+[Bt+Rt+"?",Rt,Nt,Vt,Ct].join("|")+")",Qt=RegExp(Tt,"g"),te=RegExp(Rt,"g"),ee=RegExp(jt+"(?="+jt+")|"+Zt+Jt,"g"),ne=RegExp([Wt+"?"+Ft+"+"+Yt+"(?="+[Dt,Wt,"$"].join("|")+")",$t+"+"+qt+"(?="+[Dt,Wt+Ut,"$"].join("|")+")",Wt+"?"+Ut+"+"+Yt,Wt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Lt,Gt].join("|"),"g"),ie=RegExp("["+Ht+kt+Mt+Pt+"]"),re=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,se=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oe=-1,ae={};ae[I]=ae[F]=ae[z]=ae[j]=ae[B]=ae[N]=ae[V]=ae[W]=ae[H]=!0,ae[b]=ae[_]=ae[R]=ae[y]=ae[L]=ae[x]=ae[v]=ae[w]=ae[M]=ae[S]=ae[O]=ae[P]=ae[E]=ae[T]=ae[D]=!1;var le={};le[b]=le[_]=le[R]=le[L]=le[y]=le[x]=le[I]=le[F]=le[z]=le[j]=le[B]=le[M]=le[S]=le[O]=le[P]=le[E]=le[T]=le[C]=le[N]=le[V]=le[W]=le[H]=!0,le[v]=le[w]=le[D]=!1;var ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,ue=parseInt,fe="object"==typeof n&&n&&n.Object===Object&&n,de="object"==typeof self&&self&&self.Object===Object&&self,pe=fe||de||Function("return this")(),ge=e&&!e.nodeType&&e,me=ge&&t&&!t.nodeType&&t,be=me&&me.exports===ge,_e=be&&fe.process,ye=function(){try{var t=me&&me.require&&me.require("util").types;return t||_e&&_e.binding&&_e.binding("util")}catch(e){}}(),xe=ye&&ye.isArrayBuffer,ve=ye&&ye.isDate,we=ye&&ye.isMap,ke=ye&&ye.isRegExp,Me=ye&&ye.isSet,Se=ye&&ye.isTypedArray;function Oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ae(t,e,n,i){for(var r=-1,s=null==t?0:t.length;++r-1}function Re(t,e,n){for(var i=-1,r=null==t?0:t.length;++i-1;);return n}function nn(t,e){for(var n=t.length;n--&&We(e,t[n],0)>-1;);return n}var rn=qe({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),sn=qe({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(t){return"\\"+ce[t]}function an(t){return ie.test(t)}function ln(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function cn(t,e){return function(n){return t(e(n))}}function hn(t,e){for(var n=-1,i=t.length,r=0,s=[];++n",""":'"',"'":"'"}),bn=function t(e){var n=(e=null==e?pe:bn.defaults(pe.Object(),e,bn.pick(pe,se))).Array,ot=e.Date,kt=e.Error,Mt=e.Function,St=e.Math,Ot=e.Object,At=e.RegExp,Pt=e.String,Et=e.TypeError,Tt=n.prototype,Ct=Mt.prototype,Dt=Ot.prototype,Rt=e["__core-js_shared__"],Lt=Ct.toString,It=Dt.hasOwnProperty,Ft=0,zt=function(){var t=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),jt=Dt.toString,Bt=Lt.call(Ot),Nt=pe._,Vt=At("^"+Lt.call(It).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wt=be?e.Buffer:i,Ht=e.Symbol,Ut=e.Uint8Array,$t=Wt?Wt.allocUnsafe:i,Yt=cn(Ot.getPrototypeOf,Ot),qt=Ot.create,Xt=Dt.propertyIsEnumerable,Kt=Tt.splice,Jt=Ht?Ht.isConcatSpreadable:i,Gt=Ht?Ht.iterator:i,Zt=Ht?Ht.toStringTag:i,ee=function(){try{var t=us(Ot,"defineProperty");return t({},"",{}),t}catch(e){}}(),ie=e.clearTimeout!==pe.clearTimeout&&e.clearTimeout,ce=ot&&ot.now!==pe.Date.now&&ot.now,fe=e.setTimeout!==pe.setTimeout&&e.setTimeout,de=St.ceil,ge=St.floor,me=Ot.getOwnPropertySymbols,_e=Wt?Wt.isBuffer:i,ye=e.isFinite,Be=Tt.join,qe=cn(Ot.keys,Ot),_n=St.max,yn=St.min,xn=ot.now,vn=e.parseInt,wn=St.random,kn=Tt.reverse,Mn=us(e,"DataView"),Sn=us(e,"Map"),On=us(e,"Promise"),An=us(e,"Set"),Pn=us(e,"WeakMap"),En=us(Ot,"create"),Tn=Pn&&new Pn,Cn={},Dn=zs(Mn),Rn=zs(Sn),Ln=zs(On),In=zs(An),Fn=zs(Pn),zn=Ht?Ht.prototype:i,jn=zn?zn.valueOf:i,Bn=zn?zn.toString:i;function Nn(t){if(ea(t)&&!Uo(t)&&!(t instanceof Un)){if(t instanceof Hn)return t;if(It.call(t,"__wrapped__"))return js(t)}return new Hn(t)}var Vn=function(){function t(){}return function(e){if(!ta(e))return{};if(qt)return qt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Wn(){}function Hn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function $n(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function li(t,e,n,r,s,o){var a,l=1&e,c=2&e,h=4&e;if(n&&(a=s?n(t,r,s,o):n(t)),a!==i)return a;if(!ta(t))return t;var u=Uo(t);if(u){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&It.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!l)return Er(t,a)}else{var f=ps(t),d=f==w||f==k;if(Xo(t))return kr(t,l);if(f==O||f==b||d&&!s){if(a=c||d?{}:ms(t),!l)return c?function(t,e){return Tr(t,ds(t),e)}(t,function(t,e){return t&&Tr(e,Da(e),t)}(a,t)):function(t,e){return Tr(t,fs(t),e)}(t,ri(a,t))}else{if(!le[f])return s?t:{};a=function(t,e,n){var i,r=t.constructor;switch(e){case R:return Mr(t);case y:case x:return new r(+t);case L:return function(t,e){var n=e?Mr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case I:case F:case z:case j:case B:case N:case V:case W:case H:return Sr(t,n);case M:return new r;case S:case T:return new r(t);case P:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case E:return new r;case C:return i=t,jn?Ot(jn.call(i)):{}}}(t,f,l)}}o||(o=new Kn);var p=o.get(t);if(p)return p;o.set(t,a),oa(t)?t.forEach((function(i){a.add(li(i,e,n,i,t,o))})):na(t)&&t.forEach((function(i,r){a.set(r,li(i,e,n,r,t,o))}));var g=u?i:(h?c?rs:is:c?Da:Ca)(t);return Pe(g||t,(function(i,r){g&&(i=t[r=i]),ei(a,r,li(i,e,n,r,t,o))})),a}function ci(t,e,n){var r=n.length;if(null==t)return!r;for(t=Ot(t);r--;){var s=n[r],o=e[s],a=t[s];if(a===i&&!(s in t)||!o(a))return!1}return!0}function hi(t,e,n){if("function"!=typeof t)throw new Et(r);return Ts((function(){t.apply(i,n)}),e)}function ui(t,e,n,i){var r=-1,s=De,o=!0,a=t.length,l=[],c=e.length;if(!a)return l;n&&(e=Le(e,Ze(n))),i?(s=Re,o=!1):e.length>=200&&(s=tn,o=!1,e=new Xn(e));t:for(;++r-1},Yn.prototype.set=function(t,e){var n=this.__data__,i=ni(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(Sn||Yn),string:new $n}},qn.prototype.delete=function(t){var e=cs(this,t).delete(t);return this.size-=e?1:0,e},qn.prototype.get=function(t){return cs(this,t).get(t)},qn.prototype.has=function(t){return cs(this,t).has(t)},qn.prototype.set=function(t,e){var n=cs(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},Xn.prototype.add=Xn.prototype.push=function(t){return this.__data__.set(t,s),this},Xn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Yn){var i=n.__data__;if(!Sn||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new qn(i)}return n.set(t,e),this.size=n.size,this};var fi=Rr(xi),di=Rr(vi,!0);function pi(t,e){var n=!0;return fi(t,(function(t,i,r){return n=!!e(t,i,r)})),n}function gi(t,e,n){for(var r=-1,s=t.length;++r0&&n(a)?e>1?bi(a,e-1,n,i,r):Ie(r,a):i||(r[r.length]=a)}return r}var _i=Lr(),yi=Lr(!0);function xi(t,e){return t&&_i(t,e,Ca)}function vi(t,e){return t&&yi(t,e,Ca)}function wi(t,e){return Ce(e,(function(e){return Go(t[e])}))}function ki(t,e){for(var n=0,r=(e=yr(e,t)).length;null!=t&&ne}function Ai(t,e){return null!=t&&It.call(t,e)}function Pi(t,e){return null!=t&&e in Ot(t)}function Ei(t,e,r){for(var s=r?Re:De,o=t[0].length,a=t.length,l=a,c=n(a),h=1/0,u=[];l--;){var f=t[l];l&&e&&(f=Le(f,Ze(e))),h=yn(f.length,h),c[l]=!r&&(e||o>=120&&f.length>=120)?new Xn(l&&f):i}f=t[0];var d=-1,p=c[0];t:for(;++d=a?l:l*("desc"==n[i]?-1:1)}return t.index-e.index}(t,e,n)}))}function $i(t,e,n){for(var i=-1,r=e.length,s={};++i-1;)a!==t&&Kt.call(a,l,1),Kt.call(t,l,1);return t}function qi(t,e){for(var n=t?e.length:0,i=n-1;n--;){var r=e[n];if(n==i||r!==s){var s=r;_s(r)?Kt.call(t,r,1):ur(t,r)}}return t}function Xi(t,e){return t+ge(wn()*(e-t+1))}function Ki(t,e){var n="";if(!t||e<1||e>d)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Ji(t,e){return Cs(Os(t,e,il),t+"")}function Gi(t){return Gn(Na(t))}function Zi(t,e){var n=Na(t);return Ls(n,ai(e,0,n.length))}function Qi(t,e,n,r){if(!ta(t))return t;for(var s=-1,o=(e=yr(e,t)).length,a=o-1,l=t;null!=l&&++ss?0:s+e),(i=i>s?s:i)<0&&(i+=s),s=e>i?0:i-e>>>0,e>>>=0;for(var o=n(s);++r>>1,o=t[s];null!==o&&!la(o)&&(n?o<=e:o=200){var c=e?null:Kr(t);if(c)return un(c);o=!1,r=tn,l=new Xn}else l=e?[]:a;t:for(;++i=r?t:ir(t,e,n)}var wr=ie||function(t){return pe.clearTimeout(t)};function kr(t,e){if(e)return t.slice();var n=t.length,i=$t?$t(n):new t.constructor(n);return t.copy(i),i}function Mr(t){var e=new t.constructor(t.byteLength);return new Ut(e).set(new Ut(t)),e}function Sr(t,e){var n=e?Mr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Or(t,e){if(t!==e){var n=t!==i,r=null===t,s=t==t,o=la(t),a=e!==i,l=null===e,c=e==e,h=la(e);if(!l&&!h&&!o&&t>e||o&&a&&c&&!l&&!h||r&&a&&c||!n&&c||!s)return 1;if(!r&&!o&&!h&&t1?n[s-1]:i,a=s>2?n[2]:i;for(o=t.length>3&&"function"==typeof o?(s--,o):i,a&&ys(n[0],n[1],a)&&(o=s<3?i:o,s=1),e=Ot(e);++r-1?s[o?e[a]:a]:i}}function Br(t){return ns((function(e){var n=e.length,s=n,o=Hn.prototype.thru;for(t&&e.reverse();s--;){var a=e[s];if("function"!=typeof a)throw new Et(r);if(o&&!l&&"wrapper"==os(a))var l=new Hn([],!0)}for(s=l?s:n;++s1&&x.reverse(),d&&ul))return!1;var h=o.get(t),u=o.get(e);if(h&&u)return h==e&&u==t;var f=-1,d=!0,p=2&n?new Xn:i;for(o.set(t,e),o.set(e,t);++f-1&&t%1==0&&t1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(i,function(t,e){return Pe(m,(function(n){var i="_."+n[0];e&n[1]&&!De(t,i)&&t.push(i)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(ct):[]}(i),n)))}function Rs(t){var e=0,n=0;return function(){var r=xn(),s=16-(r-n);if(n=r,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Ls(t,e){var n=-1,r=t.length,s=r-1;for(e=e===i?r:e;++n1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,ro(t,n)}));function uo(t){var e=Nn(t);return e.__chain__=!0,e}function fo(t,e){return e(t)}var po=ns((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,s=function(e){return oi(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Un&&_s(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:fo,args:[s],thisArg:i}),new Hn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(s)})),go=Cr((function(t,e,n){It.call(t,n)?++t[n]:si(t,n,1)})),mo=jr(Ws),bo=jr(Hs);function _o(t,e){return(Uo(t)?Pe:fi)(t,ls(e,3))}function yo(t,e){return(Uo(t)?Ee:di)(t,ls(e,3))}var xo=Cr((function(t,e,n){It.call(t,n)?t[n].push(e):si(t,n,[e])})),vo=Ji((function(t,e,i){var r=-1,s="function"==typeof e,o=Yo(t)?n(t.length):[];return fi(t,(function(t){o[++r]=s?Oe(e,t,i):Ti(t,e,i)})),o})),wo=Cr((function(t,e,n){si(t,n,e)}));function ko(t,e){return(Uo(t)?Le:Bi)(t,ls(e,3))}var Mo=Cr((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),So=Ji((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ys(t,e[0],e[1])?e=[]:n>2&&ys(e[0],e[1],e[2])&&(e=[e[0]]),Ui(t,bi(e,1),[])})),Oo=ce||function(){return pe.Date.now()};function Ao(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Gr(t,h,i,i,i,i,e)}function Po(t,e){var n;if("function"!=typeof e)throw new Et(r);return t=pa(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Eo=Ji((function(t,e,n){var i=1;if(n.length){var r=hn(n,as(Eo));i|=l}return Gr(t,i,e,n,r)})),To=Ji((function(t,e,n){var i=3;if(n.length){var r=hn(n,as(To));i|=l}return Gr(e,i,t,n,r)}));function Co(t,e,n){var s,o,a,l,c,h,u=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new Et(r);function g(e){var n=s,r=o;return s=o=i,u=e,l=t.apply(r,n)}function m(t){var n=t-h;return h===i||n>=e||n<0||d&&t-u>=a}function b(){var t=Oo();if(m(t))return _(t);c=Ts(b,function(t){var n=e-(t-h);return d?yn(n,a-(t-u)):n}(t))}function _(t){return c=i,p&&s?g(t):(s=o=i,l)}function y(){var t=Oo(),n=m(t);if(s=arguments,o=this,h=t,n){if(c===i)return function(t){return u=t,c=Ts(b,e),f?g(t):l}(h);if(d)return wr(c),c=Ts(b,e),g(h)}return c===i&&(c=Ts(b,e)),l}return e=ma(e)||0,ta(n)&&(f=!!n.leading,a=(d="maxWait"in n)?_n(ma(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),y.cancel=function(){c!==i&&wr(c),u=0,s=h=o=c=i},y.flush=function(){return c===i?l:_(Oo())},y}var Do=Ji((function(t,e){return hi(t,1,e)})),Ro=Ji((function(t,e,n){return hi(t,ma(e)||0,n)}));function Lo(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Et(r);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=t.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(Lo.Cache||qn),n}function Io(t){if("function"!=typeof t)throw new Et(r);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Lo.Cache=qn;var Fo=xr((function(t,e){var n=(e=1==e.length&&Uo(e[0])?Le(e[0],Ze(ls())):Le(bi(e,1),Ze(ls()))).length;return Ji((function(i){for(var r=-1,s=yn(i.length,n);++r=e})),Ho=Ci(function(){return arguments}())?Ci:function(t){return ea(t)&&It.call(t,"callee")&&!Xt.call(t,"callee")},Uo=n.isArray,$o=xe?Ze(xe):function(t){return ea(t)&&Si(t)==R};function Yo(t){return null!=t&&Qo(t.length)&&!Go(t)}function qo(t){return ea(t)&&Yo(t)}var Xo=_e||ml,Ko=ve?Ze(ve):function(t){return ea(t)&&Si(t)==x};function Jo(t){if(!ea(t))return!1;var e=Si(t);return e==v||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Go(t){if(!ta(t))return!1;var e=Si(t);return e==w||e==k||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Zo(t){return"number"==typeof t&&t==pa(t)}function Qo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=d}function ta(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ea(t){return null!=t&&"object"==typeof t}var na=we?Ze(we):function(t){return ea(t)&&ps(t)==M};function ia(t){return"number"==typeof t||ea(t)&&Si(t)==S}function ra(t){if(!ea(t)||Si(t)!=O)return!1;var e=Yt(t);if(null===e)return!0;var n=It.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==Bt}var sa=ke?Ze(ke):function(t){return ea(t)&&Si(t)==P},oa=Me?Ze(Me):function(t){return ea(t)&&ps(t)==E};function aa(t){return"string"==typeof t||!Uo(t)&&ea(t)&&Si(t)==T}function la(t){return"symbol"==typeof t||ea(t)&&Si(t)==C}var ca=Se?Ze(Se):function(t){return ea(t)&&Qo(t.length)&&!!ae[Si(t)]},ha=Yr(ji),ua=Yr((function(t,e){return t<=e}));function fa(t){if(!t)return[];if(Yo(t))return aa(t)?pn(t):Er(t);if(Gt&&t[Gt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Gt]());var e=ps(t);return(e==M?ln:e==E?un:Na)(t)}function da(t){return t?(t=ma(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function pa(t){var e=da(t),n=e%1;return e==e?n?e-n:e:0}function ga(t){return t?ai(pa(t),0,g):0}function ma(t){if("number"==typeof t)return t;if(la(t))return p;if(ta(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ta(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=mt.test(t);return n||_t.test(t)?ue(t.slice(2),n?2:8):gt.test(t)?p:+t}function ba(t){return Tr(t,Da(t))}function _a(t){return null==t?"":cr(t)}var ya=Dr((function(t,e){if(ks(e)||Yo(e))Tr(e,Ca(e),t);else for(var n in e)It.call(e,n)&&ei(t,n,e[n])})),xa=Dr((function(t,e){Tr(e,Da(e),t)})),va=Dr((function(t,e,n,i){Tr(e,Da(e),t,i)})),wa=Dr((function(t,e,n,i){Tr(e,Ca(e),t,i)})),ka=ns(oi),Ma=Ji((function(t,e){t=Ot(t);var n=-1,r=e.length,s=r>2?e[2]:i;for(s&&ys(e[0],e[1],s)&&(r=1);++n1),e})),Tr(t,rs(t),n),i&&(n=li(n,7,ts));for(var r=e.length;r--;)ur(n,e[r]);return n})),Fa=ns((function(t,e){return null==t?{}:function(t,e){return $i(t,e,(function(e,n){return Aa(t,n)}))}(t,e)}));function za(t,e){if(null==t)return{};var n=Le(rs(t),(function(t){return[t]}));return e=ls(e),$i(t,n,(function(t,n){return e(t,n[0])}))}var ja=Jr(Ca),Ba=Jr(Da);function Na(t){return null==t?[]:Qe(t,Ca(t))}var Va=Fr((function(t,e,n){return e=e.toLowerCase(),t+(n?Wa(e):e)}));function Wa(t){return Ja(_a(t).toLowerCase())}function Ha(t){return(t=_a(t))&&t.replace(xt,rn).replace(te,"")}var Ua=Fr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),$a=Fr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ya=Ir("toLowerCase"),qa=Fr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Xa=Fr((function(t,e,n){return t+(n?" ":"")+Ja(e)})),Ka=Fr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ja=Ir("toUpperCase");function Ga(t,e,n){return t=_a(t),(e=n?i:e)===i?function(t){return re.test(t)}(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.match(ht)||[]}(t):t.match(e)||[]}var Za=Ji((function(t,e){try{return Oe(t,i,e)}catch(n){return Jo(n)?n:new kt(n)}})),Qa=ns((function(t,e){return Pe(e,(function(e){e=Fs(e),si(t,e,Eo(t[e],t))})),t}));function tl(t){return function(){return t}}var el=Br(),nl=Br(!0);function il(t){return t}function rl(t){return Ii("function"==typeof t?t:li(t,1))}var sl=Ji((function(t,e){return function(n){return Ti(n,t,e)}})),ol=Ji((function(t,e){return function(n){return Ti(t,n,e)}}));function al(t,e,n){var i=Ca(e),r=wi(e,i);null!=n||ta(e)&&(r.length||!i.length)||(n=e,e=t,t=this,r=wi(e,Ca(e)));var s=!(ta(n)&&"chain"in n&&!n.chain),o=Go(t);return Pe(r,(function(n){var i=e[n];t[n]=i,o&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=Er(this.__actions__)).push({func:i,args:arguments,thisArg:t}),n.__chain__=e,n}return i.apply(t,Ie([this.value()],arguments))})})),t}function ll(){}var cl=Hr(Le),hl=Hr(Te),ul=Hr(je);function fl(t){return xs(t)?Ye(Fs(t)):function(t){return function(e){return ki(e,t)}}(t)}var dl=$r(),pl=$r(!0);function gl(){return[]}function ml(){return!1}var bl,_l=Wr((function(t,e){return t+e}),0),yl=Xr("ceil"),xl=Wr((function(t,e){return t/e}),1),vl=Xr("floor"),wl=Wr((function(t,e){return t*e}),1),kl=Xr("round"),Ml=Wr((function(t,e){return t-e}),0);return Nn.after=function(t,e){if("function"!=typeof e)throw new Et(r);return t=pa(t),function(){if(--t<1)return e.apply(this,arguments)}},Nn.ary=Ao,Nn.assign=ya,Nn.assignIn=xa,Nn.assignInWith=va,Nn.assignWith=wa,Nn.at=ka,Nn.before=Po,Nn.bind=Eo,Nn.bindAll=Qa,Nn.bindKey=To,Nn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Uo(t)?t:[t]},Nn.chain=uo,Nn.chunk=function(t,e,r){e=(r?ys(t,e,r):e===i)?1:_n(pa(e),0);var s=null==t?0:t.length;if(!s||e<1)return[];for(var o=0,a=0,l=n(de(s/e));os?0:s+n),(r=r===i||r>s?s:pa(r))<0&&(r+=s),r=n>r?0:ga(r);n>>0)?(t=_a(t))&&("string"==typeof e||null!=e&&!sa(e))&&!(e=cr(e))&&an(t)?vr(pn(t),0,n):t.split(e,n):[]},Nn.spread=function(t,e){if("function"!=typeof t)throw new Et(r);return e=null==e?0:_n(pa(e),0),Ji((function(n){var i=n[e],r=vr(n,0,e);return i&&Ie(r,i),Oe(t,this,r)}))},Nn.tail=function(t){var e=null==t?0:t.length;return e?ir(t,1,e):[]},Nn.take=function(t,e,n){return t&&t.length?ir(t,0,(e=n||e===i?1:pa(e))<0?0:e):[]},Nn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ir(t,(e=r-(e=n||e===i?1:pa(e)))<0?0:e,r):[]},Nn.takeRightWhile=function(t,e){return t&&t.length?dr(t,ls(e,3),!1,!0):[]},Nn.takeWhile=function(t,e){return t&&t.length?dr(t,ls(e,3)):[]},Nn.tap=function(t,e){return e(t),t},Nn.throttle=function(t,e,n){var i=!0,s=!0;if("function"!=typeof t)throw new Et(r);return ta(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),Co(t,e,{leading:i,maxWait:e,trailing:s})},Nn.thru=fo,Nn.toArray=fa,Nn.toPairs=ja,Nn.toPairsIn=Ba,Nn.toPath=function(t){return Uo(t)?Le(t,Fs):la(t)?[t]:Er(Is(_a(t)))},Nn.toPlainObject=ba,Nn.transform=function(t,e,n){var i=Uo(t),r=i||Xo(t)||ca(t);if(e=ls(e,4),null==n){var s=t&&t.constructor;n=r?i?new s:[]:ta(t)&&Go(s)?Vn(Yt(t)):{}}return(r?Pe:xi)(t,(function(t,i,r){return e(n,t,i,r)})),n},Nn.unary=function(t){return Ao(t,1)},Nn.union=to,Nn.unionBy=eo,Nn.unionWith=no,Nn.uniq=function(t){return t&&t.length?hr(t):[]},Nn.uniqBy=function(t,e){return t&&t.length?hr(t,ls(e,2)):[]},Nn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?hr(t,i,e):[]},Nn.unset=function(t,e){return null==t||ur(t,e)},Nn.unzip=io,Nn.unzipWith=ro,Nn.update=function(t,e,n){return null==t?t:fr(t,e,_r(n))},Nn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:fr(t,e,_r(n),r)},Nn.values=Na,Nn.valuesIn=function(t){return null==t?[]:Qe(t,Da(t))},Nn.without=so,Nn.words=Ga,Nn.wrap=function(t,e){return zo(_r(e),t)},Nn.xor=oo,Nn.xorBy=ao,Nn.xorWith=lo,Nn.zip=co,Nn.zipObject=function(t,e){return mr(t||[],e||[],ei)},Nn.zipObjectDeep=function(t,e){return mr(t||[],e||[],Qi)},Nn.zipWith=ho,Nn.entries=ja,Nn.entriesIn=Ba,Nn.extend=xa,Nn.extendWith=va,al(Nn,Nn),Nn.add=_l,Nn.attempt=Za,Nn.camelCase=Va,Nn.capitalize=Wa,Nn.ceil=yl,Nn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=ma(n))==n?n:0),e!==i&&(e=(e=ma(e))==e?e:0),ai(ma(t),e,n)},Nn.clone=function(t){return li(t,4)},Nn.cloneDeep=function(t){return li(t,5)},Nn.cloneDeepWith=function(t,e){return li(t,5,e="function"==typeof e?e:i)},Nn.cloneWith=function(t,e){return li(t,4,e="function"==typeof e?e:i)},Nn.conformsTo=function(t,e){return null==e||ci(t,e,Ca(e))},Nn.deburr=Ha,Nn.defaultTo=function(t,e){return null==t||t!=t?e:t},Nn.divide=xl,Nn.endsWith=function(t,e,n){t=_a(t),e=cr(e);var r=t.length,s=n=n===i?r:ai(pa(n),0,r);return(n-=e.length)>=0&&t.slice(n,s)==e},Nn.eq=No,Nn.escape=function(t){return(t=_a(t))&&J.test(t)?t.replace(X,sn):t},Nn.escapeRegExp=function(t){return(t=_a(t))&&rt.test(t)?t.replace(it,"\\$&"):t},Nn.every=function(t,e,n){var r=Uo(t)?Te:pi;return n&&ys(t,e,n)&&(e=i),r(t,ls(e,3))},Nn.find=mo,Nn.findIndex=Ws,Nn.findKey=function(t,e){return Ne(t,ls(e,3),xi)},Nn.findLast=bo,Nn.findLastIndex=Hs,Nn.findLastKey=function(t,e){return Ne(t,ls(e,3),vi)},Nn.floor=vl,Nn.forEach=_o,Nn.forEachRight=yo,Nn.forIn=function(t,e){return null==t?t:_i(t,ls(e,3),Da)},Nn.forInRight=function(t,e){return null==t?t:yi(t,ls(e,3),Da)},Nn.forOwn=function(t,e){return t&&xi(t,ls(e,3))},Nn.forOwnRight=function(t,e){return t&&vi(t,ls(e,3))},Nn.get=Oa,Nn.gt=Vo,Nn.gte=Wo,Nn.has=function(t,e){return null!=t&&gs(t,e,Ai)},Nn.hasIn=Aa,Nn.head=$s,Nn.identity=il,Nn.includes=function(t,e,n,i){t=Yo(t)?t:Na(t),n=n&&!i?pa(n):0;var r=t.length;return n<0&&(n=_n(r+n,0)),aa(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&We(t,e,n)>-1},Nn.indexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:pa(n);return r<0&&(r=_n(i+r,0)),We(t,e,r)},Nn.inRange=function(t,e,n){return e=da(e),n===i?(n=e,e=0):n=da(n),function(t,e,n){return t>=yn(e,n)&&t<_n(e,n)}(t=ma(t),e,n)},Nn.invoke=Ta,Nn.isArguments=Ho,Nn.isArray=Uo,Nn.isArrayBuffer=$o,Nn.isArrayLike=Yo,Nn.isArrayLikeObject=qo,Nn.isBoolean=function(t){return!0===t||!1===t||ea(t)&&Si(t)==y},Nn.isBuffer=Xo,Nn.isDate=Ko,Nn.isElement=function(t){return ea(t)&&1===t.nodeType&&!ra(t)},Nn.isEmpty=function(t){if(null==t)return!0;if(Yo(t)&&(Uo(t)||"string"==typeof t||"function"==typeof t.splice||Xo(t)||ca(t)||Ho(t)))return!t.length;var e=ps(t);if(e==M||e==E)return!t.size;if(ks(t))return!Fi(t).length;for(var n in t)if(It.call(t,n))return!1;return!0},Nn.isEqual=function(t,e){return Di(t,e)},Nn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Di(t,e,i,n):!!r},Nn.isError=Jo,Nn.isFinite=function(t){return"number"==typeof t&&ye(t)},Nn.isFunction=Go,Nn.isInteger=Zo,Nn.isLength=Qo,Nn.isMap=na,Nn.isMatch=function(t,e){return t===e||Ri(t,e,hs(e))},Nn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Ri(t,e,hs(e),n)},Nn.isNaN=function(t){return ia(t)&&t!=+t},Nn.isNative=function(t){if(ws(t))throw new kt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Li(t)},Nn.isNil=function(t){return null==t},Nn.isNull=function(t){return null===t},Nn.isNumber=ia,Nn.isObject=ta,Nn.isObjectLike=ea,Nn.isPlainObject=ra,Nn.isRegExp=sa,Nn.isSafeInteger=function(t){return Zo(t)&&t>=-9007199254740991&&t<=d},Nn.isSet=oa,Nn.isString=aa,Nn.isSymbol=la,Nn.isTypedArray=ca,Nn.isUndefined=function(t){return t===i},Nn.isWeakMap=function(t){return ea(t)&&ps(t)==D},Nn.isWeakSet=function(t){return ea(t)&&"[object WeakSet]"==Si(t)},Nn.join=function(t,e){return null==t?"":Be.call(t,e)},Nn.kebabCase=Ua,Nn.last=Ks,Nn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r;return n!==i&&(s=(s=pa(n))<0?_n(r+s,0):yn(s,r-1)),e==e?function(t,e,n){for(var i=n+1;i--;)if(t[i]===e)return i;return i}(t,e,s):Ve(t,Ue,s,!0)},Nn.lowerCase=$a,Nn.lowerFirst=Ya,Nn.lt=ha,Nn.lte=ua,Nn.max=function(t){return t&&t.length?gi(t,il,Oi):i},Nn.maxBy=function(t,e){return t&&t.length?gi(t,ls(e,2),Oi):i},Nn.mean=function(t){return $e(t,il)},Nn.meanBy=function(t,e){return $e(t,ls(e,2))},Nn.min=function(t){return t&&t.length?gi(t,il,ji):i},Nn.minBy=function(t,e){return t&&t.length?gi(t,ls(e,2),ji):i},Nn.stubArray=gl,Nn.stubFalse=ml,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=wl,Nn.nth=function(t,e){return t&&t.length?Hi(t,pa(e)):i},Nn.noConflict=function(){return pe._===this&&(pe._=Nt),this},Nn.noop=ll,Nn.now=Oo,Nn.pad=function(t,e,n){t=_a(t);var i=(e=pa(e))?dn(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return Ur(ge(r),n)+t+Ur(de(r),n)},Nn.padEnd=function(t,e,n){t=_a(t);var i=(e=pa(e))?dn(t):0;return e&&ie){var r=t;t=e,e=r}if(n||t%1||e%1){var s=wn();return yn(t+s*(e-t+he("1e-"+((s+"").length-1))),e)}return Xi(t,e)},Nn.reduce=function(t,e,n){var i=Uo(t)?Fe:Xe,r=arguments.length<3;return i(t,ls(e,4),n,r,fi)},Nn.reduceRight=function(t,e,n){var i=Uo(t)?ze:Xe,r=arguments.length<3;return i(t,ls(e,4),n,r,di)},Nn.repeat=function(t,e,n){return e=(n?ys(t,e,n):e===i)?1:pa(e),Ki(_a(t),e)},Nn.replace=function(){var t=arguments,e=_a(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Nn.result=function(t,e,n){var r=-1,s=(e=yr(e,t)).length;for(s||(s=1,t=i);++rd)return[];var n=g,i=yn(t,g);e=ls(e),t-=g;for(var r=Je(i,e);++n=o)return t;var l=n-dn(r);if(l<1)return r;var c=a?vr(a,0,l).join(""):t.slice(0,l);if(s===i)return c+r;if(a&&(l+=c.length-l),sa(s)){if(t.slice(l).search(s)){var h,u=c;for(s.global||(s=At(s.source,_a(pt.exec(s))+"g")),s.lastIndex=0;h=s.exec(u);)var f=h.index;c=c.slice(0,f===i?l:f)}}else if(t.indexOf(cr(s),l)!=l){var d=c.lastIndexOf(s);d>-1&&(c=c.slice(0,d))}return c+r},Nn.unescape=function(t){return(t=_a(t))&&K.test(t)?t.replace(q,mn):t},Nn.uniqueId=function(t){var e=++Ft;return _a(t)+e},Nn.upperCase=Ka,Nn.upperFirst=Ja,Nn.each=_o,Nn.eachRight=yo,Nn.first=$s,al(Nn,(bl={},xi(Nn,(function(t,e){It.call(Nn.prototype,e)||(bl[e]=t)})),bl),{chain:!1}),Nn.VERSION="4.17.21",Pe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Nn[t].placeholder=Nn})),Pe(["drop","take"],(function(t,e){Un.prototype[t]=function(n){n=n===i?1:_n(pa(n),0);var r=this.__filtered__&&!e?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,g),type:t+(r.__dir__<0?"Right":"")}),r},Un.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Pe(["filter","map","takeWhile"],(function(t,e){var n=e+1,i=1==n||3==n;Un.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ls(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}})),Pe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),Pe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(il)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Ji((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Ti(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter(Io(ls(t)))},Un.prototype.slice=function(t,e){t=pa(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Un(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=pa(e))<0?n.dropRight(-e):n.take(e-t)),n)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(g)},xi(Un.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),s=Nn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);s&&(Nn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,l=e instanceof Un,c=a[0],h=l||Uo(e),u=function(t){var e=s.apply(Nn,Ie([t],a));return r&&f?e[0]:e};h&&n&&"function"==typeof c&&1!=c.length&&(l=h=!1);var f=this.__chain__,d=!!this.__actions__.length,p=o&&!f,g=l&&!d;if(!o&&h){e=g?e:new Un(this);var m=t.apply(e,a);return m.__actions__.push({func:fo,args:[u],thisArg:i}),new Hn(m,f)}return p&&g?t.apply(this,a):(m=this.thru(u),p?r?m.value()[0]:m.value():m)})})),Pe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Tt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);Nn.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(Uo(r)?r:[],t)}return this[n]((function(n){return e.apply(Uo(n)?n:[],t)}))}})),xi(Un.prototype,(function(t,e){var n=Nn[e];if(n){var i=n.name+"";It.call(Cn,i)||(Cn[i]=[]),Cn[i].push({name:e,func:n})}})),Cn[Nr(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Er(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Er(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Er(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Uo(t),i=e<0,r=n?t.length:0,s=function(t,e,n){for(var i=-1,r=n.length;++i=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Nn.prototype.plant=function(t){for(var e,n=this;n instanceof Wn;){var r=js(n);r.__index__=0,r.__values__=i,e?s.__wrapped__=r:e=r;var s=r;n=n.__wrapped__}return s.__wrapped__=t,e},Nn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Un){var e=t;return this.__actions__.length&&(e=new Un(this)),(e=e.reverse()).__actions__.push({func:fo,args:[Qs],thisArg:i}),new Hn(e,this.__chain__)}return this.thru(Qs)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return pr(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,Gt&&(Nn.prototype[Gt]=function(){return this}),Nn}();me?((me.exports=bn)._=bn,ge._=bn):pe._=bn}).call(n)}(b,m);const{toString:y}=Object.prototype,{getPrototypeOf:x}=Object,v=(w=Object.create(null),t=>{const e=y.call(t);return w[e]||(w[e]=e.slice(8,-1).toLowerCase())});var w;const k=t=>(t=t.toLowerCase(),e=>v(e)===t),M=t=>e=>typeof e===t,{isArray:S}=Array,O=M("undefined"),A=k("ArrayBuffer"),P=M("string"),E=M("function"),T=M("number"),C=t=>null!==t&&"object"==typeof t,D=t=>{if("object"!==v(t))return!1;const e=x(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},R=k("Date"),L=k("File"),I=k("Blob"),F=k("FileList"),z=k("URLSearchParams");function j(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let i,r;if("object"!=typeof t&&(t=[t]),S(t))for(i=0,r=t.length;i0;)if(i=n[r],e===i.toLowerCase())return i;return null}const N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,V=t=>!O(t)&&t!==N,W=(H="undefined"!=typeof Uint8Array&&x(Uint8Array),t=>H&&t instanceof H);var H;const U=k("HTMLFormElement"),$=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Y=k("RegExp"),q=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};j(n,((n,r)=>{!1!==e(n,r,t)&&(i[r]=n)})),Object.defineProperties(t,i)},X="abcdefghijklmnopqrstuvwxyz",K="0123456789",J={DIGIT:K,ALPHA:X,ALPHA_DIGIT:X+X.toUpperCase()+K},G={isArray:S,isArrayBuffer:A,isBuffer:function(t){return null!==t&&!O(t)&&null!==t.constructor&&!O(t.constructor)&&E(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||y.call(t)===e||E(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&A(t.buffer),e},isString:P,isNumber:T,isBoolean:t=>!0===t||!1===t,isObject:C,isPlainObject:D,isUndefined:O,isDate:R,isFile:L,isBlob:I,isRegExp:Y,isFunction:E,isStream:t=>C(t)&&E(t.pipe),isURLSearchParams:z,isTypedArray:W,isFileList:F,forEach:j,merge:function t(){const{caseless:e}=V(this)&&this||{},n={},i=(i,r)=>{const s=e&&B(n,r)||r;D(n[s])&&D(i)?n[s]=t(n[s],i):D(i)?n[s]=t({},i):S(i)?n[s]=i.slice():n[s]=i};for(let r=0,s=arguments.length;r(j(e,((e,i)=>{n&&E(e)?t[i]=_(e,n):t[i]=e}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,s,o;const a={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)o=r[s],i&&!i(o,t,e)||a[o]||(e[o]=t[o],a[o]=!0);t=!1!==n&&x(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:v,kindOfTest:k,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},toArray:t=>{if(!t)return null;if(S(t))return t;let e=t.length;if(!T(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const n=i.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:U,hasOwnProperty:$,hasOwnProp:$,reduceDescriptors:q,freezeMethods:t=>{q(t,((e,n)=>{if(E(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];E(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return S(t)?i(t):i(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:B,global:N,isContextDefined:V,ALPHABET:J,generateString:(t=16,e=J.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n},isSpecCompliantForm:function(t){return!!(t&&E(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,i)=>{if(C(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=S(t)?[]:{};return j(t,((t,e)=>{const s=n(t,i+1);!O(s)&&(r[e]=s)})),e[i]=void 0,r}}return t};return n(t,0)}};function Z(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}G.inherits(Z,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:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Q=Z.prototype,tt={};function et(t){return G.isPlainObject(t)||G.isArray(t)}function nt(t){return G.endsWith(t,"[]")?t.slice(0,-2):t}function it(t,e,n){return t?t.concat(e).map((function(t,e){return t=nt(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["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((t=>{tt[t]={value:t}})),Object.defineProperties(Z,tt),Object.defineProperty(Q,"isAxiosError",{value:!0}),Z.from=(t,e,n,i,r,s)=>{const o=Object.create(Q);return G.toFlatObject(t,o,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Z.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const rt=G.toFlatObject(G,{},null,(function(t){return/^is[A-Z]/.test(t)}));function st(t,e,n){if(!G.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!G.isUndefined(e[t])}))).metaTokens,r=n.visitor||c,s=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(e);if(!G.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(G.isDate(t))return t.toISOString();if(!a&&G.isBlob(t))throw new Z("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(t)||G.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,r){let a=t;if(t&&!r&&"object"==typeof t)if(G.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(G.isArray(t)&&function(t){return G.isArray(t)&&!t.some(et)}(t)||(G.isFileList(t)||G.endsWith(n,"[]"))&&(a=G.toArray(t)))return n=nt(n),a.forEach((function(t,i){!G.isUndefined(t)&&null!==t&&e.append(!0===o?it([n],i,s):null===o?n:n+"[]",l(t))})),!1;return!!et(t)||(e.append(it(r,n,s),l(t)),!1)}const h=[],u=Object.assign(rt,{defaultVisitor:c,convertValue:l,isVisitable:et});if(!G.isObject(t))throw new TypeError("data must be an object");return function t(n,i){if(!G.isUndefined(n)){if(-1!==h.indexOf(n))throw Error("Circular reference detected in "+i.join("."));h.push(n),G.forEach(n,(function(n,s){!0===(!(G.isUndefined(n)||null===n)&&r.call(e,n,G.isString(s)?s.trim():s,i,u))&&t(n,i?i.concat(s):[s])})),h.pop()}}(t),e}function ot(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function at(t,e){this._pairs=[],t&&st(t,this,e)}const lt=at.prototype;function ct(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ht(t,e,n){if(!e)return t;const i=n&&n.encode||ct,r=n&&n.serialize;let s;if(s=r?r(e,n):G.isURLSearchParams(e)?e.toString():new at(e,n).toString(i),s){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}lt.append=function(t,e){this._pairs.push([t,e])},lt.toString=function(t){const e=t?function(e){return t.call(this,e,ot)}:ot;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const ut=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,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){G.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:at,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function pt(t){function e(t,n,i,r){let s=t[r++];const o=Number.isFinite(+s),a=r>=t.length;return s=!s&&G.isArray(i)?i.length:s,a?(G.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!o):(i[s]&&G.isObject(i[s])||(i[s]=[]),e(t,n,i[s],r)&&G.isArray(i[s])&&(i[s]=function(t){const e={},n=Object.keys(t);let i;const r=n.length;let s;for(i=0;i{e(function(t){return G.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),i,n,0)})),n}return null}const gt={"Content-Type":void 0},mt={transitional:ft,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=G.isObject(t);if(r&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return i&&i?JSON.stringify(pt(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return st(t,new dt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return dt.isNode&&G.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((s=G.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return st(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),function(t,e,n){if(G.isString(t))try{return(e||JSON.parse)(t),G.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||mt.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&G.isString(t)&&(n&&!this.responseType||i)){const n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(r){if(n){if("SyntaxError"===r.name)throw Z.from(r,Z.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dt.classes.FormData,Blob:dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],(function(t){mt.headers[t]={}})),G.forEach(["post","put","patch"],(function(t){mt.headers[t]=G.merge(gt)}));const bt=mt,_t=G.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"]),yt=Symbol("internals");function xt(t){return t&&String(t).trim().toLowerCase()}function vt(t){return!1===t||null==t?t:G.isArray(t)?t.map(vt):String(t)}function wt(t,e,n,i,r){return G.isFunction(i)?i.call(this,e,n):(r&&(e=n),G.isString(e)?G.isString(i)?-1!==e.indexOf(i):G.isRegExp(i)?i.test(e):void 0:void 0)}class kt{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=xt(e);if(!r)throw new Error("header name must be a non-empty string");const s=G.findKey(i,r);(!s||void 0===i[s]||!0===n||void 0===n&&!1!==i[s])&&(i[s||e]=vt(t))}const s=(t,e)=>G.forEach(t,((t,n)=>r(t,n,e)));return G.isPlainObject(t)||t instanceof this.constructor?s(t,e):G.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?s((t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&_t[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e})(t),e):null!=t&&r(e,t,n),this}get(t,e){if(t=xt(t)){const n=G.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}(t);if(G.isFunction(e))return e.call(this,t,n);if(G.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=xt(t)){const n=G.findKey(this,t);return!(!n||void 0===this[n]||e&&!wt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=xt(t)){const r=G.findKey(n,t);!r||e&&!wt(0,n[r],r,e)||(delete n[r],i=!0)}}return G.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];t&&!wt(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return G.forEach(this,((i,r)=>{const s=G.findKey(n,r);if(s)return e[s]=vt(i),void delete e[r];const o=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):String(r).trim();o!==r&&delete e[r],e[o]=vt(i),n[o]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return G.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&G.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("\n")}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((t=>n.set(t))),n}static accessor(t){const e=(this[yt]=this[yt]={accessors:{}}).accessors,n=this.prototype;function i(t){const i=xt(t);e[i]||(function(t,e){const n=G.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[i]=!0)}return G.isArray(t)?t.forEach(i):i(t),this}}kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.freezeMethods(kt.prototype),G.freezeMethods(kt);const Mt=kt;function St(t,e){const n=this||bt,i=e||n,r=Mt.from(i.headers);let s=i.data;return G.forEach(t,(function(t){s=t.call(n,s,r.normalize(),e?e.status:void 0)})),r.normalize(),s}function Ot(t){return!(!t||!t.__CANCEL__)}function At(t,e,n){Z.call(this,null==t?"canceled":t,Z.ERR_CANCELED,e,n),this.name="CanceledError"}G.inherits(At,Z,{__CANCEL__:!0});const Pt=dt.isStandardBrowserEnv?{write:function(t,e,n,i,r,s){const o=[];o.push(t+"="+encodeURIComponent(e)),G.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),G.isString(i)&&o.push("path="+i),G.isString(r)&&o.push("domain="+r),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Et(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Tt=dt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{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=i(window.location.href),function(t){const e=G.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Ct(t,e){let n=0;const i=function(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,s=0,o=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=i[o];r||(r=l),n[s]=a,i[s]=l;let h=o,u=0;for(;h!==s;)u+=n[h++],h%=t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),l-r{const s=r.loaded,o=r.lengthComputable?r.total:void 0,a=s-n,l=i(a);n=s;const c={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&s<=o?(o-s)/l:void 0,event:r};c[e?"download":"upload"]=!0,t(c)}}const Dt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let i=t.data;const r=Mt.from(t.headers).normalize(),s=t.responseType;let o;function a(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}G.isFormData(i)&&(dt.isStandardBrowserEnv||dt.isStandardBrowserWebWorkerEnv)&&r.setContentType(!1);let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(e+":"+n))}const c=Et(t.baseURL,t.url);function h(){if(!l)return;const i=Mt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new Z("Request failed with status code "+n.status,[Z.ERR_BAD_REQUEST,Z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:i,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),ht(c,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new Z("Request aborted",Z.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new Z("Network Error",Z.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const i=t.transitional||ft;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new Z(e,i.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,t,l)),l=null},dt.isStandardBrowserEnv){const e=(t.withCredentials||Tt(c))&&t.xsrfCookieName&&Pt.read(t.xsrfCookieName);e&&r.set(t.xsrfHeaderName,e)}void 0===i&&r.setContentType(null),"setRequestHeader"in l&&G.forEach(r.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),G.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),s&&"json"!==s&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",Ct(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Ct(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{l&&(n(!e||e.type?new At(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const u=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(c);u&&-1===dt.protocols.indexOf(u)?n(new Z("Unsupported protocol "+u+":",Z.ERR_BAD_REQUEST,t)):l.send(i||null)}))},Rt={http:null,xhr:Dt};G.forEach(Rt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const Lt=t=>{t=G.isArray(t)?t:[t];const{length:e}=t;let n,i;for(let r=0;rt instanceof Mt?t.toJSON():t;function jt(t,e){e=e||{};const n={};function i(t,e,n){return G.isPlainObject(t)&&G.isPlainObject(e)?G.merge.call({caseless:n},t,e):G.isPlainObject(e)?G.merge({},e):G.isArray(e)?e.slice():e}function r(t,e,n){return G.isUndefined(e)?G.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function s(t,e){if(!G.isUndefined(e))return i(void 0,e)}function o(t,e){return G.isUndefined(e)?G.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,s){return s in e?i(n,r):s in t?i(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(t,e)=>r(zt(t),zt(e),!0)};return G.forEach(Object.keys(t).concat(Object.keys(e)),(function(i){const s=l[i]||r,o=s(t[i],e[i],i);G.isUndefined(o)&&s!==a||(n[i]=o)})),n}const Bt="1.3.5",Nt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Nt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Vt={};Nt.transitional=function(t,e,n){function i(t,e){return"[Axios v1.3.5] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,s)=>{if(!1===t)throw new Z(i(r," has been removed"+(e?" in "+e:"")),Z.ERR_DEPRECATED);return e&&!Vt[r]&&(Vt[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}};const Wt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new Z("options must be an object",Z.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const s=i[r],o=e[s];if(o){const e=t[s],n=void 0===e||o(e,s,t);if(!0!==n)throw new Z("option "+s+" must be "+n,Z.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Z("Unknown option "+s,Z.ERR_BAD_OPTION)}},validators:Nt},Ht=Wt.validators;class Ut{constructor(t){this.defaults=t,this.interceptors={request:new ut,response:new ut}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=jt(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;let s;void 0!==n&&Wt.assertOptions(n,{silentJSONParsing:Ht.transitional(Ht.boolean),forcedJSONParsing:Ht.transitional(Ht.boolean),clarifyTimeoutError:Ht.transitional(Ht.boolean)},!1),null!=i&&(G.isFunction(i)?e.paramsSerializer={serialize:i}:Wt.assertOptions(i,{encode:Ht.function,serialize:Ht.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase(),s=r&&G.merge(r.common,r[e.method]),s&&G.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=Mt.concat(s,r);const o=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,o.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let h,u=0;if(!a){const t=[Ft.bind(this),void 0];for(t.unshift.apply(t,o),t.push.apply(t,l),h=t.length,c=Promise.resolve(e);u{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new At(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Yt((function(e){t=e})),cancel:t}}}const qt=Yt,Xt={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(Xt).forEach((([t,e])=>{Xt[e]=t}));const Kt=Xt,Jt=function t(e){const n=new $t(e),i=_($t.prototype.request,n);return G.extend(i,$t.prototype,n,{allOwnKeys:!0}),G.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(jt(e,n))},i}(bt);Jt.Axios=$t,Jt.CanceledError=At,Jt.CancelToken=qt,Jt.isCancel=Ot,Jt.VERSION=Bt,Jt.toFormData=st,Jt.AxiosError=Z,Jt.Cancel=Jt.CanceledError,Jt.all=function(t){return Promise.all(t)},Jt.spread=function(t){return function(e){return t.apply(null,e)}},Jt.isAxiosError=function(t){return G.isObject(t)&&!0===t.isAxiosError},Jt.mergeConfig=jt,Jt.AxiosHeaders=Mt,Jt.formToJSON=t=>pt(G.isHTMLForm(t)?new FormData(t):t),Jt.HttpStatusCode=Kt,Jt.default=Jt,t("a",Jt);var Gt=t("b",{}),Zt={get exports(){return Gt},set exports(e){t("b",Gt=e)}}; /*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela * Released under the MIT License */ function Qt(t){return t+.5|0}!function(t){var e=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function r(t,e){if(!i[t]){i[t]={};for(var n=0;n>>8,n[2*i+1]=o%256}return n},decompressFromUint8Array:function(e){if(null==e)return s.decompress(e);for(var n=new Array(e.length/2),i=0,r=n.length;i>=1}else{for(r=1,i=0;i>=1}0==--u&&(u=Math.pow(2,d),d++),delete a[h]}else for(r=o[h],i=0;i>=1;0==--u&&(u=Math.pow(2,d),d++),o[c]=f++,h=String(l)}if(""!==h){if(Object.prototype.hasOwnProperty.call(a,h)){if(h.charCodeAt(0)<256){for(i=0;i>=1}else{for(r=1,i=0;i>=1}0==--u&&(u=Math.pow(2,d),d++),delete a[h]}else for(r=o[h],i=0;i>=1;0==--u&&(u=Math.pow(2,d),d++)}for(r=2,i=0;i>=1;for(;;){if(g<<=1,m==e-1){p.push(n(g));break}m++}return p.join("")},decompress:function(t){return null==t?"":""==t?null:s._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,n,i){var r,s,o,a,l,c,h,u=[],f=4,d=4,p=3,g="",m=[],b={val:i(0),position:n,index:1};for(r=0;r<3;r+=1)u[r]=r;for(o=0,l=Math.pow(2,2),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;switch(o){case 0:for(o=0,l=Math.pow(2,8),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;h=t(o);break;case 1:for(o=0,l=Math.pow(2,16),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;h=t(o);break;case 2:return""}for(u[3]=h,s=h,m.push(h);;){if(b.index>e)return"";for(o=0,l=Math.pow(2,p),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;switch(h=o){case 0:for(o=0,l=Math.pow(2,8),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;u[d++]=t(o),h=d-1,f--;break;case 1:for(o=0,l=Math.pow(2,16),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;u[d++]=t(o),h=d-1,f--;break;case 2:return m.join("")}if(0==f&&(f=Math.pow(2,p),p++),u[h])g=u[h];else{if(h!==d)return null;g=s+s.charAt(0)}m.push(g),u[d++]=s+g.charAt(0),s=g,0==--f&&(f=Math.pow(2,p),p++)}}};return s}();null!=t?t.exports=e:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",(function(){return e}))}(Zt);const te=(t,e,n)=>Math.max(Math.min(t,n),e);function ee(t){return te(Qt(2.55*t),0,255)}function ne(t){return te(Qt(255*t),0,255)}function ie(t){return te(Qt(t/2.55)/100,0,1)}function re(t){return te(Qt(100*t),0,100)}const se={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},oe=[..."0123456789ABCDEF"],ae=t=>oe[15&t],le=t=>oe[(240&t)>>4]+oe[15&t],ce=t=>(240&t)>>4==(15&t);function he(t){var e=(t=>ce(t.r)&&ce(t.g)&&ce(t.b)&&ce(t.a))(t)?ae:le;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const ue=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function fe(t,e,n){const i=e*Math.min(n,1-n),r=(e,r=(e+t/30)%12)=>n-i*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function de(t,e,n){const i=(i,r=(i+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function pe(t,e,n){const i=fe(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)i[r]*=1-e-n,i[r]+=e;return i}function ge(t){const e=t.r/255,n=t.g/255,i=t.b/255,r=Math.max(e,n,i),s=Math.min(e,n,i),o=(r+s)/2;let a,l,c;return r!==s&&(c=r-s,l=o>.5?c/(2-r-s):c/(r+s),a=function(t,e,n,i,r){return t===r?(e-n)/i+(e>16&255,s>>8&255,255&s]}return t}(),we.transparent=[0,0,0,0]);const e=we[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Me=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Se=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Oe=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Ae(t,e,n){if(t){let i=ge(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=be(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Pe(t,e){return t?Object.assign(e||{},t):t}function Ee(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ne(t[3]))):(e=Pe(t,{r:0,g:0,b:0,a:1})).a=ne(e.a),e}function Te(t){return"r"===t.charAt(0)?function(t){const e=Me.exec(t);let n,i,r,s=255;if(e){if(e[7]!==n){const t=+e[7];s=e[8]?ee(t):te(255*t,0,255)}return n=+e[1],i=+e[3],r=+e[5],n=255&(e[2]?ee(n):te(n,0,255)),i=255&(e[4]?ee(i):te(i,0,255)),r=255&(e[6]?ee(r):te(r,0,255)),{r:n,g:i,b:r,a:s}}}(t):ye(t)}class Ce{constructor(t){if(t instanceof Ce)return t;const e=typeof t;let n;var i,r,s;"object"===e?n=Ee(t):"string"===e&&(s=(i=t).length,"#"===i[0]&&(4===s||5===s?r={r:255&17*se[i[1]],g:255&17*se[i[2]],b:255&17*se[i[3]],a:5===s?17*se[i[4]]:255}:7!==s&&9!==s||(r={r:se[i[1]]<<4|se[i[2]],g:se[i[3]]<<4|se[i[4]],b:se[i[5]]<<4|se[i[6]],a:9===s?se[i[7]]<<4|se[i[8]]:255})),n=r||ke(t)||Te(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Pe(this._rgb);return t&&(t.a=ie(t.a)),t}set rgb(t){this._rgb=Ee(t)}rgbString(){return this._valid?function(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ie(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}(this._rgb):void 0}hexString(){return this._valid?he(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=ge(t),n=e[0],i=re(e[1]),r=re(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${ie(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let r;const s=e===r?.5:e,o=2*s-1,a=n.a-i.a,l=((o*a==-1?o:(o+a)/(1+o*a))+1)/2;r=1-l,n.r=255&l*n.r+r*i.r+.5,n.g=255&l*n.g+r*i.g+.5,n.b=255&l*n.b+r*i.b+.5,n.a=s*n.a+(1-s)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const i=Oe(ie(t.r)),r=Oe(ie(t.g)),s=Oe(ie(t.b));return{r:ne(Se(i+n*(Oe(ie(e.r))-i))),g:ne(Se(r+n*(Oe(ie(e.g))-r))),b:ne(Se(s+n*(Oe(ie(e.b))-s))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Ce(this.rgb)}alpha(t){return this._rgb.a=ne(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Qt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.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 Ae(this._rgb,2,t),this}darken(t){return Ae(this._rgb,2,-t),this}saturate(t){return Ae(this._rgb,1,t),this}desaturate(t){return Ae(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=ge(t);n[0]=_e(n[0]+e),n=be(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}} /*! * Chart.js v4.2.1 * https://www.chartjs.org * (c) 2023 Chart.js Contributors * Released under the MIT License */function De(){}const Re=(()=>{let t=0;return()=>t++})();function Le(t){return null==t}function Ie(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function Fe(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function ze(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function je(t,e){return ze(t)?t:e}function Be(t,e){return void 0===t?e:t}const Ne=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Ve(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function We(t,e,n,i){let r,s,o;if(Ie(t))if(s=t.length,i)for(r=s-1;r>=0;r--)e.call(n,t[r],r);else for(r=0;rt,x:t=>t.x,y:t=>t.y};function Ge(t,e){const n=Je[e]||(Je[e]=function(t){const e=function(t){const e=t.split("."),n=[];let i="";for(const r of e)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function Ze(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Qe=t=>void 0!==t,tn=t=>"function"==typeof t,en=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0},nn=Math.PI,rn=2*nn,sn=rn+nn,on=Number.POSITIVE_INFINITY,an=nn/180,ln=nn/2,cn=nn/4,hn=2*nn/3,un=Math.log10,fn=Math.sign;function dn(t,e,n){return Math.abs(t-e)l&&c=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function An(t,e,n){n=n||(n=>t[n]1;)i=s+r>>1,n(i)?s=i:r=i;return{lo:s,hi:r}}const Pn=(t,e,n,i)=>An(t,n,i?i=>{const r=t[i][e];return rt[i][e]An(t,n,(i=>t[i][e]>=n)),Tn=["push","pop","shift","splice","unshift"];function Cn(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(e);-1!==r&&i.splice(r,1),i.length>0||(Tn.forEach((e=>{delete t[e]})),delete t._chartjs)}function Dn(t){const e=new Set;let n,i;for(n=0,i=t.length;n{i=!1,t.apply(e,n)})))}}const In=t=>"start"===t?"left":"end"===t?"right":"center",Fn=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function zn(t,e,n){const i=e.length;let r=0,s=i;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:c,max:h,minDefined:u,maxDefined:f}=o.getUserBounds();u&&(r=Sn(Math.min(Pn(a,o.axis,c).lo,n?i:Pn(e,l,o.getPixelForValue(c)).lo),0,i-1)),s=f?Sn(Math.max(Pn(a,o.axis,h,!0).hi+1,n?0:Pn(e,l,o.getPixelForValue(h),!0).hi+1),r,i)-r:i-r}return{start:r,count:s}}function jn(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,r={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=r,!0;const s=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),s}const Bn=t=>0===t||1===t,Nn=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*rn/n),Vn=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*rn/n)+1,Wn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*ln),easeOutSine:t=>Math.sin(t*ln),easeInOutSine:t=>-.5*(Math.cos(nn*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Bn(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Bn(t)?t:Nn(t,.075,.3),easeOutElastic:t=>Bn(t)?t:Vn(t,.075,.3),easeInOutElastic(t){const e=.1125;return Bn(t)?t:t<.5?.5*Nn(2*t,e,.45):.5+.5*Vn(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Wn.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*Wn.easeInBounce(2*t):.5*Wn.easeOutBounce(2*t-1)+.5};function Hn(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Un(t){return Hn(t)?t:new Ce(t)}function $n(t){return Hn(t)?t:new Ce(t).saturate(.5).darken(.1).hexString()}const Yn=["x","y","borderWidth","radius","tension"],qn=["color","borderColor","backgroundColor"],Xn=new Map;function Kn(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Xn.get(n);return i||(i=new Intl.NumberFormat(t,e),Xn.set(n,i)),i}(e,n).format(t)}const Jn={values:t=>Ie(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let r,s=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),s=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}(t,n)}const o=un(Math.abs(s)),a=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Kn(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(un(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?Jn.numeric.call(this,t,e,n):""}};var Gn={formatters:Jn};const Zn=Object.create(null),Qn=Object.create(null);function ti(t,e){if(!e)return t;const n=e.split(".");for(let i=0,r=n.length;it.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=(t,e)=>$n(e.backgroundColor),this.hoverBorderColor=(t,e)=>$n(e.borderColor),this.hoverColor=(t,e)=>$n(e.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 ei(this,t,e)}get(t){return ti(this,t)}describe(t,e){return ei(Qn,t,e)}override(t,e){return ei(Zn,t,e)}route(t,e,n,i){const r=ti(this,t),s=ti(this,n),o="_"+e;Object.defineProperties(r,{[o]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=s[i];return Fe(t)?Object.assign({},e,t):Be(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ii=new ni({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:qn},numbers:{type:"number",properties:Yn}}),t.describe("animations",{_fallback:"animation"}),t.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=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.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:Gn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function ri(t,e,n,i,r){let s=e[r];return s||(s=e[r]=t.measureText(r).width,n.push(r)),s>i&&(i=s),i}function si(t,e,n,i){let r=(i=i||{}).data=i.data||{},s=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},s=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let o=0;const a=n.length;let l,c,h,u,f;for(l=0;ln.length){for(l=0;l0&&t.stroke()}}function hi(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Le(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l+t||0;function ki(t,e){const n={},i=Fe(e),r=i?Object.keys(e):e,s=Fe(t)?i?n=>Be(t[n],t[e[n]]):e=>t[e]:()=>t;for(const o of r)n[o]=wi(s(o));return n}function Mi(t){return ki(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Si(t){return ki(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Oi(t){const e=Mi(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ai(t,e){t=t||{},e=e||ii.font;let n=Be(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=Be(t.style,e.style);i&&!(""+i).match(xi)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:Be(t.family,e.family),lineHeight:vi(Be(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:Be(t.weight,e.weight),string:""};return r.string=function(t){return!t||Le(t.size)||Le(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function Pi(t,e,n,i){let r,s,o,a=!0;for(r=0,s=t.length;rt[0])){Qe(i)||(i=Vi("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:i,_getTarget:r,override:r=>Ti([r,...t],e,n,i)};return new Proxy(s,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>Ii(n,i,(()=>function(t,e,n,i){let r;for(const s of e)if(r=Vi(Ri(s,t),n),Qe(r))return Li(t,r)?Bi(n,i,t,r):r}(i,e,t,n))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Wi(t).includes(e),ownKeys:t=>Wi(t),set(t,e,n){const i=t._storage||(t._storage=r());return t[e]=i[e]=n,delete t._keys,!0}})}function Ci(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Di(t,i),setContext:e=>Ci(t,e,n,i),override:r=>Ci(t.override(r),e,n,i)};return new Proxy(r,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>Ii(t,e,(()=>function(t,e,n){const{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=t;let a=i[e];return tn(a)&&o.isScriptable(e)&&(a=function(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);return a.add(t),e=e(s,o||i),a.delete(t),Li(t,e)&&(e=Bi(r._scopes,r,t,e)),e}(e,a,t,n)),Ie(a)&&a.length&&(a=function(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=n;if(Qe(s.index)&&i(t))e=e[s.index%e.length];else if(Fe(e[0])){const n=e,i=r._scopes.filter((t=>t!==n));e=[];for(const l of n){const n=Bi(i,r,t,l);e.push(Ci(n,s,o&&o[t],a))}}return e}(e,a,t,o.isIndexable)),Li(e,a)&&(a=Ci(a,r,s&&s[e],o)),a}(t,e,n))),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function Di(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:i,isScriptable:tn(n)?n:()=>n,isIndexable:tn(i)?i:()=>i}}const Ri=(t,e)=>t?t+Ze(e):e,Li=(t,e)=>Fe(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Ii(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const i=n();return t[e]=i,i}function Fi(t,e,n){return tn(t)?t(e,n):t}const zi=(t,e)=>!0===t?e:"string"==typeof t?Ge(e,t):void 0;function ji(t,e,n,i,r){for(const s of e){const e=zi(n,s);if(e){t.add(e);const s=Fi(e._fallback,n,r);if(Qe(s)&&s!==n&&s!==i)return s}else if(!1===e&&Qe(i)&&n!==i)return null}return!1}function Bi(t,e,n,i){const r=e._rootScopes,s=Fi(e._fallback,n,i),o=[...t,...r],a=new Set;a.add(i);let l=Ni(a,o,n,s||n,i);return null!==l&&(!Qe(s)||s===n||(l=Ni(a,o,s,l,i),null!==l))&&Ti(Array.from(a),[""],r,s,(()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];return Ie(r)&&Fe(n)?n:r||{}}(e,n,i)))}function Ni(t,e,n,i,r){for(;n;)n=ji(t,e,n,i,r);return n}function Vi(t,e){for(const n of e){if(!n)continue;const e=n[t];if(Qe(e))return e}}function Wi(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function Hi(t,e,n,i){const{iScale:r}=t,{key:s="r"}=this._parsing,o=new Array(i);let a,l,c,h;for(a=0,l=i;ae"x"===t?"y":"x";function qi(t,e,n,i){const r=t.skip?e:t,s=e,o=n.skip?e:n,a=vn(s,r),l=vn(o,s);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=i*c,f=i*h;return{previous:{x:s.x-u*(o.x-r.x),y:s.y-u*(o.y-r.y)},next:{x:s.x+f*(o.x-r.x),y:s.y+f*(o.y-r.y)}}}function Xi(t,e="x"){const n=Yi(e),i=t.length,r=Array(i).fill(0),s=Array(i);let o,a,l,c=$i(t,0);for(o=0;o!t.skip))),"monotone"===e.cubicInterpolationMode)Xi(t,r);else{let n=i?t[t.length-1]:t[0];for(s=0,o=t.length;st.ownerDocument.defaultView.getComputedStyle(t,null),er=["top","right","bottom","left"];function nr(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const s=er[r];i[s]=parseFloat(t[e+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const ir=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function rr(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,r=tr(n),s="border-box"===r.boxSizing,o=nr(r,"padding"),a=nr(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:r,offsetY:s}=i;let o,a,l=!1;if(ir(r,s,t.target))o=r,a=s;else{const t=e.getBoundingClientRect();o=i.clientX-t.left,a=i.clientY-t.top,l=!0}return{x:o,y:a,box:l}}(t,n),u=o.left+(h&&a.left),f=o.top+(h&&a.top);let{width:d,height:p}=e;return s&&(d-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-u)/d*n.width/i),y:Math.round((c-f)/p*n.height/i)}}const sr=t=>Math.round(10*t)/10;function or(t,e,n,i){const r=tr(t),s=nr(r,"margin"),o=Qi(r.maxWidth,t,"clientWidth")||on,a=Qi(r.maxHeight,t,"clientHeight")||on,l=function(t,e,n){let i,r;if(void 0===e||void 0===n){const s=Zi(t);if(s){const t=s.getBoundingClientRect(),o=tr(s),a=nr(o,"border","width"),l=nr(o,"padding");e=t.width-l.width-a.width,n=t.height-l.height-a.height,i=Qi(o.maxWidth,s,"clientWidth"),r=Qi(o.maxHeight,s,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||on,maxHeight:r||on}}(t,e,n);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=nr(r,"border","width"),e=nr(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,i?c/i:h-s.height),c=sr(Math.min(c,o,l.maxWidth)),h=sr(Math.min(h,a,l.maxHeight)),c&&!h&&(h=sr(c/2)),(void 0!==e||void 0!==n)&&i&&l.height&&h>l.height&&(h=l.height,c=sr(Math.floor(h*i))),{width:c,height:h}}function ar(t,e,n){const i=e||1,r=Math.floor(t.height*i),s=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||o.height!==r||o.width!==s)&&(t.currentDevicePixelRatio=i,o.height=r,o.width=s,t.ctx.setTransform(i,0,0,i,0,0),!0)}const lr=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}return t}();function cr(t,e){const n=function(t,e){return tr(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function hr(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function ur(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function fr(t,e,n,i){const r={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},o=hr(t,r,n),a=hr(r,s,n),l=hr(s,e,n),c=hr(o,a,n),h=hr(a,l,n);return hr(c,h,n)}function dr(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function pr(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function gr(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mr(t){return"angle"===t?{between:Mn,compare:wn,normalize:kn}:{between:On,compare:(t,e)=>t-e,normalize:t=>t}}function br({start:t,end:e,count:n,loop:i,style:r}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:r}}function _r(t,e,n){if(!n)return[t];const{property:i,start:r,end:s}=n,o=e.length,{compare:a,between:l,normalize:c}=mr(i),{start:h,end:u,loop:f,style:d}=function(t,e,n){const{property:i,start:r,end:s}=n,{between:o,normalize:a}=mr(i),l=e.length;let c,h,{start:u,end:f,loop:d}=t;if(d){for(u+=l,f+=l,c=0,h=l;c_||l(r,b,g)&&0!==a(r,b),v=()=>!_||0===a(s,g)||l(s,b,g);for(let w=h,k=h;w<=u;++w)m=e[w%o],m.skip||(g=c(m[i]),g!==b&&(_=l(g,r,s),null===y&&x()&&(y=0===a(g,r)?w:k),null!==y&&v()&&(p.push(br({start:y,end:w,loop:f,count:o,style:d})),y=null),k=w,b=g));return null!==y&&p.push(br({start:y,end:u,loop:f,count:o,style:d})),p}function yr(t,e){const n=[],i=t.segments;for(let r=0;ri({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(n-e.start,s)})))}_refresh(){this._request||(this._running=!0,this._request=Rn.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((n,i)=>{if(!n.running||!n.items.length)return;const r=n.items;let s,o=r.length-1,a=!1;for(;o>=0;--o)s=r[o],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,n,t,"progress")),r.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(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(((t,e)=>Math.max(t,e._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 i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Mr=new kr;const Sr="transparent",Or={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const i=Un(t||Sr),r=i.valid&&Un(e||Sr);return r&&r.valid?r.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Ar{constructor(t,e,n,i){const r=e[n];i=Pi([t.to,i,r,t.from]);const s=Pi([t.from,r,i]);this._active=!0,this._fn=t.fn||Or[t.type||typeof s],this._easing=Wn[t.easing]||Wn.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=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const i=this._target[this._prop],r=n-this._start,s=this._duration-r;this._start=n,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=Pi([t.to,e,i,t.from]),this._from=Pi([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,r=this._from,s=this._loop,o=this._to;let a;if(this._active=r!==o&&(s||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[i]=this._fn(r,o,a))}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 i=0;i{const r=t[i];if(!Fe(r))return;const s={};for(const t of e)s[t]=r[t];(Ie(r.properties)&&r.properties||[i]).forEach((t=>{t!==i&&n.has(t)||n.set(t,s)}))}))}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}(t,n);if(!i)return[];const r=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let r=0;r{t.options=n}),(()=>{})),r}_createAnimations(t,e){const n=this._properties,i=[],r=t.$animations||(t.$animations={}),s=Object.keys(e),o=Date.now();let a;for(a=s.length-1;a>=0;--a){const l=s[a];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=n.get(l);if(h){if(u&&h.active()){h.update(u,c,o);continue}h.cancel()}u&&u.duration?(r[l]=h=new Ar(u,t,l,c),i.push(h)):t[l]=c}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(Mr.add(this._chart,n),!0):void 0}}function Er(t,e){const n=t&&t.options||{},i=n.reverse,r=void 0===n.min?e:0,s=void 0===n.max?e:0;return{start:i?s:r,end:i?r:s}}function Tr(t,e){const n=[],i=t._getSortedDatasetMetas(e);let r,s;for(r=0,s=i.length;r0||!n&&e<0)return r.index}return null}function Ir(t,e){const{chart:n,_cachedMeta:i}=t,r=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=i,l=s.axis,c=o.axis,h=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(s,o,i),u=e.length;let f;for(let d=0;dn[t].axis===e)).shift()}function zr(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[n]&&delete e[i]._visualValues[n]}}}const jr=t=>"reset"===t||"none"===t,Br=(t,e)=>e?t:Object.assign({},t);class Nr{static defaults={};static datasetElementType=null;static dataElementType=null;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=Dr(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&&zr(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),i=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,r=e.xAxisID=Be(n.xAxisID,Fr(t,"x")),s=e.yAxisID=Be(n.yAxisID,Fr(t,"y")),o=e.rAxisID=Be(n.rAxisID,Fr(t,"r")),a=e.indexAxis,l=e.iAxisID=i(a,r,s,o),c=e.vAxisID=i(a,s,r,o);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}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&&Cn(this._data,this),t._stacked&&zr(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(Fe(e))this._data=function(t){const e=Object.keys(t),n=new Array(e.length);let i,r,s;for(i=0,r=e.length;i{const e="_onData"+Ze(t),n=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...t){const r=n.apply(this,t);return i._chartjs.listeners.forEach((n=>{"function"==typeof n[e]&&n[e](...t)})),r}})})))),this._syncList=[],this._data=e}var i,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const r=e._stacked;e._stacked=Dr(e.vScale,e),e.stack!==n.stack&&(i=!0,zr(e),e.stack=n.stack),this._resyncElements(t),(i||r!==e._stacked)&&Ir(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:i}=this,{iScale:r,_stacked:s}=n,o=r.axis;let a,l,c,h=0===t&&e===i.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=i,n._sorted=!0,c=i;else{c=Ie(i[t])?this.parseArrayData(n,i,t,e):Fe(i[t])?this.parseObjectData(n,i,t,e):this.parsePrimitiveData(n,i,t,e);const r=()=>null===l[o]||u&&l[o]t&&!e.hidden&&e._stacked&&{keys:Tr(n,!0),values:null})(e,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:n,minDefined:i,maxDefined:r}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}(o);let u,f;function d(){f=i[u];const e=f[o.axis];return!ze(f[t.axis])||c>e||h=0;--u)if(!d()){this.updateRangeFromParsed(l,t,f,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let i,r,s;for(i=0,r=e.length;i=0&&tthis.getContext(n,i,e)),h);return d.$shared&&(d.$shared=a,r[s]=Object.freeze(Br(d,a))),d}_resolveAnimations(t,e,n){const i=this.chart,r=this._cachedDataOpts,s=`animation-${e}`,o=r[s];if(o)return o;let a;if(!1!==i.options.animation){const i=this.chart.config,r=i.datasetAnimationScopeKeys(this._type,e),s=i.getOptionScopes(this.getDataset(),r);a=i.createResolver(s,this.getContext(t,n,e))}const l=new Pr(i,a&&a.animations);return a&&a._cacheable&&(r[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||jr(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,r=this.getSharedOptions(n),s=this.includeOptions(e,r)||r!==i;return this.updateSharedOptions(r,e,n),{sharedOptions:r,includeOptions:s}}updateElement(t,e,n,i){jr(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!jr(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const r=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(r)||r})}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[o,a,l]of this._syncList)this[o](a,l);this._syncList=[];const i=n.length,r=e.length,s=Math.min(r,i);s&&this.parse(0,s),r>i?this._insertElements(i,r-i,t):r{for(t.length+=e,o=t.length-1;o>=s;o--)t[o]=t[o-e]};for(a(r),o=t;ot-e)))}return t._cache.$bar}(e,t.type);let i,r,s,o,a=e._length;const l=()=>{32767!==s&&-32768!==s&&(Qe(o)&&(a=Math.min(a,Math.abs(s-o)||a)),o=s)};for(i=0,r=n.length;iMath.abs(a)&&(l=a,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:s,min:o,max:a}}(t,e,n,i):e[n.axis]=n.parse(t,i),e}function Hr(t,e,n,i){const r=t.iScale,s=t.vScale,o=r.getLabels(),a=r===s,l=[];let c,h,u,f;for(c=n,h=n+i;ct.x,n="left",i="right"):(e=t.base"spacing"!==t,_indexable:t=>"spacing"!==t};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:i}}=t.legend.options;return e.labels.map(((e,r)=>{const s=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,fontColor:i,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}}))}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};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,i=this._cachedMeta;if(!1===this._parsing)i._parsed=n;else{let r,s,o=t=>+n[t];if(Fe(n[t])){const{key:t="value"}=this._parsing;o=e=>+Ge(n[e],t)}for(r=t,s=t+e;rMn(t,a,l,!0)?1:Math.max(e,e*n,i,i*n),p=(t,e,i)=>Mn(t,a,l,!0)?-1:Math.min(e,e*n,i,i*n),g=d(0,c,u),m=d(ln,h,f),b=p(nn,c,u),_=p(nn+ln,h,f);i=(g-b)/2,r=(m-_)/2,s=-(g+b)/2,o=-(m+_)/2}return{ratioX:i,ratioY:r,offsetX:s,offsetY:o}}(f,u,a),b=(n.width-s)/d,_=(n.height-s)/p,y=Math.max(Math.min(b,_)/2,0),x=Ne(this.options.radius,y),v=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,i.total=this.calculateTotal(),this.outerRadius=x-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const n=this.options,i=this._cachedMeta,r=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===i._parsed[t]||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*r/rn)}updateElements(t,e,n,i){const r="reset"===i,s=this.chart,o=s.chartArea,a=s.options.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,f=h?0:this.outerRadius,{sharedOptions:d,includeOptions:p}=this._getSharedOptions(e,i);let g,m=this._getRotation();for(g=0;g0&&!isNaN(t)?rn*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],r=Kn(e._parsed[t],n.options.locale);return{label:i[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,r,s,o,a;if(!t)for(i=0,r=n.data.datasets.length;i{const s=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,fontColor:i,lineWidth:s.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}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],r=Kn(e._parsed[t].r,n.options.locale);return{label:i[t]||"",value:r}}parseObjectData(t,e,n,i){return Hi.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,n)=>{const i=this.getParsed(n).r;!isNaN(i)&&this.chart.getDataVisibility(n)&&(ie.max&&(e.max=i))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(i/2,0),s=(r-Math.max(n.cutoutPercentage?r/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,n,i){const r="reset"===i,s=this.chart,o=s.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,c=a.yCenter,h=a.getIndexAngle(0)-.5*nn;let u,f=h;const d=360/this.countVisibleElements();for(u=0;u{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++})),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?bn(this.resolveDataElementOptions(t,e).angle||n):0}}var Gr=Object.freeze({__proto__:null,BarController:class extends Nr{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,n,i){return Hr(t,e,n,i)}parseArrayData(t,e,n,i){return Hr(t,e,n,i)}parseObjectData(t,e,n,i){const{iScale:r,vScale:s}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l="x"===r.axis?o:a,c="x"===s.axis?o:a,h=[];let u,f,d,p;for(u=n,f=n+i;ut.controller.options.grouped)),r=n.options.stacked,s=[],o=t=>{const n=t.controller.getParsed(e),i=n&&n[t.vScale.axis];if(Le(i)||isNaN(i))return!0};for(const a of i)if((void 0===e||!o(a))&&((!1===r||-1===s.indexOf(a.stack)||void 0===r&&void 0===a.stack)&&s.push(a.stack),a.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const i=this._getStacks(t,n),r=void 0!==e?i.indexOf(e):-1;return-1===r?i.length-1:r}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,i=[];let r,s;for(r=0,s=e.data.length;r=n?1:-1)}(u,e,o)*s,f===o&&(m-=u/2);const t=e.getPixelForDecimal(0),r=e.getPixelForDecimal(1),l=Math.min(t,r),d=Math.max(t,r);m=Math.max(Math.min(m,d),l),h=m+u,n&&!c&&(a._stacks[e.axis]._visualValues[i]=e.getValueForPixel(h)-e.getValueForPixel(m))}if(m===e.getPixelForValue(o)){const t=fn(u)*e.getLineWidthForValue(o)/2;m+=t,u-=t}return{size:u,base:m,head:h,center:h+u/2}}_calculateBarIndexPixels(t,e){const n=e.scale,i=this.options,r=i.skipNull,s=Be(i.maxBarThickness,1/0);let o,a;if(e.grouped){const n=r?this._getStackCount(t):e.stackCount,l="flex"===i.barThickness?function(t,e,n,i){const r=e.pixels,s=r[t];let o=t>0?r[t-1]:null,a=t=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:i,yScale:r}=e,s=this.getParsed(t),o=i.getLabelForValue(s.x),a=r.getLabelForValue(s.y),l=s._custom;return{label:n[t]||"",value:"("+o+", "+a+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,i){const r="reset"===i,{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,i),c=s.axis,h=o.axis;for(let u=e;u0&&this.getParsed(e-1);for(let x=0;x<_;++x){const n=t[x],d=m?n:{};if(x=b){d.skip=!0;continue}const _=this.getParsed(x),v=Le(_[f]),w=d[u]=s.getPixelForValue(_[u],x),k=d[f]=r||v?o.getBasePixel():o.getPixelForValue(a?this.applyStack(o,_,a):_[f],x);d.skip=isNaN(w)||isNaN(k)||v,d.stop=x>0&&Math.abs(_[u]-y[u])>g,p&&(d.parsed=_,d.raw=l.data[x]),h&&(d.options=c||this.resolveDataElementOptions(x,n.active?"active":i)),m||this.updateElement(n,x,d,i),y=_}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const r=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,r,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PolarAreaController:Jr,PieController:class extends Kr{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},RadarController:class extends Nr{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};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,i){return Hi.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta,n=e.dataset,i=e.data||[],r=e.iScale.getLabels();if(n.points=i,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const s={_loop:!0,_fullLoop:r.length===i.length,options:e};this.updateElement(n,void 0,s,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,n,i){const r=this._cachedMeta.rScale,s="reset"===i;for(let o=e;o0&&this.getParsed(e-1);for(let y=e;y0&&Math.abs(n[f]-_[f])>m,g&&(c.parsed=n,c.raw=l.data[y]),u&&(c.options=h||this.resolveDataElementOptions(y,e.active?"active":i)),b||this.updateElement(e,y,c,i),_=n}this.updateSharedOptions(h,i,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}const n=t.dataset,i=n.options&&n.options.borderWidth||0;if(!e.length)return i;const r=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,r,s)/2}}});function Zr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Qr{static override(t){Object.assign(Qr.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return Zr()}parse(){return Zr()}format(){return Zr()}add(){return Zr()}diff(){return Zr()}startOf(){return Zr()}endOf(){return Zr()}}var ts=Qr;function es(t,e,n,i){const{controller:r,data:s,_sorted:o}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&o&&s.length){const t=a._reversePixels?En:Pn;if(!i)return t(s,e,n);if(r._sharedOptions){const i=s[0],r="function"==typeof i.getRange&&i.getRange(e);if(r){const i=t(s,e,n-r),o=t(s,e,n+r);return{lo:i.lo,hi:o.hi}}}}return{lo:0,hi:s.length-1}}function ns(t,e,n,i,r){const s=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=s.length;a{t[o](e[n],r)&&(s.push({element:t,datasetIndex:i,index:l}),a=a||t.inRange(e.x,e.y,r))})),i&&!a?[]:s}var as={evaluateInteractionItems:ns,modes:{index(t,e,n,i){const r=rr(e,t),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?is(t,r,s,i,o):ss(t,r,s,!1,i,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,n=t.data[e];n&&!n.skip&&l.push({element:n,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,n,i){const r=rr(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?is(t,r,s,i,o):ss(t,r,s,!1,i,o);if(a.length>0){const e=a[0].datasetIndex,n=t.getDatasetMeta(e).data;a=[];for(let t=0;tis(t,rr(e,t),n.axis||"xy",i,n.includeInvisible||!1),nearest(t,e,n,i){const r=rr(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return ss(t,r,s,n.intersect,i,o)},x:(t,e,n,i)=>os(t,rr(e,t),"x",n.intersect,i),y:(t,e,n,i)=>os(t,rr(e,t),"y",n.intersect,i)}};const ls=["left","top","right","bottom"];function cs(t,e){return t.filter((t=>t.pos===e))}function hs(t,e){return t.filter((t=>-1===ls.indexOf(t.pos)&&t.box.axis===e))}function us(t,e){return t.sort(((t,n)=>{const i=e?n:t,r=e?t:n;return i.weight===r.weight?i.index-r.index:i.weight-r.weight}))}function fs(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:i,stackWeight:r}=n;if(!t||!ls.includes(i))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=r}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:r}=e;let s,o,a;for(s=0,o=t.length;s{i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function bs(t,e,n,i){const r=[];let s,o,a,l,c,h;for(s=0,o=t.length,c=0;st.box.fullSize)),!0),i=us(cs(e,"left"),!0),r=us(cs(e,"right")),s=us(cs(e,"top"),!0),o=us(cs(e,"bottom")),a=hs(e,"x"),l=hs(e,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:r.concat(l).concat(o).concat(a),chartArea:cs(e,"chartArea"),vertical:i.concat(r).concat(l),horizontal:s.concat(o).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;We(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/h,hBoxMaxHeight:o/2}),f=Object.assign({},r);ps(f,Oi(i));const d=Object.assign({maxPadding:f,w:s,h:o,x:r.left,y:r.top},r),p=fs(l.concat(c),u);bs(a.fullSize,d,u,p),bs(l,d,u,p),bs(c,d,u,p)&&bs(l,d,u,p),function(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(d),ys(a.leftAndTop,d,u,p),d.x+=d.w,d.y+=d.h,ys(a.rightAndBottom,d,u,p),t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},We(a.chartArea,(e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})}))}};class vs{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class ws extends vs{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ks="$chartjs",Ms={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ss=t=>null===t||""===t,Os=!!lr&&{passive:!0};function As(t,e,n){t.canvas.removeEventListener(e,n,Os)}function Ps(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Es(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||Ps(n.addedNodes,i),e=e&&!Ps(n.removedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Ts(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||Ps(n.removedNodes,i),e=e&&!Ps(n.addedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}const Cs=new Map;let Ds=0;function Rs(){const t=window.devicePixelRatio;t!==Ds&&(Ds=t,Cs.forEach(((e,n)=>{n.currentDevicePixelRatio!==t&&e()})))}function Ls(t,e,n){const i=t.canvas,r=i&&Zi(i);if(!r)return;const s=Ln(((t,e)=>{const i=r.clientWidth;n(t,e),i{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||s(n,i)}));return o.observe(r),function(t,e){Cs.size||window.addEventListener("resize",Rs),Cs.set(t,e)}(t,s),o}function Is(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){Cs.delete(t),Cs.size||window.removeEventListener("resize",Rs)}(t)}function Fs(t,e,n){const i=t.canvas,r=Ln((e=>{null!==t.ctx&&n(function(t,e){const n=Ms[t.type]||t.type,{x:i,y:r}=rr(t,e);return{type:n,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==r?r:null}}(e,t))}),t);return function(t,e,n){t.addEventListener(e,n,Os)}(i,e,r),r}class zs extends vs{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[ks]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Ss(r)){const e=cr(t,"width");void 0!==e&&(t.width=e)}if(Ss(i))if(""===t.style.height)t.height=t.width/(e||2);else{const e=cr(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[ks])return!1;const n=e[ks].initial;["height","width"].forEach((t=>{const i=n[t];Le(i)?e.removeAttribute(t):e.setAttribute(t,i)}));const i=n.style||{};return Object.keys(i).forEach((t=>{e.style[t]=i[t]})),e.width=e.width,delete e[ks],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),r={attach:Es,detach:Ts,resize:Ls}[e]||Fs;i[e]=r(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];i&&(({attach:Is,detach:Is,resize:Is}[e]||As)(t,e,i),n[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,i){return or(t,e,n,i)}isAttached(t){const e=Zi(t);return!(!e||!e.isConnected)}}class js{static defaults={};static defaultRoutes=void 0;active=!1;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return gn(this.x)&&gn(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach((t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]})),i}}function Bs(t,e){const n=t.options.ticks,i=function(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(i,r))}(t),r=Math.min(n.maxTicksLimit||i,i),s=n.major.enabled?function(t){const e=[];let n,i;for(n=0,i=t.length;nr)return function(t,e,n,i){let r,s=0,o=n[0];for(i=Math.ceil(i),r=0;rt-e)).pop(),e}(i);for(let o=0,a=s.length-1;or)return t}return Math.max(r,1)}(s,e,r);if(o>0){let t,n;const i=o>1?Math.round((l-a)/(o-1)):null;for(Ns(e,c,h,Le(i)?0:a-i,a),t=0,n=o-1;t"top"===e||"left"===e?t[e]+n:t[e]-n,Ws=(t,e)=>Math.min(e||t,t);function Hs(t,e){const n=[],i=t.length/e,r=t.length;let s=0;for(;so+a)))return c}function $s(t){return t.drawTicks?t.tickLength:0}function Ys(t,e){if(!t.display)return 0;const n=Ai(t.font,e),i=Oi(t.padding);return(Ie(t.text)?t.text.length:1)*n.lineHeight+i.height}function qs(t,e,n){let i=In(t);return(n&&"right"!==e||!n&&"right"===e)&&(i=(t=>"left"===t?"right":"right"===t?"left":t)(i)),i}class Xs extends js{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:i}=this;return t=je(t,Number.POSITIVE_INFINITY),e=je(e,Number.NEGATIVE_INFINITY),n=je(n,Number.POSITIVE_INFINITY),i=je(i,Number.NEGATIVE_INFINITY),{min:je(t,n),max:je(e,i),minDefined:ze(t),maxDefined:ze(e)}}getMinMax(t){let e,{min:n,max:i,minDefined:r,maxDefined:s}=this.getUserBounds();if(r&&s)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let a=0,l=o.length;ai?i:n,i=r&&n>i?n:i,{min:je(n,je(i,n)),max:je(i,je(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ve(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:i,grace:r,ticks:s}=this.options,o=s.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=function(t,e,n){const{min:i,max:r}=t,s=Ne(e,(r-i)/2),o=(t,e)=>n&&0===t?0:t+e;return{min:o(i,-Math.abs(s)),max:o(r,s)}}(this,r,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=o=r||n<=1||!this.isHorizontal())return void(this.labelRotation=i);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,f=Sn(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/n:f/(n-1),h+6>s&&(s=f/(n-(t.offset?.5:1)),o=this.maxHeight-$s(t.grid)-e.padding-Ys(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=_n(Math.min(Math.asin(Sn((c.highest.height+6)/s,-1,1)),Math.asin(Sn(o/a,-1,1))-Math.asin(Sn(u/a,-1,1)))),l=Math.max(i,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){Ve(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ve(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:i,grid:r}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const s=Ys(i,e.options.font);if(o?(t.width=this.maxWidth,t.height=$s(r)+s):(t.height=this.maxHeight,t.width=$s(r)+s),n.display&&this.ticks.length){const{first:e,last:i,widest:r,highest:s}=this._getLabelSizes(),a=2*n.padding,l=bn(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(o){const e=n.mirror?0:h*r.width+c*s.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=n.mirror?0:c*r.width+h*s.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,i,h,c)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:r,padding:s},position:o}=this.options,a=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=i*t.width,u=n*e.height):(h=n*t.height,u=i*e.width):"start"===r?u=e.width:"end"===r?h=t.width:"inner"!==r&&(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-o+s)*this.width/(this.width-o),0),this.paddingRight=Math.max((u-c+s)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===r?(n=0,i=t.height):"end"===r&&(n=e.height,i=0),this.paddingTop=n+s,this.paddingBottom=i+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ve(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e{const n=t.gc,i=n.length/2;let r;if(i>e){for(r=0;r({width:s[t]||0,height:o[t]||0});return{first:k(0),last:k(e-1),widest:k(v),highest:k(w),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Sn(this._alignToPixels?oi(this.chart,e,0):e,-32768,32767)}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&&to*i?o/n:a/i:a*i0}_computeGridLineItems(t){const e=this.axis,n=this.chart,i=this.options,{grid:r,position:s,border:o}=i,a=r.offset,l=this.isHorizontal(),c=this.ticks.length+(a?1:0),h=$s(r),u=[],f=o.setContext(this.getContext()),d=f.display?f.width:0,p=d/2,g=function(t){return oi(n,t,d)};let m,b,_,y,x,v,w,k,M,S,O,A;if("top"===s)m=g(this.bottom),v=this.bottom-h,k=m-p,S=g(t.top)+p,A=t.bottom;else if("bottom"===s)m=g(this.top),S=t.top,A=g(t.bottom)-p,v=m+p,k=this.top+h;else if("left"===s)m=g(this.right),x=this.right-h,w=m-p,M=g(t.left)+p,O=t.right;else if("right"===s)m=g(this.left),M=t.left,O=g(t.right)-p,x=m+p,w=this.left+h;else if("x"===e){if("center"===s)m=g((t.top+t.bottom)/2+.5);else if(Fe(s)){const t=Object.keys(s)[0],e=s[t];m=g(this.chart.scales[t].getPixelForValue(e))}S=t.top,A=t.bottom,v=m+p,k=v+h}else if("y"===e){if("center"===s)m=g((t.left+t.right)/2);else if(Fe(s)){const t=Object.keys(s)[0],e=s[t];m=g(this.chart.scales[t].getPixelForValue(e))}x=m-p,w=x-h,M=t.left,O=t.right}const P=Be(i.ticks.maxTicksLimit,c),E=Math.max(1,Math.ceil(c/P));for(b=0;be.value===t));return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,s;const o=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(r=0,s=i.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let r,s;for(r=0,s=e.length;r{const i=n.split("."),r=i.pop(),s=[t].concat(i).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");ii.route(s,r,l,a)}))}(e,t.defaultRoutes),t.descriptors&&ii.describe(e,t.descriptors)}(t,s,n),this.override&&ii.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,i=this.scope;n in e&&delete e[n],i&&n in ii[i]&&(delete ii[i][n],this.override&&delete Zn[n])}}class Js{constructor(){this.controllers=new Ks(Nr,"datasets",!0),this.elements=new Ks(js,"elements"),this.plugins=new Ks(Object,"plugins"),this.scales=new Ks(Xs,"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((e=>{const i=n||this._getRegistryForType(e);n||i.isForType(e)||i===this.plugins&&e.id?this._exec(t,i,e):We(e,(e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)}))}))}_exec(t,e,n){const i=Ze(t);Ve(n["before"+i],[],n),e[t](n),Ve(n["after"+i],[],n)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function Qs(t,e){return e||!1!==t?!0===t?{}:t:null}function to(t,{plugin:e,local:n},i,r){const s=t.pluginScopeKeys(e),o=t.getOptionScopes(i,s);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function eo(t,e){const n=ii.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function no(t,e){if("x"===t||"y"===t||"r"===t)return t;var n;if(t=e.axis||("top"===(n=e.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||t.length>1&&no(t[0].toLowerCase(),e))return t;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function io(t){const e=t.options||(t.options={});e.plugins=Be(e.plugins,{}),e.scales=function(t,e){const n=Zn[t.type]||{scales:{}},i=e.scales||{},r=eo(t.type,e),s=Object.create(null);return Object.keys(i).forEach((t=>{const e=i[t];if(!Fe(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const o=no(t,e),a=function(t,e){return t===e?"_index_":"_value_"}(o,r),l=n.scales||{};s[t]=Xe(Object.create(null),[{axis:o},e,l[o],l[a]])})),t.data.datasets.forEach((n=>{const r=n.type||t.type,o=n.indexAxis||eo(r,e),a=(Zn[r]||{}).scales||{};Object.keys(a).forEach((t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,o),r=n[e+"AxisID"]||e;s[r]=s[r]||Object.create(null),Xe(s[r],[{axis:e},i[r],a[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];Xe(e,[ii.scales[e.type],ii.scale])})),s}(t,e)}function ro(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const so=new Map,oo=new Set;function ao(t,e){let n=so.get(t);return n||(n=e(),so.set(t,n),oo.add(n)),n}const lo=(t,e,n)=>{const i=Ge(e,n);void 0!==i&&t.add(i)};class co{constructor(t){this._config=function(t){return(t=t||{}).data=ro(t.data),io(t),t}(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=ro(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(),io(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ao(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return ao(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return ao(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return ao(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:i,type:r}=this,s=this._cachedScopes(t,n),o=s.get(e);if(o)return o;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>lo(a,t,e)))),e.forEach((t=>lo(a,i,t))),e.forEach((t=>lo(a,Zn[r]||{},t))),e.forEach((t=>lo(a,ii,t))),e.forEach((t=>lo(a,Qn,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),oo.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Zn[e]||{},ii.datasets[e]||{},{type:e},ii,Qn]}resolveNamedOptions(t,e,n,i=[""]){const r={$shared:!0},{resolver:s,subPrefixes:o}=ho(this._resolverCache,t,i);let a=s;(function(t,e){const{isScriptable:n,isIndexable:i}=Di(t);for(const r of e){const e=n(r),s=i(r),o=(s||e)&&t[r];if(e&&(tn(o)||uo(o))||s&&Ie(o))return!0}return!1})(s,e)&&(r.$shared=!1,a=Ci(s,n=tn(n)?n():n,this.createResolver(t,n,o)));for(const l of e)r[l]=a[l];return r}createResolver(t,e,n=[""],i){const{resolver:r}=ho(this._resolverCache,t,n);return Fe(e)?Ci(r,e,void 0,i):r}}function ho(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const r=n.join();let s=i.get(r);return s||(s={resolver:Ti(e,n),subPrefixes:n.filter((t=>!t.toLowerCase().includes("hover")))},i.set(r,s)),s}const uo=t=>Fe(t)&&Object.getOwnPropertyNames(t).reduce(((e,n)=>e||tn(t[n])),!1),fo=["top","bottom","left","right","chartArea"];function po(t,e){return"top"===t||"bottom"===t||-1===fo.indexOf(t)&&"x"===e}function go(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function mo(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Ve(n&&n.onComplete,[t],e)}function bo(t){const e=t.chart,n=e.options.animation;Ve(n&&n.onProgress,[t],e)}function _o(t){return Gi()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const yo={},xo=t=>{const e=_o(t);return Object.values(yo).filter((t=>t.canvas===e)).pop()};function vo(t,e,n){const i=Object.keys(t);for(const r of i){const i=+r;if(i>=e){const s=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=s)}}}class wo{static defaults=ii;static instances=yo;static overrides=Zn;static registry=Gs;static version="4.2.1";static getChart=xo;static register(...t){Gs.add(...t),ko()}static unregister(...t){Gs.remove(...t),ko()}constructor(t,e){const n=this.config=new co(e),i=_o(t),r=xo(i);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const s=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!Gi()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ws:zs}(i)),this.platform.updateConfig(n);const o=this.platform.acquireContext(i,s.aspectRatio),a=o&&o.canvas,l=a&&a.height,c=a&&a.width;this.id=Re(),this.ctx=o,this.canvas=a,this.width=c,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Zs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}((t=>this.update(t)),s.resizeDelay||0),this._dataChanges=[],yo[this.id]=this,o&&a?(Mr.listen(this,"complete",mo),Mr.listen(this,"progress",bo),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:i,_aspectRatio:r}=this;return Le(t)?e&&r?r:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Gs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ar(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ai(this.canvas,this.ctx),this}stop(){return Mr.stop(this),this}resize(t,e){Mr.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,i=this.canvas,r=n.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,e,r),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,ar(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),Ve(n.onResize,[this,s],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){We(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,i=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const n=e[t],i=no(t,n),r="r"===i,s="x"===i;return{options:n,dposition:r?"chartArea":s?"bottom":"left",dtype:r?"radialLinear":s?"category":"linear"}})))),We(r,(e=>{const r=e.options,s=r.id,o=no(s,r),a=Be(r.type,e.dtype);void 0!==r.position&&po(r.position,o)===po(e.dposition)||(r.position=e.dposition),i[s]=!0;let l=null;s in n&&n[s].type===a?l=n[s]:(l=new(Gs.getScale(a))({id:s,type:a,ctx:this.ctx,chart:this}),n[l.id]=l),l.init(r,t)})),We(i,((t,e)=>{t||delete n[e]})),We(n,(t=>{xs.configure(this,t,t.options),xs.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort(((t,e)=>t.index-e.index)),n>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,n)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=e.length;n{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()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let l=0,c=this.data.datasets.length;l{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(go("z","_idx"));const{_active:o,_lastEvent:a}=this;a?this._eventHandler(a,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){We(this.scales,(t=>{xs.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);en(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:r}of e)vo(t,i,"_removeElements"===n?-r:r)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),i=n(0);for(let r=1;rt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;xs.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],We(this.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,i=!n.disabled,r=function(t){const{xScale:e,yScale:n}=t;if(e&&n)return{left:e.left,right:e.right,top:n.top,bottom:n.bottom}}(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(i&&ui(e,{left:!1===n.left?0:r.left-n.left,right:!1===n.right?this.width:r.right+n.right,top:!1===n.top?0:r.top-n.top,bottom:!1===n.bottom?this.height:r.bottom+n.bottom}),t.controller.draw(),i&&fi(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return hi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const r=as.modes[e];return"function"==typeof r?r(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter((t=>t&&t._dataset===e)).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=Ei(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"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const i=n?"show":"hide",r=this.getDatasetMeta(t),s=r.controller._resolveAnimations(void 0,i);Qe(e)?(r.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),s.update(r,{visible:n}),this.update((e=>e.datasetIndex===t?i:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Mr.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,n,i),t[n]=i},i=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};We(this.options.events,(t=>n(t,i)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const o=()=>{i("attach",o),this.attached=!0,this.resize(),n("resize",r),n("detach",s)};s=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),n("attach",o)},e.isAttached(this.canvas)?o():s()}unbindEvents(){We(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},We(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let r,s,o,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),o=0,a=t.length;o{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}));!He(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 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,n){const i=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),s=r(e,t),o=n?t:r(t,e);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const r=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(r||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:i=[],options:r}=this,s=e,o=this._getActiveElements(t,i,n,s),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,n,a);n&&(this._lastEvent=null,Ve(r.onHover,[t,o,this],this),a&&Ve(r.onClick,[t,o,this],this));const c=!He(o,i);return(c||e)&&(this._active=o,this._updateHoverStyles(o,i,e)),this._lastEvent=l,c}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,i)}}function ko(){return We(wo.instances,(t=>t._plugins.invalidate()))}function Mo(t,e,n,i){const r=ki(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),s=(n-e)/2,o=Math.min(s,i*e/2),a=t=>{const e=(n-Math.min(s,t))*i/2;return Sn(t,0,Math.min(s,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:Sn(r.innerStart,0,o),innerEnd:Sn(r.innerEnd,0,o)}}function So(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Oo(t,e,n,i,r,s){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=e,u=Math.max(e.outerRadius+i+n-c,0),f=h>0?h+i+n+c:0;let d=0;const p=r-l;if(i){const t=((h>0?h-i:0)+(u>0?u-i:0))/2;d=(p-(0!==t?p*t/(t+i):p))/2}const g=(p-Math.max(.001,p*u-n/nn)/u)/2,m=l+g+d,b=r-g-d,{outerStart:_,outerEnd:y,innerStart:x,innerEnd:v}=Mo(e,f,u,b-m),w=u-_,k=u-y,M=m+_/w,S=b-y/k,O=f+x,A=f+v,P=m+x/O,E=b-v/A;if(t.beginPath(),s){const e=(M+S)/2;if(t.arc(o,a,u,M,e),t.arc(o,a,u,e,S),y>0){const e=So(k,S,o,a);t.arc(e.x,e.y,y,S,b+ln)}const n=So(A,b,o,a);if(t.lineTo(n.x,n.y),v>0){const e=So(A,E,o,a);t.arc(e.x,e.y,v,b+ln,E+Math.PI)}const i=(b-v/f+(m+x/f))/2;if(t.arc(o,a,f,b-v/f,i,!0),t.arc(o,a,f,i,m+x/f,!0),x>0){const e=So(O,P,o,a);t.arc(e.x,e.y,x,P+Math.PI,m-ln)}const r=So(w,m,o,a);if(t.lineTo(r.x,r.y),_>0){const e=So(w,M,o,a);t.arc(e.x,e.y,_,m-ln,M)}}else{t.moveTo(o,a);const e=Math.cos(M)*u+o,n=Math.sin(M)*u+a;t.lineTo(e,n);const i=Math.cos(S)*u+o,r=Math.sin(S)*u+a;t.lineTo(i,r)}t.closePath()}function Ao(t,e,n,i,r){const{fullCircles:s,startAngle:o,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:h}=l,u="inner"===l.borderAlign;if(!c)return;u?(t.lineWidth=2*c,t.lineJoin=h||"round"):(t.lineWidth=c,t.lineJoin=h||"bevel");let f=e.endAngle;if(s){Oo(t,e,n,i,f,r);for(let e=0;er?(c=r/l,t.arc(s,o,l,n+c,i-c,!0)):t.arc(s,o,r,n+ln,i-ln),t.closePath(),t.clip()}(t,e,f),s||(Oo(t,e,n,i,f,r),t.stroke())}function Po(t,e,n=e){t.lineCap=Be(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Be(n.borderDash,e.borderDash)),t.lineDashOffset=Be(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Be(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Be(n.borderWidth,e.borderWidth),t.strokeStyle=Be(n.borderColor,e.borderColor)}function Eo(t,e,n){t.lineTo(n.x,n.y)}function To(t,e,n={}){const i=t.length,{start:r=0,end:s=i-1}=n,{start:o,end:a}=e,l=Math.max(r,o),c=Math.min(s,a),h=ra&&s>a;return{count:i,start:l,loop:e.loop,ilen:c(o+(c?a-t:t))%s,y=()=>{d!==p&&(t.lineTo(m,p),t.lineTo(m,d),t.lineTo(m,g))};for(l&&(u=r[_(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[_(h)],u.skip)continue;const e=u.x,n=u.y,i=0|e;i===f?(np&&(p=n),m=(b*m+e)/++b):(y(),t.lineTo(e,n),f=i,b=0,d=p=n),g=n}y()}function Ro(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n?Co:Do}t("C",wo);const Lo="function"==typeof Path2D;function Io(t,e,n,i){Lo&&!e.options.segment?function(t,e,n,i){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,i)&&r.closePath()),Po(t,e.options),t.stroke(r)}(t,e,n,i):function(t,e,n,i){const{segments:r,options:s}=e,o=Ro(e);for(const a of r)Po(t,s,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}class Fo extends js{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};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||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;Ji(this._points,n,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const n=t.points,i=t.options.spanGaps,r=n.length;if(!r)return[];const s=!!t._loop,{start:o,end:a}=function(t,e,n,i){let r=0,s=e-1;if(n&&!i)for(;rr&&t[s%e].skip;)s--;return s%=e,{start:r,end:s}}(n,r,s,i);return xr(t,!0===i?[{start:o,end:a,loop:s}]:function(t,e,n,i){const r=t.length,s=[];let o,a=e,l=t[e];for(o=e+1;o<=n;++o){const n=t[o%r];n.skip||n.stop?l.skip||(i=!1,s.push({start:e%r,end:(o-1)%r,loop:i}),e=a=n.stop?o:null):(a=o,l.skip&&(e=o)),l=n}return null!==a&&s.push({start:e%r,end:a%r,loop:i}),s}(n,o,a=rn||Mn(r,o,a),d=On(s,l+u,c+u);return f&&d}getCenterPoint(t){const{x:e,y:n,startAngle:i,endAngle:r,innerRadius:s,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:a,spacing:l}=this.options,c=(i+r)/2,h=(s+o+l+a)/2;return{x:e+Math.cos(c)*h,y:n+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,i=(e.offset||0)/4,r=(e.spacing||0)/2,s=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>rn?Math.floor(n/rn):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();const o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*i,Math.sin(o)*i);const a=i*(1-Math.sin(Math.min(nn,n||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,n,i,r){const{fullCircles:s,startAngle:o,circumference:a}=e;let l=e.endAngle;if(s){Oo(t,e,n,i,l,r);for(let e=0;et.replace("rgb(","rgba(").replace(")",", 0.5)")));function qo(t){return $o[t%$o.length]}function Xo(t){return Yo[t%Yo.length]}function Ko(t){let e=0;return(n,i)=>{const r=t.getDatasetMeta(i).controller;r instanceof Kr?e=function(t,e){return t.backgroundColor=t.data.map((()=>qo(e++))),e}(n,e):r instanceof Jr?e=function(t,e){return t.backgroundColor=t.data.map((()=>Xo(e++))),e}(n,e):r&&(e=function(t,e){return t.borderColor=qo(e),t.backgroundColor=Xo(e),++e}(n,e))}}function Jo(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Go={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:i},options:r}=t.config,{elements:s}=r;if(!n.forceOverride&&(Jo(i)||(o=r)&&(o.borderColor||o.backgroundColor)||s&&Jo(s)))return;var o;const a=Ko(t);i.forEach(a)}};function Zo(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Qo(t){t.data.datasets.forEach((t=>{Zo(t)}))}var ta={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled)return void Qo(t);const i=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:s,indexAxis:o}=e,a=t.getDatasetMeta(r),l=s||e.data;if("y"===Pi([o,t.options.indexAxis]))return;if(!a.controller.supportsDecimation)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let h,{start:u,count:f}=function(t,e){const n=e.length;let i,r=0;const{iScale:s}=t,{min:o,max:a,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(r=Sn(Pn(e,s.axis,o).lo,0,n-1)),i=c?Sn(Pn(e,s.axis,a).hi+1,r,n)-r:n-r,{start:r,count:i}}(a,l);if(f<=(n.threshold||4*i))Zo(e);else{switch(Le(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),n.algorithm){case"lttb":h=function(t,e,n,i,r){const s=r.samples||i;if(s>=n)return t.slice(e,e+n);const o=[],a=(n-2)/(s-2);let l=0;const c=e+n-1;let h,u,f,d,p,g=e;for(o[l++]=t[g],h=0;hf&&(f=d,u=t[i],p=i);o[l++]=u,g=p}return o[l++]=t[c],o}(l,u,f,i,n);break;case"min-max":h=function(t,e,n,i){let r,s,o,a,l,c,h,u,f,d,p=0,g=0;const m=[],b=e+n-1,_=t[e].x,y=t[b].x-_;for(r=e;rd&&(d=a,h=r),p=(g*p+s.x)/++g;else{const n=r-1;if(!Le(c)&&!Le(h)){const e=Math.min(c,h),i=Math.max(c,h);e!==u&&e!==n&&m.push({...t[e],x:p}),i!==u&&i!==n&&m.push({...t[i],x:p})}r>0&&n!==u&&m.push(t[n]),m.push(s),l=e,g=0,f=d=a,c=h=u=r}}return m}(l,u,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}e._decimated=h}}))},destroy(t){Qo(t)}};function ea(t,e,n,i){if(i)return;let r=e[t],s=n[t];return"angle"===t&&(r=kn(r),s=kn(s)),{property:t,start:r,end:s}}function na(t,e,n){for(;e>t;e--){const t=n[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ia(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function ra(t,e){let n=[],i=!1;return Ie(t)?(i=!0,n=t):n=function(t,e){const{x:n=null,y:i=null}=t||{},r=e.points,s=[];return e.segments.forEach((({start:t,end:e})=>{e=na(t,e,r);const o=r[t],a=r[e];null!==i?(s.push({x:o.x,y:i}),s.push({x:a.x,y:i})):null!==n&&(s.push({x:n,y:o.y}),s.push({x:n,y:a.y}))})),s}(t,e),n.length?new Fo({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function sa(t){return t&&!1!==t.fill}function oa(t,e,n){let i=t[e].fill;const r=[e];let s;if(!n)return i;for(;!1!==i&&-1===r.indexOf(i);){if(!ze(i))return i;if(s=t[i],!s)return!1;if(s.visible)return i;r.push(i),i=s.fill}return!1}function aa(t,e,n){const i=function(t){const e=t.options,n=e.fill;let i=Be(n&&n.target,n);return void 0===i&&(i=!!e.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}(t);if(Fe(i))return!isNaN(i.value)&&i;let r=parseFloat(i);return ze(r)&&Math.floor(r)===r?function(t,e,n,i){return"-"!==t&&"+"!==t||(n=e+n),!(n===e||n<0||n>=i)&&n}(i[0],e,r,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function la(t,e,n){const i=[];for(let r=0;r=0;--o){const e=r[o].$filler;e&&(e.line.updateControlPoints(s,e.axis),i&&e.fill&&fa(t.ctx,e,s))}},beforeDatasetsDraw(t,e,n){if("beforeDatasetsDraw"!==n.drawTime)return;const i=t.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const e=i[r].$filler;sa(e)&&fa(t.ctx,e,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;sa(i)&&"beforeDatasetDraw"===n.drawTime&&fa(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const _a=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}};class ya extends js{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=Ve(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,n)=>t.sort(e,n,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,i=Ai(n.font),r=i.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:a}=_a(n,r);let l,c;e.font=i.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(s,r,o,a)+10):(c=this.maxHeight,l=this._fitCols(s,i,o,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:r,maxWidth:s,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=i+o;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,f=-c;return this.legendItems.forEach(((t,d)=>{const p=n+e/2+r.measureText(t.text).width;(0===d||l[l.length-1]+p+2*o>s)&&(h+=c,l[l.length-(d>0?0:1)]=0,f+=c,u++),a[d]={left:0,top:f,row:u,width:p,height:i},l[l.length-1]+=p+o})),h}_fitCols(t,e,n,i){const{ctx:r,maxHeight:s,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=s-t;let h=o,u=0,f=0,d=0,p=0;return this.legendItems.forEach(((t,s)=>{const{itemWidth:g,itemHeight:m}=function(t,e,n,i,r){const s=function(t,e,n,i){let r=t.text;return r&&"string"!=typeof r&&(r=r.reduce(((t,e)=>t.length>e.length?t:e))),e+n.size/2+i.measureText(r).width}(i,t,e,n),o=function(t,e,n){let i=t;return"string"!=typeof e.text&&(i=xa(e,n)),i}(r,i,e.lineHeight);return{itemWidth:s,itemHeight:o}}(n,e,r,t,i);s>0&&f+m+2*o>c&&(h+=u+o,l.push({width:u,height:f}),d+=u+o,p++,u=f=0),a[s]={left:d,top:f,col:p,width:g,height:m},u=Math.max(u,g),f+=m+o})),h+=u,l.push({width:u,height:f}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:i},rtl:r}}=this,s=dr(r,this.left,this.width);if(this.isHorizontal()){let r=0,o=Fn(n,this.left+i,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,o=Fn(n,this.left+i,this.right-this.lineWidths[r])),a.top+=this.top+t+i,a.left=s.leftForLtr(s.x(o),a.width),o+=a.width+i}else{let r=0,o=Fn(n,this.top+t+i,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,o=Fn(n,this.top+t+i,this.bottom-this.columnSizes[r].height)),a.top=o,a.left+=this.left+i,a.left=s.leftForLtr(s.x(a.left),a.width),o+=a.height+i}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ui(t,this),this._draw(),fi(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:i}=this,{align:r,labels:s}=t,o=ii.color,a=dr(t.rtl,this.left,this.width),l=Ai(s.font),{padding:c}=s,h=l.size,u=h/2;let f;this.drawTitle(),i.textAlign=a.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=l.string;const{boxWidth:d,boxHeight:p,itemHeight:g}=_a(s,h),m=this.isHorizontal(),b=this._computeTitleHeight();f=m?{x:Fn(r,this.left+c,this.right-n[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:Fn(r,this.top+b+c,this.bottom-e[0].height),line:0},pr(this.ctx,t.textDirection);const _=g+c;this.legendItems.forEach(((y,x)=>{i.strokeStyle=y.fontColor,i.fillStyle=y.fontColor;const v=i.measureText(y.text).width,w=a.textAlign(y.textAlign||(y.textAlign=s.textAlign)),k=d+u+v;let M=f.x,S=f.y;if(a.setWidth(this.width),m?x>0&&M+k+c>this.right&&(S=f.y+=_,f.line++,M=f.x=Fn(r,this.left+c,this.right-n[f.line])):x>0&&S+_>this.bottom&&(M=f.x=M+e[f.line].width+c,f.line++,S=f.y=Fn(r,this.top+b+c,this.bottom-e[f.line].height)),function(t,e,n){if(isNaN(d)||d<=0||isNaN(p)||p<0)return;i.save();const r=Be(n.lineWidth,1);if(i.fillStyle=Be(n.fillStyle,o),i.lineCap=Be(n.lineCap,"butt"),i.lineDashOffset=Be(n.lineDashOffset,0),i.lineJoin=Be(n.lineJoin,"miter"),i.lineWidth=r,i.strokeStyle=Be(n.strokeStyle,o),i.setLineDash(Be(n.lineDash,[])),s.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:r},l=a.xPlus(t,d/2);ci(i,o,l,e+u,s.pointStyleWidth&&d)}else{const s=e+Math.max((h-p)/2,0),o=a.leftForLtr(t,d),l=Si(n.borderRadius);i.beginPath(),Object.values(l).some((t=>0!==t))?_i(i,{x:o,y:s,w:d,h:p,radius:l}):i.rect(o,s,d,p),i.fill(),0!==r&&i.stroke()}i.restore()}(a.x(M),S,y),M=((t,e,n,i)=>t===(i?"left":"right")?n:"center"===t?(e+n)/2:e)(w,M+d+u,m?M+k:this.right,t.rtl),function(t,e,n){gi(i,n.text,t,e+g/2,l,{strikethrough:n.hidden,textAlign:a.textAlign(n.textAlign)})}(a.x(M),S,y),m)f.x+=k+c;else if("string"!=typeof y.text){const t=l.lineHeight;f.y+=xa(y,t)}else f.y+=_})),gr(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=Ai(e.font),i=Oi(e.padding);if(!e.display)return;const r=dr(t.rtl,this.left,this.width),s=this.ctx,o=e.position,a=n.size/2,l=i.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=Fn(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+Fn(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const f=Fn(o,h,h+u);s.textAlign=r.textAlign(In(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=n.string,gi(s,e.text,f,c,n)}_computeTitleHeight(){const t=this.options.title,e=Ai(t.font),n=Oi(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,i,r;if(On(t,this.left,this.right)&&On(e,this.top,this.bottom))for(r=this.legendHitBoxes,n=0;nnull!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index)(i,n);i&&!r&&Ve(e.onLeave,[t,i,this],this),this._hoveredItem=n,n&&!r&&Ve(e.onHover,[t,n,this],this)}else n&&Ve(e.onClick,[t,n,this],this)}}function xa(t,e){return e*(t.text?t.text.length+.5:0)}var va={id:"legend",_element:ya,start(t,e,n){const i=t.legend=new ya({ctx:t.ctx,options:n,chart:t});xs.configure(t,i,n),xs.addBox(t,i)},stop(t){xs.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;xs.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),e.hidden=!0):(r.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:s,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(n?0:void 0),c=Oi(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:i||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:o&&(a||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class wa extends js{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)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const i=Ie(n.text)?n.text.length:1;this._padding=Oi(n.padding);const r=i*Ai(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:i,right:r,options:s}=this,o=s.align;let a,l,c,h=0;return this.isHorizontal()?(l=Fn(o,n,r),c=e+t,a=r-n):("left"===s.position?(l=n+t,c=Fn(o,i,e),h=-.5*nn):(l=r-t,c=Fn(o,e,i),h=.5*nn),a=i-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=Ai(e.font),i=n.lineHeight/2+this._padding.top,{titleX:r,titleY:s,maxWidth:o,rotation:a}=this._drawArgs(i);gi(t,e.text,0,0,n,{color:e.color,maxWidth:o,rotation:a,textAlign:In(e.align),textBaseline:"middle",translation:[r,s]})}}var ka={id:"title",_element:wa,start(t,e,n){!function(t,e){const n=new wa({ctx:t.ctx,options:e,chart:t});xs.configure(t,n,e),xs.addBox(t,n),t.titleBlock=n}(t,n)},stop(t){const e=t.titleBlock;xs.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;xs.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ma=new WeakMap;var Sa={id:"subtitle",start(t,e,n){const i=new wa({ctx:t.ctx,options:n,chart:t});xs.configure(t,i,n),xs.addBox(t,i),Ma.set(t,i)},stop(t){xs.removeBox(t,Ma.get(t)),Ma.delete(t)},beforeUpdate(t,e,n){const i=Ma.get(t);xs.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oa={average(t){if(!t.length)return!1;let e,n,i=0,r=0,s=0;for(e=0,n=t.length;e-1?t.split("\n"):t}function Ea(t,e){const{element:n,datasetIndex:i,index:r}=e,s=t.getDatasetMeta(i).controller,{label:o,value:a}=s.getLabelAndValue(r);return{chart:t,label:o,parsed:s.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:a,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function Ta(t,e){const n=t.chart.ctx,{body:i,footer:r,title:s}=t,{boxWidth:o,boxHeight:a}=e,l=Ai(e.bodyFont),c=Ai(e.titleFont),h=Ai(e.footerFont),u=s.length,f=r.length,d=i.length,p=Oi(e.padding);let g=p.height,m=0,b=i.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b&&(g+=d*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-d)*l.lineHeight+(b-1)*e.bodySpacing),f&&(g+=e.footerMarginTop+f*h.lineHeight+(f-1)*e.footerSpacing);let _=0;const y=function(t){m=Math.max(m,n.measureText(t).width+_)};return n.save(),n.font=c.string,We(t.title,y),n.font=l.string,We(t.beforeBody.concat(t.afterBody),y),_=e.displayColors?o+2+e.boxPadding:0,We(i,(t=>{We(t.before,y),We(t.lines,y),We(t.after,y)})),_=0,n.font=h.string,We(t.footer,y),n.restore(),m+=p.width,{width:m,height:g}}function Ca(t,e,n,i){const{x:r,width:s}=n,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return"center"===i?c=r<=(a+l)/2?"left":"right":r<=s/2?c="left":r>=o-s/2&&(c="right"),function(t,e,n,i){const{x:r,width:s}=i,o=n.caretSize+n.caretPadding;return"left"===t&&r+s+o>e.width||"right"===t&&r-s-o<0||void 0}(c,t,e,n)&&(c="center"),c}function Da(t,e,n){const i=n.yAlign||e.yAlign||function(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||Ca(t,e,n,i),yAlign:i}}function Ra(t,e,n,i){const{caretSize:r,caretPadding:s,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,c=r+s,{topLeft:h,topRight:u,bottomLeft:f,bottomRight:d}=Si(o);let p=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,a);const g=function(t,e,n){let{y:i,height:r}=t;return"top"===e?i+=n:i-="bottom"===e?r+n:r/2,i}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,f)+r:"right"===a&&(p+=Math.max(u,d)+r),{x:Sn(p,0,i.width-e.width),y:Sn(g,0,i.height-e.height)}}function La(t,e,n){const i=Oi(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Ia(t){return Aa([],Pa(t))}function Fa(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const za={beforeTitle:De,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex{const e={before:[],lines:[],after:[]},r=Fa(n,t);Aa(e.before,Pa(ja(r,"beforeLabel",this,t))),Aa(e.lines,ja(r,"label",this,t)),Aa(e.after,Pa(ja(r,"afterLabel",this,t))),i.push(e)})),i}getAfterBody(t,e){return Ia(ja(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,i=ja(n,"beforeFooter",this,t),r=ja(n,"footer",this,t),s=ja(n,"afterFooter",this,t);let o=[];return o=Aa(o,Pa(i)),o=Aa(o,Pa(r)),o=Aa(o,Pa(s)),o}_createItems(t){const e=this._active,n=this.chart.data,i=[],r=[],s=[];let o,a,l=[];for(o=0,a=e.length;ot.filter(e,i,r,n)))),t.itemSort&&(l=l.sort(((e,i)=>t.itemSort(e,i,n)))),We(l,(e=>{const n=Fa(t.callbacks,e);i.push(ja(n,"labelColor",this,e)),r.push(ja(n,"labelPointStyle",this,e)),s.push(ja(n,"labelTextColor",this,e))})),this.labelColors=i,this.labelPointStyles=r,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let r,s=[];if(i.length){const t=Oa[n.position].call(this,i,this._eventPosition);s=this._createItems(n),this.title=this.getTitle(s,n),this.beforeBody=this.getBeforeBody(s,n),this.body=this.getBody(s,n),this.afterBody=this.getAfterBody(s,n),this.footer=this.getFooter(s,n);const e=this._size=Ta(this,n),o=Object.assign({},t,e),a=Da(this.chart,n,o),l=Ra(n,o,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=s,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const r=this.getCaretPosition(t,n,i);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,n){const{xAlign:i,yAlign:r}=this,{caretSize:s,cornerRadius:o}=n,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=Si(o),{x:u,y:f}=t,{width:d,height:p}=e;let g,m,b,_,y,x;return"center"===r?(y=f+p/2,"left"===i?(g=u,m=g-s,_=y+s,x=y-s):(g=u+d,m=g+s,_=y-s,x=y+s),b=g):(m="left"===i?u+Math.max(a,c)+s:"right"===i?u+d-Math.max(l,h)-s:this.caretX,"top"===r?(_=f,y=_-s,g=m-s,b=m+s):(_=f+p,y=_+s,g=m+s,b=m-s),x=_),{x1:g,x2:m,x3:b,y1:_,y2:y,y3:x}}drawTitle(t,e,n){const i=this.title,r=i.length;let s,o,a;if(r){const l=dr(n.rtl,this.x,this.width);for(t.x=La(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",s=Ai(n.titleFont),o=n.titleSpacing,e.fillStyle=n.titleColor,e.font=s.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,_i(t,{x:e,y:p,w:l,h:a,radius:o}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),_i(t,{x:n,y:p+1,w:l-2,h:a-2,radius:o}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=s.backgroundColor,t.fillRect(n,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:i}=this,{bodySpacing:r,bodyAlign:s,displayColors:o,boxHeight:a,boxWidth:l,boxPadding:c}=n,h=Ai(n.bodyFont);let u=h.lineHeight,f=0;const d=dr(n.rtl,this.x,this.width),p=function(n){e.fillText(n,d.x(t.x+f),t.y+u/2),t.y+=u+r},g=d.textAlign(s);let m,b,_,y,x,v,w;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=La(this,g,n),e.fillStyle=n.bodyColor,We(this.beforeBody,p),f=o&&"right"!==g?"center"===s?l/2+c:l+2+c:0,y=0,v=i.length;y0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,r=n&&n.y;if(i||r){const n=Oa[t.position].call(this,this._active,this._eventPosition);if(!n)return;const s=this._size=Ta(this,t),o=Object.assign({},n,this._size),a=Da(e,t,o),l=Ra(t,o,a,e);i._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=s.width,this.height=s.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},r={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const s=Oi(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=n,this.drawBackground(r,t,i,e),pr(t,e.textDirection),r.y+=s.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gr(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,i=t.map((({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),r=!He(n,i),s=this._positionChanged(i,e);(r||s)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,r=this._active||[],s=this._getActiveElements(t,r,e,n),o=this._positionChanged(s,t),a=e||!He(s,r)||o;return a&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,n,i){const r=this.options;if("mouseout"===t.type)return[];if(!i)return e;const s=this.chart.getElementsAtEventForMode(t,r.mode,r,n);return r.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:n,caretY:i,options:r}=this,s=Oa[r.position].call(this,t,e);return!1!==s&&(n!==s.x||i!==s.y)}}var Na={id:"tooltip",_element:Ba,positioners:Oa,afterInit(t,e,n){n&&(t.tooltip=new Ba({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:za},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Va=Object.freeze({__proto__:null,Colors:Go,Decimation:ta,Filler:ba,Legend:va,SubTitle:Sa,Title:ka,Tooltip:Na});function Wa(t,e,n,i){const r=t.indexOf(e);return-1===r?((t,e,n,i)=>("string"==typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,i):r!==t.lastIndexOf(e)?n:r}function Ha(t){const e=this.getLabels();return t>=0&&td&&(M=pn(k*M/d/f)*f),Le(a)||(x=Math.pow(10,a),M=Math.ceil(M*x)/x),"ticks"===i?(v=Math.floor(p/M)*M,w=Math.ceil(g/M)*M):(v=p,w=g),m&&b&&r&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((o-s)/r,M/1e3)?(k=Math.round(Math.min((o-s)/M,c)),M=(o-s)/k,v=s,w=o):_?(v=m?s:v,w=b?o:w,k=l-1,M=(w-v)/k):(k=(w-v)/M,k=dn(k,Math.round(k),M/1e3)?Math.round(k):Math.ceil(k));const S=Math.max(yn(M),yn(v));x=Math.pow(10,Le(a)?S:a),v=Math.round(v*x)/x,w=Math.round(w*x)/x;let O=0;for(m&&(u&&v!==s?(n.push({value:s}),vi=e?i:t,o=t=>r=n?r:t;if(t){const t=fn(i),e=fn(r);t<0&&e<0?o(0):t>0&&e>0&&s(0)}if(i===r){let e=0===r?1:Math.abs(.05*r);o(r+e),t||s(i-e)}this.min=i,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i=Ua({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:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&mn(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Kn(t,this.chart.options.locale,this.options.ticks.format)}}class qa extends Ya{static id="linear";static defaults={ticks:{callback:Gn.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ze(t)?t:0,this.max=ze(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=bn(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Xa=t=>Math.floor(un(t)),Ka=(t,e)=>Math.pow(10,Xa(t)+e);function Ja(t){return 1==t/Math.pow(10,Xa(t))}function Ga(t,e,n){const i=Math.pow(10,n),r=Math.floor(t/i);return Math.ceil(e/i)-r}function Za(t,{min:e,max:n}){e=je(t.min,e);const i=[],r=Xa(e);let s=function(t,e){let n=Xa(e-t);for(;Ga(t,e,n)>10;)n++;for(;Ga(t,e,n)<10;)n--;return Math.min(n,Xa(t))}(e,n),o=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),l=r>s?Math.pow(10,r):0,c=Math.round((e-l)*o)/o,h=Math.floor((e-l)/a/10)*a*10;let u=Math.floor((c-h)/Math.pow(10,s)),f=je(t.min,Math.round((l+h+u*Math.pow(10,s))*o)/o);for(;f=10?u=u<15?15:20:u++,u>=20&&(s++,u=2,o=s>=0?1:o),f=Math.round((l+h+u*Math.pow(10,s))*o)/o;const d=je(t.max,f);return i.push({value:d,major:Ja(d),significand:u}),i}class Qa extends Xs{static id="logarithmic";static defaults={ticks:{callback:Gn.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=Ya.prototype.parse.apply(this,[t,e]);if(0!==n)return ze(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ze(t)?Math.max(0,t):null,this.max=ze(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ze(this._userMin)&&(this.min=t===Ka(this.min,0)?Ka(this.min,-1):Ka(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,i=this.max;const r=e=>n=t?n:e,s=t=>i=e?i:t;n===i&&(n<=0?(r(1),s(10)):(r(Ka(n,-1)),s(Ka(i,1)))),n<=0&&r(Ka(i,-1)),i<=0&&s(Ka(n,1)),this.min=n,this.max=i}buildTicks(){const t=this.options,e=Za({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&mn(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Kn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=un(t),this._valueRange=un(this.max)-un(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(un(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function tl(t){const e=t.ticks;if(e.display&&t.display){const t=Oi(e.backdropPadding);return Be(e.font&&e.font.size,ii.font.size)+t.height}return 0}function el(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:tr?{start:e-n,end:e}:{start:e,end:e+n}}function nl(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],r=[],s=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?nn/s:0;for(let u=0;ue.r&&(a=(i.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),r.starte.b&&(l=(r.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function rl(t){return 0===t||180===t?"center":t<180?"left":"right"}function sl(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function ol(t,e,n){return 90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e),t}function al(t,e,n,i){const{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,rn);else{let n=t.getPointPosition(0,e);r.moveTo(n.x,n.y);for(let s=1;st,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};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=Oi(tl(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=ze(t)&&!isNaN(t)?t:0,this.max=ze(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/tl(this.options))}generateTickLabels(t){Ya.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const n=Ve(this.options.pointLabels.callback,[t,e],this);return n||0===n?n:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?nl(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,i))}getIndexAngle(t){return kn(t*(rn/(this._pointLabels.length||1))+bn(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(Le(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(Le(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=0;r--){const e=i.setContext(t.getPointLabelContext(r)),s=Ai(e.font),{x:o,y:a,textAlign:l,left:c,top:h,right:u,bottom:f}=t._pointLabelItems[r],{backdropColor:d}=e;if(!Le(d)){const t=Si(e.borderRadius),i=Oi(e.backdropPadding);n.fillStyle=d;const r=c-i.left,s=h-i.top,o=u-c+i.width,a=f-h+i.height;Object.values(t).some((t=>0!==t))?(n.beginPath(),_i(n,{x:r,y:s,w:o,h:a,radius:t}),n.fill()):n.fillRect(r,s,o,a)}gi(n,t._pointLabels[r],o,a+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,s),i.display&&this.ticks.forEach(((t,e)=>{if(0!==e){a=this.getDistanceFromCenterForValue(t.value);const n=this.getContext(e),o=i.setContext(n),l=r.setContext(n);!function(t,e,n,i,r){const s=t.ctx,o=e.circular,{color:a,lineWidth:l}=e;!o&&!i||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(r.dash),s.lineDashOffset=r.dashOffset,s.beginPath(),al(t,n,o,i),s.closePath(),s.stroke(),s.restore())}(this,o,a,s,l)}})),n.display){for(t.save(),o=s-1;o>=0;o--){const i=n.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:s}=i;s&&r&&(t.lineWidth=s,t.strokeStyle=r,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let r,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((i,o)=>{if(0===o&&!e.reverse)return;const a=n.setContext(this.getContext(o)),l=Ai(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[o].value),a.showLabelBackdrop){t.font=l.string,s=t.measureText(i.label).width,t.fillStyle=a.backdropColor;const e=Oi(a.backdropPadding);t.fillRect(-s/2-e.left,-r-l.size/2-e.top,s+e.width,l.size+e.height)}gi(t,i.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}const cl={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}},hl=Object.keys(cl);function ul(t,e){return t-e}function fl(t,e){if(Le(e))return null;const n=t._adapter,{parser:i,round:r,isoWeekday:s}=t._parseOpts;let o=e;return"function"==typeof i&&(o=i(o)),ze(o)||(o="string"==typeof i?n.parse(o,i):n.parse(o)),null===o?null:(r&&(o="week"!==r||!gn(s)&&!0!==s?n.startOf(o,r):n.startOf(o,"isoWeek",s)),+o)}function dl(t,e,n,i){const r=hl.length;for(let s=hl.indexOf(t);s=e?n[i]:n[r]]=!0}}else t[e]=!0}function gl(t,e,n){const i=[],r={},s=e.length;let o,a;for(o=0;o=0&&(e[l].major=!0);return e}(t,i,r,n):i}class ml extends Xs{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};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={}),i=this._adapter=new ts(t.adapters.date);i.init(e),Xe(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:fl(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:i,max:r,minDefined:s,maxDefined:o}=this.getUserBounds();function a(t){s||isNaN(t.min)||(i=Math.min(i,t.min)),o||isNaN(t.max)||(r=Math.max(r,t.max))}s&&o||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),i=ze(i)&&!isNaN(i)?i:+e.startOf(Date.now(),n),r=ze(r)&&!isNaN(r)?r:+e.endOf(Date.now(),n)+1,this.min=Math.min(i,r-1),this.max=Math.max(i+1,r)}_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,i="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const r=this.min,s=function(t,e,n){let i=0,r=t.length;for(;ii&&t[r-1]>n;)r--;return i>0||r=hl.indexOf(n);s--){const n=hl[s];if(cl[n].common&&t._adapter.diff(r,i,n)>=e-1)return n}return hl[n?hl.indexOf(n):0]}(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=hl.indexOf(t)+1,n=hl.length;e+t.value)))}initOffsets(t=[]){let e,n,i=0,r=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),i=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),r=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;i=Sn(i,0,s),r=Sn(r,0,s),this._offsets={start:i,end:r,factor:1/(i+1+r)}}_generate(){const t=this._adapter,e=this.min,n=this.max,i=this.options,r=i.time,s=r.unit||dl(r.minUnit,e,n,this._getLabelCapacity(e)),o=Be(i.ticks.stepSize,1),a="week"===s&&r.isoWeekday,l=gn(a)||!0===a,c={};let h,u,f=e;if(l&&(f=+t.startOf(f,"isoWeek",a)),f=+t.startOf(f,l?"day":s),t.diff(n,e,s)>1e5*o)throw new Error(e+" and "+n+" are too far apart with stepSize of "+o+" "+s);const d="data"===i.ticks.source&&this.getDataTimestamps();for(h=f,u=0;ht-e)).map((t=>+t))}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 n=this.options.time.displayFormats,i=this._unit,r=e||n[i];return this._adapter.format(t,r)}_tickFormatFunction(t,e,n,i){const r=this.options,s=r.ticks.callback;if(s)return Ve(s,[t,e,n],this);const o=r.time.displayFormats,a=this._unit,l=this._majorUnit,c=a&&o[a],h=l&&o[l],u=n[e],f=l&&h&&u&&u.major;return this._adapter.format(t,i||(f?h:c))}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e0?o:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Pn(t,"pos",e)),({pos:i,time:s}=t[a]),({pos:r,time:o}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Pn(t,"time",e)),({time:i,pos:s}=t[a]),({time:r,pos:o}=t[l]));const c=r-i;return c?s+(o-s)*(e-i)/c:s}var _l=Object.freeze({__proto__:null,CategoryScale:class extends Xs{static id="category";static defaults={ticks:{callback:Ha}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Le(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:Sn(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:Wa(n,t,Be(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let s=t;s<=e;s++)i.push({value:s});return i}getLabelForValue(t){return Ha.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?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}},LinearScale:qa,LogarithmicScale:Qa,RadialLinearScale:ll,TimeScale:ml,TimeSeriesScale:class extends ml{static id="timeseries";static defaults=ml.defaults;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=bl(e,this.min),this._tableRange=bl(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,i=[],r=[];let s,o,a,l,c;for(s=0,o=t.length;s=e&&l<=n&&i.push(l);if(i.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(s=0,o=i.length;s