diff --git a/docs/404.html b/docs/404.html index cda2d18..39df31a 100644 --- a/docs/404.html +++ b/docs/404.html @@ -5,7 +5,7 @@ smol-string - + diff --git a/docs/assets/BenchmarksView-43e6f07e.js b/docs/assets/BenchmarksView-98cc24df.js similarity index 62% rename from docs/assets/BenchmarksView-43e6f07e.js rename to docs/assets/BenchmarksView-98cc24df.js index 2a644fb..a52f35a 100644 --- a/docs/assets/BenchmarksView-43e6f07e.js +++ b/docs/assets/BenchmarksView-98cc24df.js @@ -1 +1 @@ -import{d as t,o as e,c as o,a as c,w as a,S as _,b as n,e as r,u as l,f as i,_ as u}from"./index-8b18b11e.js";const m=n("h2",null,"Benchmarks",-1),d=n("p",null,"Running benchmarks...",-1),B=t({__name:"BenchmarksView",setup(p){const s=i(()=>u(()=>import("./LibBenchmark-2d0d46e9.js"),["assets/LibBenchmark-2d0d46e9.js","assets/index-8b18b11e.js","assets/index-acfa1921.css"]));return(f,h)=>(e(),o("main",null,[m,(e(),c(_,null,{fallback:a(()=>[d]),default:a(()=>[r(l(s))]),_:1}))]))}});export{B as default}; +import{d as t,o as e,c as o,a as c,w as a,S as _,b as n,e as r,u as l,f as i,_ as u}from"./index-9e0d836e.js";const m=n("h2",null,"Benchmarks",-1),d=n("p",null,"Running benchmarks...",-1),B=t({__name:"BenchmarksView",setup(p){const s=i(()=>u(()=>import("./LibBenchmark-471060c8.js"),["assets/LibBenchmark-471060c8.js","assets/index-9e0d836e.js","assets/index-acfa1921.css"]));return(f,h)=>(e(),o("main",null,[m,(e(),c(_,null,{fallback:a(()=>[d]),default:a(()=>[r(l(s))]),_:1}))]))}});export{B as default}; diff --git a/docs/assets/DocumentationView-96ce0f58.js b/docs/assets/DocumentationView-db9890b7.js similarity index 78% rename from docs/assets/DocumentationView-96ce0f58.js rename to docs/assets/DocumentationView-db9890b7.js index 1553891..5dfedb2 100644 --- a/docs/assets/DocumentationView-96ce0f58.js +++ b/docs/assets/DocumentationView-db9890b7.js @@ -1 +1 @@ -import{g as e,o,c as n,b as t}from"./index-8b18b11e.js";const s={},c=t("h2",null,"Documentation",-1),r=t("div",null,[t("a",{href:"https://github.com/Senryoku/smol-string"},"GitHub Repository")],-1),i=[c,r];function a(_,l){return o(),n("div",null,i)}const d=e(s,[["render",a]]);export{d as default}; +import{g as e,o,c as n,b as t}from"./index-9e0d836e.js";const s={},c=t("h2",null,"Documentation",-1),r=t("div",null,[t("a",{href:"https://github.com/Senryoku/smol-string"},"GitHub Repository")],-1),i=[c,r];function a(_,l){return o(),n("div",null,i)}const d=e(s,[["render",a]]);export{d as default}; diff --git a/docs/assets/LibBenchmark-2d0d46e9.js b/docs/assets/LibBenchmark-2d0d46e9.js deleted file mode 100644 index 5257e59..0000000 --- a/docs/assets/LibBenchmark-2d0d46e9.js +++ /dev/null @@ -1,18 +0,0 @@ -import{d as fi,s as Us,h as Ys,v as Yn,r as Vs,i as Vn,j as Wn,k as jn,t as oi,l as Ws,_ as Te,m as ze,n as Ue,o as Kn,c as Xn,b as lt,e as Ye,u as ge}from"./index-8b18b11e.js";/*! - * @kurkle/color v0.3.2 - * https://github.com/kurkle/color#readme - * (c) 2023 Jukka Kurkela - * Released under the MIT License - */function ae(i){return i+.5|0}const ht=(i,t,e)=>Math.max(Math.min(i,e),t);function Wt(i){return ht(ae(i*2.55),0,255)}function ft(i){return ht(ae(i*255),0,255)}function ct(i){return ht(ae(i/2.55)/100,0,1)}function Di(i){return ht(ae(i*100),0,100)}const $={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},ai=[..."0123456789ABCDEF"],$n=i=>ai[i&15],Zn=i=>ai[(i&240)>>4]+ai[i&15],de=i=>(i&240)>>4===(i&15),to=i=>de(i.r)&&de(i.g)&&de(i.b)&&de(i.a);function eo(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&$[i[1]]*17,g:255&$[i[2]]*17,b:255&$[i[3]]*17,a:t===5?$[i[4]]*17:255}:(t===7||t===9)&&(e={r:$[i[1]]<<4|$[i[2]],g:$[i[3]]<<4|$[i[4]],b:$[i[5]]<<4|$[i[6]],a:t===9?$[i[7]]<<4|$[i[8]]:255})),e}const io=(i,t)=>i<255?t(i):"";function so(i){var t=to(i)?$n:Zn;return i?"#"+t(i.r)+t(i.g)+t(i.b)+io(i.a,t):void 0}const no=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function js(i,t,e){const s=t*Math.min(e,1-e),n=(o,a=(o+i/30)%12)=>e-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function oo(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function ao(i,t,e){const s=js(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function ro(i,t,e,s,n){return i===n?(t-e)/s+(t.5?c/(2-o-a):c/(o+a),A=ro(e,s,n,c,o),A=A*60+.5),[A|0,l||0,r]}function pi(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(ft)}function Ii(i,t,e){return pi(js,i,t,e)}function Ao(i,t,e){return pi(ao,i,t,e)}function lo(i,t,e){return pi(oo,i,t,e)}function Ks(i){return(i%360+360)%360}function co(i){const t=no.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?Wt(+t[5]):ft(+t[5]));const n=Ks(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?s=Ao(n,o,a):t[1]==="hsv"?s=lo(n,o,a):s=Ii(n,o,a),{r:s[0],g:s[1],b:s[2],a:e}}function ho(i,t){var e=ui(i);e[0]=Ks(e[0]+t),e=Ii(e),i.r=e[0],i.g=e[1],i.b=e[2]}function go(i){if(!i)return;const t=ui(i),e=t[0],s=Di(t[1]),n=Di(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${ct(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const Mi={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Si={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function fo(){const i={},t=Object.keys(Si),e=Object.keys(Mi);let s,n,o,a,r;for(s=0;s>16&255,o>>8&255,o&255]}return i}let fe;function uo(i){fe||(fe=fo(),fe.transparent=[0,0,0,0]);const t=fe[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const po=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Io(i){const t=po.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const a=+t[7];e=t[8]?Wt(a):ht(a*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?Wt(s):ht(s,0,255)),n=255&(t[4]?Wt(n):ht(n,0,255)),o=255&(t[6]?Wt(o):ht(o,0,255)),{r:s,g:n,b:o,a:e}}}function Co(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${ct(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Ve=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,St=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function mo(i,t,e){const s=St(ct(i.r)),n=St(ct(i.g)),o=St(ct(i.b));return{r:ft(Ve(s+e*(St(ct(t.r))-s))),g:ft(Ve(n+e*(St(ct(t.g))-n))),b:ft(Ve(o+e*(St(ct(t.b))-o))),a:i.a+e*(t.a-i.a)}}function ue(i,t,e){if(i){let s=ui(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=Ii(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function Xs(i,t){return i&&Object.assign(t||{},i)}function vi(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=ft(i[3]))):(t=Xs(i,{r:0,g:0,b:0,a:1}),t.a=ft(t.a)),t}function Bo(i){return i.charAt(0)==="r"?Io(i):co(i)}class te{constructor(t){if(t instanceof te)return t;const e=typeof t;let s;e==="object"?s=vi(t):e==="string"&&(s=eo(t)||uo(t)||Bo(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Xs(this._rgb);return t&&(t.a=ct(t.a)),t}set rgb(t){this._rgb=vi(t)}rgbString(){return this._valid?Co(this._rgb):void 0}hexString(){return this._valid?so(this._rgb):void 0}hslString(){return this._valid?go(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,A=s.a-n.a,l=((r*A===-1?r:(r+A)/(1+r*A))+1)/2;o=1-l,s.r=255&l*s.r+o*n.r+.5,s.g=255&l*s.g+o*n.g+.5,s.b=255&l*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=mo(this._rgb,t._rgb,e)),this}clone(){return new te(this.rgb)}alpha(t){return this._rgb.a=ft(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=ae(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ue(this._rgb,2,t),this}darken(t){return ue(this._rgb,2,-t),this}saturate(t){return ue(this._rgb,1,t),this}desaturate(t){return ue(this._rgb,1,-t),this}rotate(t){return ho(this._rgb,t),this}}/*! - * Chart.js v4.4.0 - * https://www.chartjs.org - * (c) 2023 Chart.js Contributors - * Released under the MIT License - */function at(){}const bo=(()=>{let i=0;return()=>i++})();function v(i){return i===null||typeof i>"u"}function L(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function w(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function N(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function W(i,t){return N(i)?i:t}function k(i,t){return typeof i>"u"?t:i}const Qo=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,$s=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function F(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function M(i,t,e,s){let n,o,a;if(L(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;ni,x:i=>i.x,y:i=>i.y};function yo(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function _o(i){const t=yo(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function pt(i,t){return(Fi[t]||(Fi[t]=_o(t)))(i)}function Ci(i){return i.charAt(0).toUpperCase()+i.slice(1)}const ie=i=>typeof i<"u",It=i=>typeof i=="function",Li=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function wo(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const P=Math.PI,q=2*P,ve=Number.POSITIVE_INFINITY,ko=P/180,z=P/2,Ct=P/4,Ri=P*2/3,gt=Math.log10,ut=Math.sign;function we(i,t,e){return Math.abs(i-t)n-o).pop(),t}function Fe(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Mo(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function tn(i,t,e){let s,n,o;for(s=0,n=i.length;sA&&l=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Bi(i,t,e){e=e||(a=>i[a]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const Ai=(i,t,e,s)=>Bi(i,e,s?n=>{const o=i[n][t];return oi[n][t]Bi(i,e,s=>i[s][t]>=e);function Ro(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{const s="_onData"+Ci(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=n.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function Ti(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(en.forEach(o=>{delete i[o]}),delete i._chartjs)}function sn(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const nn=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function on(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,nn.call(window,()=>{s=!1,i.apply(t,e)}))}}function Po(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const bi=i=>i==="start"?"left":i==="end"?"right":"center",G=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,To=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t,pe=i=>i===0||i===1,Ni=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*q/e)),Hi=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*q/e)+1,$t={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*z)+1,easeOutSine:i=>Math.sin(i*z),easeInOutSine:i=>-.5*(Math.cos(P*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>pe(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>pe(i)?i:Ni(i,.075,.3),easeOutElastic:i=>pe(i)?i:Hi(i,.075,.3),easeInOutElastic(i){return pe(i)?i:i<.5?.5*Ni(i*2,.1125,.45):.5+.5*Hi(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-$t.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?$t.easeInBounce(i*2)*.5:$t.easeOutBounce(i*2-1)*.5+.5};function an(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Gi(i){return an(i)?i:new te(i)}function We(i){return an(i)?i:new te(i).saturate(.5).darken(.1).hexString()}const No=["x","y","borderWidth","radius","tension"],Ho=["color","borderColor","backgroundColor"];function Go(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Ho},numbers:{type:"number",properties:No}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Jo(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ji=new Map;function qo(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Ji.get(e);return s||(s=new Intl.NumberFormat(i,t),Ji.set(e,s)),s}function re(i,t,e){return qo(t,e).format(i)}const rn={values(i){return L(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const l=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(l<1e-4||l>1e15)&&(n="scientific"),o=zo(i,e)}const a=gt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),A={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(A,this.options.ticks.format),re(i,s,A)},logarithmic(i,t,e){if(i===0)return"0";const s=e[t].significand||i/Math.pow(10,Math.floor(gt(i)));return[1,2,3,5,10,15].includes(s)||t>.8*e.length?rn.numeric.call(this,i,t,e):""}};function zo(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Ne={formatters:rn};function Uo(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,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:Ne.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const yt=Object.create(null),li=Object.create(null);function Zt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>We(n.backgroundColor),this.hoverBorderColor=(s,n)=>We(n.borderColor),this.hoverColor=(s,n)=>We(n.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 je(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return je(li,t,e)}override(t,e){return je(yt,t,e)}route(t,e,s,n){const o=Zt(this,t),a=Zt(this,s),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const A=this[r],l=a[n];return w(A)?Object.assign({},l,A):k(A,l)},set(A){this[r]=A}}})}apply(t){t.forEach(e=>e(this))}}var R=new Yo({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Go,Jo,Uo]);function Vo(i){return!i||v(i.size)||v(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Le(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function Wo(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let a=0;const r=e.length;let A,l,c,h,g;for(A=0;Ae.length){for(A=0;A0&&i.stroke()}}function Lt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="";let A,l;for(i.save(),i.font=n.string,jo(i,o),A=0;A+i||0;function ln(i,t){const e={},s=w(t),n=s?Object.keys(t):t,o=w(i)?s?a=>k(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of n)e[a]=ea(o(a));return e}function cn(i){return ln(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Et(i){return ln(i,["topLeft","topRight","bottomLeft","bottomRight"])}function J(i){const t=cn(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function T(i,t){i=i||{},t=t||R.font;let e=k(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=k(i.style,t.style);s&&!(""+s).match(Zo)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:k(i.family,t.family),lineHeight:ta(k(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:k(i.weight,t.weight),string:""};return n.string=Vo(n),n}function Ie(i,t,e,s){let n=!0,o,a,r;for(o=0,a=i.length;oe&&r===0?0:r+A;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function wt(i,t){return Object.assign(Object.create(i),t)}function xi(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=fn("_fallback",i));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:r=>xi([r,...i],t,o,s)};return new Proxy(a,{deleteProperty(r,A){return delete r[A],delete r._keys,delete i[0][A],!0},get(r,A){return gn(r,A,()=>ca(A,t,i,r))},getOwnPropertyDescriptor(r,A){return Reflect.getOwnPropertyDescriptor(r._scopes[0],A)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(r,A){return Yi(r).includes(A)},ownKeys(r){return Yi(r)},set(r,A,l){const c=r._storage||(r._storage=n());return r[A]=c[A]=l,delete r._keys,!0}})}function Pt(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:hn(i,s),setContext:o=>Pt(i,o,e,s),override:o=>Pt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return gn(o,a,()=>na(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function hn(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:It(e)?e:()=>e,isIndexable:It(s)?s:()=>s}}const sa=(i,t)=>i?i+Ci(t):t,yi=(i,t)=>w(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function gn(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const s=e();return i[t]=s,s}function na(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=i;let r=s[t];return It(r)&&a.isScriptable(t)&&(r=oa(t,r,i,e)),L(r)&&r.length&&(r=aa(t,r,i,a.isIndexable)),yi(t,r)&&(r=Pt(r,n,o&&o[t],a)),r}function oa(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);r.add(i);let A=t(o,a||s);return r.delete(i),yi(i,A)&&(A=_i(n._scopes,n,i,A)),A}function aa(i,t,e,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(w(t[0])){const A=t,l=n._scopes.filter(c=>c!==A);t=[];for(const c of A){const h=_i(l,n,i,c);t.push(Pt(h,o,a&&a[i],r))}}return t}function dn(i,t,e){return It(i)?i(t,e):i}const ra=(i,t)=>i===!0?t:typeof i=="string"?pt(t,i):void 0;function Aa(i,t,e,s,n){for(const o of t){const a=ra(e,o);if(a){i.add(a);const r=dn(a._fallback,e,n);if(typeof r<"u"&&r!==e&&r!==s)return r}else if(a===!1&&typeof s<"u"&&e!==s)return null}return!1}function _i(i,t,e,s){const n=t._rootScopes,o=dn(t._fallback,e,s),a=[...i,...n],r=new Set;r.add(s);let A=Ui(r,a,e,o||e,s);return A===null||typeof o<"u"&&o!==e&&(A=Ui(r,a,o,A,s),A===null)?!1:xi(Array.from(r),[""],n,o,()=>la(t,e,s))}function Ui(i,t,e,s,n){for(;e;)e=Aa(i,t,e,s,n);return e}function la(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return L(n)&&w(e)?e:n||{}}function ca(i,t,e,s){let n;for(const o of t)if(n=fn(sa(o,i),e),typeof n<"u")return yi(i,n)?_i(e,s,i,n):n}function fn(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function Yi(i){let t=i._keys;return t||(t=i._keys=ha(i._scopes)),t}function ha(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}function ga(i,t,e,s){const{iScale:n}=i,{key:o="r"}=this._parsing,a=new Array(s);let r,A,l,c;for(r=0,A=s;ri.ownerDocument.defaultView.getComputedStyle(i,null);function da(i,t){return He(i).getPropertyValue(t)}const fa=["top","right","bottom","left"];function xt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=fa[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const ua=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function pa(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let a=!1,r,A;if(ua(n,o,i.target))r=n,A=o;else{const l=t.getBoundingClientRect();r=s.clientX-l.left,A=s.clientY-l.top,a=!0}return{x:r,y:A,box:a}}function Qt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=He(e),o=n.boxSizing==="border-box",a=xt(n,"padding"),r=xt(n,"border","width"),{x:A,y:l,box:c}=pa(i,e),h=a.left+(c&&r.left),g=a.top+(c&&r.top);let{width:d,height:f}=t;return o&&(d-=a.width+r.width,f-=a.height+r.height),{x:Math.round((A-h)/d*e.width/s),y:Math.round((l-g)/f*e.height/s)}}function Ia(i,t,e){let s,n;if(t===void 0||e===void 0){const o=wi(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const a=o.getBoundingClientRect(),r=He(o),A=xt(r,"border","width"),l=xt(r,"padding");t=a.width-l.width-A.width,e=a.height-l.height-A.height,s=Re(r.maxWidth,o,"clientWidth"),n=Re(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||ve,maxHeight:n||ve}}const Ce=i=>Math.round(i*10)/10;function Ca(i,t,e,s){const n=He(i),o=xt(n,"margin"),a=Re(n.maxWidth,i,"clientWidth")||ve,r=Re(n.maxHeight,i,"clientHeight")||ve,A=Ia(i,t,e);let{width:l,height:c}=A;if(n.boxSizing==="content-box"){const g=xt(n,"border","width"),d=xt(n,"padding");l-=d.width+g.width,c-=d.height+g.height}return l=Math.max(0,l-o.width),c=Math.max(0,s?l/s:c-o.height),l=Ce(Math.min(l,a,A.maxWidth)),c=Ce(Math.min(c,r,A.maxHeight)),l&&!c&&(c=Ce(l/2)),(t!==void 0||e!==void 0)&&s&&A.height&&c>A.height&&(c=A.height,l=Ce(Math.floor(c*s))),{width:l,height:c}}function Vi(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(i.currentDevicePixelRatio=s,a.height=n,a.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const ma=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function Wi(i,t){const e=da(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}const Ba=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},ba=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Rt(i,t,e){return i?Ba(t,e):ba()}function pn(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function In(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}/*! - * Chart.js v4.4.0 - * https://www.chartjs.org - * (c) 2023 Chart.js Contributors - * Released under the MIT License - */class Qa{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(s-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=nn.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let a=o.length-1,r=!1,A;for(;a>=0;--a)A=o[a],A._active?(A._total>s.duration&&(s.duration=A._total),A.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}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((s,n)=>Math.max(s,n._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 s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var rt=new Qa;const ji="transparent",Ea={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Gi(i||ji),n=s.valid&&Gi(t||ji);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class xa{constructor(t,e,s,n){const o=e[s];n=Ie([t.to,n,o,t.from]);const a=Ie([t.from,o,n]);this._active=!0,this._fn=t.fn||Ea[t.type||typeof a],this._easing=$t[t.easing]||$t.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=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Ie([t.to,e,n,t.from]),this._from=Ie([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to;let A;if(this._active=o!==r&&(a||e1?2-A:A,A=this._easing(Math.min(1,Math.max(0,A))),this._target[n]=this._fn(o,r,A)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n{const o=t[n];if(!w(o))return;const a={};for(const r of e)a[r]=o[r];(L(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!s.has(r))&&s.set(r,a)})})}_animateOptions(t,e){const s=e.options,n=_a(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&ya(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let A;for(A=a.length-1;A>=0;--A){const l=a[A];if(l.charAt(0)==="$")continue;if(l==="options"){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=o[l];const g=s.get(l);if(h)if(g&&h.active()){h.update(g,c,r);continue}else h.cancel();if(!g||!g.duration){t[l]=c;continue}o[l]=h=new xa(g,t,l,c),n.push(h)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return rt.add(this._chart,s),!0}}function ya(i,t){const e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function ts(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=s,A=o.axis,l=a.axis,c=Ma(o,a,s),h=t.length;let g;for(let d=0;de[s].axis===t).shift()}function Fa(i,t){return wt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function La(i,t,e){return wt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function qt(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const Xe=i=>i==="reset"||i==="none",es=(i,t)=>t?i:Object.assign({},i),Ra=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:mn(e,!0),values:null};class Ge{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=$i(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&&qt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(h,g,d,f)=>h==="x"?g:h==="r"?f:d,o=e.xAxisID=k(s.xAxisID,Ke(t,"x")),a=e.yAxisID=k(s.yAxisID,Ke(t,"y")),r=e.rAxisID=k(s.rAxisID,Ke(t,"r")),A=e.indexAxis,l=e.iAxisID=n(A,o,a,r),c=e.vAxisID=n(A,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),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&&Ti(this._data,this),t._stacked&&qt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(w(e))this._data=Da(e);else if(s!==e){if(s){Ti(s,this);const n=this._cachedMeta;qt(n),n._parsed=[]}e&&Object.isExtensible(e)&&Oo(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=$i(e.vScale,e),e.stack!==s.stack&&(n=!0,qt(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&ts(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:a}=s,r=o.axis;let A=t===0&&e===n.length?!0:s._sorted,l=t>0&&s._parsed[t-1],c,h,g;if(this._parsing===!1)s._parsed=n,s._sorted=!0,g=n;else{L(n[t])?g=this.parseArrayData(s,n,t,e):w(n[t])?g=this.parseObjectData(s,n,t,e):g=this.parsePrimitiveData(s,n,t,e);const d=()=>h[r]===null||l&&h[r]p||h=0;--g)if(!f()){this.updateRangeFromParsed(l,t,d,A);break}}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,a;for(n=0,o=e.length;n=0&&tthis.getContext(s,n,e),p=l.resolveNamedOptions(g,d,f,h);return p.$shared&&(p.$shared=A,o[a]=Object.freeze(es(p,A))),p}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let A;if(n.options.animation!==!1){const c=this.chart.config,h=c.datasetAnimationScopeKeys(this._type,e),g=c.getOptionScopes(this.getDataset(),h);A=c.createResolver(g,this.getContext(t,s,e))}const l=new Cn(n,A&&A.animations);return A&&A._cacheable&&(o[a]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Xe(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),a=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:a}}updateElement(t,e,s,n){Xe(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Xe(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[r,A,l]of this._syncList)this[r](A,l);this._syncList=[];const n=s.length,o=e.length,a=Math.min(o,n);a&&this.parse(0,a),o>n?this._insertElements(n,o-n,t):o{for(l.length+=e,r=l.length-1;r>=a;r--)l[r]=l[r-e]};for(A(o),r=t;rn-o))}return i._cache.$bar}function Pa(i){const t=i.iScale,e=Oa(t,i.type);let s=t._length,n,o,a,r;const A=()=>{a===32767||a===-32768||(ie(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=e.length;n0?n[i-1]:null,r=iMath.abs(r)&&(A=r,l=a),t[e.axis]=l,t._custom={barStart:A,barEnd:l,start:n,end:o,min:a,max:r}}function Bn(i,t,e,s){return L(i)?Ha(i,t,e,s):t[e.axis]=e.parse(i,s),t}function is(i,t,e,s){const n=i.iScale,o=i.vScale,a=n.getLabels(),r=n===o,A=[];let l,c,h,g;for(l=e,c=e+s;l=e?1:-1)}function Ja(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.baseA.controller.options.grouped),o=s.options.stacked,a=[],r=A=>{const l=A.controller.getParsed(e),c=l&&l[A.vScale.axis];if(v(c)||isNaN(c))return!0};for(const A of n)if(!(e!==void 0&&r(A))&&((o===!1||a.indexOf(A.stack)===-1||o===void 0&&A.stack===void 0)&&a.push(A.stack),A.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,a;for(o=0,a=e.data.length;ori(b,r,A,!0)?1:Math.max(Q,Q*e,m,m*e),f=(b,Q,m)=>ri(b,r,A,!0)?-1:Math.min(Q,Q*e,m,m*e),p=d(0,l,h),u=d(z,c,g),I=f(P,l,h),B=f(P+z,c,g);s=(p-I)/2,n=(u-B)/2,o=-(p+I)/2,a=-(u+B)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}class Wa extends Ge{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:n}}=t.legend.options;return e.labels.map((o,a)=>{const A=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:A.backgroundColor,strokeStyle:A.borderColor,fontColor:n,lineWidth:A.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.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 s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=A=>+s[A];if(w(s[t])){const{key:A="value"}=this._parsing;o=l=>+pt(s[l],A)}let a,r;for(a=t,r=t+e;a0&&!isNaN(t)?q*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=re(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const s=this.chart;let n,o,a,r,A;if(!t){for(n=0,o=s.data.datasets.length;n{const A=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:A.backgroundColor,strokeStyle:A.borderColor,fontColor:n,lineWidth:A.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.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,s=this.chart,n=s.data.labels||[],o=re(e._parsed[t].r,s.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,s,n){return ga.bind(this)(t,e,s,n)}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((s,n)=>{const o=this.getParsed(n).r;!isNaN(o)&&this.chart.getDataVisibility(n)&&(oe.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,s=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),a=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,s,n){const o=n==="reset",a=this.chart,A=a.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,g=l.getIndexAngle(0)-.5*P;let d=g,f;const p=360/this.countVisibleElements();for(f=0;f{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,s){return this.chart.getDataVisibility(t)?tt(this.resolveDataElementOptions(t,e).angle||s):0}}function Bt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ki{static override(t){Object.assign(ki.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Bt()}parse(){return Bt()}format(){return Bt()}add(){return Bt()}diff(){return Bt()}startOf(){return Bt()}endOf(){return Bt()}}var Ka={_date:ki};function Xa(i,t,e,s){const{controller:n,data:o,_sorted:a}=i,r=n._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const A=r._reversePixels?Lo:Ai;if(s){if(n._sharedOptions){const l=o[0],c=typeof l.getRange=="function"&&l.getRange(t);if(c){const h=A(o,t,e-c),g=A(o,t,e+c);return{lo:h.lo,hi:g.hi}}}}else return A(o,t,e)}return{lo:0,hi:o.length-1}}function Ae(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,A=o.length;r{A[a](t[e],n)&&(o.push({element:A,datasetIndex:l,index:c}),r=r||A.inRange(t.x,t.y,n))}),s&&!r?[]:o}var er={evaluateInteractionItems:Ae,modes:{index(i,t,e,s){const n=Qt(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?Ze(i,n,o,s,a):ti(i,n,o,!1,s,a),A=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(l=>{const c=r[0].index,h=l.data[c];h&&!h.skip&&A.push({element:h,datasetIndex:l.index,index:c})}),A):[]},dataset(i,t,e,s){const n=Qt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?Ze(i,n,o,s,a):ti(i,n,o,!1,s,a);if(r.length>0){const A=r[0].datasetIndex,l=i.getDatasetMeta(A).data;r=[];for(let c=0;ce.pos===t)}function as(i,t){return i.filter(e=>bn.indexOf(e.pos)===-1&&e.box.axis===t)}function Ut(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function ir(i){const t=[];let e,s,n,o,a,r;for(e=0,s=(i||[]).length;el.box.fullSize),!0),s=Ut(zt(t,"left"),!0),n=Ut(zt(t,"right")),o=Ut(zt(t,"top"),!0),a=Ut(zt(t,"bottom")),r=as(t,"x"),A=as(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(A).concat(a).concat(r),chartArea:zt(t,"chartArea"),vertical:s.concat(n).concat(A),horizontal:o.concat(a).concat(r)}}function rs(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function Qn(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function ar(i,t,e,s){const{pos:n,box:o}=e,a=i.maxPadding;if(!w(n)){e.size&&(i[n]-=e.size);const h=s[e.stack]||{size:0,count:1};h.size=Math.max(h.size,e.horizontal?o.height:o.width),e.size=h.size/h.count,i[n]+=e.size}o.getPadding&&Qn(a,o.getPadding());const r=Math.max(0,t.outerWidth-rs(a,i,"left","right")),A=Math.max(0,t.outerHeight-rs(a,i,"top","bottom")),l=r!==i.w,c=A!==i.h;return i.w=r,i.h=A,e.horizontal?{same:l,other:c}:{same:c,other:l}}function rr(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Ar(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return s(i?["left","right"]:["top","bottom"])}function jt(i,t,e,s){const n=[];let o,a,r,A,l,c;for(o=0,a=i.length,l=0;o{typeof p.beforeLayout=="function"&&p.beforeLayout()});const c=A.reduce((p,u)=>u.box.options&&u.box.options.display===!1?p:p+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),g=Object.assign({},n);Qn(g,J(s));const d=Object.assign({maxPadding:g,w:o,h:a,x:n.left,y:n.top},n),f=nr(A.concat(l),h);jt(r.fullSize,d,h,f),jt(A,d,h,f),jt(l,d,h,f)&&jt(A,d,h,f),rr(d),As(r.leftAndTop,d,h,f),d.x+=d.w,d.y+=d.h,As(r.rightAndBottom,d,h,f),i.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},M(r.chartArea,p=>{const u=p.box;Object.assign(u,i.chartArea),u.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class En{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class lr extends En{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ke="$chartjs",cr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ls=i=>i===null||i==="";function hr(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[ke]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",ls(n)){const o=Wi(i,"width");o!==void 0&&(i.width=o)}if(ls(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Wi(i,"height");o!==void 0&&(i.height=o)}return i}const xn=ma?{passive:!0}:!1;function gr(i,t,e){i.addEventListener(t,e,xn)}function dr(i,t,e){i.canvas.removeEventListener(t,e,xn)}function fr(i,t){const e=cr[i.type]||i.type,{x:s,y:n}=Qt(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function Oe(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function ur(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||Oe(r.addedNodes,s),a=a&&!Oe(r.removedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function pr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||Oe(r.removedNodes,s),a=a&&!Oe(r.addedNodes,s);a&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const ne=new Map;let cs=0;function yn(){const i=window.devicePixelRatio;i!==cs&&(cs=i,ne.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Ir(i,t){ne.size||window.addEventListener("resize",yn),ne.set(i,t)}function Cr(i){ne.delete(i),ne.size||window.removeEventListener("resize",yn)}function mr(i,t,e){const s=i.canvas,n=s&&wi(s);if(!n)return;const o=on((r,A)=>{const l=n.clientWidth;e(r,A),l{const A=r[0],l=A.contentRect.width,c=A.contentRect.height;l===0&&c===0||o(l,c)});return a.observe(n),Ir(i,o),a}function ei(i,t,e){e&&e.disconnect(),t==="resize"&&Cr(i)}function Br(i,t,e){const s=i.canvas,n=on(o=>{i.ctx!==null&&e(fr(o,i))},i);return gr(s,t,n),n}class br extends En{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(hr(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[ke])return!1;const s=e[ke].initial;["height","width"].forEach(o=>{const a=s[o];v(a)?e.removeAttribute(o):e.setAttribute(o,a)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[ke],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),a={attach:ur,detach:pr,resize:mr}[e]||Br;n[e]=a(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:ei,detach:ei,resize:ei}[e]||dr)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return Ca(t,e,s,n)}isAttached(t){const e=wi(t);return!!(e&&e.isConnected)}}function Qr(i){return!un()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?lr:br}class Tt{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Fe(this.x)&&Fe(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}function Er(i,t){const e=i.options.ticks,s=xr(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?_r(t):[],a=o.length,r=o[0],A=o[a-1],l=[];if(a>n)return wr(t,l,o,a/n),l;const c=yr(o,t,n);if(a>0){let h,g;const d=a>1?Math.round((A-r)/(a-1)):null;for(Be(t,l,c,v(d)?0:r-d,r),h=0,g=a-1;hn)return A}return Math.max(n,1)}function _r(i){const t=[];let e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,hs=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,gs=(i,t)=>Math.min(t||i,i);function ds(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;oa+r)))return A}function Sr(i,t){M(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;os?s:e,s=n&&e>s?e:s,{min:W(e,W(s,e)),max:W(s,W(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){F(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ia(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const A=r=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const c=this._getLabelSizes(),h=c.widest.width,g=c.highest.height,d=et(this.chart.width-h,0,this.maxWidth);r=t.offset?this.maxWidth/s:d/(s-1),h+6>r&&(r=d/(s-(t.offset?.5:1)),A=this.maxHeight-Yt(t.grid)-e.padding-fs(t.title,this.chart.options.font),l=Math.sqrt(h*h+g*g),a=mi(Math.min(Math.asin(et((c.highest.height+6)/r,-1,1)),Math.asin(et(A/l,-1,1))-Math.asin(et(g/l,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){F(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){F(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const A=fs(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Yt(o)+A):(t.height=this.maxHeight,t.width=Yt(o)+A),s.display&&this.ticks.length){const{first:l,last:c,widest:h,highest:g}=this._getLabelSizes(),d=s.padding*2,f=tt(this.labelRotation),p=Math.cos(f),u=Math.sin(f);if(r){const I=s.mirror?0:u*h.width+p*g.height;t.height=Math.min(this.maxHeight,t.height+I+d)}else{const I=s.mirror?0:p*h.width+u*g.height;t.width=Math.min(this.maxWidth,t.width+I+d)}this._calculatePadding(l,c,u,p)}}this._handleMargins(),r?(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,s,n){const{ticks:{align:o,padding:a},position:r}=this.options,A=this.labelRotation!==0,l=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,d=0;A?l?(g=n*t.width,d=s*e.height):(g=s*t.height,d=n*e.width):o==="start"?d=e.width:o==="end"?g=t.width:o!=="inner"&&(g=t.width/2,d=e.width/2),this.paddingLeft=Math.max((g-c+a)*this.width/(this.width-c),0),this.paddingRight=Math.max((d-h+a)*this.width/(this.width-h),0)}else{let c=e.height/2,h=t.height/2;o==="start"?(c=0,h=t.height):o==="end"&&(c=e.height,h=0),this.paddingTop=c+a,this.paddingBottom=h+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){F(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:a[y]||0,height:r[y]||0});return{first:x(0),last:x(e-1),widest:x(C),highest:x(E),widths:a,heights:r}}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 Fo(this._alignToPixels?mt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&tr*n?r/s:A/n:A*n0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:a,border:r}=n,A=o.offset,l=this.isHorizontal(),h=this.ticks.length+(A?1:0),g=Yt(o),d=[],f=r.setContext(this.getContext()),p=f.display?f.width:0,u=p/2,I=function(H){return mt(s,H,p)};let B,b,Q,m,C,E,x,y,S,_,D,U;if(a==="top")B=I(this.bottom),E=this.bottom-g,y=B-u,_=I(t.top)+u,U=t.bottom;else if(a==="bottom")B=I(this.top),_=t.top,U=I(t.bottom)-u,E=B+u,y=this.top+g;else if(a==="left")B=I(this.right),C=this.right-g,x=B-u,S=I(t.left)+u,D=t.right;else if(a==="right")B=I(this.left),S=t.left,D=I(t.right)-u,C=B+u,x=this.left+g;else if(e==="x"){if(a==="center")B=I((t.top+t.bottom)/2+.5);else if(w(a)){const H=Object.keys(a)[0],X=a[H];B=I(this.chart.scales[H].getPixelForValue(X))}_=t.top,U=t.bottom,E=B+u,y=E+g}else if(e==="y"){if(a==="center")B=I((t.left+t.right)/2);else if(w(a)){const H=Object.keys(a)[0],X=a[H];B=I(this.chart.scales[H].getPixelForValue(X))}C=B-u,x=C-g,S=t.left,D=t.right}const it=k(n.ticks.maxTicksLimit,h),O=Math.max(1,Math.ceil(h/it));for(b=0;bo.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(A,l,c)=>{!c.width||!c.color||(s.save(),s.lineWidth=c.width,s.strokeStyle=c.color,s.setLineDash(c.borderDash||[]),s.lineDashOffset=c.borderDashOffset,s.beginPath(),s.moveTo(A.x,A.y),s.lineTo(l.x,l.y),s.stroke(),s.restore())};if(e.display)for(o=0,a=n.length;o{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,a;for(o=0,a=e.length;o{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),a=t[e].split("."),r=a.pop(),A=a.join(".");R.route(o,n,A,r)})}function Tr(i){return"id"in i&&"defaults"in i}class Nr{constructor(){this.controllers=new be(Ge,"datasets",!0),this.elements=new be(Tt,"elements"),this.plugins=new be(Object,"plugins"),this.scales=new be(kt,"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,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):M(n,a=>{const r=s||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,s){const n=Ci(t);F(s["before"+n],[],s),e[t](s),F(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;eo.filter(r=>!a.some(A=>r.plugin.id===A.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function Gr(i){const t={},e=[],s=Object.keys(nt.plugins.items);for(let o=0;o1&&us(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function ps(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Wr(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return ps(i,"x",e[0])||ps(i,"y",e[0])}return{}}function jr(i,t){const e=yt[i.type]||{scales:{}},s=t.scales||{},n=ci(i.type,t),o=Object.create(null);return Object.keys(s).forEach(a=>{const r=s[a];if(!w(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const A=hi(a,r,Wr(a,i),R.scales[r.type]),l=Yr(A,n),c=e.scales||{};o[a]=Xt(Object.create(null),[{axis:A},r,c[A],c[l]])}),i.data.datasets.forEach(a=>{const r=a.type||i.type,A=a.indexAxis||ci(r,t),c=(yt[r]||{}).scales||{};Object.keys(c).forEach(h=>{const g=Ur(h,A),d=a[g+"AxisID"]||g;o[d]=o[d]||Object.create(null),Xt(o[d],[{axis:g},s[d],c[h]])})}),Object.keys(o).forEach(a=>{const r=o[a];Xt(r,[R.scales[r.type],R.scale])}),o}function _n(i){const t=i.options||(i.options={});t.plugins=k(t.plugins,{}),t.scales=jr(i,t)}function wn(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Kr(i){return i=i||{},i.data=wn(i.data),_n(i),i}const Is=new Map,kn=new Set;function Qe(i,t){let e=Is.get(i);return e||(e=t(),Is.set(i,e),kn.add(e)),e}const Vt=(i,t,e)=>{const s=pt(t,e);s!==void 0&&i.add(s)};class Xr{constructor(t){this._config=Kr(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=wn(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(),_n(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Qe(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Qe(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Qe(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return Qe(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,a=this._cachedScopes(t,s),r=a.get(e);if(r)return r;const A=new Set;e.forEach(c=>{t&&(A.add(t),c.forEach(h=>Vt(A,t,h))),c.forEach(h=>Vt(A,n,h)),c.forEach(h=>Vt(A,yt[o]||{},h)),c.forEach(h=>Vt(A,R,h)),c.forEach(h=>Vt(A,li,h))});const l=Array.from(A);return l.length===0&&l.push(Object.create(null)),kn.has(e)&&a.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,yt[e]||{},R.datasets[e]||{},{type:e},R,li]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Cs(this._resolverCache,t,n);let A=a;if(Zr(a,e)){o.$shared=!1,s=It(s)?s():s;const l=this.createResolver(t,s,r);A=Pt(a,s,l)}for(const l of e)o[l]=A[l];return o}createResolver(t,e,s=[""],n){const{resolver:o}=Cs(this._resolverCache,t,s);return w(e)?Pt(o,e,void 0,n):o}}function Cs(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:xi(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}const $r=i=>w(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||It(i[e]),!1);function Zr(i,t){const{isScriptable:e,isIndexable:s}=hn(i);for(const n of t){const o=e(n),a=s(n),r=(a||o)&&i[n];if(o&&(It(r)||$r(r))||a&&L(r))return!0}return!1}var tA="4.4.0";const eA=["top","bottom","left","right","chartArea"];function ms(i,t){return i==="top"||i==="bottom"||eA.indexOf(i)===-1&&t==="x"}function Bs(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function bs(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),F(e&&e.onComplete,[i],t)}function iA(i){const t=i.chart,e=t.options.animation;F(e&&e.onProgress,[i],t)}function Dn(i){return un()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const De={},Qs=i=>{const t=Dn(i);return Object.values(De).filter(e=>e.canvas===t).pop()};function sA(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const a=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=a)}}}function nA(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}function Ee(i,t,e){return i.options.clip?i[e]:t[e]}function oA(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:Ee(e,t,"left"),right:Ee(e,t,"right"),top:Ee(s,t,"top"),bottom:Ee(s,t,"bottom")}:t}let Ot=class{static defaults=R;static instances=De;static overrides=yt;static registry=nt;static version=tA;static getChart=Qs;static register(...t){nt.add(...t),Es()}static unregister(...t){nt.remove(...t),Es()}constructor(t,e){const s=this.config=new Xr(e),n=Dn(t),o=Qs(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Qr(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,a.aspectRatio),A=r&&r.canvas,l=A&&A.height,c=A&&A.width;if(this.id=bo(),this.ctx=r,this.canvas=A,this.width=c,this.height=l,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Hr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Po(h=>this.update(h),a.resizeDelay||0),this._dataChanges=[],De[this.id]=this,!r||!A){console.error("Failed to create chart: can't acquire context from the given item");return}rt.listen(this,"complete",bs),rt.listen(this,"progress",iA),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return v(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return nt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Vi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return qi(this.canvas,this.ctx),this}stop(){return rt.stop(this),this}resize(t,e){rt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,o),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),A=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Vi(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),F(s.onResize,[this,a],this),this.attached&&this._doResize(A)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};M(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],A=hi(a,r),l=A==="r",c=A==="x";return{options:r,dposition:l?"chartArea":c?"bottom":"left",dtype:l?"radialLinear":c?"category":"linear"}}))),M(o,a=>{const r=a.options,A=r.id,l=hi(A,r),c=k(r.type,a.dtype);(r.position===void 0||ms(r.position,l)!==ms(a.dposition))&&(r.position=a.dposition),n[A]=!0;let h=null;if(A in s&&s[A].type===c)h=s[A];else{const g=nt.getScale(c);h=new g({id:A,type:c,ctx:this.ctx,chart:this}),s[h.id]=h}h.init(r,t)}),M(n,(a,r)=>{a||delete s[r]}),M(s,a=>{Z.configure(this,a,a.options),Z.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let l=0,c=this.data.datasets.length;l{l.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Bs("z","_idx"));const{_active:r,_lastEvent:A}=this;A?this._eventHandler(A,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){M(this.scales,t=>{Z.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Li(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const a=s==="_removeElements"?-o:o;sA(t,n,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Z.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],M(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s=t._clip,n=!s.disabled,o=oA(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&Qi(e,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&Ei(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Lt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=er.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={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},s.push(n)),n}getContext(){return this.$context||(this.$context=wt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,n);ie(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),a.update(o,{visible:s}),this.update(r=>r.datasetIndex===t?n: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(),rt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,a),t[o]=a},n=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};M(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(A,l)=>{e.addEventListener(this,A,l),t[A]=l},n=(A,l)=>{t[A]&&(e.removeEventListener(this,A,l),delete t[A])},o=(A,l)=>{this.canvas&&this.resize(A,l)};let a;const r=()=>{n("attach",r),this.attached=!0,this.resize(),s("resize",o),s("detach",a)};a=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){M(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},M(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,a,r,A;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,A=t.length;r{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!Me(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(A,l)=>A.filter(c=>!l.some(h=>c.datasetIndex===h.datasetIndex&&c.index===h.index)),a=o(e,t),r=s?t:o(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,a=e,r=this._getActiveElements(t,n,s,a),A=wo(t),l=nA(t,this._lastEvent,s,A);s&&(this._lastEvent=null,F(o.onHover,[t,r,this],this),A&&F(o.onClick,[t,r,this],this));const c=!Me(r,n);return(c||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=l,c}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}};function Es(){return M(Ot.instances,i=>i._plugins.invalidate())}function Mn(i,t){const{x:e,y:s,base:n,width:o,height:a}=i.getProps(["x","y","base","width","height"],t);let r,A,l,c,h;return i.horizontal?(h=a/2,r=Math.min(e,n),A=Math.max(e,n),l=s-h,c=s+h):(h=o/2,r=e-h,A=e+h,l=Math.min(s,n),c=Math.max(s,n)),{left:r,top:l,right:A,bottom:c}}function dt(i,t,e,s){return i?0:et(t,e,s)}function aA(i,t,e){const s=i.options.borderWidth,n=i.borderSkipped,o=cn(s);return{t:dt(n.top,o.top,0,e),r:dt(n.right,o.right,0,t),b:dt(n.bottom,o.bottom,0,e),l:dt(n.left,o.left,0,t)}}function rA(i,t,e){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=Et(n),a=Math.min(t,e),r=i.borderSkipped,A=s||w(n);return{topLeft:dt(!A||r.top||r.left,o.topLeft,0,a),topRight:dt(!A||r.top||r.right,o.topRight,0,a),bottomLeft:dt(!A||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:dt(!A||r.bottom||r.right,o.bottomRight,0,a)}}function AA(i){const t=Mn(i),e=t.right-t.left,s=t.bottom-t.top,n=aA(i,e/2,s/2),o=rA(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function ii(i,t,e,s){const n=t===null,o=e===null,r=i&&!(n&&o)&&Mn(i,s);return r&&(n||Ft(t,r.left,r.right))&&(o||Ft(e,r.top,r.bottom))}function lA(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function cA(i,t){i.rect(t.x,t.y,t.w,t.h)}function si(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,a=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+a,radius:i.radius}}class hA extends Tt{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:a}=AA(this),r=lA(a.radius)?se:cA;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,si(a,e,o)),t.clip(),r(t,si(o,-e,a)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),r(t,si(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return ii(this,t,e,s)}inXRange(t,e){return ii(this,t,null,e)}inYRange(t,e){return ii(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const gi=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],xs=gi.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Sn(i){return gi[i%gi.length]}function vn(i){return xs[i%xs.length]}function gA(i,t){return i.borderColor=Sn(t),i.backgroundColor=vn(t),++t}function dA(i,t){return i.backgroundColor=i.data.map(()=>Sn(t++)),t}function fA(i,t){return i.backgroundColor=i.data.map(()=>vn(t++)),t}function uA(i){let t=0;return(e,s)=>{const n=i.getDatasetMeta(s).controller;n instanceof Wa?t=dA(e,t):n instanceof ja?t=fA(e,t):n&&(t=gA(e,t))}}function ys(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function pA(i){return i&&(i.borderColor||i.backgroundColor)}var IA={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;const{data:{datasets:s},options:n}=i.config,{elements:o}=n;if(!e.forceOverride&&(ys(s)||pA(n)||o&&ys(o)))return;const a=uA(i);s.forEach(a)}};const _s=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},CA=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class ws extends Tt{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,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=F(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=T(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:A}=_s(s,o);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,o,r,A)+10):(c=this.maxHeight,l=this._fitCols(a,n,r,A)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,A=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+r;let h=t;o.textAlign="left",o.textBaseline="middle";let g=-1,d=-c;return this.legendItems.forEach((f,p)=>{const u=s+e/2+o.measureText(f.text).width;(p===0||l[l.length-1]+u+2*r>a)&&(h+=c,l[l.length-(p>0?0:1)]=0,d+=c,g++),A[p]={left:0,top:d,row:g,width:u,height:n},l[l.length-1]+=u+r}),h}_fitCols(t,e,s,n){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,A=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-t;let h=r,g=0,d=0,f=0,p=0;return this.legendItems.forEach((u,I)=>{const{itemWidth:B,itemHeight:b}=mA(s,e,o,u,n);I>0&&d+b+2*r>c&&(h+=g+r,l.push({width:g,height:d}),f+=g+r,p++,g=d=0),A[I]={left:f,top:d,col:p,width:B,height:b},g=Math.max(g,B),d+=b+r}),h+=g,l.push({width:g,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,a=Rt(o,this.left,this.width);if(this.isHorizontal()){let r=0,A=G(s,this.left+n,this.right-this.lineWidths[r]);for(const l of e)r!==l.row&&(r=l.row,A=G(s,this.left+n,this.right-this.lineWidths[r])),l.top+=this.top+t+n,l.left=a.leftForLtr(a.x(A),l.width),A+=l.width+n}else{let r=0,A=G(s,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const l of e)l.col!==r&&(r=l.col,A=G(s,this.top+t+n,this.bottom-this.columnSizes[r].height)),l.top=A,l.left+=this.left+n,l.left=a.leftForLtr(a.x(l.left),l.width),A+=l.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Qi(t,this),this._draw(),Ei(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:a}=t,r=R.color,A=Rt(t.rtl,this.left,this.width),l=T(a.font),{padding:c}=a,h=l.size,g=h/2;let d;this.drawTitle(),n.textAlign=A.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:p,itemHeight:u}=_s(a,h),I=function(C,E,x){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;n.save();const y=k(x.lineWidth,1);if(n.fillStyle=k(x.fillStyle,r),n.lineCap=k(x.lineCap,"butt"),n.lineDashOffset=k(x.lineDashOffset,0),n.lineJoin=k(x.lineJoin,"miter"),n.lineWidth=y,n.strokeStyle=k(x.strokeStyle,r),n.setLineDash(k(x.lineDash,[])),a.usePointStyle){const S={radius:p*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:y},_=A.xPlus(C,f/2),D=E+g;An(n,S,_,D,a.pointStyleWidth&&f)}else{const S=E+Math.max((h-p)/2,0),_=A.leftForLtr(C,f),D=Et(x.borderRadius);n.beginPath(),Object.values(D).some(U=>U!==0)?se(n,{x:_,y:S,w:f,h:p,radius:D}):n.rect(_,S,f,p),n.fill(),y!==0&&n.stroke()}n.restore()},B=function(C,E,x){_t(n,x.text,C,E+u/2,l,{strikethrough:x.hidden,textAlign:A.textAlign(x.textAlign)})},b=this.isHorizontal(),Q=this._computeTitleHeight();b?d={x:G(o,this.left+c,this.right-s[0]),y:this.top+c+Q,line:0}:d={x:this.left+c,y:G(o,this.top+Q+c,this.bottom-e[0].height),line:0},pn(this.ctx,t.textDirection);const m=u+c;this.legendItems.forEach((C,E)=>{n.strokeStyle=C.fontColor,n.fillStyle=C.fontColor;const x=n.measureText(C.text).width,y=A.textAlign(C.textAlign||(C.textAlign=a.textAlign)),S=f+g+x;let _=d.x,D=d.y;A.setWidth(this.width),b?E>0&&_+S+c>this.right&&(D=d.y+=m,d.line++,_=d.x=G(o,this.left+c,this.right-s[d.line])):E>0&&D+m>this.bottom&&(_=d.x=_+e[d.line].width+c,d.line++,D=d.y=G(o,this.top+Q+c,this.bottom-e[d.line].height));const U=A.x(_);if(I(U,D,C),_=To(y,_+f+g,b?_+S:this.right,t.rtl),B(A.x(_),D,C),b)d.x+=S+c;else if(typeof C.text!="string"){const it=l.lineHeight;d.y+=Fn(C,it)+c}else d.y+=m}),In(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=T(e.font),n=J(e.padding);if(!e.display)return;const o=Rt(t.rtl,this.left,this.width),a=this.ctx,r=e.position,A=s.size/2,l=n.top+A;let c,h=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),c=this.top+l,h=G(t.align,h,this.right-g);else{const f=this.columnSizes.reduce((p,u)=>Math.max(p,u.height),0);c=l+G(t.align,this.top,this.bottom-f-t.labels.padding-this._computeTitleHeight())}const d=G(r,h,h+g);a.textAlign=o.textAlign(bi(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=s.string,_t(a,e.text,d,c,s)}_computeTitleHeight(){const t=this.options.title,e=T(t.font),s=J(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(Ft(t,this.left,this.right)&&Ft(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;so.length>a.length?o:a)),t+e.size/2+s.measureText(n).width}function bA(i,t,e){let s=i;return typeof t.text!="string"&&(s=Fn(t,e)),s}function Fn(i,t){const e=i.text?i.text.length:0;return t*e}function QA(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var EA={id:"legend",_element:ws,start(i,t,e){const s=i.legend=new ws({ctx:i.ctx,options:e,chart:i});Z.configure(i,s,e),Z.addBox(i,s)},stop(i){Z.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;Z.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=i.legend.options;return i._getSortedDatasetMetas().map(A=>{const l=A.controller.getStyle(e?0:void 0),c=J(l.borderWidth);return{text:t[A.index].label,fillStyle:l.backgroundColor,fontColor:o,hidden:!A.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:s||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:a&&(r||l.borderRadius),datasetIndex:A.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Ln extends Tt{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 s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=L(s.text)?s.text.length:1;this._padding=J(s.padding);const o=n*T(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:a}=this,r=a.align;let A=0,l,c,h;return this.isHorizontal()?(c=G(r,s,o),h=e+t,l=o-s):(a.position==="left"?(c=s+t,h=G(r,n,e),A=P*-.5):(c=o-t,h=G(r,e,n),A=P*.5),l=n-e),{titleX:c,titleY:h,maxWidth:l,rotation:A}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=T(e.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:A,rotation:l}=this._drawArgs(o);_t(t,e.text,0,0,s,{color:e.color,maxWidth:A,rotation:l,textAlign:bi(e.align),textBaseline:"middle",translation:[a,r]})}}function xA(i,t){const e=new Ln({ctx:i.ctx,options:t,chart:i});Z.configure(i,e,t),Z.addBox(i,e),i.titleBlock=e}var yA={id:"title",_element:Ln,start(i,t,e){xA(i,e)},stop(i){const t=i.titleBlock;Z.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;Z.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Kt={average(i){if(!i.length)return!1;let t,e,s=0,n=0,o=0;for(t=0,e=i.length;t-1?i.split(` -`):i}function _A(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:i,label:a,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function ks(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:a,boxHeight:r}=t,A=T(t.bodyFont),l=T(t.titleFont),c=T(t.footerFont),h=o.length,g=n.length,d=s.length,f=J(t.padding);let p=f.height,u=0,I=s.reduce((Q,m)=>Q+m.before.length+m.lines.length+m.after.length,0);if(I+=i.beforeBody.length+i.afterBody.length,h&&(p+=h*l.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),I){const Q=t.displayColors?Math.max(r,A.lineHeight):A.lineHeight;p+=d*Q+(I-d)*A.lineHeight+(I-1)*t.bodySpacing}g&&(p+=t.footerMarginTop+g*c.lineHeight+(g-1)*t.footerSpacing);let B=0;const b=function(Q){u=Math.max(u,e.measureText(Q).width+B)};return e.save(),e.font=l.string,M(i.title,b),e.font=A.string,M(i.beforeBody.concat(i.afterBody),b),B=t.displayColors?a+2+t.boxPadding:0,M(s,Q=>{M(Q.before,b),M(Q.lines,b),M(Q.after,b)}),B=0,e.font=c.string,M(i.footer,b),e.restore(),u+=f.width,{width:u,height:p}}function wA(i,t){const{y:e,height:s}=t;return ei.height-s/2?"bottom":"center"}function kA(i,t,e,s){const{x:n,width:o}=s,a=e.caretSize+e.caretPadding;if(i==="left"&&n+o+a>t.width||i==="right"&&n-o-a<0)return!0}function DA(i,t,e,s){const{x:n,width:o}=e,{width:a,chartArea:{left:r,right:A}}=i;let l="center";return s==="center"?l=n<=(r+A)/2?"left":"right":n<=o/2?l="left":n>=a-o/2&&(l="right"),kA(l,i,t,e)&&(l="center"),l}function Ds(i,t,e){const s=e.yAlign||t.yAlign||wA(i,e);return{xAlign:e.xAlign||t.xAlign||DA(i,t,e,s),yAlign:s}}function MA(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function SA(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Ms(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:A}=e,l=n+o,{topLeft:c,topRight:h,bottomLeft:g,bottomRight:d}=Et(a);let f=MA(t,r);const p=SA(t,A,l);return A==="center"?r==="left"?f+=l:r==="right"&&(f-=l):r==="left"?f-=Math.max(c,g)+n:r==="right"&&(f+=Math.max(h,d)+n),{x:et(f,0,s.width-t.width),y:et(p,0,s.height-t.height)}}function xe(i,t,e){const s=J(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function Ss(i){return st([],At(i))}function vA(i,t,e){return wt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function vs(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const Rn={beforeTitle:at,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex"u"?Rn[t].call(e,s):n}class Fs extends Tt{static positioners=Kt;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new Cn(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=vA(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=Y(s,"beforeTitle",this,t),o=Y(s,"title",this,t),a=Y(s,"afterTitle",this,t);let r=[];return r=st(r,At(n)),r=st(r,At(o)),r=st(r,At(a)),r}getBeforeBody(t,e){return Ss(Y(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return M(t,o=>{const a={before:[],lines:[],after:[]},r=vs(s,o);st(a.before,At(Y(r,"beforeLabel",this,o))),st(a.lines,Y(r,"label",this,o)),st(a.after,At(Y(r,"afterLabel",this,o))),n.push(a)}),n}getAfterBody(t,e){return Ss(Y(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=Y(s,"beforeFooter",this,t),o=Y(s,"footer",this,t),a=Y(s,"afterFooter",this,t);let r=[];return r=st(r,At(n)),r=st(r,At(o)),r=st(r,At(a)),r}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],a=[];let r=[],A,l;for(A=0,l=e.length;At.filter(c,h,g,s))),t.itemSort&&(r=r.sort((c,h)=>t.itemSort(c,h,s))),M(r,c=>{const h=vs(t.callbacks,c);n.push(Y(h,"labelColor",this,c)),o.push(Y(h,"labelPointStyle",this,c)),a.push(Y(h,"labelTextColor",this,c))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,a=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const r=Kt[s.position].call(this,n,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const A=this._size=ks(this,s),l=Object.assign({},r,A),c=Ds(this.chart,s,l),h=Ms(s,l,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,o={opacity:1,x:h.x,y:h.y,width:A.width,height:A.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:a,cornerRadius:r}=s,{topLeft:A,topRight:l,bottomLeft:c,bottomRight:h}=Et(r),{x:g,y:d}=t,{width:f,height:p}=e;let u,I,B,b,Q,m;return o==="center"?(Q=d+p/2,n==="left"?(u=g,I=u-a,b=Q+a,m=Q-a):(u=g+f,I=u+a,b=Q-a,m=Q+a),B=u):(n==="left"?I=g+Math.max(A,c)+a:n==="right"?I=g+f-Math.max(l,h)-a:I=this.caretX,o==="top"?(b=d,Q=b-a,u=I-a,B=I+a):(b=d+p,Q=b+a,u=I+a,B=I-a),m=b),{x1:u,x2:I,x3:B,y1:b,y2:Q,y3:m}}drawTitle(t,e,s){const n=this.title,o=n.length;let a,r,A;if(o){const l=Rt(s.rtl,this.x,this.width);for(t.x=xe(this,s.titleAlign,s),e.textAlign=l.textAlign(s.titleAlign),e.textBaseline="middle",a=T(s.titleFont),r=s.titleSpacing,e.fillStyle=s.titleColor,e.font=a.string,A=0;AB!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,se(t,{x:p,y:f,w:l,h:A,radius:I}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),se(t,{x:u,y:f+1,w:l-2,h:A-2,radius:I}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,f,l,A),t.strokeRect(p,f,l,A),t.fillStyle=a.backgroundColor,t.fillRect(u,f+1,l-2,A-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:A,boxWidth:l,boxPadding:c}=s,h=T(s.bodyFont);let g=h.lineHeight,d=0;const f=Rt(s.rtl,this.x,this.width),p=function(x){e.fillText(x,f.x(t.x+d),t.y+g/2),t.y+=g+o},u=f.textAlign(a);let I,B,b,Q,m,C,E;for(e.textAlign=a,e.textBaseline="middle",e.font=h.string,t.x=xe(this,u,s),e.fillStyle=s.bodyColor,M(this.beforeBody,p),d=r&&u!=="right"?a==="center"?l/2+c:l+2+c:0,Q=0,C=n.length;Q0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const a=Kt[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=ks(this,t),A=Object.assign({},a,this._size),l=Ds(e,t,A),c=Ms(t,A,l,e);(n._to!==c.x||o._to!==c.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const a=J(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),pn(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),In(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:r,index:A})=>{const l=this.chart.getDatasetMeta(r);if(!l)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:l.data[A],index:A}}),o=!Me(s,n),a=this._positionChanged(n,e);(o||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,s),r=this._positionChanged(a,t),A=e||!Me(a,o)||r;return A&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),A}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,a=Kt[o.position].call(this,t,e);return a!==!1&&(s!==a.x||n!==a.y)}}var FA={id:"tooltip",_element:Fs,positioners:Kt,afterInit(i,t,e){e&&(i.tooltip=new Fs({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Rn},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const LA=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function RA(i,t,e,s){const n=i.indexOf(t);if(n===-1)return LA(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const OA=(i,t)=>i===null?null:et(Math.round(i),0,t);function Ls(i){const t=this.getLabels();return i>=0&&ie.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function TA(i,t){const e=[],{bounds:n,step:o,min:a,max:r,precision:A,count:l,maxTicks:c,maxDigits:h,includeBounds:g}=i,d=o||1,f=c-1,{min:p,max:u}=t,I=!v(a),B=!v(r),b=!v(l),Q=(u-p)/(h+1);let m=Oi((u-p)/f/d)*d,C,E,x,y;if(m<1e-14&&!I&&!B)return[{value:p},{value:u}];y=Math.ceil(u/m)-Math.floor(p/m),y>f&&(m=Oi(y*m/f/d)*d),v(A)||(C=Math.pow(10,A),m=Math.ceil(m*C)/C),n==="ticks"?(E=Math.floor(p/m)*m,x=Math.ceil(u/m)*m):(E=p,x=u),I&&B&&o&&Mo((r-a)/o,m/1e3)?(y=Math.round(Math.min((r-a)/m,c)),m=(r-a)/y,E=a,x=r):b?(E=I?a:E,x=B?r:x,y=l-1,m=(x-E)/y):(y=(x-E)/m,we(y,Math.round(y),m/1e3)?y=Math.round(y):y=Math.ceil(y));const S=Math.max(Pi(m),Pi(E));C=Math.pow(10,v(A)?S:A),E=Math.round(E*C)/C,x=Math.round(x*C)/C;let _=0;for(I&&(g&&E!==a?(e.push({value:a}),Er)break;e.push({value:D})}return B&&g&&x!==r?e.length&&we(e[e.length-1].value,r,Rs(r,Q,i))?e[e.length-1].value=r:e.push({value:r}):(!B||x===r)&&e.push({value:x}),e}function Rs(i,t,{horizontal:e,minRotation:s}){const n=tt(s),o=(e?Math.sin(n):Math.cos(n))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}class Pe extends kt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return v(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const a=A=>n=e?n:A,r=A=>o=s?o:A;if(t){const A=ut(n),l=ut(o);A<0&&l<0?r(0):A>0&&l>0&&a(0)}if(n===o){let A=o===0?1:Math.abs(o*.05);r(o+A),t||a(n-A)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=TA(n,o);return t.bounds==="ticks"&&tn(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return re(t,this.chart.options.locale,this.options.ticks.format)}}class NA extends Pe{static id="linear";static defaults={ticks:{callback:Ne.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=N(t)?t:0,this.max=N(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=tt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const oe=i=>Math.floor(gt(i)),bt=(i,t)=>Math.pow(10,oe(i)+t);function Os(i){return i/Math.pow(10,oe(i))===1}function Ps(i,t,e){const s=Math.pow(10,e),n=Math.floor(i/s);return Math.ceil(t/s)-n}function HA(i,t){const e=t-i;let s=oe(e);for(;Ps(i,t,s)>10;)s++;for(;Ps(i,t,s)<10;)s--;return Math.min(s,oe(i))}function GA(i,{min:t,max:e}){t=W(i.min,t);const s=[],n=oe(t);let o=HA(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),A=n>o?Math.pow(10,n):0,l=Math.round((t-A)*a)/a,c=Math.floor((t-A)/r/10)*r*10;let h=Math.floor((l-c)/Math.pow(10,o)),g=W(i.min,Math.round((A+c+h*Math.pow(10,o))*a)/a);for(;g=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,a=o>=0?1:a),g=Math.round((A+c+h*Math.pow(10,o))*a)/a;const d=W(i.max,g);return s.push({value:d,major:Os(d),significand:h}),s}class _l extends kt{static id="logarithmic";static defaults={ticks:{callback:Ne.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 s=Pe.prototype.parse.apply(this,[t,e]);if(s===0){this._zero=!0;return}return N(s)&&s>0?s:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=N(t)?Math.max(0,t):null,this.max=N(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!N(this._userMin)&&(this.min=t===bt(this.min,0)?bt(this.min,-1):bt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let s=this.min,n=this.max;const o=r=>s=t?s:r,a=r=>n=e?n:r;s===n&&(s<=0?(o(1),a(10)):(o(bt(s,-1)),a(bt(n,1)))),s<=0&&o(bt(n,-1)),n<=0&&a(bt(s,1)),this.min=s,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},s=GA(e,this);return t.bounds==="ticks"&&tn(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":re(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=gt(t),this._valueRange=gt(this.max)-gt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(gt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function di(i){const t=i.ticks;if(t.display&&i.display){const e=J(t.backdropPadding);return k(t.font&&t.font.size,R.font.size)+e.height}return 0}function JA(i,t,e){return e=L(e)?e:[e],{w:Wo(i,t.string,e),h:e.length*t.lineHeight}}function Ts(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:in?{start:t-e,end:t}:{start:t,end:t+e}}function qA(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?P/o:0;for(let A=0;At.r&&(r=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),n.startt.b&&(A=(n.end-t.b)/a,i.b=Math.max(i.b,t.b+A))}function UA(i,t,e){const s=i.drawingArea,{extra:n,additionalAngle:o,padding:a,size:r}=e,A=i.getPointPosition(t,s+n+a,o),l=Math.round(mi(ot(A.angle+z))),c=KA(A.y,r.h,l),h=WA(l),g=jA(A.x,r.w,h);return{visible:!0,x:A.x,y:c,textAlign:h,left:g,top:c,right:g+r.w,bottom:c+r.h}}function YA(i,t){if(!t)return!0;const{left:e,top:s,right:n,bottom:o}=i;return!(Lt({x:e,y:s},t)||Lt({x:e,y:o},t)||Lt({x:n,y:s},t)||Lt({x:n,y:o},t))}function VA(i,t,e){const s=[],n=i._pointLabels.length,o=i.options,{centerPointLabels:a,display:r}=o.pointLabels,A={extra:di(o)/2,additionalAngle:a?P/n:0};let l;for(let c=0;c270||e<90)&&(i-=t),i}function XA(i,t,e){const{left:s,top:n,right:o,bottom:a}=e,{backdropColor:r}=t;if(!v(r)){const A=Et(t.borderRadius),l=J(t.backdropPadding);i.fillStyle=r;const c=s-l.left,h=n-l.top,g=o-s+l.width,d=a-n+l.height;Object.values(A).some(f=>f!==0)?(i.beginPath(),se(i,{x:c,y:h,w:g,h:d,radius:A}),i.fill()):i.fillRect(c,h,g,d)}}function $A(i,t){const{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){const o=i._pointLabelItems[n];if(!o.visible)continue;const a=s.setContext(i.getPointLabelContext(n));XA(e,a,o);const r=T(a.font),{x:A,y:l,textAlign:c}=o;_t(e,i._pointLabels[n],A,l+r.lineHeight/2,r,{color:a.color,textAlign:c,textBaseline:"middle"})}}function On(i,t,e,s){const{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,q);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let a=1;a{const n=F(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){const t=this.options;t.display&&t.pointLabels.display?qA(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){const e=q/(this._pointLabels.length||1),s=this.options.startAngle||0;return ot(t*e+tt(s))}getDistanceFromCenterForValue(t){if(v(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(v(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{if(h!==0){A=this.getDistanceFromCenterForValue(c.value);const g=this.getContext(h),d=n.setContext(g),f=o.setContext(g);ZA(this,d,A,a,f)}}),s.display){for(t.save(),r=a-1;r>=0;r--){const c=s.setContext(this.getPointLabelContext(r)),{color:h,lineWidth:g}=c;!g||!h||(t.lineWidth=g,t.strokeStyle=h,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,A=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(r,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,s=e.ticks;if(!s.display)return;const n=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,A)=>{if(A===0&&!e.reverse)return;const l=s.setContext(this.getContext(A)),c=T(l.font);if(o=this.getDistanceFromCenterForValue(this.ticks[A].value),l.showLabelBackdrop){t.font=c.string,a=t.measureText(r.label).width,t.fillStyle=l.backdropColor;const h=J(l.backdropPadding);t.fillRect(-a/2-h.left,-o-c.size/2-h.top,a+h.width,c.size+h.height)}_t(t,r.label,0,-o,c,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})}),t.restore()}drawTitle(){}}const Je={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}},V=Object.keys(Je);function Ns(i,t){return i-t}function Hs(i,t){if(v(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let a=t;return typeof s=="function"&&(a=s(a)),N(a)||(a=typeof s=="string"?e.parse(a,s):e.parse(a)),a===null?null:(n&&(a=n==="week"&&(Fe(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,n)),+a)}function Gs(i,t,e,s){const n=V.length;for(let o=V.indexOf(i);o=V.indexOf(e);o--){const a=V[o];if(Je[a].common&&i._adapter.diff(n,s,a)>=t-1)return a}return V[e?V.indexOf(e):0]}function il(i){for(let t=V.indexOf(i)+1,e=V.length;t=t?e[s]:e[n];i[o]=!0}}function sl(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),a=t[t.length-1].value;let r,A;for(r=o;r<=a;r=+n.add(r,1,s))A=e[r],A>=0&&(t[A].major=!0);return t}function qs(i,t,e){const s=[],n={},o=t.length;let a,r;for(a=0;a+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=et(e,0,a),s=et(s,0,a),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,a=o.unit||Gs(o.minUnit,e,s,this._getLabelCapacity(e)),r=k(n.ticks.stepSize,1),A=a==="week"?o.isoWeekday:!1,l=Fe(A)||A===!0,c={};let h=e,g,d;if(l&&(h=+t.startOf(h,"isoWeek",A)),h=+t.startOf(h,l?"day":a),t.diff(s,e,a)>1e5*r)throw new Error(e+" and "+s+" are too far apart with stepSize of "+r+" "+a);const f=n.ticks.source==="data"&&this.getDataTimestamps();for(g=h,d=0;g+p)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,a=e||n[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,s,n){const o=this.options,a=o.ticks.callback;if(a)return F(a,[t,e,s],this);const r=o.time.displayFormats,A=this._unit,l=this._majorUnit,c=A&&r[A],h=l&&r[l],g=s[e],d=l&&h&&g&&g.major;return this._adapter.format(t,n||(d?h:c))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=Ai(i,"pos",t)),{pos:o,time:r}=i[s],{pos:a,time:A}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=Ai(i,"time",t)),{time:o,pos:r}=i[s],{time:a,pos:A}=i[n]);const l=a-o;return l?r+(A-r)*(t-o)/l:r}class kl extends zs{static id="timeseries";static defaults=zs.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=ye(e,this.min),this._tableRange=ye(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let a,r,A,l,c;for(a=0,r=t.length;a=e&&l<=s&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(a=0,r=n.length;an-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(ye(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return ye(this._table,s*this._tableRange+this._minPos,!0)}}const Pn={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},nl={type:{type:String,required:!0},...Pn},ol=Yn[0]==="2"?(i,t)=>Object.assign(i,{attrs:t}):(i,t)=>Object.assign(i,t);function vt(i){return Ws(i)?oi(i):i}function al(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i;return Ws(t)?new Proxy(i,{}):i}function rl(i,t){const e=i.options;e&&t&&Object.assign(e,t)}function Tn(i,t){i.labels=t}function Nn(i,t,e){const s=[];i.datasets=t.map(n=>{const o=i.datasets.find(a=>a[e]===n[e]);return!o||!n.data||s.includes(o)?{...n}:(s.push(o),Object.assign(o,n),o)})}function Al(i,t){const e={labels:[],datasets:[]};return Tn(e,i.labels),Nn(e,i.datasets,t),e}const ll=fi({props:nl,setup(i,t){let{expose:e}=t;const s=Vs(null),n=Us(null);e({chart:n});const o=()=>{if(!s.value)return;const{type:A,data:l,options:c,plugins:h,datasetIdKey:g}=i,d=Al(l,g),f=al(d,l);n.value=new Ot(s.value,{type:A,data:f,options:{...c},plugins:h})},a=()=>{const A=oi(n.value);A&&(A.destroy(),n.value=null)},r=A=>{A.update(i.updateMode)};return Vn(o),Wn(a),jn([()=>i.options,()=>i.data],(A,l)=>{let[c,h]=A,[g,d]=l;const f=oi(n.value);if(!f)return;let p=!1;if(c){const u=vt(c),I=vt(g);u&&u!==I&&(rl(f,u),p=!0)}if(h){const u=vt(h.labels),I=vt(d.labels),B=vt(h.datasets),b=vt(d.datasets);u!==I&&(Tn(f.config.data,u),p=!0),B&&B!==b&&(Nn(f.config.data,B,i.datasetIdKey),p=!0)}p&&r(f)},{deep:!0}),()=>Ys("canvas",{ref:s})}});function cl(i,t){return Ot.register(t),fi({props:Pn,setup(e,s){let{expose:n}=s;const o=Us(null),a=r=>{o.value=r?.chart};return n({chart:o}),()=>Ys(ll,ol({ref:a},{type:i,...e}))}})}const ni=cl("bar",Ya);function Hn(i,t){const e=new TextEncoder().encode(i),s=t.allocUint8(e.length);return new Uint8Array(t.memory.buffer,s,e.length).set(e),{ptr:s,length:e.length}}function Gn(i){const t=new Array(i.length);for(let e=0;e{let e;if(t.startsWith("data:")){const s=t.replace(/^data:.*?base64,/,"");let n;if(typeof Buffer=="function"&&typeof Buffer.from=="function")n=Buffer.from(s,"base64");else if(typeof atob=="function"){const o=atob(s);n=new Uint8Array(o.length);for(let a=0;aJn(i,"data:application/wasm;base64,AGFzbQEAAAABUQxgBH9/f38Bf2AFf39/f38AYAZ/f39/f38Bf2ABfwF/YAN/f38AYAJ/fwBgAX8AYAR/f39/AGACf38BfmACf38Bf2ADf39/AX9gBX9+fn5+AAMdHAMEAwQFBAYFBwgACQkJBgQJCQoHBQQAAgELCgoEBQFwAQQEBQMBABEGDgJ/AUGAgMAAC38AQQALB0QGBm1lbW9yeQIACmFsbG9jVWludDgAAAthbGxvY1VpbnQxNgACBGZyZWUABAhjb21wcmVzcwALCm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YgB4VCABCZgICAACACIAJBEGpBCGopAwBC29HQhZra34FnhUIAIAGtIAIpAxCFQq/I9cXHrIe7oH+FQgAQmYCAgAAgAkEIaikDACEHIAIpAwAhBCACQeAAaiSAgICAACAHIASFC1gBAn9BACEEAkAgASADRw0AAkAgACACRw0AQQEPCwNAIAFFIQQgAUUNASABQX9qIQEgAi0AACEDIAAtAAAhBSAAQQFqIQAgAkEBaiECIAUgA0YNAAsLIAQLiRMGAX8BfgV/AX4cfwF+I4CAgIAAQaABayICJICAgIAAAkACQAJAIAENACOBgICAAEGYgMCAAGopAwAhA0Gq1arVeiEEQQAhBUEAIQYMAQtBACEHIAJBGGpBCGoiCEEANgIAIAJCADcDGCACI4GAgIAAQZiAwIAAaikDACIJNwIkIAIgCTcCdCACQQA2AnAgAkKq1arVCjcCaAJAIAJB6ABqIAEQjICAgABB//8DcUUNACACQRhqEIaAgIAADAILIAJBGGpBDGohCiAJQiCIpyELIAIpAnQhAyACKAJwIQUgAigCbCEGIAIoAmghBCAJpyEMQYACIQ1BACEOA0AgBiEPIA5BAmohByAAIA5qIRBBACEGAkACQAJAAkACQAJAAkACQAJAAkADQAJAAkAgByAGaiABTw0AIAJBMGogAkEYaiAQIAZBAmoiERCIgICAACACLQAyDQEgAigCGCESIAIoAiANBgJAAkAgEg0AQQEhBwwBCyASQXxqKAIArULQAH4iCSAJQuQAgn1C5AB8QtAAgKchBwtBACETIAJB6ABqQQhqIhRBADYCACACQgA3A2hBAA0FAkACQEIBQSAgB2drrUL//wODhqciB0EIIAdBCEsbIhVBAXQgFUEPakF8cSIWIBVBA3RqIhdqQQNqQXxxIgcNAEF8IQcMAQtBACETIAwgB0ECQQAgCygCABGAgICAAAAiB0UNBgsgB0EIaiIYIBU2AgAgByAHIBZqNgIEIAcgByAXajYCACACIAdBDGoiBzYCaCAHQQAgFRCagICAACETIAIgFa1C0AB+QuQAgKciGTYCcCACKAIcIhpFDQRBACEbQQAhHAJAIBJFDQAgEkF8aigCACEcCyATQXR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EQaiSAgICAAAu9AQEEf0EAIQQCQCABQYGAfE8NAAJAI4GAgIAAQaiAwIAAaiABQf//A2pBEHYiASACEJKAgIAAIgRBf0cNAAJAI4GAgIAAQaCAwIAAaiABIAIQkoCAgAAiBEF/Rg0AIARBgBBqIQQMAQtBACEEQQEgAnQiBT8AIgZBEHQiAmpBf2pBACAFa3EiBSACa0EQdiIHIAFqQABBAUgNASAHIAZqIQQgBSACRg0AIAYgBBCUgICAAAsgBEEQdCEECyAEC08BAX8CQCACQf//A2oiBkGAgHxxIARPIgJFDQAgBEH//wNqQRB2IgQgBkEQdiIGRg0AIAQgAUH//wNqQRB2IgFqIAEgBmoQlICAgAALIAILIQAgAUH//wNqQRB2IgEgASACQf//A2pBEHZqEJSAgIAAC3UBAX4gACAEIAF+IAIgA358IANCIIgiAiABQiCIIgR+fCADQv////8PgyIDIAFC/////w+DIgF+IgVCIIggAyAEfnwiA0IgiHwgA0L/////D4MgAiABfnwiAUIgiHw3AwggACABQiCGIAVC/////w+DhDcDAAssAQF/AkAgAkUNACAAIQMDQCADIAE6AAAgA0EBaiEDIAJBf2oiAg0ACwsgAAtCAQF/AkAgAkUNACACQX9qIQIgACEDA0AgAyABLQAAOgAAIAJFDQEgAkF/aiECIAFBAWohASADQQFqIQMMAAsLIAALC0ECAEGAgMAACwgAAAAAAAAAAABBiIDAAAsoAQAAAAIAAAADAAAAAAAAAAAAAAAIABAAqqqqqgAAAAAwABAAEAAAAA=="),gl=await hl(),j=gl.exports;function dl(i){const{ptr:t,length:e}=Hn(i,j),s=j.compress(t,e);j.free(t,e);const{start:n,end:o,capacity:a}=qe(j.memory,s),r=new Uint16Array(j.memory.buffer.slice(n,o)),A=Gn(r);return j.free(n,a),A}function fl(i){const t=j.allocUint16(i.length),e=new Uint16Array(j.memory.buffer,t,i.length);for(let l=0;lJn(i,"data:application/wasm;base64,AGFzbQEAAAABUQxgBH9/f38Bf2AFf39/f38AYAZ/f39/f38Bf2ABfwF/YAN/f38AYAJ/fw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gBUEDdGoiESAgNgIEIBEgITYCACAZKAIAIAVBAnRqIgUgEzsBACAFQQJqIBNBgIA8cUEQdjoAACAVQX9qIRUgF0EBaiIXIBZHDQAgFiEXDAULIB1BAWohHQwACwsCQAJAIAhBAWogAUkNACACQThqIActAAAQhYCAgABB//8DcQ0ODAELIAJB6ABqQRBqIAJBIGpBEGooAgA2AgAgAkHoAGpBCGogAkEgakEIaikDADcDACACIAIpAyA3A2ggAkGAAWogAkHoAGogByAEQQJqEImAgIAAAkACQAJAIAItAIQBDQAgBA0BIActAAAhCQwCCyACQThqIAIvAYABIAItAIIBQRB0chCFgICAAEH//wNxRQ0CDA8LIAJBiAFqQRBqIAJBIGpBEGooAgA2AgAgAkGIAWpBCGogAkEgakEIaikDADcDACACIAIpAyA3A4gBIAJBoAFqIAJBiAFqIAcgBEEBahCJgICAACACLwGgASACLQCiAUEQdHIhCQsgAkE4aiAJEIWAgIAAQf//A3ENDSACQThqIAcgBGpBAWotAAAQhYCAgABB//8DcQ0NCyACQSBqEIeAgIAAIAIvAVYhESACLQBVIQUgAi0AVCEGIAIoAlAhByACKAJMIQEgAikCRCEDIAIoAkAhCCACKAI8IQkgAigCOCEEDA8LIARBAWohBAwACwsgAiAVNgKwASACIBc2AqwBCyAKKAIAIQUgCiAMKAIANgIAIAwgBTYCACACQQA2AiQgAikDICEDIAIgAikDqAEiIzcDICACIAM3A6gBICOnIRBBASEGCyACQagBaiALEIiAgIAAIAYNACOBgICAACEFIAIoAiQNASAFQYCAwIAAaiESDAMLIAcgCRCKgICAACEDAkACQCAQDQAgA6chBUEAIRJBfyEdDAELIBBBfGooAgAiEkF/aiIdIAOncSEFCyAQQXhqISAgEEF8aiEhIANCOYinISIgEiEGA0AgECAFaiITLAAAIhFFDQIgBkEARg0CAkACQCARQX9KDQAgIiARQf8AcUcNACAHIAkgICgCACAFQQN0aiIRKAIAIBEoAgQQi4CAgABBAXFFDQEMBgsgEiAhKAIARw0AIAUgEiARQQFGGyESCyAGQX9qI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ALvQEBBH9BACEEAkAgAUGBgHxPDQACQCOBgICAAEGogMCAAGogAUH//wNqQRB2IgEgAhCWgICAACIEQX9HDQACQCOBgICAAEGggMCAAGogASACEJaAgIAAIgRBf0YNACAEQYAQaiEEDAELQQAhBEEBIAJ0IgU/ACIGQRB0IgJqQX9qQQAgBWtxIgUgAmtBEHYiByABakAAQQFIDQEgByAGaiEEIAUgAkYNACAGIAQQmICAgAALIARBEHQhBAsgBAtPAQF/AkAgAkH//wNqIgZBgIB8cSAETyICRQ0AIARB//8DakEQdiIEIAZBEHYiBkYNACAEIAFB//8DakEQdiIBaiABIAZqEJiAgIAACyACCyEAIAFB//8DakEQdiIBIAEgAkH//wNqQRB2ahCYgICAAAt1AQF+IAAgBCABfiACIAN+fCADQiCIIgIgAUIgiCIEfnwgA0L/////D4MiAyABQv////8PgyIBfiIFQiCIIAMgBH58IgNCIIh8IANC/////w+DIAIgAX58IgFCIIh8NwMIIAAgAUIghiAFQv////8Pg4Q3AwALLAEBfwJAIAJFDQAgACEDA0AgAyABOgAAIANBAWohAyACQX9qIgINAAsLIAALQgEBfwJAIAJFDQAgAkF/aiECIAAhAwNAIAMgAS0AADoAACACRQ0BIAJBf2ohAiABQQFqIQEgA0EBaiEDDAALCyAACwtBAgBBgIDAAAsIAAAAAAAAAAAAQYiAwAALKAEAAAACAAAAAwAAAAAAAAAAAAAACAAQAKqqqqoAAAAAMAAQABAAAAA="),pl=await ul(),K=pl.exports;function Il(i){const{ptr:t,length:e}=Hn(i,K),s=K.compressPacked(t,e);K.free(t,e);const{start:n,end:o,capacity:a}=qe(K.memory,s),r=new Uint16Array(K.memory.buffer.slice(n,o)),A=Gn(r);return K.free(n,a),A}function Cl(i){const t=(i.charCodeAt(i.length-1)<<16)+i.charCodeAt(i.length-2);let e=K.allocUint16(i.length-2),s=new Uint16Array(K.memory.buffer,e,i.length-2);for(let c=0;c>>8,A[2*l+1]=h%256}return A},decompressFromUint8Array:function(a){if(a==null)return o.decompress(a);for(var r=new Array(a.length/2),A=0,l=r.length;A>=1}else{for(c=1,l=0;l>=1}--I==0&&(I=Math.pow(2,b),b++),delete d[u]}else for(c=g[u],l=0;l>=1;--I==0&&(I=Math.pow(2,b),b++),g[p]=B++,u=String(f)}if(u!==""){if(Object.prototype.hasOwnProperty.call(d,u)){if(u.charCodeAt(0)<256){for(l=0;l>=1}else{for(c=1,l=0;l>=1}--I==0&&(I=Math.pow(2,b),b++),delete d[u]}else for(c=g[u],l=0;l>=1;--I==0&&(I=Math.pow(2,b),b++)}for(c=2,l=0;l>=1;for(;;){if(m<<=1,C==r-1){Q.push(A(m));break}C++}return Q.join("")},decompress:function(a){return a==null?"":a==""?null:o._decompress(a.length,32768,function(r){return a.charCodeAt(r)})},_decompress:function(a,r,A){var l,c,h,g,d,f,p,u=[],I=4,B=4,b=3,Q="",m=[],C={val:A(0),position:r,index:1};for(l=0;l<3;l+=1)u[l]=l;for(h=0,d=Math.pow(2,2),f=1;f!=d;)g=C.val&C.position,C.position>>=1,C.position==0&&(C.position=r,C.val=A(C.index++)),h|=(g>0?1:0)*f,f<<=1;switch(h){case 0:for(h=0,d=Math.pow(2,8),f=1;f!=d;)g=C.val&C.position,C.position>>=1,C.position==0&&(C.position=r,C.val=A(C.index++)),h|=(g>0?1:0)*f,f<<=1;p=i(h);break;case 1:for(h=0,d=Math.pow(2,16),f=1;f!=d;)g=C.val&C.position,C.position>>=1,C.position==0&&(C.position=r,C.val=A(C.index++)),h|=(g>0?1:0)*f,f<<=1;p=i(h);break;case 2:return""}for(u[3]=p,c=p,m.push(p);;){if(C.index>a)return"";for(h=0,d=Math.pow(2,b),f=1;f!=d;)g=C.val&C.position,C.position>>=1,C.position==0&&(C.position=r,C.val=A(C.index++)),h|=(g>0?1:0)*f,f<<=1;switch(p=h){case 0:for(h=0,d=Math.pow(2,8),f=1;f!=d;)g=C.val&C.position,C.position>>=1,C.position==0&&(C.position=r,C.val=A(C.index++)),h|=(g>0?1:0)*f,f<<=1;u[B++]=i(h),p=B-1,I--;break;case 1:for(h=0,d=Math.pow(2,16),f=1;f!=d;)g=C.val&C.position,C.position>>=1,C.position==0&&(C.position=r,C.val=A(C.index++)),h|=(g>0?1:0)*f,f<<=1;u[B++]=i(h),p=B-1,I--;break;case 2:return m.join("")}if(I==0&&(I=Math.pow(2,b),b++),u[p])Q=u[p];else{if(p!==B)return null;Q=c+c.charAt(0)}m.push(Q),u[B++]=c+Q.charAt(0),c=Q,--I==0&&(I=Math.pow(2,b),b++)}}};return o}();const _e=ml,qn=Te(()=>import("./512KB-af4b69ed.js"),[]),zn=Te(()=>import("./1MB-c4d2b939.js"),[]),Un=Te(()=>import("./rw_medium-9bc89782.js"),[]),Bl=Te(()=>import("./rw_large-2123ae92.js"),[]);JSON.stringify(await qn),JSON.stringify(await zn),JSON.stringify(await Un),JSON.stringify(await Bl);const bl=lt("h3",null,"Compression Time",-1),Ql=lt("h3",null,"Decompression Time",-1),El=lt("h3",null,"Compressed Size",-1),Dl=fi({__name:"LibBenchmark",async setup(i){let t,e;Ot.defaults.color="#ddd",Ot.defaults.borderColor="#555",Ot.register(yA,FA,EA,hA,PA,NA,IA);const s=Vs({compressed:{},decompressed:{},success:{},size:{}}),n={responsive:!0,plugins:{colors:{forceOverride:!0}},scales:{x:{title:{display:!0,text:"File"}},y:{title:{display:!0,text:"Time (ms)"}}}},o=structuredClone(n);o.scales.y.title.text="Size (%)";const a=["smol-string","smol-string-packed","LZString","LZString UTF-16"],r=ze(()=>{const g=[];for(const d of a)g.push({label:d,data:Object.values(s.value.compressed).map(f=>f[d]??0)});return{labels:Object.keys(s.value.compressed),datasets:g}}),A=ze(()=>{const g=[];for(const d of a)g.push({label:d,data:Object.values(s.value.decompressed).map(f=>f[d]??0)});return{labels:Object.keys(s.value.decompressed),datasets:g}}),l=ze(()=>{const g=[];for(const d of a)g.push({label:d,data:Object.values(s.value.size).map(f=>f[d]??0)});return{labels:Object.keys(s.value.size),datasets:g}});function c(g,d,f,p,u){const I=performance.now(),B=p(f),b=performance.now()-I;localStorage.setItem("compressed",B);const Q=localStorage.getItem("compressed");localStorage.removeItem("compressed");const m=performance.now(),C=u(Q),E=performance.now()-m;s.value.compressed[d][g]=b,s.value.size[d][g]=100*(B.length/f.length),s.value.decompressed[d][g]=E,s.value.success[d][g]=f===C}const h=[{name:"json_512kb",input:JSON.stringify(([t,e]=Ue(()=>qn),t=await t,e(),t))},{name:"json_1mb",input:JSON.stringify(([t,e]=Ue(()=>zn),t=await t,e(),t))},{name:"rw_medium",input:JSON.stringify(([t,e]=Ue(()=>Un),t=await t,e(),t))}];for(const{name:g,input:d}of h)s.value.compressed[g]={},s.value.decompressed[g]={},s.value.success[g]={},s.value.size[g]={};for(const{name:g,input:d}of h)c("smol-string",g,d,dl,fl),c("smol-string-packed",g,d,Il,Cl),c("LZString",g,d,_e.compress,_e.decompress),c("LZString UTF-16",g,d,_e.compressToUTF16,_e.decompressFromUTF16);return(g,d)=>(Kn(),Xn("div",null,[lt("div",null,[bl,lt("div",null,[Ye(ge(ni),{options:n,data:r.value},null,8,["data"])])]),lt("div",null,[Ql,lt("div",null,[Ye(ge(ni),{options:n,data:A.value},null,8,["data"])])]),lt("div",null,[El,lt("div",null,[Ye(ge(ni),{options:ge(o),data:l.value},null,8,["options","data"])])])]))}});export{Dl as default}; diff --git a/docs/assets/LibBenchmark-471060c8.js b/docs/assets/LibBenchmark-471060c8.js new file mode 100644 index 0000000..6d88465 --- /dev/null +++ b/docs/assets/LibBenchmark-471060c8.js @@ -0,0 +1,18 @@ +import{d as fi,s as Xn,h as jn,v as js,r as Kn,i as Ks,j as $s,k as qs,t as si,l as $n,_ as we,m as Ye,n as Qt,o as to,c as eo,b as rt,e as Ie,u as de}from"./index-9e0d836e.js";/*! + * @kurkle/color v0.3.2 + * https://github.com/kurkle/color#readme + * (c) 2023 Jukka Kurkela + * Released under the MIT License + */function oe(i){return i+.5|0}const ct=(i,t,e)=>Math.max(Math.min(i,e),t);function At(i){return ct(oe(i*2.55),0,255)}function ut(i){return ct(oe(i*255),0,255)}function lt(i){return ct(oe(i/2.55)/100,0,1)}function yi(i){return ct(oe(i*100),0,100)}const j={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},oi=[..."0123456789ABCDEF"],io=i=>oi[i&15],no=i=>oi[(i&240)>>4]+oi[i&15],ue=i=>(i&240)>>4===(i&15),so=i=>ue(i.r)&&ue(i.g)&&ue(i.b)&&ue(i.a);function oo(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&j[i[1]]*17,g:255&j[i[2]]*17,b:255&j[i[3]]*17,a:t===5?j[i[4]]*17:255}:(t===7||t===9)&&(e={r:j[i[1]]<<4|j[i[2]],g:j[i[3]]<<4|j[i[4]],b:j[i[5]]<<4|j[i[6]],a:t===9?j[i[7]]<<4|j[i[8]]:255})),e}const ao=(i,t)=>i<255?t(i):"";function ro(i){var t=so(i)?io:no;return i?"#"+t(i.r)+t(i.g)+t(i.b)+ao(i.a,t):void 0}const lo=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function qn(i,t,e){const n=t*Math.min(e,1-e),s=(o,a=(o+i/30)%12)=>e-n*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function co(i,t,e){const n=(s,o=(s+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function ho(i,t,e){const n=qn(i,1,.5);let s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)n[s]*=1-t-e,n[s]+=t;return n}function uo(i,t,e,n,s){return i===s?(t-e)/n+(t.5?h/(2-o-a):h/(o+a),l=uo(e,n,s,h,o),l=l*60+.5),[l|0,c||0,r]}function Fi(i,t,e,n){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,n)).map(ut)}function Qi(i,t,e){return Fi(qn,i,t,e)}function fo(i,t,e){return Fi(ho,i,t,e)}function Uo(i,t,e){return Fi(co,i,t,e)}function ts(i){return(i%360+360)%360}function Fo(i){const t=lo.exec(i);let e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?At(+t[5]):ut(+t[5]));const s=ts(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?n=fo(s,o,a):t[1]==="hsv"?n=Uo(s,o,a):n=Qi(s,o,a),{r:n[0],g:n[1],b:n[2],a:e}}function Qo(i,t){var e=Ui(i);e[0]=ts(e[0]+t),e=Qi(e),i.r=e[0],i.g=e[1],i.b=e[2]}function go(i){if(!i)return;const t=Ui(i),e=t[0],n=yi(t[1]),s=yi(t[2]);return i.a<255?`hsla(${e}, ${n}%, ${s}%, ${lt(i.a)})`:`hsl(${e}, ${n}%, ${s}%)`}const Ni={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Ei={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function po(){const i={},t=Object.keys(Ei),e=Object.keys(Ni);let n,s,o,a,r;for(n=0;n>16&255,o>>8&255,o&255]}return i}let fe;function mo(i){fe||(fe=po(),fe.transparent=[0,0,0,0]);const t=fe[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Bo=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ro(i){const t=Bo.exec(i);let e=255,n,s,o;if(t){if(t[7]!==n){const a=+t[7];e=t[8]?At(a):ct(a*255,0,255)}return n=+t[1],s=+t[3],o=+t[5],n=255&(t[2]?At(n):ct(n,0,255)),s=255&(t[4]?At(s):ct(s,0,255)),o=255&(t[6]?At(o):ct(o,0,255)),{r:n,g:s,b:o,a:e}}}function bo(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${lt(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const He=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,yt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function So(i,t,e){const n=yt(lt(i.r)),s=yt(lt(i.g)),o=yt(lt(i.b));return{r:ut(He(n+e*(yt(lt(t.r))-n))),g:ut(He(s+e*(yt(lt(t.g))-s))),b:ut(He(o+e*(yt(lt(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Ue(i,t,e){if(i){let n=Ui(i);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=Qi(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function es(i,t){return i&&Object.assign(t||{},i)}function Di(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=ut(i[3]))):(t=es(i,{r:0,g:0,b:0,a:1}),t.a=ut(t.a)),t}function xo(i){return i.charAt(0)==="r"?Ro(i):Fo(i)}class qt{constructor(t){if(t instanceof qt)return t;const e=typeof t;let n;e==="object"?n=Di(t):e==="string"&&(n=oo(t)||mo(t)||xo(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=es(this._rgb);return t&&(t.a=lt(t.a)),t}set rgb(t){this._rgb=Di(t)}rgbString(){return this._valid?bo(this._rgb):void 0}hexString(){return this._valid?ro(this._rgb):void 0}hslString(){return this._valid?go(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,s=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,l=n.a-s.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=a*n.a+(1-a)*s.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=So(this._rgb,t._rgb,e)),this}clone(){return new qt(this.rgb)}alpha(t){return this._rgb.a=ut(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=oe(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ue(this._rgb,2,t),this}darken(t){return Ue(this._rgb,2,-t),this}saturate(t){return Ue(this._rgb,1,t),this}desaturate(t){return Ue(this._rgb,1,-t),this}rotate(t){return Qo(this._rgb,t),this}}/*! + * Chart.js v4.4.0 + * https://www.chartjs.org + * (c) 2023 Chart.js Contributors + * Released under the MIT License + */function st(){}const Vo=(()=>{let i=0;return()=>i++})();function E(i){return i===null||typeof i>"u"}function Z(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function W(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function w(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function G(i,t){return w(i)?i:t}function J(i,t){return typeof i>"u"?t:i}const ko=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,is=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function D(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function y(i,t,e,n){let s,o,a;if(Z(i))if(o=i.length,n)for(s=o-1;s>=0;s--)t.call(e,i[s],s);else for(s=0;si,x:i=>i.x,y:i=>i.y};function _o(i){const t=i.split("."),e=[];let n="";for(const s of t)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function yo(i){const t=_o(i);return e=>{for(const n of t){if(n==="")break;e=e&&e[n]}return e}}function Ut(i,t){return(Zi[t]||(Zi[t]=yo(t)))(i)}function gi(i){return i.charAt(0).toUpperCase()+i.slice(1)}const ee=i=>typeof i<"u",Ft=i=>typeof i=="function",vi=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function No(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const M=Math.PI,z=2*M,Ne=Number.POSITIVE_INFINITY,Eo=M/180,Y=M/2,gt=M/4,Ci=M*2/3,ht=Math.log10,ft=Math.sign;function ke(i,t,e){return Math.abs(i-t)s-o).pop(),t}function Ee(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Zo(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function ss(i,t,e){let n,s,o;for(n=0,s=i.length;nl&&c=Math.min(t,e)-n&&i<=Math.max(t,e)+n}function mi(i,t,e){e=e||(a=>i[a]1;)o=s+n>>1,e(o)?s=o:n=o;return{lo:s,hi:n}}const ri=(i,t,e,n)=>mi(i,e,n?s=>{const o=i[s][t];return oi[s][t]mi(i,e,n=>i[n][t]>=e);function wo(i,t,e){let n=0,s=i.length;for(;nn&&i[s-1]>e;)s--;return n>0||s{const n="_onData"+gi(e),s=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const a=s.apply(this,o);return i._chartjs.listeners.forEach(r=>{typeof r[n]=="function"&&r[n](...o)}),a}})})}function wi(i,t){const e=i._chartjs;if(!e)return;const n=e.listeners,s=n.indexOf(t);s!==-1&&n.splice(s,1),!(n.length>0)&&(os.forEach(o=>{delete i[o]}),delete i._chartjs)}function as(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const rs=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function ls(i,t){let e=[],n=!1;return function(...s){e=s,n||(n=!0,rs.call(window,()=>{n=!1,i.apply(t,e)}))}}function Lo(i,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(i,t,n)):i.apply(this,n),t}}const Bi=i=>i==="start"?"left":i==="end"?"right":"center",L=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Po=(i,t,e,n)=>i===(n?"left":"right")?e:i==="center"?(t+e)/2:t,Fe=i=>i===0||i===1,Oi=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*z/e)),Li=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*z/e)+1,Kt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*Y)+1,easeOutSine:i=>Math.sin(i*Y),easeInOutSine:i=>-.5*(Math.cos(M*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Fe(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Fe(i)?i:Oi(i,.075,.3),easeOutElastic:i=>Fe(i)?i:Li(i,.075,.3),easeInOutElastic(i){return Fe(i)?i:i<.5?.5*Oi(i*2,.1125,.45):.5+.5*Li(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Kt.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Kt.easeInBounce(i*2)*.5:Kt.easeOutBounce(i*2-1)*.5+.5};function cs(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Pi(i){return cs(i)?i:new qt(i)}function Ae(i){return cs(i)?i:new qt(i).saturate(.5).darken(.1).hexString()}const zo=["x","y","borderWidth","radius","tension"],Yo=["color","borderColor","backgroundColor"];function Io(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Yo},numbers:{type:"number",properties:zo}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Ho(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const zi=new Map;function Ao(i,t){t=t||{};const e=i+JSON.stringify(t);let n=zi.get(e);return n||(n=new Intl.NumberFormat(i,t),zi.set(e,n)),n}function ae(i,t,e){return Ao(t,e).format(i)}const hs={values(i){return Z(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const n=this.chart.options.locale;let s,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=Go(i,e)}const a=ht(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),ae(i,n,l)},logarithmic(i,t,e){if(i===0)return"0";const n=e[t].significand||i/Math.pow(10,Math.floor(ht(i)));return[1,2,3,5,10,15].includes(n)||t>.8*e.length?hs.numeric.call(this,i,t,e):""}};function Go(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Oe={formatters:hs};function Xo(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,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:Oe.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const xt=Object.create(null),li=Object.create(null);function $t(i,t){if(!t)return i;const e=t.split(".");for(let n=0,s=e.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>Ae(s.backgroundColor),this.hoverBorderColor=(n,s)=>Ae(s.borderColor),this.hoverColor=(n,s)=>Ae(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Ge(this,t,e)}get(t){return $t(this,t)}describe(t,e){return Ge(li,t,e)}override(t,e){return Ge(xt,t,e)}route(t,e,n,s){const o=$t(this,t),a=$t(this,n),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[r],c=a[s];return W(l)?Object.assign({},c,l):J(l,c)},set(l){this[r]=l}}})}apply(t){t.forEach(e=>e(this))}}var v=new jo({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Io,Ho,Xo]);function Ko(i){return!i||E(i.size)||E(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function De(i,t,e,n,s){let o=t[s];return o||(o=t[s]=i.measureText(s).width,e.push(s)),o>n&&(n=o),n}function $o(i,t,e,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(s=n.data={},o=n.garbageCollect=[],n.font=t),i.save(),i.font=t;let a=0;const r=e.length;let l,c,h,d,u;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function Dt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=s.string,qo(i,o),l=0;l+i||0;function us(i,t){const e={},n=W(t),s=n?Object.keys(t):t,o=W(i)?n?a=>J(i[a],i[t[a]]):a=>i[a]:()=>i;for(const a of s)e[a]=oa(o(a));return e}function fs(i){return us(i,{top:"y",right:"x",bottom:"y",left:"x"})}function bt(i){return us(i,["topLeft","topRight","bottomLeft","bottomRight"])}function P(i){const t=fs(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function T(i,t){i=i||{},t=t||v.font;let e=J(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=J(i.style,t.style);n&&!(""+n).match(na)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:J(i.family,t.family),lineHeight:sa(J(i.lineHeight,t.lineHeight),e),size:e,style:n,weight:J(i.weight,t.weight),string:""};return s.string=Ko(s),s}function Qe(i,t,e,n){let s=!0,o,a,r;for(o=0,a=i.length;oe&&r===0?0:r+l;return{min:a(n,-Math.abs(o)),max:a(s,o)}}function kt(i,t){return Object.assign(Object.create(i),t)}function Si(i,t=[""],e,n,s=()=>i[0]){const o=e||i;typeof n>"u"&&(n=gs("_fallback",i));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:s,override:r=>Si([r,...i],t,o,n)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete i[0][l],!0},get(r,l){return Fs(r,l,()=>Ua(l,t,i,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(r,l){return Ai(r).includes(l)},ownKeys(r){return Ai(r)},set(r,l,c){const h=r._storage||(r._storage=s());return r[l]=h[l]=c,delete r._keys,!0}})}function Ct(i,t,e,n){const s={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Us(i,n),setContext:o=>Ct(i,o,e,n),override:o=>Ct(i.override(o),t,e,n)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete i[a],!0},get(o,a,r){return Fs(o,a,()=>la(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(i,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,a)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,a){return Reflect.has(i,a)},ownKeys(){return Reflect.ownKeys(i)},set(o,a,r){return i[a]=r,delete o[a],!0}})}function Us(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:s=t.allKeys}=i;return{allKeys:s,scriptable:e,indexable:n,isScriptable:Ft(e)?e:()=>e,isIndexable:Ft(n)?n:()=>n}}const ra=(i,t)=>i?i+gi(t):t,xi=(i,t)=>W(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Fs(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const n=e();return i[t]=n,n}function la(i,t,e){const{_proxy:n,_context:s,_subProxy:o,_descriptors:a}=i;let r=n[t];return Ft(r)&&a.isScriptable(t)&&(r=ca(t,r,i,e)),Z(r)&&r.length&&(r=ha(t,r,i,a.isIndexable)),xi(t,r)&&(r=Ct(r,s,o&&o[t],a)),r}function ca(i,t,e,n){const{_proxy:s,_context:o,_subProxy:a,_stack:r}=e;if(r.has(i))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+i);r.add(i);let l=t(o,a||n);return r.delete(i),xi(i,l)&&(l=Vi(s._scopes,s,i,l)),l}function ha(i,t,e,n){const{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=e;if(typeof o.index<"u"&&n(i))return t[o.index%t.length];if(W(t[0])){const l=t,c=s._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=Vi(c,s,i,h);t.push(Ct(d,o,a&&a[i],r))}}return t}function Qs(i,t,e){return Ft(i)?i(t,e):i}const da=(i,t)=>i===!0?t:typeof i=="string"?Ut(t,i):void 0;function ua(i,t,e,n,s){for(const o of t){const a=da(e,o);if(a){i.add(a);const r=Qs(a._fallback,e,s);if(typeof r<"u"&&r!==e&&r!==n)return r}else if(a===!1&&typeof n<"u"&&e!==n)return null}return!1}function Vi(i,t,e,n){const s=t._rootScopes,o=Qs(t._fallback,e,n),a=[...i,...s],r=new Set;r.add(n);let l=Hi(r,a,e,o||e,n);return l===null||typeof o<"u"&&o!==e&&(l=Hi(r,a,o,l,n),l===null)?!1:Si(Array.from(r),[""],s,o,()=>fa(t,e,n))}function Hi(i,t,e,n,s){for(;e;)e=ua(i,t,e,n,s);return e}function fa(i,t,e){const n=i._getTarget();t in n||(n[t]={});const s=n[t];return Z(s)&&W(e)?e:s||{}}function Ua(i,t,e,n){let s;for(const o of t)if(s=gs(ra(o,i),e),typeof s<"u")return xi(i,s)?Vi(e,n,i,s):s}function gs(i,t){for(const e of t){if(!e)continue;const n=e[i];if(typeof n<"u")return n}}function Ai(i){let t=i._keys;return t||(t=i._keys=Fa(i._scopes)),t}function Fa(i){const t=new Set;for(const e of i)for(const n of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(n);return Array.from(t)}function Qa(i,t,e,n){const{iScale:s}=i,{key:o="r"}=this._parsing,a=new Array(n);let r,l,c,h;for(r=0,l=n;ri.ownerDocument.defaultView.getComputedStyle(i,null);function ga(i,t){return Le(i).getPropertyValue(t)}const pa=["top","right","bottom","left"];function St(i,t,e){const n={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=pa[s];n[o]=parseFloat(i[t+"-"+o+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const ma=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Ba(i,t){const e=i.touches,n=e&&e.length?e[0]:i,{offsetX:s,offsetY:o}=n;let a=!1,r,l;if(ma(s,o,i.target))r=s,l=o;else{const c=t.getBoundingClientRect();r=n.clientX-c.left,l=n.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Rt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:n}=t,s=Le(e),o=s.boxSizing==="border-box",a=St(s,"padding"),r=St(s,"border","width"),{x:l,y:c,box:h}=Ba(i,e),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:U}=t;return o&&(f-=a.width+r.width,U-=a.height+r.height),{x:Math.round((l-d)/f*e.width/n),y:Math.round((c-u)/U*e.height/n)}}function Ra(i,t,e){let n,s;if(t===void 0||e===void 0){const o=ki(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const a=o.getBoundingClientRect(),r=Le(o),l=St(r,"border","width"),c=St(r,"padding");t=a.width-c.width-l.width,e=a.height-c.height-l.height,n=Ze(r.maxWidth,o,"clientWidth"),s=Ze(r.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:n||Ne,maxHeight:s||Ne}}const ge=i=>Math.round(i*10)/10;function ba(i,t,e,n){const s=Le(i),o=St(s,"margin"),a=Ze(s.maxWidth,i,"clientWidth")||Ne,r=Ze(s.maxHeight,i,"clientHeight")||Ne,l=Ra(i,t,e);let{width:c,height:h}=l;if(s.boxSizing==="content-box"){const u=St(s,"border","width"),f=St(s,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?c/n:h-o.height),c=ge(Math.min(c,a,l.maxWidth)),h=ge(Math.min(h,r,l.maxHeight)),c&&!h&&(h=ge(c/2)),(t!==void 0||e!==void 0)&&n&&l.height&&h>l.height&&(h=l.height,c=ge(Math.floor(h*n))),{width:c,height:h}}function Gi(i,t,e){const n=t||1,s=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const a=i.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${i.height}px`,a.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||a.height!==s||a.width!==o?(i.currentDevicePixelRatio=n,a.height=s,a.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}const Sa=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function Xi(i,t){const e=ga(i,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}const xa=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},Va=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Zt(i,t,e){return i?xa(t,e):Va()}function ms(i,t){let e,n;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=n)}function Bs(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}/*! + * Chart.js v4.4.0 + * https://www.chartjs.org + * (c) 2023 Chart.js Contributors + * Released under the MIT License + */class ka{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,s){const o=e.listeners[s],a=e.duration;o.forEach(r=>r({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(n-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=rs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const o=n.items;let a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),r=!0):(o[a]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,n,t,"progress")),o.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ot=new ka;const ji="transparent",Wa={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const n=Pi(i||ji),s=n.valid&&Pi(t||ji);return s&&s.valid?s.mix(n,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class Ja{constructor(t,e,n,s){const o=e[n];s=Qe([t.to,s,o,t.from]);const a=Qe([t.from,o,s]);this._active=!0,this._fn=t.fn||Wa[t.type||typeof a],this._easing=Kt[t.easing]||Kt.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=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const s=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Qe([t.to,e,s,t.from]),this._from=Qe([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,s=this._prop,o=this._from,a=this._loop,r=this._to;let l;if(this._active=o!==r&&(a||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,r,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let s=0;s{const o=t[s];if(!W(o))return;const a={};for(const r of e)a[r]=o[r];(Z(o.properties)&&o.properties||[s]).forEach(r=>{(r===s||!n.has(r))&&n.set(r,a)})})}_animateOptions(t,e){const n=e.options,s=ya(t,n);if(!s)return[];const o=this._createAnimations(s,n);return n.$shared&&_a(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,e){const n=this._properties,s=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=n.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new Ja(u,t,c,h),s.push(d)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const n=this._createAnimations(t,e);if(n.length)return ot.add(this._chart,n),!0}}function _a(i,t){const e=[],n=Object.keys(t);for(let s=0;s0||!e&&o<0)return s.index}return null}function en(i,t){const{chart:e,_cachedMeta:n}=i,s=e._stacks||(e._stacks={}),{iScale:o,vScale:a,index:r}=n,l=o.axis,c=a.axis,h=Za(o,a,n),d=t.length;let u;for(let f=0;fe[n].axis===t).shift()}function Ma(i,t){return kt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Ta(i,t,e){return kt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Pt(i,t){const e=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){t=t||i._parsed;for(const s of t){const o=s._stacks;if(!o||o[n]===void 0||o[n][e]===void 0)return;delete o[n][e],o[n]._visualValues!==void 0&&o[n]._visualValues[e]!==void 0&&delete o[n]._visualValues[e]}}}const je=i=>i==="reset"||i==="none",nn=(i,t)=>t?i:Object.assign({},i),wa=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:bs(e,!0),values:null};class Pe{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=qi(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&&Pt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),s=(d,u,f,U)=>d==="x"?u:d==="r"?U:f,o=e.xAxisID=J(n.xAxisID,Xe(t,"x")),a=e.yAxisID=J(n.yAxisID,Xe(t,"y")),r=e.rAxisID=J(n.rAxisID,Xe(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,o,a,r),h=e.vAxisID=s(l,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&wi(this._data,this),t._stacked&&Pt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(W(e))this._data=Da(e);else if(n!==e){if(n){wi(n,this);const s=this._cachedMeta;Pt(s),s._parsed=[]}e&&Object.isExtensible(e)&&Oo(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let s=!1;this._dataCheck();const o=e._stacked;e._stacked=qi(e.vScale,e),e.stack!==n.stack&&(s=!0,Pt(e),e.stack=n.stack),this._resyncElements(t),(s||o!==e._stacked)&&en(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:s}=this,{iScale:o,_stacked:a}=n,r=o.axis;let l=t===0&&e===s.length?!0:n._sorted,c=t>0&&n._parsed[t-1],h,d,u;if(this._parsing===!1)n._parsed=s,n._sorted=!0,u=s;else{Z(s[t])?u=this.parseArrayData(n,s,t,e):W(s[t])?u=this.parseObjectData(n,s,t,e):u=this.parsePrimitiveData(n,s,t,e);const f=()=>d[r]===null||c&&d[r]Q||d=0;--u)if(!U()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let s,o,a;for(s=0,o=e.length;s=0&&tthis.getContext(n,s,e),Q=c.resolveNamedOptions(u,f,U,d);return Q.$shared&&(Q.$shared=l,o[a]=Object.freeze(nn(Q,l))),Q}_resolveAnimations(t,e,n){const s=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let l;if(s.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,n,e))}const c=new Rs(s,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||je(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(n),a=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,n),{sharedOptions:o,includeOptions:a}}updateElement(t,e,n,s){je(s)?Object.assign(t,n):this._resolveAnimations(e,s).update(t,n)}updateSharedOptions(t,e,n){t&&!je(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,s){t.active=s;const o=this.getStyle(e,s);this._resolveAnimations(e,n,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[r,l,c]of this._syncList)this[r](l,c);this._syncList=[];const s=n.length,o=e.length,a=Math.min(o,s);a&&this.parse(0,a),o>s?this._insertElements(s,o-s,t):o{for(c.length+=e,r=c.length-1;r>=a;r--)c[r]=c[r-e]};for(l(o),r=t;rs-o))}return i._cache.$bar}function La(i){const t=i.iScale,e=Oa(t,i.type);let n=t._length,s,o,a,r;const l=()=>{a===32767||a===-32768||(ee(r)&&(n=Math.min(n,Math.abs(a-r)||n)),r=a)};for(s=0,o=e.length;s0?s[i-1]:null,r=iMath.abs(r)&&(l=r,c=a),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:o,min:a,max:r}}function Ss(i,t,e,n){return Z(i)?Ya(i,t,e,n):t[e.axis]=e.parse(i,n),t}function sn(i,t,e,n){const s=i.iScale,o=i.vScale,a=s.getLabels(),r=s===o,l=[];let c,h,d,u;for(c=e,h=e+n;c=e?1:-1)}function Ha(i){let t,e,n,s,o;return i.horizontal?(t=i.base>i.x,e="left",n="right"):(t=i.basel.controller.options.grouped),o=n.options.stacked,a=[],r=l=>{const c=l.controller.getParsed(e),h=c&&c[l.vScale.axis];if(E(h)||isNaN(h))return!0};for(const l of s)if(!(e!==void 0&&r(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const s=this._getStacks(t,n),o=e!==void 0?s.indexOf(e):-1;return o===-1?s.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,s=[];let o,a;for(o=0,a=e.data.length;oai(R,r,l,!0)?1:Math.max(b,b*e,m,m*e),U=(R,b,m)=>ai(R,r,l,!0)?-1:Math.min(b,b*e,m,m*e),Q=f(0,c,d),F=f(Y,h,u),g=U(M,c,d),B=U(M+Y,h,u);n=(Q-g)/2,s=(F-B)/2,o=-(Q+g)/2,a=-(F+B)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:a}}class $a extends Pe{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};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:s}}=t.legend.options;return e.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(a),index:a}})}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,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let o=l=>+n[l];if(W(n[t])){const{key:l="value"}=this._parsing;o=c=>+Ut(n[c],l)}let a,r;for(a=t,r=t+e;a0&&!isNaN(t)?z*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=ae(e._parsed[t],n.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const n=this.chart;let s,o,a,r,l;if(!t){for(s=0,o=n.data.datasets.length;s{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(a),index:a}})}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,s=n.data.labels||[],o=ae(e._parsed[t].r,n.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,n,s){return Qa.bind(this)(t,e,n,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(oe.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(s/2,0),a=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),r=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,n,s){const o=s==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*M;let f=u,U;const Q=360/this.countVisibleElements();for(U=0;U{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?$(this.resolveDataElementOptions(t,e).angle||n):0}}function mt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Wi{static override(t){Object.assign(Wi.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return mt()}parse(){return mt()}format(){return mt()}add(){return mt()}diff(){return mt()}startOf(){return mt()}endOf(){return mt()}}var tr={_date:Wi};function er(i,t,e,n){const{controller:s,data:o,_sorted:a}=i,r=s._cachedMeta.iScale;if(r&&t===r.axis&&t!=="r"&&a&&o.length){const l=r._reversePixels?To:ri;if(n){if(s._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const d=l(o,t,e-h),u=l(o,t,e+h);return{lo:d.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function re(i,t,e,n,s){const o=i.getSortedVisibleDatasetMetas(),a=e[t];for(let r=0,l=o.length;r{l[a](t[e],s)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(t.x,t.y,s))}),n&&!r?[]:o}var or={evaluateInteractionItems:re,modes:{index(i,t,e,n){const s=Rt(t,i),o=e.axis||"x",a=e.includeInvisible||!1,r=e.intersect?$e(i,s,o,n,a):qe(i,s,o,!1,n,a),l=[];return r.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,n){const s=Rt(t,i),o=e.axis||"xy",a=e.includeInvisible||!1;let r=e.intersect?$e(i,s,o,n,a):qe(i,s,o,!1,n,a);if(r.length>0){const l=r[0].datasetIndex,c=i.getDatasetMeta(l).data;r=[];for(let h=0;he.pos===t)}function ln(i,t){return i.filter(e=>xs.indexOf(e.pos)===-1&&e.box.axis===t)}function Yt(i,t){return i.sort((e,n)=>{const s=t?n:e,o=t?e:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function ar(i){const t=[];let e,n,s,o,a,r;for(e=0,n=(i||[]).length;ec.box.fullSize),!0),n=Yt(zt(t,"left"),!0),s=Yt(zt(t,"right")),o=Yt(zt(t,"top"),!0),a=Yt(zt(t,"bottom")),r=ln(t,"x"),l=ln(t,"y");return{fullSize:e,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:zt(t,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(a).concat(r)}}function cn(i,t,e,n){return Math.max(i[e],t[e])+Math.max(i[n],t[n])}function Vs(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function hr(i,t,e,n){const{pos:s,box:o}=e,a=i.maxPadding;if(!W(s)){e.size&&(i[s]-=e.size);const d=n[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[s]+=e.size}o.getPadding&&Vs(a,o.getPadding());const r=Math.max(0,t.outerWidth-cn(a,i,"left","right")),l=Math.max(0,t.outerHeight-cn(a,i,"top","bottom")),c=r!==i.w,h=l!==i.h;return i.w=r,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function dr(i){const t=i.maxPadding;function e(n){const s=Math.max(t[n]-i[n],0);return i[n]+=s,s}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function ur(i,t){const e=t.maxPadding;function n(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(t[a],e[a])}),o}return n(i?["left","right"]:["top","bottom"])}function Gt(i,t,e,n){const s=[];let o,a,r,l,c,h;for(o=0,a=i.length,c=0;o{typeof Q.beforeLayout=="function"&&Q.beforeLayout()});const h=l.reduce((Q,F)=>F.box.options&&F.box.options.display===!1?Q:Q+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},s);Vs(u,P(n));const f=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),U=lr(l.concat(c),d);Gt(r.fullSize,f,d,U),Gt(l,f,d,U),Gt(c,f,d,U)&&Gt(l,f,d,U),dr(f),hn(r.leftAndTop,f,d,U),f.x+=f.w,f.y+=f.h,hn(r.rightAndBottom,f,d,U),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},y(r.chartArea,Q=>{const F=Q.box;Object.assign(F,i.chartArea),F.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class ks{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,s){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):n)}}isAttached(t){return!0}updateConfig(t){}}class fr extends ks{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const We="$chartjs",Ur={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},dn=i=>i===null||i==="";function Fr(i,t){const e=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[We]={initial:{height:n,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",dn(s)){const o=Xi(i,"width");o!==void 0&&(i.width=o)}if(dn(n))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Xi(i,"height");o!==void 0&&(i.height=o)}return i}const Ws=Sa?{passive:!0}:!1;function Qr(i,t,e){i.addEventListener(t,e,Ws)}function gr(i,t,e){i.canvas.removeEventListener(t,e,Ws)}function pr(i,t){const e=Ur[i.type]||i.type,{x:n,y:s}=Rt(i,t);return{type:e,chart:t,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function ve(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function mr(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||ve(r.addedNodes,n),a=a&&!ve(r.removedNodes,n);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function Br(i,t,e){const n=i.canvas,s=new MutationObserver(o=>{let a=!1;for(const r of o)a=a||ve(r.removedNodes,n),a=a&&!ve(r.addedNodes,n);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const ne=new Map;let un=0;function Js(){const i=window.devicePixelRatio;i!==un&&(un=i,ne.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Rr(i,t){ne.size||window.addEventListener("resize",Js),ne.set(i,t)}function br(i){ne.delete(i),ne.size||window.removeEventListener("resize",Js)}function Sr(i,t,e){const n=i.canvas,s=n&&ki(n);if(!s)return;const o=ls((r,l)=>{const c=s.clientWidth;e(r,l),c{const l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(s),Rr(i,o),a}function ti(i,t,e){e&&e.disconnect(),t==="resize"&&br(i)}function xr(i,t,e){const n=i.canvas,s=ls(o=>{i.ctx!==null&&e(pr(o,i))},i);return Qr(n,t,s),s}class Vr extends ks{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(Fr(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[We])return!1;const n=e[We].initial;["height","width"].forEach(o=>{const a=n[o];E(a)?e.removeAttribute(o):e.setAttribute(o,a)});const s=n.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[We],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),a={attach:mr,detach:Br,resize:Sr}[e]||xr;s[e]=a(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),s=n[e];if(!s)return;({attach:ti,detach:ti,resize:ti}[e]||gr)(t,e,s),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,s){return ba(t,e,n,s)}isAttached(t){const e=ki(t);return!!(e&&e.isConnected)}}function kr(i){return!ps()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?fr:Vr}class Mt{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return Ee(this.x)&&Ee(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const s={};return t.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}}function Wr(i,t){const e=i.options.ticks,n=Jr(i),s=Math.min(e.maxTicksLimit||n,n),o=e.major.enabled?yr(t):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>s)return Nr(t,c,o,a/s),c;const h=_r(o,t,s);if(a>0){let d,u;const f=a>1?Math.round((l-r)/(a-1)):null;for(me(t,c,h,E(f)?0:r-f,r),d=0,u=a-1;ds)return l}return Math.max(s,1)}function yr(i){const t=[];let e,n;for(e=0,n=i.length;ei==="left"?"right":i==="right"?"left":i,fn=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,Un=(i,t)=>Math.min(t||i,i);function Fn(i,t){const e=[],n=i.length/t,s=i.length;let o=0;for(;oa+r)))return l}function vr(i,t){y(i,e=>{const n=e.gc,s=n.length/2;let o;if(s>t){for(o=0;on?n:e,n=s&&e>n?e:n,{min:G(e,G(n,e)),max:G(n,G(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){D(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.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=aa(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=r=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=q(this.chart.width-d,0,this.maxWidth);r=t.offset?this.maxWidth/n:f/(n-1),d+6>r&&(r=f/(n-(t.offset?.5:1)),l=this.maxHeight-It(t.grid)-e.padding-Qn(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=pi(Math.min(Math.asin(q((h.highest.height+6)/r,-1,1)),Math.asin(q(l/c,-1,1))-Math.asin(q(u/c,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){D(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){D(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const l=Qn(s,e.options.font);if(r?(t.width=this.maxWidth,t.height=It(o)+l):(t.height=this.maxHeight,t.width=It(o)+l),n.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=n.padding*2,U=$(this.labelRotation),Q=Math.cos(U),F=Math.sin(U);if(r){const g=n.mirror?0:F*d.width+Q*u.height;t.height=Math.min(this.maxHeight,t.height+g+f)}else{const g=n.mirror?0:Q*d.width+F*u.height;t.width=Math.min(this.maxWidth,t.width+g+f)}this._calculatePadding(c,h,F,Q)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,s){const{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=s*t.width,f=n*e.height):(u=n*t.height,f=s*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){D(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e({width:a[V]||0,height:r[V]||0});return{first:x(0),last:x(e-1),widest:x(p),highest:x(S),widths:a,heights:r}}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 Mo(this._alignToPixels?pt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&tr*s?r/n:l/s:l*s0}_computeGridLineItems(t){const e=this.axis,n=this.chart,s=this.options,{grid:o,position:a,border:r}=s,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=It(o),f=[],U=r.setContext(this.getContext()),Q=U.display?U.width:0,F=Q/2,g=function(O){return pt(n,O,Q)};let B,R,b,m,p,S,x,V,N,k,_,I;if(a==="top")B=g(this.bottom),S=this.bottom-u,V=B-F,k=g(t.top)+F,I=t.bottom;else if(a==="bottom")B=g(this.top),k=t.top,I=g(t.bottom)-F,S=B+F,V=this.top+u;else if(a==="left")B=g(this.right),p=this.right-u,x=B-F,N=g(t.left)+F,_=t.right;else if(a==="right")B=g(this.left),N=t.left,_=g(t.right)-F,p=B+F,x=this.left+u;else if(e==="x"){if(a==="center")B=g((t.top+t.bottom)/2+.5);else if(W(a)){const O=Object.keys(a)[0],X=a[O];B=g(this.chart.scales[O].getPixelForValue(X))}k=t.top,I=t.bottom,S=B+F,V=S+u}else if(e==="y"){if(a==="center")B=g((t.left+t.right)/2);else if(W(a)){const O=Object.keys(a)[0],X=a[O];B=g(this.chart.scales[O].getPixelForValue(X))}p=B-F,x=p-u,N=t.left,_=t.right}const tt=J(s.ticks.maxTicksLimit,d),C=Math.max(1,Math.ceil(d/tt));for(R=0;Ro.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(l,c,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(e.display)for(o=0,a=s.length;o{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[];let o,a;for(o=0,a=e.length;o{const n=e.split("."),s=n.pop(),o=[i].concat(n).join("."),a=t[e].split("."),r=a.pop(),l=a.join(".");v.route(o,s,l,r)})}function Pr(i){return"id"in i&&"defaults"in i}class zr{constructor(){this.controllers=new Be(Pe,"datasets",!0),this.elements=new Be(Mt,"elements"),this.plugins=new Be(Object,"plugins"),this.scales=new Be(Wt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(s=>{const o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):y(s,a=>{const r=n||this._getRegistryForType(a);this._exec(t,r,a)})})}_exec(t,e,n){const s=gi(t);D(n["before"+s],[],n),e[t](n),D(n["after"+s],[],n)}_getRegistryForType(t){for(let e=0;eo.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(s(e,n),t,"stop"),this._notify(s(n,e),t,"start")}}function Ir(i){const t={},e=[],n=Object.keys(it.plugins.items);for(let o=0;o1&&gn(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function pn(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function $r(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(e.length)return pn(i,"x",e[0])||pn(i,"y",e[0])}return{}}function qr(i,t){const e=xt[i.type]||{scales:{}},n=t.scales||{},s=ci(i.type,t),o=Object.create(null);return Object.keys(n).forEach(a=>{const r=n[a];if(!W(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=hi(a,r,$r(a,i),v.scales[r.type]),c=jr(l,s),h=e.scales||{};o[a]=jt(Object.create(null),[{axis:l},r,h[l],h[c]])}),i.data.datasets.forEach(a=>{const r=a.type||i.type,l=a.indexAxis||ci(r,t),h=(xt[r]||{}).scales||{};Object.keys(h).forEach(d=>{const u=Xr(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),jt(o[f],[{axis:u},n[f],h[d]])})}),Object.keys(o).forEach(a=>{const r=o[a];jt(r,[v.scales[r.type],v.scale])}),o}function _s(i){const t=i.options||(i.options={});t.plugins=J(t.plugins,{}),t.scales=qr(i,t)}function ys(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function tl(i){return i=i||{},i.data=ys(i.data),_s(i),i}const mn=new Map,Ns=new Set;function Re(i,t){let e=mn.get(i);return e||(e=t(),mn.set(i,e),Ns.add(e)),e}const Ht=(i,t,e)=>{const n=Ut(t,e);n!==void 0&&i.add(n)};class el{constructor(t){this._config=tl(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=ys(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(),_s(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Re(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Re(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Re(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,n=this.type;return Re(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let s=n.get(t);return(!s||e)&&(s=new Map,n.set(t,s)),s}getOptionScopes(t,e,n){const{options:s,type:o}=this,a=this._cachedScopes(t,n),r=a.get(e);if(r)return r;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Ht(l,t,d))),h.forEach(d=>Ht(l,s,d)),h.forEach(d=>Ht(l,xt[o]||{},d)),h.forEach(d=>Ht(l,v,d)),h.forEach(d=>Ht(l,li,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ns.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,xt[e]||{},v.datasets[e]||{},{type:e},v,li]}resolveNamedOptions(t,e,n,s=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Bn(this._resolverCache,t,s);let l=a;if(nl(a,e)){o.$shared=!1,n=Ft(n)?n():n;const c=this.createResolver(t,n,r);l=Ct(a,n,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,n=[""],s){const{resolver:o}=Bn(this._resolverCache,t,n);return W(e)?Ct(o,e,void 0,s):o}}function Bn(i,t,e){let n=i.get(t);n||(n=new Map,i.set(t,n));const s=e.join();let o=n.get(s);return o||(o={resolver:Si(t,e),subPrefixes:e.filter(r=>!r.toLowerCase().includes("hover"))},n.set(s,o)),o}const il=i=>W(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||Ft(i[e]),!1);function nl(i,t){const{isScriptable:e,isIndexable:n}=Us(i);for(const s of t){const o=e(s),a=n(s),r=(a||o)&&i[s];if(o&&(Ft(r)||il(r))||a&&Z(r))return!0}return!1}var sl="4.4.0";const ol=["top","bottom","left","right","chartArea"];function Rn(i,t){return i==="top"||i==="bottom"||ol.indexOf(i)===-1&&t==="x"}function bn(i,t){return function(e,n){return e[i]===n[i]?e[t]-n[t]:e[i]-n[i]}}function Sn(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),D(e&&e.onComplete,[i],t)}function al(i){const t=i.chart,e=t.options.animation;D(e&&e.onProgress,[i],t)}function Es(i){return ps()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const Je={},xn=i=>{const t=Es(i);return Object.values(Je).filter(e=>e.canvas===t).pop()};function rl(i,t,e){const n=Object.keys(i);for(const s of n){const o=+s;if(o>=t){const a=i[s];delete i[s],(e>0||o>t)&&(i[o+e]=a)}}}function ll(i,t,e,n){return!e||i.type==="mouseout"?null:n?t:i}function be(i,t,e){return i.options.clip?i[e]:t[e]}function cl(i,t){const{xScale:e,yScale:n}=i;return e&&n?{left:be(e,t,"left"),right:be(e,t,"right"),top:be(n,t,"top"),bottom:be(n,t,"bottom")}:t}let vt=class{static defaults=v;static instances=Je;static overrides=xt;static registry=it;static version=sl;static getChart=xn;static register(...t){it.add(...t),Vn()}static unregister(...t){it.remove(...t),Vn()}constructor(t,e){const n=this.config=new el(e),s=Es(t),o=xn(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||kr(s)),this.platform.updateConfig(n);const r=this.platform.acquireContext(s,a.aspectRatio),l=r&&r.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Vo(),this.ctx=r,this.canvas=l,this.width=h,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Yr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Lo(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],Je[this.id]=this,!r||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ot.listen(this,"complete",Sn),ot.listen(this,"progress",al),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:s,_aspectRatio:o}=this;return E(t)?e&&o?o:s?n/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return it}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Gi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Yi(this.canvas,this.ctx),this}stop(){return ot.stop(this),this}resize(t,e){ot.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,s=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,e,o),r=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Gi(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),D(n.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};y(e,(n,s)=>{n.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,s=Object.keys(n).reduce((a,r)=>(a[r]=!1,a),{});let o=[];e&&(o=o.concat(Object.keys(e).map(a=>{const r=e[a],l=hi(a,r),c=l==="r",h=l==="x";return{options:r,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),y(o,a=>{const r=a.options,l=r.id,c=hi(l,r),h=J(r.type,a.dtype);(r.position===void 0||Rn(r.position,c)!==Rn(a.dposition))&&(r.position=a.dposition),s[l]=!0;let d=null;if(l in n&&n[l].type===h)d=n[l];else{const u=it.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),n[d.id]=d}d.init(r,t)}),y(s,(a,r)=>{a||delete n[r]}),y(n,a=>{K.configure(this,a,a.options),K.addBox(this,a)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((s,o)=>s.index-o.index),n>e){for(let s=e;se.length&&delete this._stacks,t.forEach((n,s)=>{e.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,s;for(this._removeUnreferencedMetasets(),n=0,s=e.length;n{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(bn("z","_idx"));const{_active:r,_lastEvent:l}=this;l?this._eventHandler(l,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){y(this.scales,t=>{K.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!vi(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:s,count:o}of e){const a=n==="_removeElements"?-o:o;rl(t,s,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=o=>new Set(t.filter(a=>a[0]===o).map((a,r)=>r+","+a.splice(1).join(","))),s=n(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;K.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],y(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,s=!n.disabled,o=cl(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(s&&Ri(e,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),t.controller.draw(),s&&bi(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Dt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,s){const o=or.modes[e];return typeof o=="function"?o(this,t,n,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let s=n.filter(o=>o&&o._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=kt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const s=n?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,s);ee(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(o,{visible:n}),this.update(r=>r.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ot.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,a),t[o]=a},s=(o,a,r)=>{o.offsetX=a,o.offsetY=r,this._eventHandler(o)};y(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const r=()=>{s("attach",r),this.attached=!0,this.resize(),n("resize",o),n("detach",a)};a=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){y(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},y(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const s=n?"set":"remove";let o,a,r,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),r=0,l=t.length;r{const r=this.getDatasetMeta(o);if(!r)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:r.data[a],index:a}});!_e(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){const s=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),a=o(e,t),r=n?t:o(t,e);a.length&&this.updateHoverStyle(a,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;const o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:s=[],options:o}=this,a=e,r=this._getActiveElements(t,s,n,a),l=No(t),c=ll(t,this._lastEvent,n,l);n&&(this._lastEvent=null,D(o.onHover,[t,r,this],this),l&&D(o.onClick,[t,r,this],this));const h=!_e(r,s);return(h||e)&&(this._active=r,this._updateHoverStyles(r,s,e)),this._lastEvent=c,h}_getActiveElements(t,e,n,s){if(t.type==="mouseout")return[];if(!n)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}};function Vn(){return y(vt.instances,i=>i._plugins.invalidate())}function Ds(i,t){const{x:e,y:n,base:s,width:o,height:a}=i.getProps(["x","y","base","width","height"],t);let r,l,c,h,d;return i.horizontal?(d=a/2,r=Math.min(e,s),l=Math.max(e,s),c=n-d,h=n+d):(d=o/2,r=e-d,l=e+d,c=Math.min(n,s),h=Math.max(n,s)),{left:r,top:c,right:l,bottom:h}}function dt(i,t,e,n){return i?0:q(t,e,n)}function hl(i,t,e){const n=i.options.borderWidth,s=i.borderSkipped,o=fs(n);return{t:dt(s.top,o.top,0,e),r:dt(s.right,o.right,0,t),b:dt(s.bottom,o.bottom,0,e),l:dt(s.left,o.left,0,t)}}function dl(i,t,e){const{enableBorderRadius:n}=i.getProps(["enableBorderRadius"]),s=i.options.borderRadius,o=bt(s),a=Math.min(t,e),r=i.borderSkipped,l=n||W(s);return{topLeft:dt(!l||r.top||r.left,o.topLeft,0,a),topRight:dt(!l||r.top||r.right,o.topRight,0,a),bottomLeft:dt(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:dt(!l||r.bottom||r.right,o.bottomRight,0,a)}}function ul(i){const t=Ds(i),e=t.right-t.left,n=t.bottom-t.top,s=hl(i,e/2,n/2),o=dl(i,e/2,n/2);return{outer:{x:t.left,y:t.top,w:e,h:n,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function ei(i,t,e,n){const s=t===null,o=e===null,r=i&&!(s&&o)&&Ds(i,n);return r&&(s||Et(t,r.left,r.right))&&(o||Et(e,r.top,r.bottom))}function fl(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Ul(i,t){i.rect(t.x,t.y,t.w,t.h)}function ii(i,t,e={}){const n=i.x!==e.x?-t:0,s=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-n,a=(i.y+i.h!==e.y+e.h?t:0)-s;return{x:i.x+n,y:i.y+s,w:i.w+o,h:i.h+a,radius:i.radius}}class Fl extends Mt{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:a}=ul(this),r=fl(a.radius)?ie:Ul;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),r(t,ii(a,e,o)),t.clip(),r(t,ii(o,-e,a)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),r(t,ii(o,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,n){return ei(this,t,e,n)}inXRange(t,e){return ei(this,t,null,e)}inYRange(t,e){return ei(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+s)/2:e,y:o?n:(n+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const di=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],kn=di.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Zs(i){return di[i%di.length]}function vs(i){return kn[i%kn.length]}function Ql(i,t){return i.borderColor=Zs(t),i.backgroundColor=vs(t),++t}function gl(i,t){return i.backgroundColor=i.data.map(()=>Zs(t++)),t}function pl(i,t){return i.backgroundColor=i.data.map(()=>vs(t++)),t}function ml(i){let t=0;return(e,n)=>{const s=i.getDatasetMeta(n).controller;s instanceof $a?t=gl(e,t):s instanceof qa?t=pl(e,t):s&&(t=Ql(e,t))}}function Wn(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function Bl(i){return i&&(i.borderColor||i.backgroundColor)}var Rl={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;const{data:{datasets:n},options:s}=i.config,{elements:o}=s;if(!e.forceOverride&&(Wn(n)||Bl(s)||o&&Wn(o)))return;const a=ml(i);n.forEach(a)}};const Jn=(i,t)=>{let{boxHeight:e=t,boxWidth:n=t}=i;return i.usePointStyle&&(e=Math.min(e,t),n=i.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},bl=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class _n extends Mt{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=D(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,s)=>t.sort(n,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,s=T(n.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=Jn(n,o);let c,h;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,s,r,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,s){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=s+r;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((U,Q)=>{const F=n+e/2+o.measureText(U.text).width;(Q===0||c[c.length-1]+F+2*r>a)&&(d+=h,c[c.length-(Q>0?0:1)]=0,f+=h,u++),l[Q]={left:0,top:f,row:u,width:F,height:s},c[c.length-1]+=F+r}),d}_fitCols(t,e,n,s){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-t;let d=r,u=0,f=0,U=0,Q=0;return this.legendItems.forEach((F,g)=>{const{itemWidth:B,itemHeight:R}=Sl(n,e,o,F,s);g>0&&f+R+2*r>h&&(d+=u+r,c.push({width:u,height:f}),U+=u+r,Q++,u=f=0),l[g]={left:U,top:f,col:Q,width:B,height:R},u=Math.max(u,B),f+=R+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:s},rtl:o}}=this,a=Zt(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=L(n,this.left+s,this.right-this.lineWidths[r]);for(const c of e)r!==c.row&&(r=c.row,l=L(n,this.left+s,this.right-this.lineWidths[r])),c.top+=this.top+t+s,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+s}else{let r=0,l=L(n,this.top+t+s,this.bottom-this.columnSizes[r].height);for(const c of e)c.col!==r&&(r=c.col,l=L(n,this.top+t+s,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+s,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ri(t,this),this._draw(),bi(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:s}=this,{align:o,labels:a}=t,r=v.color,l=Zt(t.rtl,this.left,this.width),c=T(a.font),{padding:h}=a,d=c.size,u=d/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:U,boxHeight:Q,itemHeight:F}=Jn(a,d),g=function(p,S,x){if(isNaN(U)||U<=0||isNaN(Q)||Q<0)return;s.save();const V=J(x.lineWidth,1);if(s.fillStyle=J(x.fillStyle,r),s.lineCap=J(x.lineCap,"butt"),s.lineDashOffset=J(x.lineDashOffset,0),s.lineJoin=J(x.lineJoin,"miter"),s.lineWidth=V,s.strokeStyle=J(x.strokeStyle,r),s.setLineDash(J(x.lineDash,[])),a.usePointStyle){const N={radius:Q*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:V},k=l.xPlus(p,U/2),_=S+u;ds(s,N,k,_,a.pointStyleWidth&&U)}else{const N=S+Math.max((d-Q)/2,0),k=l.leftForLtr(p,U),_=bt(x.borderRadius);s.beginPath(),Object.values(_).some(I=>I!==0)?ie(s,{x:k,y:N,w:U,h:Q,radius:_}):s.rect(k,N,U,Q),s.fill(),V!==0&&s.stroke()}s.restore()},B=function(p,S,x){Vt(s,x.text,p,S+F/2,c,{strikethrough:x.hidden,textAlign:l.textAlign(x.textAlign)})},R=this.isHorizontal(),b=this._computeTitleHeight();R?f={x:L(o,this.left+h,this.right-n[0]),y:this.top+h+b,line:0}:f={x:this.left+h,y:L(o,this.top+b+h,this.bottom-e[0].height),line:0},ms(this.ctx,t.textDirection);const m=F+h;this.legendItems.forEach((p,S)=>{s.strokeStyle=p.fontColor,s.fillStyle=p.fontColor;const x=s.measureText(p.text).width,V=l.textAlign(p.textAlign||(p.textAlign=a.textAlign)),N=U+u+x;let k=f.x,_=f.y;l.setWidth(this.width),R?S>0&&k+N+h>this.right&&(_=f.y+=m,f.line++,k=f.x=L(o,this.left+h,this.right-n[f.line])):S>0&&_+m>this.bottom&&(k=f.x=k+e[f.line].width+h,f.line++,_=f.y=L(o,this.top+b+h,this.bottom-e[f.line].height));const I=l.x(k);if(g(I,_,p),k=Po(V,k+U+u,R?k+N:this.right,t.rtl),B(l.x(k),_,p),R)f.x+=N+h;else if(typeof p.text!="string"){const tt=c.lineHeight;f.y+=Cs(p,tt)+h}else f.y+=m}),Bs(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=T(e.font),s=P(e.padding);if(!e.display)return;const o=Zt(t.rtl,this.left,this.width),a=this.ctx,r=e.position,l=n.size/2,c=s.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=L(t.align,d,this.right-u);else{const U=this.columnSizes.reduce((Q,F)=>Math.max(Q,F.height),0);h=c+L(t.align,this.top,this.bottom-U-t.labels.padding-this._computeTitleHeight())}const f=L(r,d,d+u);a.textAlign=o.textAlign(Bi(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=n.string,Vt(a,e.text,f,h,n)}_computeTitleHeight(){const t=this.options.title,e=T(t.font),n=P(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,s,o;if(Et(t,this.left,this.right)&&Et(e,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;no.length>a.length?o:a)),t+e.size/2+n.measureText(s).width}function Vl(i,t,e){let n=i;return typeof t.text!="string"&&(n=Cs(t,e)),n}function Cs(i,t){const e=i.text?i.text.length:0;return t*e}function kl(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Wl={id:"legend",_element:_n,start(i,t,e){const n=i.legend=new _n({ctx:i.ctx,options:e,chart:i});K.configure(i,n,e),K.addBox(i,n)},stop(i){K.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const n=i.legend;K.configure(i,n,e),n.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const n=t.datasetIndex,s=e.chart;s.isDatasetVisible(n)?(s.hide(n),t.hidden=!0):(s.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=P(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Ms extends Mt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const s=Z(n.text)?n.text.length:1;this._padding=P(n.padding);const o=s*T(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:n,bottom:s,right:o,options:a}=this,r=a.align;let l=0,c,h,d;return this.isHorizontal()?(h=L(r,n,o),d=e+t,c=o-n):(a.position==="left"?(h=n+t,d=L(r,s,e),l=M*-.5):(h=o-t,d=L(r,e,s),l=M*.5),c=s-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=T(e.font),o=n.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Vt(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:Bi(e.align),textBaseline:"middle",translation:[a,r]})}}function Jl(i,t){const e=new Ms({ctx:i.ctx,options:t,chart:i});K.configure(i,e,t),K.addBox(i,e),i.titleBlock=e}var _l={id:"title",_element:Ms,start(i,t,e){Jl(i,e)},stop(i){const t=i.titleBlock;K.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const n=i.titleBlock;K.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Xt={average(i){if(!i.length)return!1;let t,e,n=0,s=0,o=0;for(t=0,e=i.length;t-1?i.split(` +`):i}function yl(i,t){const{element:e,datasetIndex:n,index:s}=t,o=i.getDatasetMeta(n).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:i,label:a,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:e}}function yn(i,t){const e=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:a,boxHeight:r}=t,l=T(t.bodyFont),c=T(t.titleFont),h=T(t.footerFont),d=o.length,u=s.length,f=n.length,U=P(t.padding);let Q=U.height,F=0,g=n.reduce((b,m)=>b+m.before.length+m.lines.length+m.after.length,0);if(g+=i.beforeBody.length+i.afterBody.length,d&&(Q+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),g){const b=t.displayColors?Math.max(r,l.lineHeight):l.lineHeight;Q+=f*b+(g-f)*l.lineHeight+(g-1)*t.bodySpacing}u&&(Q+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let B=0;const R=function(b){F=Math.max(F,e.measureText(b).width+B)};return e.save(),e.font=c.string,y(i.title,R),e.font=l.string,y(i.beforeBody.concat(i.afterBody),R),B=t.displayColors?a+2+t.boxPadding:0,y(n,b=>{y(b.before,R),y(b.lines,R),y(b.after,R)}),B=0,e.font=h.string,y(i.footer,R),e.restore(),F+=U.width,{width:F,height:Q}}function Nl(i,t){const{y:e,height:n}=t;return ei.height-n/2?"bottom":"center"}function El(i,t,e,n){const{x:s,width:o}=n,a=e.caretSize+e.caretPadding;if(i==="left"&&s+o+a>t.width||i==="right"&&s-o-a<0)return!0}function Dl(i,t,e,n){const{x:s,width:o}=e,{width:a,chartArea:{left:r,right:l}}=i;let c="center";return n==="center"?c=s<=(r+l)/2?"left":"right":s<=o/2?c="left":s>=a-o/2&&(c="right"),El(c,i,t,e)&&(c="center"),c}function Nn(i,t,e){const n=e.yAlign||t.yAlign||Nl(i,e);return{xAlign:e.xAlign||t.xAlign||Dl(i,t,e,n),yAlign:n}}function Zl(i,t){let{x:e,width:n}=i;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function vl(i,t,e){let{y:n,height:s}=i;return t==="top"?n+=e:t==="bottom"?n-=s+e:n-=s/2,n}function En(i,t,e,n){const{caretSize:s,caretPadding:o,cornerRadius:a}=i,{xAlign:r,yAlign:l}=e,c=s+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=bt(a);let U=Zl(t,r);const Q=vl(t,l,c);return l==="center"?r==="left"?U+=c:r==="right"&&(U-=c):r==="left"?U-=Math.max(h,u)+s:r==="right"&&(U+=Math.max(d,f)+s),{x:q(U,0,n.width-t.width),y:q(Q,0,n.height-t.height)}}function Se(i,t,e){const n=P(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-n.right:i.x+n.left}function Dn(i){return et([],at(i))}function Cl(i,t,e){return kt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Zn(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const Ts={beforeTitle:st,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex"u"?Ts[t].call(e,n):s}class vn extends Mt{static positioners=Xt;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&e.options.animation&&n.animations,o=new Rs(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Cl(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:n}=e,s=H(n,"beforeTitle",this,t),o=H(n,"title",this,t),a=H(n,"afterTitle",this,t);let r=[];return r=et(r,at(s)),r=et(r,at(o)),r=et(r,at(a)),r}getBeforeBody(t,e){return Dn(H(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,s=[];return y(t,o=>{const a={before:[],lines:[],after:[]},r=Zn(n,o);et(a.before,at(H(r,"beforeLabel",this,o))),et(a.lines,H(r,"label",this,o)),et(a.after,at(H(r,"afterLabel",this,o))),s.push(a)}),s}getAfterBody(t,e){return Dn(H(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,s=H(n,"beforeFooter",this,t),o=H(n,"footer",this,t),a=H(n,"afterFooter",this,t);let r=[];return r=et(r,at(s)),r=et(r,at(o)),r=et(r,at(a)),r}_createItems(t){const e=this._active,n=this.chart.data,s=[],o=[],a=[];let r=[],l,c;for(l=0,c=e.length;lt.filter(h,d,u,n))),t.itemSort&&(r=r.sort((h,d)=>t.itemSort(h,d,n))),y(r,h=>{const d=Zn(t.callbacks,h);s.push(H(d,"labelColor",this,h)),o.push(H(d,"labelPointStyle",this,h)),a.push(H(d,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=r,r}update(t,e){const n=this.options.setContext(this.getContext()),s=this._active;let o,a=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const r=Xt[n.position].call(this,s,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const l=this._size=yn(this,n),c=Object.assign({},r,l),h=Nn(this.chart,n,c),d=En(n,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:r.x,caretY:r.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,s){const o=this.getCaretPosition(t,n,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,n){const{xAlign:s,yAlign:o}=this,{caretSize:a,cornerRadius:r}=n,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=bt(r),{x:u,y:f}=t,{width:U,height:Q}=e;let F,g,B,R,b,m;return o==="center"?(b=f+Q/2,s==="left"?(F=u,g=F-a,R=b+a,m=b-a):(F=u+U,g=F+a,R=b-a,m=b+a),B=F):(s==="left"?g=u+Math.max(l,h)+a:s==="right"?g=u+U-Math.max(c,d)-a:g=this.caretX,o==="top"?(R=f,b=R-a,F=g-a,B=g+a):(R=f+Q,b=R+a,F=g+a,B=g-a),m=R),{x1:F,x2:g,x3:B,y1:R,y2:b,y3:m}}drawTitle(t,e,n){const s=this.title,o=s.length;let a,r,l;if(o){const c=Zt(n.rtl,this.x,this.width);for(t.x=Se(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",a=T(n.titleFont),r=n.titleSpacing,e.fillStyle=n.titleColor,e.font=a.string,l=0;lB!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ie(t,{x:Q,y:U,w:c,h:l,radius:g}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ie(t,{x:F,y:U+1,w:c-2,h:l-2,radius:g}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(Q,U,c,l),t.strokeRect(Q,U,c,l),t.fillStyle=a.backgroundColor,t.fillRect(F,U+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:s}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c,boxPadding:h}=n,d=T(n.bodyFont);let u=d.lineHeight,f=0;const U=Zt(n.rtl,this.x,this.width),Q=function(x){e.fillText(x,U.x(t.x+f),t.y+u/2),t.y+=u+o},F=U.textAlign(a);let g,B,R,b,m,p,S;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=Se(this,F,n),e.fillStyle=n.bodyColor,y(this.beforeBody,Q),f=r&&F!=="right"?a==="center"?c/2+h:c+2+h:0,b=0,p=s.length;b0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,s=n&&n.x,o=n&&n.y;if(s||o){const a=Xt[t.position].call(this,this._active,this._eventPosition);if(!a)return;const r=this._size=yn(this,t),l=Object.assign({},a,this._size),c=Nn(e,t,l),h=En(t,l,c,e);(s._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=r.width,this.height=r.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=P(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,s,e),ms(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Bs(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,s=t.map(({datasetIndex:r,index:l})=>{const c=this.chart.getDatasetMeta(r);if(!c)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:c.data[l],index:l}}),o=!_e(n,s),a=this._positionChanged(s,e);(o||a)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,n),r=this._positionChanged(a,t),l=e||!_e(a,o)||r;return l&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return e;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:n,caretY:s,options:o}=this,a=Xt[o.position].call(this,t,e);return a!==!1&&(n!==a.x||s!==a.y)}}var Ml={id:"tooltip",_element:vn,positioners:Xt,afterInit(i,t,e){e&&(i.tooltip=new vn({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Ts},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Tl=(i,t,e,n)=>(typeof t=="string"?(e=i.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function wl(i,t,e,n){const s=i.indexOf(t);if(s===-1)return Tl(i,t,e,n);const o=i.lastIndexOf(t);return s!==o?e:s}const Ol=(i,t)=>i===null?null:q(Math.round(i),0,t);function Cn(i){const t=this.getLabels();return i>=0&&ie.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Pl(i,t){const e=[],{bounds:s,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,U=h-1,{min:Q,max:F}=t,g=!E(a),B=!E(r),R=!E(c),b=(F-Q)/(d+1);let m=Mi((F-Q)/U/f)*f,p,S,x,V;if(m<1e-14&&!g&&!B)return[{value:Q},{value:F}];V=Math.ceil(F/m)-Math.floor(Q/m),V>U&&(m=Mi(V*m/U/f)*f),E(l)||(p=Math.pow(10,l),m=Math.ceil(m*p)/p),s==="ticks"?(S=Math.floor(Q/m)*m,x=Math.ceil(F/m)*m):(S=Q,x=F),g&&B&&o&&Zo((r-a)/o,m/1e3)?(V=Math.round(Math.min((r-a)/m,h)),m=(r-a)/V,S=a,x=r):R?(S=g?a:S,x=B?r:x,V=c-1,m=(x-S)/V):(V=(x-S)/m,ke(V,Math.round(V),m/1e3)?V=Math.round(V):V=Math.ceil(V));const N=Math.max(Ti(m),Ti(S));p=Math.pow(10,E(l)?N:l),S=Math.round(S*p)/p,x=Math.round(x*p)/p;let k=0;for(g&&(u&&S!==a?(e.push({value:a}),Sr)break;e.push({value:_})}return B&&u&&x!==r?e.length&&ke(e[e.length-1].value,r,Mn(r,b,i))?e[e.length-1].value=r:e.push({value:r}):(!B||x===r)&&e.push({value:x}),e}function Mn(i,t,{horizontal:e,minRotation:n}){const s=$(n),o=(e?Math.sin(s):Math.cos(s))||.001,a=.75*t*(""+i).length;return Math.min(t/o,a)}class Ce extends Wt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return E(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:o}=this;const a=l=>s=e?s:l,r=l=>o=n?o:l;if(t){const l=ft(s),c=ft(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);r(o+l),t||a(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:n}=t,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const s={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,a=Pl(s,o);return t.bounds==="ticks"&&ss(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const s=(n-e)/Math.max(t.length-1,1)/2;e-=s,n+=s}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return ae(t,this.chart.options.locale,this.options.ticks.format)}}class zl extends Ce{static id="linear";static defaults={ticks:{callback:Oe.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=w(t)?t:0,this.max=w(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=$(this.options.ticks.minRotation),s=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const se=i=>Math.floor(ht(i)),Bt=(i,t)=>Math.pow(10,se(i)+t);function Tn(i){return i/Math.pow(10,se(i))===1}function wn(i,t,e){const n=Math.pow(10,e),s=Math.floor(i/n);return Math.ceil(t/n)-s}function Yl(i,t){const e=t-i;let n=se(e);for(;wn(i,t,n)>10;)n++;for(;wn(i,t,n)<10;)n--;return Math.min(n,se(i))}function Il(i,{min:t,max:e}){t=G(i.min,t);const n=[],s=se(t);let o=Yl(t,e),a=o<0?Math.pow(10,Math.abs(o)):1;const r=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((t-l)*a)/a,h=Math.floor((t-l)/r/10)*r*10;let d=Math.floor((c-h)/Math.pow(10,o)),u=G(i.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),u=Math.round((l+h+d*Math.pow(10,o))*a)/a;const f=G(i.max,u);return n.push({value:f,major:Tn(f),significand:d}),n}class Wc extends Wt{static id="logarithmic";static defaults={ticks:{callback:Oe.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=Ce.prototype.parse.apply(this,[t,e]);if(n===0){this._zero=!0;return}return w(n)&&n>0?n:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=w(t)?Math.max(0,t):null,this.max=w(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!w(this._userMin)&&(this.min=t===Bt(this.min,0)?Bt(this.min,-1):Bt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,s=this.max;const o=r=>n=t?n:r,a=r=>s=e?s:r;n===s&&(n<=0?(o(1),a(10)):(o(Bt(n,-1)),a(Bt(s,1)))),n<=0&&o(Bt(s,-1)),s<=0&&a(Bt(n,1)),this.min=n,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},n=Il(e,this);return t.bounds==="ticks"&&ss(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":ae(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ht(t),this._valueRange=ht(this.max)-ht(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ht(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function ui(i){const t=i.ticks;if(t.display&&i.display){const e=P(t.backdropPadding);return J(t.font&&t.font.size,v.font.size)+e.height}return 0}function Hl(i,t,e){return e=Z(e)?e:[e],{w:$o(i,t.string,e),h:e.length*t.lineHeight}}function On(i,t,e,n,s){return i===n||i===s?{start:t-e/2,end:t+e/2}:is?{start:t-e,end:t}:{start:t,end:t+e}}function Al(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),n=[],s=[],o=i._pointLabels.length,a=i.options.pointLabels,r=a.centerPointLabels?M/o:0;for(let l=0;lt.r&&(r=(n.end-t.r)/o,i.r=Math.max(i.r,t.r+r)),s.startt.b&&(l=(s.end-t.b)/a,i.b=Math.max(i.b,t.b+l))}function Xl(i,t,e){const n=i.drawingArea,{extra:s,additionalAngle:o,padding:a,size:r}=e,l=i.getPointPosition(t,n+s+a,o),c=Math.round(pi(nt(l.angle+Y))),h=tc(l.y,r.h,c),d=$l(c),u=ql(l.x,r.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+r.w,bottom:h+r.h}}function jl(i,t){if(!t)return!0;const{left:e,top:n,right:s,bottom:o}=i;return!(Dt({x:e,y:n},t)||Dt({x:e,y:o},t)||Dt({x:s,y:n},t)||Dt({x:s,y:o},t))}function Kl(i,t,e){const n=[],s=i._pointLabels.length,o=i.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:ui(o)/2,additionalAngle:a?M/s:0};let c;for(let h=0;h270||e<90)&&(i-=t),i}function ec(i,t,e){const{left:n,top:s,right:o,bottom:a}=e,{backdropColor:r}=t;if(!E(r)){const l=bt(t.borderRadius),c=P(t.backdropPadding);i.fillStyle=r;const h=n-c.left,d=s-c.top,u=o-n+c.width,f=a-s+c.height;Object.values(l).some(U=>U!==0)?(i.beginPath(),ie(i,{x:h,y:d,w:u,h:f,radius:l}),i.fill()):i.fillRect(h,d,u,f)}}function ic(i,t){const{ctx:e,options:{pointLabels:n}}=i;for(let s=t-1;s>=0;s--){const o=i._pointLabelItems[s];if(!o.visible)continue;const a=n.setContext(i.getPointLabelContext(s));ec(e,a,o);const r=T(a.font),{x:l,y:c,textAlign:h}=o;Vt(e,i._pointLabels[s],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function ws(i,t,e,n){const{ctx:s}=i;if(e)s.arc(i.xCenter,i.yCenter,t,0,z);else{let o=i.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let a=1;a{const s=D(this.options.pointLabels.callback,[e,n],this);return s||s===0?s:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){const t=this.options;t.display&&t.pointLabels.display?Al(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,s))}getIndexAngle(t){const e=z/(this._pointLabels.length||1),n=this.options.startAngle||0;return nt(t*e+$(n))}getDistanceFromCenterForValue(t){if(E(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(E(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{if(d!==0){l=this.getDistanceFromCenterForValue(h.value);const u=this.getContext(d),f=s.setContext(u),U=o.setContext(u);nc(this,f,l,a,U)}}),n.display){for(t.save(),r=a-1;r>=0;r--){const h=n.setContext(this.getPointLabelContext(r)),{color:d,lineWidth:u}=h;!u||!d||(t.lineWidth=u,t.strokeStyle=d,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(r,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const s=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&!e.reverse)return;const c=n.setContext(this.getContext(l)),h=T(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,a=t.measureText(r.label).width,t.fillStyle=c.backdropColor;const d=P(c.backdropPadding);t.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}Vt(t,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}const ze={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}},A=Object.keys(ze);function Ln(i,t){return i-t}function Pn(i,t){if(E(t))return null;const e=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts;let a=t;return typeof n=="function"&&(a=n(a)),w(a)||(a=typeof n=="string"?e.parse(a,n):e.parse(a)),a===null?null:(s&&(a=s==="week"&&(Ee(o)||o===!0)?e.startOf(a,"isoWeek",o):e.startOf(a,s)),+a)}function zn(i,t,e,n){const s=A.length;for(let o=A.indexOf(i);o=A.indexOf(e);o--){const a=A[o];if(ze[a].common&&i._adapter.diff(s,n,a)>=t-1)return a}return A[e?A.indexOf(e):0]}function ac(i){for(let t=A.indexOf(i)+1,e=A.length;t=t?e[n]:e[s];i[o]=!0}}function rc(i,t,e,n){const s=i._adapter,o=+s.startOf(t[0].value,n),a=t[t.length-1].value;let r,l;for(r=o;r<=a;r=+s.add(r,1,n))l=e[r],l>=0&&(t[l].major=!0);return t}function In(i,t,e){const n=[],s={},o=t.length;let a,r;for(a=0;a+t.value))}initOffsets(t=[]){let e=0,n=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=q(e,0,a),n=q(n,0,a),this._offsets={start:e,end:n,factor:1/(e+1+n)}}_generate(){const t=this._adapter,e=this.min,n=this.max,s=this.options,o=s.time,a=o.unit||zn(o.minUnit,e,n,this._getLabelCapacity(e)),r=J(s.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Ee(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(n,e,a)>1e5*r)throw new Error(e+" and "+n+" are too far apart with stepSize of "+r+" "+a);const U=s.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u+Q)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,o=this._unit,a=e||s[o];return this._adapter.format(t,a)}_tickFormatFunction(t,e,n,s){const o=this.options,a=o.ticks.callback;if(a)return D(a,[t,e,n],this);const r=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&r[l],d=c&&r[c],u=n[e],f=c&&d&&u&&u.major;return this._adapter.format(t,s||(f?d:h))}generateTickLabels(t){let e,n,s;for(e=0,n=t.length;e0?r:1}getDataTimestamps(){let t=this._cache.data||[],e,n;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,n=s.length;e=i[n].pos&&t<=i[s].pos&&({lo:n,hi:s}=ri(i,"pos",t)),{pos:o,time:r}=i[n],{pos:a,time:l}=i[s]):(t>=i[n].time&&t<=i[s].time&&({lo:n,hi:s}=ri(i,"time",t)),{time:o,pos:r}=i[n],{time:a,pos:l}=i[s]);const c=a-o;return c?r+(l-r)*(t-o)/c:r}class _c extends Hn{static id="timeseries";static defaults=Hn.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=xe(e,this.min),this._tableRange=xe(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,s=[],o=[];let a,r,l,c,h;for(a=0,r=t.length;a=e&&c<=n&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(a=0,r=s.length;as-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?t=this.normalize(e.concat(n)):t=e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(xe(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return xe(this._table,n*this._tableRange+this._minPos,!0)}}const Os={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},lc={type:{type:String,required:!0},...Os},cc=js[0]==="2"?(i,t)=>Object.assign(i,{attrs:t}):(i,t)=>Object.assign(i,t);function Nt(i){return $n(i)?si(i):i}function hc(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i;return $n(t)?new Proxy(i,{}):i}function dc(i,t){const e=i.options;e&&t&&Object.assign(e,t)}function Ls(i,t){i.labels=t}function Ps(i,t,e){const n=[];i.datasets=t.map(s=>{const o=i.datasets.find(a=>a[e]===s[e]);return!o||!s.data||n.includes(o)?{...s}:(n.push(o),Object.assign(o,s),o)})}function uc(i,t){const e={labels:[],datasets:[]};return Ls(e,i.labels),Ps(e,i.datasets,t),e}const fc=fi({props:lc,setup(i,t){let{expose:e}=t;const n=Kn(null),s=Xn(null);e({chart:s});const o=()=>{if(!n.value)return;const{type:l,data:c,options:h,plugins:d,datasetIdKey:u}=i,f=uc(c,u),U=hc(f,c);s.value=new vt(n.value,{type:l,data:U,options:{...h},plugins:d})},a=()=>{const l=si(s.value);l&&(l.destroy(),s.value=null)},r=l=>{l.update(i.updateMode)};return Ks(o),$s(a),qs([()=>i.options,()=>i.data],(l,c)=>{let[h,d]=l,[u,f]=c;const U=si(s.value);if(!U)return;let Q=!1;if(h){const F=Nt(h),g=Nt(u);F&&F!==g&&(dc(U,F),Q=!0)}if(d){const F=Nt(d.labels),g=Nt(f.labels),B=Nt(d.datasets),R=Nt(f.datasets);F!==g&&(Ls(U.config.data,F),Q=!0),B&&B!==R&&(Ps(U.config.data,B,i.datasetIdKey),Q=!0)}Q&&r(U)},{deep:!0}),()=>jn("canvas",{ref:n})}});function Uc(i,t){return vt.register(t),fi({props:Os,setup(e,n){let{expose:s}=n;const o=Xn(null),a=r=>{o.value=r?.chart};return s({chart:o}),()=>jn(fc,cc({ref:a},{type:i,...e}))}})}const ni=Uc("bar",ja),zs="KGFzeW5jKCk9PntmdW5jdGlvbiBEKEksZyl7Y29uc3QgQT1uZXcgVGV4dEVuY29kZXIoKS5lbmNvZ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CLmZyZWUoZyxJLmxlbmd0aCk7Y29uc3R7c3RhcnQ6USxlbmQ6RSxjYXBhY2l0eTppfT13KEIubWVtb3J5LEMpLGE9bmV3IFVpbnQ4QXJyYXkoQi5tZW1vcnkuYnVmZmVyLnNsaWNlKFEsRSkpLHQ9bmV3IFRleHREZWNvZGVyKCkuZGVjb2RlKGEpO3JldHVybiBCLmZyZWUoUSxpKSx0fW9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihJKXtjb25zdHtjb21tYW5kOmcsaWQ6QSxkYXRhOkN9PUkuZGF0YTtzd2l0Y2goZyl7Y2FzZSJkZWNvbXByZXNzIjp7cG9zdE1lc3NhZ2Uoe2lkOkEsZGF0YTpuKEMpfSk7YnJlYWt9Y2FzZSJjb21wcmVzcyI6e3Bvc3RNZXNzYWdlKHtpZDpBLGRhdGE6RihDKX0pO2JyZWFrfX19fSkoKTs=",An=typeof window<"u"&&window.Blob&&new Blob([atob(zs)],{type:"text/javascript;charset=utf-8"});function Fc(){let i;try{if(i=An&&(window.URL||window.webkitURL).createObjectURL(An),!i)throw"";return new Worker(i)}catch{return new Worker("data:application/javascript;base64,"+zs,{type:"module"})}finally{i&&(window.URL||window.webkitURL).revokeObjectURL(i)}}const Ji=new Fc;let Ys=0;const Me={};Ji.onmessage=function(i){const t=i.data.id;Me[t](i.data.data),delete Me[t]};async function Qc(i){const t=Ys++;return new Promise(e=>{Me[t]=e,Ji.postMessage({command:"compress",id:t,data:i})})}async function gc(i){const t=Ys++;return new Promise(e=>{Me[t]=e,Ji.postMessage({command:"decompress",id:t,data:i})})}const Is="KGFzeW5jKCk9PntmdW5jdGlvbiBrKEEsQyl7Y29uc3QgST1uZXcgVGV4dEVuY29kZXIoKS5lbmNvZGUoQSksZz1DLmFsbG9jVWludDgoSS5sZW5ndGgpO3JldHVybiBuZXcgVWludDhBcnJheShDLm1lbW9yeS5idWZmZXIsZyxJLmxlbmd0aCkuc2V0KEkpLHtwdHI6ZyxsZW5ndGg6SS5sZW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3aXRjaChDKXtjYXNlImRlY29tcHJlc3MiOntwb3N0TWVzc2FnZSh7aWQ6SSxkYXRhOnMoZyl9KTticmVha31jYXNlImNvbXByZXNzIjp7cG9zdE1lc3NhZ2Uoe2lkOkksZGF0YTpjKGcpfSk7YnJlYWt9fX19KSgpOw==",Gn=typeof window<"u"&&window.Blob&&new Blob([atob(Is)],{type:"text/javascript;charset=utf-8"});function pc(){let i;try{if(i=Gn&&(window.URL||window.webkitURL).createObjectURL(Gn),!i)throw"";return new Worker(i)}catch{return new Worker("data:application/javascript;base64,"+Is,{type:"module"})}finally{i&&(window.URL||window.webkitURL).revokeObjectURL(i)}}const _i=new pc;let Hs=0;const Te={};_i.onmessage=function(i){const t=i.data.id;Te[t](i.data.data),delete Te[t]};async function mc(i){const t=Hs++;return new Promise(e=>{Te[t]=e,_i.postMessage({command:"compress",id:t,data:i})})}async function Bc(i){const t=Hs++;return new Promise(e=>{Te[t]=e,_i.postMessage({command:"decompress",id:t,data:i})})}var Ve=function(){var i=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function s(a,r){if(!n[a]){n[a]={};for(var l=0;l>>8,l[2*c+1]=d%256}return l},decompressFromUint8Array:function(a){if(a==null)return o.decompress(a);for(var r=new Array(a.length/2),l=0,c=r.length;l>=1}else{for(h=1,c=0;c>=1}--g==0&&(g=Math.pow(2,R),R++),delete f[F]}else for(h=u[F],c=0;c>=1;--g==0&&(g=Math.pow(2,R),R++),u[Q]=B++,F=String(U)}if(F!==""){if(Object.prototype.hasOwnProperty.call(f,F)){if(F.charCodeAt(0)<256){for(c=0;c>=1}else{for(h=1,c=0;c>=1}--g==0&&(g=Math.pow(2,R),R++),delete f[F]}else for(h=u[F],c=0;c>=1;--g==0&&(g=Math.pow(2,R),R++)}for(h=2,c=0;c>=1;for(;;){if(m<<=1,p==r-1){b.push(l(m));break}p++}return b.join("")},decompress:function(a){return a==null?"":a==""?null:o._decompress(a.length,32768,function(r){return a.charCodeAt(r)})},_decompress:function(a,r,l){var c,h,d,u,f,U,Q,F=[],g=4,B=4,R=3,b="",m=[],p={val:l(0),position:r,index:1};for(c=0;c<3;c+=1)F[c]=c;for(d=0,f=Math.pow(2,2),U=1;U!=f;)u=p.val&p.position,p.position>>=1,p.position==0&&(p.position=r,p.val=l(p.index++)),d|=(u>0?1:0)*U,U<<=1;switch(d){case 0:for(d=0,f=Math.pow(2,8),U=1;U!=f;)u=p.val&p.position,p.position>>=1,p.position==0&&(p.position=r,p.val=l(p.index++)),d|=(u>0?1:0)*U,U<<=1;Q=i(d);break;case 1:for(d=0,f=Math.pow(2,16),U=1;U!=f;)u=p.val&p.position,p.position>>=1,p.position==0&&(p.position=r,p.val=l(p.index++)),d|=(u>0?1:0)*U,U<<=1;Q=i(d);break;case 2:return""}for(F[3]=Q,h=Q,m.push(Q);;){if(p.index>a)return"";for(d=0,f=Math.pow(2,R),U=1;U!=f;)u=p.val&p.position,p.position>>=1,p.position==0&&(p.position=r,p.val=l(p.index++)),d|=(u>0?1:0)*U,U<<=1;switch(Q=d){case 0:for(d=0,f=Math.pow(2,8),U=1;U!=f;)u=p.val&p.position,p.position>>=1,p.position==0&&(p.position=r,p.val=l(p.index++)),d|=(u>0?1:0)*U,U<<=1;F[B++]=i(d),Q=B-1,g--;break;case 1:for(d=0,f=Math.pow(2,16),U=1;U!=f;)u=p.val&p.position,p.position>>=1,p.position==0&&(p.position=r,p.val=l(p.index++)),d|=(u>0?1:0)*U,U<<=1;F[B++]=i(d),Q=B-1,g--;break;case 2:return m.join("")}if(g==0&&(g=Math.pow(2,R),R++),F[Q])b=F[Q];else{if(Q!==B)return null;b=h+h.charAt(0)}m.push(b),F[B++]=h+b.charAt(0),h=b,--g==0&&(g=Math.pow(2,R),R++)}}};return o}();const As=we(()=>import("./512KB-af4b69ed.js"),[]),Gs=we(()=>import("./1MB-c4d2b939.js"),[]),Xs=we(()=>import("./rw_medium-9bc89782.js"),[]),Rc=we(()=>import("./rw_large-2123ae92.js"),[]);JSON.stringify(await As),JSON.stringify(await Gs),JSON.stringify(await Xs),JSON.stringify(await Rc);const bc=rt("h3",null,"Compression Time",-1),Sc=rt("h3",null,"Decompression Time",-1),xc=rt("h3",null,"Compressed Size",-1),yc=fi({__name:"LibBenchmark",async setup(i){let t,e;vt.defaults.color="#ddd",vt.defaults.borderColor="#555",vt.register(_l,Ml,Wl,Fl,Ll,zl,Rl);const n=Kn({compressed:{},decompressed:{},success:{},size:{}}),s={responsive:!0,plugins:{colors:{forceOverride:!0}},scales:{x:{title:{display:!0,text:"File"}},y:{title:{display:!0,text:"Time (ms)"}}}},o=structuredClone(s);o.scales.y.title.text="Size (%)";const a=["smol-string","smol-string-packed","LZString","LZString UTF-16"],r=Ye(()=>{const u=[];for(const f of a)u.push({label:f,data:Object.values(n.value.compressed).map(U=>U[f]??0)});return{labels:Object.keys(n.value.compressed),datasets:u}}),l=Ye(()=>{const u=[];for(const f of a)u.push({label:f,data:Object.values(n.value.decompressed).map(U=>U[f]??0)});return{labels:Object.keys(n.value.decompressed),datasets:u}}),c=Ye(()=>{const u=[];for(const f of a)u.push({label:f,data:Object.values(n.value.size).map(U=>U[f]??0)});return{labels:Object.keys(n.value.size),datasets:u}});async function h(u,f,U,Q,F){const g=performance.now(),B=await Q(U),R=performance.now()-g;localStorage.setItem("compressed",B);const b=localStorage.getItem("compressed");localStorage.removeItem("compressed");const m=performance.now(),p=await F(b),S=performance.now()-m;n.value.compressed[f][u]=R,n.value.size[f][u]=100*(B.length/U.length),n.value.decompressed[f][u]=S,n.value.success[f][u]=U===p}const d=[{name:"json_512kb",input:JSON.stringify(([t,e]=Qt(()=>As),t=await t,e(),t))},{name:"json_1mb",input:JSON.stringify(([t,e]=Qt(()=>Gs),t=await t,e(),t))},{name:"rw_medium",input:JSON.stringify(([t,e]=Qt(()=>Xs),t=await t,e(),t))}];for(const{name:u,input:f}of d)n.value.compressed[u]={},n.value.decompressed[u]={},n.value.success[u]={},n.value.size[u]={};for(const{name:u,input:f}of d)[t,e]=Qt(()=>h("smol-string",u,f,Qc,gc)),await t,e(),[t,e]=Qt(()=>h("smol-string-packed",u,f,mc,Bc)),await t,e(),[t,e]=Qt(()=>h("LZString",u,f,Ve.compress,Ve.decompress)),await t,e(),[t,e]=Qt(()=>h("LZString UTF-16",u,f,Ve.compressToUTF16,Ve.decompressFromUTF16)),await t,e();return(u,f)=>(to(),eo("div",null,[rt("div",null,[bc,rt("div",null,[Ie(de(ni),{options:s,data:r.value},null,8,["data"])])]),rt("div",null,[Sc,rt("div",null,[Ie(de(ni),{options:s,data:l.value},null,8,["data"])])]),rt("div",null,[xc,rt("div",null,[Ie(de(ni),{options:de(o),data:c.value},null,8,["options","data"])])])]))}});export{yc as default}; diff --git a/docs/assets/index-8b18b11e.js b/docs/assets/index-9e0d836e.js similarity index 99% rename from docs/assets/index-8b18b11e.js rename to docs/assets/index-9e0d836e.js index 3b27383..fe80f4a 100644 --- a/docs/assets/index-8b18b11e.js +++ b/docs/assets/index-9e0d836e.js @@ -6,4 +6,4 @@ * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const pt=typeof window<"u";function cc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Y=Object.assign;function Ln(e,t){const n={};for(const s in t){const r=t[s];n[s]=Se(r)?r.map(e):e(r)}return n}const kt=()=>{},Se=Array.isArray,uc=/\/$/,fc=e=>e.replace(uc,"");function jn(e,t,n="/"){let s,r={},o="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(s=t.slice(0,l),o=t.slice(l+1,c>-1?c:t.length),r=e(o)),c>-1&&(s=s||t.slice(0,c),i=t.slice(c,t.length)),s=pc(s??t,n),{fullPath:s+(o&&"?")+o+i,path:s,query:r,hash:i}}function ac(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function fr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function dc(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Pt(t.matched[s],n.matched[r])&&yo(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Pt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function yo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!hc(e[n],t[n]))return!1;return!0}function hc(e,t){return Se(e)?ar(e,t):Se(t)?ar(t,e):e===t}function ar(e,t){return Se(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function pc(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,c;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i-(i===s.length?1:0)).join("/")}var qt;(function(e){e.pop="pop",e.push="push"})(qt||(qt={}));var $t;(function(e){e.back="back",e.forward="forward",e.unknown=""})($t||($t={}));function gc(e){if(!e)if(pt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),fc(e)}const mc=/^[^#]+#/;function _c(e,t){return e.replace(mc,"#")+t}function vc(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const An=()=>({left:window.pageXOffset,top:window.pageYOffset});function bc(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=vc(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function dr(e,t){return(history.state?history.state.position-t:-1)+e}const es=new Map;function yc(e,t){es.set(e,t)}function Ec(e){const t=es.get(e);return es.delete(e),t}let xc=()=>location.protocol+"//"+location.host;function Eo(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let c=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(c);return l[0]!=="/"&&(l="/"+l),fr(l,"")}return fr(n,e)+s+r}function wc(e,t,n,s){let r=[],o=[],i=null;const c=({state:p})=>{const _=Eo(e,location),x=n.value,T=t.value;let F=0;if(p){if(n.value=_,t.value=p,i&&i===x){i=null;return}F=T?p.position-T.position:0}else s(_);r.forEach(S=>{S(n.value,x,{delta:F,type:qt.pop,direction:F?F>0?$t.forward:$t.back:$t.unknown})})};function l(){i=n.value}function f(p){r.push(p);const _=()=>{const x=r.indexOf(p);x>-1&&r.splice(x,1)};return o.push(_),_}function a(){const{history:p}=window;p.state&&p.replaceState(Y({},p.state,{scroll:An()}),"")}function h(){for(const p of o)p();o=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",a)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",a,{passive:!0}),{pauseListeners:l,listen:f,destroy:h}}function hr(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?An():null}}function Rc(e){const{history:t,location:n}=window,s={value:Eo(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,f,a){const h=e.indexOf("#"),p=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+l:xc()+e+l;try{t[a?"replaceState":"pushState"](f,"",p),r.value=f}catch(_){console.error(_),n[a?"replace":"assign"](p)}}function i(l,f){const a=Y({},t.state,hr(r.value.back,l,r.value.forward,!0),f,{position:r.value.position});o(l,a,!0),s.value=l}function c(l,f){const a=Y({},r.value,t.state,{forward:l,scroll:An()});o(a.current,a,!0);const h=Y({},hr(s.value,l,null),{position:a.position+1},f);o(l,h,!1),s.value=l}return{location:s,state:r,push:c,replace:i}}function Pc(e){e=gc(e);const t=Rc(e),n=wc(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=Y({location:"",base:e,go:s,createHref:_c.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Cc(e){return typeof e=="string"||e&&typeof e=="object"}function xo(e){return typeof e=="string"||typeof e=="symbol"}const Ye={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},wo=Symbol("");var pr;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(pr||(pr={}));function Ct(e,t){return Y(new Error,{type:e,[wo]:!0},t)}function ke(e,t){return e instanceof Error&&wo in e&&(t==null||!!(e.type&t))}const gr="[^/]+?",Oc={sensitive:!1,strict:!1,start:!0,end:!0},Ac=/[.+*?^${}()[\]/\\]/g;function Tc(e,t){const n=Y({},Oc,t),s=[];let r=n.start?"^":"";const o=[];for(const f of e){const a=f.length?[]:[90];n.strict&&!f.length&&(r+="/");for(let h=0;ht.length?t.length===1&&t[0]===40+40?1:-1:0}function Sc(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Mc={type:0,value:""},Fc=/[a-zA-Z0-9_]/;function Bc(e){if(!e)return[[]];if(e==="/")return[[Mc]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(_){throw new Error(`ERR (${n})/"${f}": ${_}`)}let n=0,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let c=0,l,f="",a="";function h(){f&&(n===0?o.push({type:0,value:f}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:f,regexp:a,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),f="")}function p(){f+=l}for(;c{i(O)}:kt}function i(a){if(xo(a)){const h=s.get(a);h&&(s.delete(a),n.splice(n.indexOf(h),1),h.children.forEach(i),h.alias.forEach(i))}else{const h=n.indexOf(a);h>-1&&(n.splice(h,1),a.record.name&&s.delete(a.record.name),a.children.forEach(i),a.alias.forEach(i))}}function c(){return n}function l(a){let h=0;for(;h=0&&(a.record.path!==n[h].record.path||!Ro(a,n[h]));)h++;n.splice(h,0,a),a.record.name&&!vr(a)&&s.set(a.record.name,a)}function f(a,h){let p,_={},x,T;if("name"in a&&a.name){if(p=s.get(a.name),!p)throw Ct(1,{location:a});T=p.record.name,_=Y(_r(h.params,p.keys.filter(O=>!O.optional).map(O=>O.name)),a.params&&_r(a.params,p.keys.map(O=>O.name))),x=p.stringify(_)}else if("path"in a)x=a.path,p=n.find(O=>O.re.test(x)),p&&(_=p.parse(x),T=p.record.name);else{if(p=h.name?s.get(h.name):n.find(O=>O.re.test(h.path)),!p)throw Ct(1,{location:a,currentLocation:h});T=p.record.name,_=Y({},h.params,a.params),x=p.stringify(_)}const F=[];let S=p;for(;S;)F.unshift(S.record),S=S.parent;return{name:T,path:x,params:_,matched:F,meta:kc(F)}}return e.forEach(a=>o(a)),{addRoute:o,resolve:f,removeRoute:i,getRoutes:c,getRecordMatcher:r}}function _r(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Lc(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:jc(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function jc(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function vr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function kc(e){return e.reduce((t,n)=>Y(t,n.meta),{})}function br(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function Ro(e,t){return t.children.some(n=>n===e||Ro(e,n))}const Po=/#/g,$c=/&/g,Uc=/\//g,Kc=/=/g,Dc=/\?/g,Co=/\+/g,Wc=/%5B/g,qc=/%5D/g,Oo=/%5E/g,zc=/%60/g,Ao=/%7B/g,Qc=/%7C/g,To=/%7D/g,Yc=/%20/g;function Os(e){return encodeURI(""+e).replace(Qc,"|").replace(Wc,"[").replace(qc,"]")}function Jc(e){return Os(e).replace(Ao,"{").replace(To,"}").replace(Oo,"^")}function ts(e){return Os(e).replace(Co,"%2B").replace(Yc,"+").replace(Po,"%23").replace($c,"%26").replace(zc,"`").replace(Ao,"{").replace(To,"}").replace(Oo,"^")}function Vc(e){return ts(e).replace(Kc,"%3D")}function Xc(e){return Os(e).replace(Po,"%23").replace(Dc,"%3F")}function Zc(e){return e==null?"":Xc(e).replace(Uc,"%2F")}function pn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Gc(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&ts(o)):[s&&ts(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function eu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Se(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const tu=Symbol(""),Er=Symbol(""),As=Symbol(""),Io=Symbol(""),ns=Symbol("");function Mt(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ve(e,t,n,s,r){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((i,c)=>{const l=h=>{h===!1?c(Ct(4,{from:n,to:t})):h instanceof Error?c(h):Cc(h)?c(Ct(2,{from:t,to:h})):(o&&s.enterCallbacks[r]===o&&typeof h=="function"&&o.push(h),i())},f=e.call(s&&s.instances[r],t,n,l);let a=Promise.resolve(f);e.length<3&&(a=a.then(l)),a.catch(h=>c(h))})}function kn(e,t,n,s){const r=[];for(const o of e)for(const i in o.components){let c=o.components[i];if(!(t!=="beforeRouteEnter"&&!o.instances[i]))if(nu(c)){const f=(c.__vccOpts||c)[t];f&&r.push(Ve(f,n,s,o,i))}else{let l=c();r.push(()=>l.then(f=>{if(!f)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${o.path}"`));const a=cc(f)?f.default:f;o.components[i]=a;const p=(a.__vccOpts||a)[t];return p&&Ve(p,n,s,o,i)()}))}}return r}function nu(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function xr(e){const t=De(As),n=De(Io),s=Oe(()=>t.resolve(Le(e.to))),r=Oe(()=>{const{matched:l}=s.value,{length:f}=l,a=l[f-1],h=n.matched;if(!a||!h.length)return-1;const p=h.findIndex(Pt.bind(null,a));if(p>-1)return p;const _=wr(l[f-2]);return f>1&&wr(a)===_&&h[h.length-1].path!==_?h.findIndex(Pt.bind(null,l[f-2])):p}),o=Oe(()=>r.value>-1&&ou(n.params,s.value.params)),i=Oe(()=>r.value>-1&&r.value===n.matched.length-1&&yo(n.params,s.value.params));function c(l={}){return ru(l)?t[Le(e.replace)?"replace":"push"](Le(e.to)).catch(kt):Promise.resolve()}return{route:s,href:Oe(()=>s.value.href),isActive:o,isExactActive:i,navigate:c}}const su=Rn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:xr,setup(e,{slots:t}){const n=yn(xr(e)),{options:s}=De(As),r=Oe(()=>({[Rr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Rr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:bo("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),ln=su;function ru(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function ou(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Se(r)||r.length!==s.length||s.some((o,i)=>o!==r[i]))return!1}return!0}function wr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rr=(e,t,n)=>e??t??n,iu=Rn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=De(ns),r=Oe(()=>e.route||s.value),o=De(Er,0),i=Oe(()=>{let f=Le(o);const{matched:a}=r.value;let h;for(;(h=a[f])&&!h.components;)f++;return f}),c=Oe(()=>r.value.matched[i.value]);sn(Er,Oe(()=>i.value+1)),sn(tu,c),sn(ns,r);const l=Ht();return tn(()=>[l.value,c.value,e.name],([f,a,h],[p,_,x])=>{a&&(a.instances[h]=f,_&&_!==a&&f&&f===p&&(a.leaveGuards.size||(a.leaveGuards=_.leaveGuards),a.updateGuards.size||(a.updateGuards=_.updateGuards))),f&&a&&(!_||!Pt(a,_)||!p)&&(a.enterCallbacks[h]||[]).forEach(T=>T(f))},{flush:"post"}),()=>{const f=r.value,a=e.name,h=c.value,p=h&&h.components[a];if(!p)return Pr(n.default,{Component:p,route:f});const _=h.props[a],x=_?_===!0?f.params:typeof _=="function"?_(f):_:null,F=bo(p,Y({},x,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(h.instances[a]=null)},ref:l}));return Pr(n.default,{Component:F,route:f})||F}}});function Pr(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const So=iu;function lu(e){const t=Hc(e.routes,e),n=e.parseQuery||Gc,s=e.stringifyQuery||yr,r=e.history,o=Mt(),i=Mt(),c=Mt(),l=bi(Ye);let f=Ye;pt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const a=Ln.bind(null,v=>""+v),h=Ln.bind(null,Zc),p=Ln.bind(null,pn);function _(v,I){let C,B;return xo(v)?(C=t.getRecordMatcher(v),B=I):B=v,t.addRoute(B,C)}function x(v){const I=t.getRecordMatcher(v);I&&t.removeRoute(I)}function T(){return t.getRoutes().map(v=>v.record)}function F(v){return!!t.getRecordMatcher(v)}function S(v,I){if(I=Y({},I||l.value),typeof v=="string"){const g=jn(n,v,I.path),m=t.resolve({path:g.path},I),b=r.createHref(g.fullPath);return Y(g,m,{params:p(m.params),hash:pn(g.hash),redirectedFrom:void 0,href:b})}let C;if("path"in v)C=Y({},v,{path:jn(n,v.path,I.path).path});else{const g=Y({},v.params);for(const m in g)g[m]==null&&delete g[m];C=Y({},v,{params:h(g)}),I.params=h(I.params)}const B=t.resolve(C,I),Q=v.hash||"";B.params=a(p(B.params));const u=ac(s,Y({},v,{hash:Jc(Q),path:B.path})),d=r.createHref(u);return Y({fullPath:u,hash:Q,query:s===yr?eu(v.query):v.query||{}},B,{redirectedFrom:void 0,href:d})}function O(v){return typeof v=="string"?jn(n,v,l.value.path):Y({},v)}function U(v,I){if(f!==v)return Ct(8,{from:I,to:v})}function w(v){return ee(v)}function L(v){return w(Y(O(v),{replace:!0}))}function V(v){const I=v.matched[v.matched.length-1];if(I&&I.redirect){const{redirect:C}=I;let B=typeof C=="function"?C(v):C;return typeof B=="string"&&(B=B.includes("?")||B.includes("#")?B=O(B):{path:B},B.params={}),Y({query:v.query,hash:v.hash,params:"path"in B?{}:v.params},B)}}function ee(v,I){const C=f=S(v),B=l.value,Q=v.state,u=v.force,d=v.replace===!0,g=V(C);if(g)return ee(Y(O(g),{state:typeof g=="object"?Y({},Q,g.state):Q,force:u,replace:d}),I||C);const m=C;m.redirectedFrom=I;let b;return!u&&dc(s,B,C)&&(b=Ct(16,{to:m,from:B}),Fe(B,B,!0,!1)),(b?Promise.resolve(b):ie(m,B)).catch(y=>ke(y)?ke(y,2)?y:ze(y):z(y,m,B)).then(y=>{if(y){if(ke(y,2))return ee(Y({replace:d},O(y.to),{state:typeof y.to=="object"?Y({},Q,y.to.state):Q,force:u}),I||m)}else y=ye(m,B,!0,d,Q);return ue(m,B,y),y})}function Z(v,I){const C=U(v,I);return C?Promise.reject(C):Promise.resolve()}function oe(v){const I=at.values().next().value;return I&&typeof I.runWithContext=="function"?I.runWithContext(v):v()}function ie(v,I){let C;const[B,Q,u]=cu(v,I);C=kn(B.reverse(),"beforeRouteLeave",v,I);for(const g of B)g.leaveGuards.forEach(m=>{C.push(Ve(m,v,I))});const d=Z.bind(null,v,I);return C.push(d),de(C).then(()=>{C=[];for(const g of o.list())C.push(Ve(g,v,I));return C.push(d),de(C)}).then(()=>{C=kn(Q,"beforeRouteUpdate",v,I);for(const g of Q)g.updateGuards.forEach(m=>{C.push(Ve(m,v,I))});return C.push(d),de(C)}).then(()=>{C=[];for(const g of u)if(g.beforeEnter)if(Se(g.beforeEnter))for(const m of g.beforeEnter)C.push(Ve(m,v,I));else C.push(Ve(g.beforeEnter,v,I));return C.push(d),de(C)}).then(()=>(v.matched.forEach(g=>g.enterCallbacks={}),C=kn(u,"beforeRouteEnter",v,I),C.push(d),de(C))).then(()=>{C=[];for(const g of i.list())C.push(Ve(g,v,I));return C.push(d),de(C)}).catch(g=>ke(g,8)?g:Promise.reject(g))}function ue(v,I,C){c.list().forEach(B=>oe(()=>B(v,I,C)))}function ye(v,I,C,B,Q){const u=U(v,I);if(u)return u;const d=I===Ye,g=pt?history.state:{};C&&(B||d?r.replace(v.fullPath,Y({scroll:d&&g&&g.scroll},Q)):r.push(v.fullPath,Q)),l.value=v,Fe(v,I,C,d),ze()}let ae;function Me(){ae||(ae=r.listen((v,I,C)=>{if(!zt.listening)return;const B=S(v),Q=V(B);if(Q){ee(Y(Q,{replace:!0}),B).catch(kt);return}f=B;const u=l.value;pt&&yc(dr(u.fullPath,C.delta),An()),ie(B,u).catch(d=>ke(d,12)?d:ke(d,2)?(ee(d.to,B).then(g=>{ke(g,20)&&!C.delta&&C.type===qt.pop&&r.go(-1,!1)}).catch(kt),Promise.reject()):(C.delta&&r.go(-C.delta,!1),z(d,B,u))).then(d=>{d=d||ye(B,u,!1),d&&(C.delta&&!ke(d,8)?r.go(-C.delta,!1):C.type===qt.pop&&ke(d,20)&&r.go(-1,!1)),ue(B,u,d)}).catch(kt)}))}let Ee=Mt(),te=Mt(),W;function z(v,I,C){ze(v);const B=te.list();return B.length?B.forEach(Q=>Q(v,I,C)):console.error(v),Promise.reject(v)}function je(){return W&&l.value!==Ye?Promise.resolve():new Promise((v,I)=>{Ee.add([v,I])})}function ze(v){return W||(W=!v,Me(),Ee.list().forEach(([I,C])=>v?C(v):I()),Ee.reset()),v}function Fe(v,I,C,B){const{scrollBehavior:Q}=e;if(!pt||!Q)return Promise.resolve();const u=!C&&Ec(dr(v.fullPath,0))||(B||!C)&&history.state&&history.state.scroll||null;return Jr().then(()=>Q(v,I,u)).then(d=>d&&bc(d)).catch(d=>z(d,v,I))}const me=v=>r.go(v);let ft;const at=new Set,zt={currentRoute:l,listening:!0,addRoute:_,removeRoute:x,hasRoute:F,getRoutes:T,resolve:S,options:e,push:w,replace:L,go:me,back:()=>me(-1),forward:()=>me(1),beforeEach:o.add,beforeResolve:i.add,afterEach:c.add,onError:te.add,isReady:je,install(v){const I=this;v.component("RouterLink",ln),v.component("RouterView",So),v.config.globalProperties.$router=I,Object.defineProperty(v.config.globalProperties,"$route",{enumerable:!0,get:()=>Le(l)}),pt&&!ft&&l.value===Ye&&(ft=!0,w(r.location).catch(Q=>{}));const C={};for(const Q in Ye)Object.defineProperty(C,Q,{get:()=>l.value[Q],enumerable:!0});v.provide(As,I),v.provide(Io,Ur(C)),v.provide(ns,l);const B=v.unmount;at.add(v),v.unmount=function(){at.delete(v),at.size<1&&(f=Ye,ae&&ae(),ae=null,l.value=Ye,ft=!1,W=!1),B()}}};function de(v){return v.reduce((I,C)=>I.then(()=>oe(C)),Promise.resolve())}return zt}function cu(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iPt(f,c))?s.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(f=>Pt(f,l))||r.push(l))}return[n,s,r]}const uu=e=>(Ti("data-v-666be7ef"),e=e(),Ii(),e),fu=uu(()=>We("h1",null,"smol-string",-1)),au=Rn({__name:"App",setup(e){return(t,n)=>(ws(),go("div",null,[We("header",null,[fu,We("nav",null,[ne(Le(ln),{to:"/"},{default:en(()=>[on("Home")]),_:1}),ne(Le(ln),{to:"/bench"},{default:en(()=>[on("Benchmarks")]),_:1}),ne(Le(ln),{to:"/docs"},{default:en(()=>[on("Documentation")]),_:1})])]),We("div",null,[ne(Le(So))])]))}});const Mo=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},du=Mo(au,[["__scopeId","data-v-666be7ef"]]),hu="modulepreload",pu=function(e){return"/smol-string/"+e},Cr={},Or=function(t,n,s){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=pu(o),o in Cr)return;Cr[o]=!0;const i=o.endsWith(".css"),c=i?'[rel="stylesheet"]':"";if(!!s)for(let a=r.length-1;a>=0;a--){const h=r[a];if(h.href===o&&(!i||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${c}`))return;const f=document.createElement("link");if(f.rel=i?"stylesheet":hu,i||(f.as="script",f.crossOrigin=""),f.href=o,document.head.appendChild(f),i)return new Promise((a,h)=>{f.addEventListener("load",a),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},gu={},mu=We("h2",null,"Home",-1),_u=We("div",null,[We("a",{href:"https://github.com/Senryoku/smol-string"},"GitHub Repository")],-1),vu=[mu,_u];function bu(e,t){return ws(),go("div",null,vu)}const yu=Mo(gu,[["render",bu]]),Eu=lu({history:Pc("/smol-string"),routes:[{path:"/",name:"home",component:yu},{path:"/bench",name:"bench",component:()=>Or(()=>import("./BenchmarksView-43e6f07e.js"),[])},{path:"/docs",name:"docs",component:()=>Or(()=>import("./DocumentationView-96ce0f58.js"),[])}]}),Ts=sc(du);Ts.use(lc());Ts.use(Eu);Ts.mount("#app");export{xu as S,Or as _,Pu as a,We as b,go as c,Rn as d,ne as e,wu as f,Mo as g,bo as h,Yi as i,Xi as j,tn as k,Dr as l,Oe as m,Ru as n,ws as o,Ht as r,bi as s,q as t,Le as u,Nl as v,en as w}; + */const pt=typeof window<"u";function cc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Y=Object.assign;function Ln(e,t){const n={};for(const s in t){const r=t[s];n[s]=Se(r)?r.map(e):e(r)}return n}const kt=()=>{},Se=Array.isArray,uc=/\/$/,fc=e=>e.replace(uc,"");function jn(e,t,n="/"){let s,r={},o="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(s=t.slice(0,l),o=t.slice(l+1,c>-1?c:t.length),r=e(o)),c>-1&&(s=s||t.slice(0,c),i=t.slice(c,t.length)),s=pc(s??t,n),{fullPath:s+(o&&"?")+o+i,path:s,query:r,hash:i}}function ac(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function fr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function dc(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Pt(t.matched[s],n.matched[r])&&yo(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Pt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function yo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!hc(e[n],t[n]))return!1;return!0}function hc(e,t){return Se(e)?ar(e,t):Se(t)?ar(t,e):e===t}function ar(e,t){return Se(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function pc(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,i,c;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(i-(i===s.length?1:0)).join("/")}var qt;(function(e){e.pop="pop",e.push="push"})(qt||(qt={}));var $t;(function(e){e.back="back",e.forward="forward",e.unknown=""})($t||($t={}));function gc(e){if(!e)if(pt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),fc(e)}const mc=/^[^#]+#/;function _c(e,t){return e.replace(mc,"#")+t}function vc(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const An=()=>({left:window.pageXOffset,top:window.pageYOffset});function bc(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=vc(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function dr(e,t){return(history.state?history.state.position-t:-1)+e}const es=new Map;function yc(e,t){es.set(e,t)}function Ec(e){const t=es.get(e);return es.delete(e),t}let xc=()=>location.protocol+"//"+location.host;function Eo(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let c=r.includes(e.slice(o))?e.slice(o).length:1,l=r.slice(c);return l[0]!=="/"&&(l="/"+l),fr(l,"")}return fr(n,e)+s+r}function wc(e,t,n,s){let r=[],o=[],i=null;const c=({state:p})=>{const _=Eo(e,location),x=n.value,T=t.value;let F=0;if(p){if(n.value=_,t.value=p,i&&i===x){i=null;return}F=T?p.position-T.position:0}else s(_);r.forEach(S=>{S(n.value,x,{delta:F,type:qt.pop,direction:F?F>0?$t.forward:$t.back:$t.unknown})})};function l(){i=n.value}function f(p){r.push(p);const _=()=>{const x=r.indexOf(p);x>-1&&r.splice(x,1)};return o.push(_),_}function a(){const{history:p}=window;p.state&&p.replaceState(Y({},p.state,{scroll:An()}),"")}function h(){for(const p of o)p();o=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",a)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",a,{passive:!0}),{pauseListeners:l,listen:f,destroy:h}}function hr(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?An():null}}function Rc(e){const{history:t,location:n}=window,s={value:Eo(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,f,a){const h=e.indexOf("#"),p=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+l:xc()+e+l;try{t[a?"replaceState":"pushState"](f,"",p),r.value=f}catch(_){console.error(_),n[a?"replace":"assign"](p)}}function i(l,f){const a=Y({},t.state,hr(r.value.back,l,r.value.forward,!0),f,{position:r.value.position});o(l,a,!0),s.value=l}function c(l,f){const a=Y({},r.value,t.state,{forward:l,scroll:An()});o(a.current,a,!0);const h=Y({},hr(s.value,l,null),{position:a.position+1},f);o(l,h,!1),s.value=l}return{location:s,state:r,push:c,replace:i}}function Pc(e){e=gc(e);const t=Rc(e),n=wc(e,t.state,t.location,t.replace);function s(o,i=!0){i||n.pauseListeners(),history.go(o)}const r=Y({location:"",base:e,go:s,createHref:_c.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Cc(e){return typeof e=="string"||e&&typeof e=="object"}function xo(e){return typeof e=="string"||typeof e=="symbol"}const Ye={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},wo=Symbol("");var pr;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(pr||(pr={}));function Ct(e,t){return Y(new Error,{type:e,[wo]:!0},t)}function ke(e,t){return e instanceof Error&&wo in e&&(t==null||!!(e.type&t))}const gr="[^/]+?",Oc={sensitive:!1,strict:!1,start:!0,end:!0},Ac=/[.+*?^${}()[\]/\\]/g;function Tc(e,t){const n=Y({},Oc,t),s=[];let r=n.start?"^":"";const o=[];for(const f of e){const a=f.length?[]:[90];n.strict&&!f.length&&(r+="/");for(let h=0;ht.length?t.length===1&&t[0]===40+40?1:-1:0}function Sc(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Mc={type:0,value:""},Fc=/[a-zA-Z0-9_]/;function Bc(e){if(!e)return[[]];if(e==="/")return[[Mc]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(_){throw new Error(`ERR (${n})/"${f}": ${_}`)}let n=0,s=n;const r=[];let o;function i(){o&&r.push(o),o=[]}let c=0,l,f="",a="";function h(){f&&(n===0?o.push({type:0,value:f}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:f,regexp:a,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),f="")}function p(){f+=l}for(;c{i(O)}:kt}function i(a){if(xo(a)){const h=s.get(a);h&&(s.delete(a),n.splice(n.indexOf(h),1),h.children.forEach(i),h.alias.forEach(i))}else{const h=n.indexOf(a);h>-1&&(n.splice(h,1),a.record.name&&s.delete(a.record.name),a.children.forEach(i),a.alias.forEach(i))}}function c(){return n}function l(a){let h=0;for(;h=0&&(a.record.path!==n[h].record.path||!Ro(a,n[h]));)h++;n.splice(h,0,a),a.record.name&&!vr(a)&&s.set(a.record.name,a)}function f(a,h){let p,_={},x,T;if("name"in a&&a.name){if(p=s.get(a.name),!p)throw Ct(1,{location:a});T=p.record.name,_=Y(_r(h.params,p.keys.filter(O=>!O.optional).map(O=>O.name)),a.params&&_r(a.params,p.keys.map(O=>O.name))),x=p.stringify(_)}else if("path"in a)x=a.path,p=n.find(O=>O.re.test(x)),p&&(_=p.parse(x),T=p.record.name);else{if(p=h.name?s.get(h.name):n.find(O=>O.re.test(h.path)),!p)throw Ct(1,{location:a,currentLocation:h});T=p.record.name,_=Y({},h.params,a.params),x=p.stringify(_)}const F=[];let S=p;for(;S;)F.unshift(S.record),S=S.parent;return{name:T,path:x,params:_,matched:F,meta:kc(F)}}return e.forEach(a=>o(a)),{addRoute:o,resolve:f,removeRoute:i,getRoutes:c,getRecordMatcher:r}}function _r(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Lc(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:jc(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function jc(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function vr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function kc(e){return e.reduce((t,n)=>Y(t,n.meta),{})}function br(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function Ro(e,t){return t.children.some(n=>n===e||Ro(e,n))}const Po=/#/g,$c=/&/g,Uc=/\//g,Kc=/=/g,Dc=/\?/g,Co=/\+/g,Wc=/%5B/g,qc=/%5D/g,Oo=/%5E/g,zc=/%60/g,Ao=/%7B/g,Qc=/%7C/g,To=/%7D/g,Yc=/%20/g;function Os(e){return encodeURI(""+e).replace(Qc,"|").replace(Wc,"[").replace(qc,"]")}function Jc(e){return Os(e).replace(Ao,"{").replace(To,"}").replace(Oo,"^")}function ts(e){return Os(e).replace(Co,"%2B").replace(Yc,"+").replace(Po,"%23").replace($c,"%26").replace(zc,"`").replace(Ao,"{").replace(To,"}").replace(Oo,"^")}function Vc(e){return ts(e).replace(Kc,"%3D")}function Xc(e){return Os(e).replace(Po,"%23").replace(Dc,"%3F")}function Zc(e){return e==null?"":Xc(e).replace(Uc,"%2F")}function pn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Gc(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&ts(o)):[s&&ts(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function eu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Se(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const tu=Symbol(""),Er=Symbol(""),As=Symbol(""),Io=Symbol(""),ns=Symbol("");function Mt(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ve(e,t,n,s,r){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((i,c)=>{const l=h=>{h===!1?c(Ct(4,{from:n,to:t})):h instanceof Error?c(h):Cc(h)?c(Ct(2,{from:t,to:h})):(o&&s.enterCallbacks[r]===o&&typeof h=="function"&&o.push(h),i())},f=e.call(s&&s.instances[r],t,n,l);let a=Promise.resolve(f);e.length<3&&(a=a.then(l)),a.catch(h=>c(h))})}function kn(e,t,n,s){const r=[];for(const o of e)for(const i in o.components){let c=o.components[i];if(!(t!=="beforeRouteEnter"&&!o.instances[i]))if(nu(c)){const f=(c.__vccOpts||c)[t];f&&r.push(Ve(f,n,s,o,i))}else{let l=c();r.push(()=>l.then(f=>{if(!f)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${o.path}"`));const a=cc(f)?f.default:f;o.components[i]=a;const p=(a.__vccOpts||a)[t];return p&&Ve(p,n,s,o,i)()}))}}return r}function nu(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function xr(e){const t=De(As),n=De(Io),s=Oe(()=>t.resolve(Le(e.to))),r=Oe(()=>{const{matched:l}=s.value,{length:f}=l,a=l[f-1],h=n.matched;if(!a||!h.length)return-1;const p=h.findIndex(Pt.bind(null,a));if(p>-1)return p;const _=wr(l[f-2]);return f>1&&wr(a)===_&&h[h.length-1].path!==_?h.findIndex(Pt.bind(null,l[f-2])):p}),o=Oe(()=>r.value>-1&&ou(n.params,s.value.params)),i=Oe(()=>r.value>-1&&r.value===n.matched.length-1&&yo(n.params,s.value.params));function c(l={}){return ru(l)?t[Le(e.replace)?"replace":"push"](Le(e.to)).catch(kt):Promise.resolve()}return{route:s,href:Oe(()=>s.value.href),isActive:o,isExactActive:i,navigate:c}}const su=Rn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:xr,setup(e,{slots:t}){const n=yn(xr(e)),{options:s}=De(As),r=Oe(()=>({[Rr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Rr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:bo("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),ln=su;function ru(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function ou(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Se(r)||r.length!==s.length||s.some((o,i)=>o!==r[i]))return!1}return!0}function wr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rr=(e,t,n)=>e??t??n,iu=Rn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=De(ns),r=Oe(()=>e.route||s.value),o=De(Er,0),i=Oe(()=>{let f=Le(o);const{matched:a}=r.value;let h;for(;(h=a[f])&&!h.components;)f++;return f}),c=Oe(()=>r.value.matched[i.value]);sn(Er,Oe(()=>i.value+1)),sn(tu,c),sn(ns,r);const l=Ht();return tn(()=>[l.value,c.value,e.name],([f,a,h],[p,_,x])=>{a&&(a.instances[h]=f,_&&_!==a&&f&&f===p&&(a.leaveGuards.size||(a.leaveGuards=_.leaveGuards),a.updateGuards.size||(a.updateGuards=_.updateGuards))),f&&a&&(!_||!Pt(a,_)||!p)&&(a.enterCallbacks[h]||[]).forEach(T=>T(f))},{flush:"post"}),()=>{const f=r.value,a=e.name,h=c.value,p=h&&h.components[a];if(!p)return Pr(n.default,{Component:p,route:f});const _=h.props[a],x=_?_===!0?f.params:typeof _=="function"?_(f):_:null,F=bo(p,Y({},x,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(h.instances[a]=null)},ref:l}));return Pr(n.default,{Component:F,route:f})||F}}});function Pr(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const So=iu;function lu(e){const t=Hc(e.routes,e),n=e.parseQuery||Gc,s=e.stringifyQuery||yr,r=e.history,o=Mt(),i=Mt(),c=Mt(),l=bi(Ye);let f=Ye;pt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const a=Ln.bind(null,v=>""+v),h=Ln.bind(null,Zc),p=Ln.bind(null,pn);function _(v,I){let C,B;return xo(v)?(C=t.getRecordMatcher(v),B=I):B=v,t.addRoute(B,C)}function x(v){const I=t.getRecordMatcher(v);I&&t.removeRoute(I)}function T(){return t.getRoutes().map(v=>v.record)}function F(v){return!!t.getRecordMatcher(v)}function S(v,I){if(I=Y({},I||l.value),typeof v=="string"){const g=jn(n,v,I.path),m=t.resolve({path:g.path},I),b=r.createHref(g.fullPath);return Y(g,m,{params:p(m.params),hash:pn(g.hash),redirectedFrom:void 0,href:b})}let C;if("path"in v)C=Y({},v,{path:jn(n,v.path,I.path).path});else{const g=Y({},v.params);for(const m in g)g[m]==null&&delete g[m];C=Y({},v,{params:h(g)}),I.params=h(I.params)}const B=t.resolve(C,I),Q=v.hash||"";B.params=a(p(B.params));const u=ac(s,Y({},v,{hash:Jc(Q),path:B.path})),d=r.createHref(u);return Y({fullPath:u,hash:Q,query:s===yr?eu(v.query):v.query||{}},B,{redirectedFrom:void 0,href:d})}function O(v){return typeof v=="string"?jn(n,v,l.value.path):Y({},v)}function U(v,I){if(f!==v)return Ct(8,{from:I,to:v})}function w(v){return ee(v)}function L(v){return w(Y(O(v),{replace:!0}))}function V(v){const I=v.matched[v.matched.length-1];if(I&&I.redirect){const{redirect:C}=I;let B=typeof C=="function"?C(v):C;return typeof B=="string"&&(B=B.includes("?")||B.includes("#")?B=O(B):{path:B},B.params={}),Y({query:v.query,hash:v.hash,params:"path"in B?{}:v.params},B)}}function ee(v,I){const C=f=S(v),B=l.value,Q=v.state,u=v.force,d=v.replace===!0,g=V(C);if(g)return ee(Y(O(g),{state:typeof g=="object"?Y({},Q,g.state):Q,force:u,replace:d}),I||C);const m=C;m.redirectedFrom=I;let b;return!u&&dc(s,B,C)&&(b=Ct(16,{to:m,from:B}),Fe(B,B,!0,!1)),(b?Promise.resolve(b):ie(m,B)).catch(y=>ke(y)?ke(y,2)?y:ze(y):z(y,m,B)).then(y=>{if(y){if(ke(y,2))return ee(Y({replace:d},O(y.to),{state:typeof y.to=="object"?Y({},Q,y.to.state):Q,force:u}),I||m)}else y=ye(m,B,!0,d,Q);return ue(m,B,y),y})}function Z(v,I){const C=U(v,I);return C?Promise.reject(C):Promise.resolve()}function oe(v){const I=at.values().next().value;return I&&typeof I.runWithContext=="function"?I.runWithContext(v):v()}function ie(v,I){let C;const[B,Q,u]=cu(v,I);C=kn(B.reverse(),"beforeRouteLeave",v,I);for(const g of B)g.leaveGuards.forEach(m=>{C.push(Ve(m,v,I))});const d=Z.bind(null,v,I);return C.push(d),de(C).then(()=>{C=[];for(const g of o.list())C.push(Ve(g,v,I));return C.push(d),de(C)}).then(()=>{C=kn(Q,"beforeRouteUpdate",v,I);for(const g of Q)g.updateGuards.forEach(m=>{C.push(Ve(m,v,I))});return C.push(d),de(C)}).then(()=>{C=[];for(const g of u)if(g.beforeEnter)if(Se(g.beforeEnter))for(const m of g.beforeEnter)C.push(Ve(m,v,I));else C.push(Ve(g.beforeEnter,v,I));return C.push(d),de(C)}).then(()=>(v.matched.forEach(g=>g.enterCallbacks={}),C=kn(u,"beforeRouteEnter",v,I),C.push(d),de(C))).then(()=>{C=[];for(const g of i.list())C.push(Ve(g,v,I));return C.push(d),de(C)}).catch(g=>ke(g,8)?g:Promise.reject(g))}function ue(v,I,C){c.list().forEach(B=>oe(()=>B(v,I,C)))}function ye(v,I,C,B,Q){const u=U(v,I);if(u)return u;const d=I===Ye,g=pt?history.state:{};C&&(B||d?r.replace(v.fullPath,Y({scroll:d&&g&&g.scroll},Q)):r.push(v.fullPath,Q)),l.value=v,Fe(v,I,C,d),ze()}let ae;function Me(){ae||(ae=r.listen((v,I,C)=>{if(!zt.listening)return;const B=S(v),Q=V(B);if(Q){ee(Y(Q,{replace:!0}),B).catch(kt);return}f=B;const u=l.value;pt&&yc(dr(u.fullPath,C.delta),An()),ie(B,u).catch(d=>ke(d,12)?d:ke(d,2)?(ee(d.to,B).then(g=>{ke(g,20)&&!C.delta&&C.type===qt.pop&&r.go(-1,!1)}).catch(kt),Promise.reject()):(C.delta&&r.go(-C.delta,!1),z(d,B,u))).then(d=>{d=d||ye(B,u,!1),d&&(C.delta&&!ke(d,8)?r.go(-C.delta,!1):C.type===qt.pop&&ke(d,20)&&r.go(-1,!1)),ue(B,u,d)}).catch(kt)}))}let Ee=Mt(),te=Mt(),W;function z(v,I,C){ze(v);const B=te.list();return B.length?B.forEach(Q=>Q(v,I,C)):console.error(v),Promise.reject(v)}function je(){return W&&l.value!==Ye?Promise.resolve():new Promise((v,I)=>{Ee.add([v,I])})}function ze(v){return W||(W=!v,Me(),Ee.list().forEach(([I,C])=>v?C(v):I()),Ee.reset()),v}function Fe(v,I,C,B){const{scrollBehavior:Q}=e;if(!pt||!Q)return Promise.resolve();const u=!C&&Ec(dr(v.fullPath,0))||(B||!C)&&history.state&&history.state.scroll||null;return Jr().then(()=>Q(v,I,u)).then(d=>d&&bc(d)).catch(d=>z(d,v,I))}const me=v=>r.go(v);let ft;const at=new Set,zt={currentRoute:l,listening:!0,addRoute:_,removeRoute:x,hasRoute:F,getRoutes:T,resolve:S,options:e,push:w,replace:L,go:me,back:()=>me(-1),forward:()=>me(1),beforeEach:o.add,beforeResolve:i.add,afterEach:c.add,onError:te.add,isReady:je,install(v){const I=this;v.component("RouterLink",ln),v.component("RouterView",So),v.config.globalProperties.$router=I,Object.defineProperty(v.config.globalProperties,"$route",{enumerable:!0,get:()=>Le(l)}),pt&&!ft&&l.value===Ye&&(ft=!0,w(r.location).catch(Q=>{}));const C={};for(const Q in Ye)Object.defineProperty(C,Q,{get:()=>l.value[Q],enumerable:!0});v.provide(As,I),v.provide(Io,Ur(C)),v.provide(ns,l);const B=v.unmount;at.add(v),v.unmount=function(){at.delete(v),at.size<1&&(f=Ye,ae&&ae(),ae=null,l.value=Ye,ft=!1,W=!1),B()}}};function de(v){return v.reduce((I,C)=>I.then(()=>oe(C)),Promise.resolve())}return zt}function cu(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;iPt(f,c))?s.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(f=>Pt(f,l))||r.push(l))}return[n,s,r]}const uu=e=>(Ti("data-v-666be7ef"),e=e(),Ii(),e),fu=uu(()=>We("h1",null,"smol-string",-1)),au=Rn({__name:"App",setup(e){return(t,n)=>(ws(),go("div",null,[We("header",null,[fu,We("nav",null,[ne(Le(ln),{to:"/"},{default:en(()=>[on("Home")]),_:1}),ne(Le(ln),{to:"/bench"},{default:en(()=>[on("Benchmarks")]),_:1}),ne(Le(ln),{to:"/docs"},{default:en(()=>[on("Documentation")]),_:1})])]),We("div",null,[ne(Le(So))])]))}});const Mo=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},du=Mo(au,[["__scopeId","data-v-666be7ef"]]),hu="modulepreload",pu=function(e){return"/smol-string/"+e},Cr={},Or=function(t,n,s){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=pu(o),o in Cr)return;Cr[o]=!0;const i=o.endsWith(".css"),c=i?'[rel="stylesheet"]':"";if(!!s)for(let a=r.length-1;a>=0;a--){const h=r[a];if(h.href===o&&(!i||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${c}`))return;const f=document.createElement("link");if(f.rel=i?"stylesheet":hu,i||(f.as="script",f.crossOrigin=""),f.href=o,document.head.appendChild(f),i)return new Promise((a,h)=>{f.addEventListener("load",a),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},gu={},mu=We("h2",null,"Home",-1),_u=We("div",null,[We("a",{href:"https://github.com/Senryoku/smol-string"},"GitHub Repository")],-1),vu=[mu,_u];function bu(e,t){return ws(),go("div",null,vu)}const yu=Mo(gu,[["render",bu]]),Eu=lu({history:Pc("/smol-string"),routes:[{path:"/",name:"home",component:yu},{path:"/bench",name:"bench",component:()=>Or(()=>import("./BenchmarksView-98cc24df.js"),[])},{path:"/docs",name:"docs",component:()=>Or(()=>import("./DocumentationView-db9890b7.js"),[])}]}),Ts=sc(du);Ts.use(lc());Ts.use(Eu);Ts.mount("#app");export{xu as S,Or as _,Pu as a,We as b,go as c,Rn as d,ne as e,wu as f,Mo as g,bo as h,Yi as i,Xi as j,tn as k,Dr as l,Oe as m,Ru as n,ws as o,Ht as r,bi as s,q as t,Le as u,Nl as v,en as w}; diff --git a/docs/index.html b/docs/index.html index cda2d18..39df31a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,7 +5,7 @@ smol-string - +