diff --git a/docs/index.116df1af.js b/docs/index.116df1af.js new file mode 100644 index 0000000..129b912 --- /dev/null +++ b/docs/index.116df1af.js @@ -0,0 +1,7694 @@ +let t,e,i,n,r;function a(t){return t&&t.__esModule?t.default:t}/*! + * Chart.js v4.4.0 + * https://www.chartjs.org + * (c) 2023 Chart.js Contributors + * Released under the MIT License + *//*! + * Chart.js v4.4.0 + * https://www.chartjs.org + * (c) 2023 Chart.js Contributors + * Released under the MIT License + *//*! + * @kurkle/color v0.3.2 + * https://github.com/kurkle/color#readme + * (c) 2023 Jukka Kurkela + * Released under the MIT License + */function o(t){return t+.5|0}const s=(t,e,i)=>Math.max(Math.min(t,i),e);function l(t){return s(o(2.55*t),0,255)}function h(t){return s(o(255*t),0,255)}function c(t){return s(o(t/2.55)/100,0,1)}function u(t){return s(o(100*t),0,100)}const d={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},f=[..."0123456789ABCDEF"],p=t=>f[15&t],g=t=>f[(240&t)>>4]+f[15&t],m=t=>(240&t)>>4==(15&t),b=t=>m(t.r)&&m(t.g)&&m(t.b)&&m(t.a),v=(t,e)=>t<255?e(t):"",y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function x(t,e,i){let n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function _(t,e,i){let n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function w(t,e,i){let n;let r=x(t,1,.5);for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)r[n]*=1-e-i,r[n]+=e;return r}function S(t){let e,i,n;let r=t.r/255,a=t.g/255,o=t.b/255,s=Math.max(r,a,o),l=Math.min(r,a,o),h=(s+l)/2;return s!==l&&(n=s-l,i=h>.5?n/(2-s-l):n/(s+l),e=60*(e=r===s?(a-o)/n+(at<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,P=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function L(t,e,i){if(t){let n=S(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=D(x,n,void 0,void 0),t.r=n[0],t.g=n[1],t.b=n[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function I(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=h(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=h(e.a),e}class O{constructor(e){let i;if(e instanceof O)return e;let n=typeof e;if("object"===n)i=I(e);else if("string"===n){var r,a;a=e.length,"#"===e[0]&&(4===a||5===a?r={r:255&17*d[e[1]],g:255&17*d[e[2]],b:255&17*d[e[3]],a:5===a?17*d[e[4]]:255}:(7===a||9===a)&&(r={r:d[e[1]]<<4|d[e[2]],g:d[e[3]]<<4|d[e[4]],b:d[e[5]]<<4|d[e[6]],a:9===a?d[e[7]]<<4|d[e[8]]:255})),i=r||function(e){t||((t=function(){let t,e,i,n,r;let a={},o=Object.keys(k),s=Object.keys(T);for(t=0;t>16&255,i>>8&255,255&i]}return a}()).transparent=[0,0,0,0]);let i=t[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255}}(e)||("r"===e.charAt(0)?function(t){let e,i,n;let r=M.exec(t),a=255;if(r){if(r[7]!==e){let t=+r[7];a=r[8]?l(t):s(255*t,0,255)}return e=+r[1],i=+r[3],n=+r[5],{r:e=255&(r[2]?l(e):s(e,0,255)),g:i=255&(r[4]?l(i):s(i,0,255)),b:n=255&(r[6]?l(n):s(n,0,255)),a:a}}}(e):function(t){let e;let i=y.exec(t),n=255;if(!i)return;i[5]!==e&&(n=i[6]?l(+i[5]):h(+i[5]));let r=C(+i[2]),a=+i[3]/100,o=+i[4]/100;return{r:(e="hwb"===i[1]?D(w,r,a,o):"hsv"===i[1]?D(_,r,a,o):D(x,r,a,o))[0],g:e[1],b:e[2],a:n}}(e))}this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=c(t.a)),t}set rgb(t){this._rgb=I(t)}rgbString(){var t;return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${c(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0}hexString(){var t,e;return this._valid?(e=b(t=this._rgb)?p:g,t?"#"+e(t.r)+e(t.g)+e(t.b)+v(t.a,e):void 0):void 0}hslString(){return this._valid?function(t){if(!t)return;let e=S(t),i=e[0],n=u(e[1]),r=u(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${c(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):void 0}mix(t,e){if(t){let i;let n=this.rgb,r=t.rgb,a=e===i?.5:e,o=2*a-1,s=n.a-r.a,l=((o*s==-1?o:(o+s)/(1+o*s))+1)/2;i=1-l,n.r=255&l*n.r+i*r.r+.5,n.g=255&l*n.g+i*r.g+.5,n.b=255&l*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){let n=P(c(t.r)),r=P(c(t.g)),a=P(c(t.b));return{r:h(A(n+i*(P(c(e.r))-n))),g:h(A(r+i*(P(c(e.g))-r))),b:h(A(a+i*(P(c(e.b))-a))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new O(this.rgb)}alpha(t){return this._rgb.a=h(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=o(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return L(this._rgb,2,t),this}darken(t){return L(this._rgb,2,-t),this}saturate(t){return L(this._rgb,1,t),this}desaturate(t){return L(this._rgb,1,-t),this}rotate(t){var e,i;return(i=S(e=this._rgb))[0]=C(i[0]+t),i=D(x,i,void 0,void 0),e.r=i[0],e.g=i[1],e.b=i[2],this}}/** + * @namespace Chart.helpers + *//** + * An empty function that can be used, for example, for optional callback. + */function R(){/* noop */}/** + * Returns a unique id, sequentially generated from a global variable. + */const F=(r=0,()=>r++);/** + * Returns true if `value` is neither null nor undefined, else returns false. + * @param value - The value to test. + * @since 2.7.0 + */function j(t){return null==t}/** + * Returns true if `value` is an array (including typed arrays), else returns false. + * @param value - The value to test. + * @function + */function N(t){if(Array.isArray&&Array.isArray(t))return!0;let e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}/** + * Returns true if `value` is an object (excluding null), else returns false. + * @param value - The value to test. + * @since 2.7.0 + */function H(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}/** + * Returns true if `value` is a finite number, else returns false + * @param value - The value to test. + */function W(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}/** + * Returns `value` if finite, else returns `defaultValue`. + * @param value - The value to return if defined. + * @param defaultValue - The value to return if `value` is not finite. + */function B(t,e){return W(t)?t:e}/** + * Returns `value` if defined, else returns `defaultValue`. + * @param value - The value to return if defined. + * @param defaultValue - The value to return if `value` is undefined. + */function z(t,e){return void 0===t?e:t}const V=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,$=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;/** + * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the + * value returned by `fn`. If `fn` is not a function, this method returns undefined. + * @param fn - The function to call. + * @param args - The arguments with which `fn` should be called. + * @param [thisArg] - The value of `this` provided for the call to `fn`. + */function q(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function U(t,e,i,n){let r,a,o;if(N(t)){if(a=t.length,n)for(r=a-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;rt,// default resolvers +x:t=>t.x,y:t=>t.y};function te(t,e){let i=tt[e]||(tt[e]=function(t){let e=/** + * @private + */function(t){let e=t.split("."),i=[],n="";for(let t of e)(n+=t).endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(let i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}/** + * @private + */function ti(t){return t.charAt(0).toUpperCase()+t.slice(1)}const tn=t=>void 0!==t,tr=t=>"function"==typeof t,ta=(t,e)=>{if(t.size!==e.size)return!1;for(let i of t)if(!e.has(i))return!1;return!0},to=Math.PI,ts=2*to,tl=ts+to,th=Number.POSITIVE_INFINITY,tc=to/180,tu=to/2,td=to/4,tf=2*to/3,tp=Math.log10,tg=Math.sign;function tm(t,e,i){return Math.abs(t-e)l&&h=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function tA(t,e,i){let n;i=i||(i=>t[i]1;)i(n=a+r>>1)?a=n:r=n;return{lo:a,hi:r}}/** + * Binary search + * @param table - the table search. must be sorted! + * @param key - property name for the value in each entry + * @param value - value to find + * @param last - lookup last index + * @private + */const tP=(t,e,i,n)=>tA(t,i,n?n=>{let r=t[n][e];return rt[n][e]tA(t,i,n=>t[n][e]>=i),tE=["push","pop","shift","splice","unshift"];function tI(t,e){let i=t._chartjs;if(!i)return;let n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(tE.forEach(e=>{delete t[e]}),delete t._chartjs)}/** + * @param items + */function tO(t){let e=new Set(t);return e.size===t.length?t:Array.from(e)}/** +* Request animation polyfill +*/const tR="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;/** + * Throttles calling `fn` once per animation frame + * Latest arguments are used on the actual call + */function tF(t,e){let i=[],n=!1;return function(...r){// Save the args for use later +i=r,n||(n=!0,tR.call(window,()=>{n=!1,t.apply(e,i)}))}}/** + * Converts 'start' to 'left', 'end' to 'right' and others to 'center' + * @private + */const tj=t=>"start"===t?"left":"end"===t?"right":"center",tN=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,tH=(t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e;/** + * Return start and count of visible points. + * @private + */function tW(t,e,i){let n=e.length,r=0,a=n;if(t._sorted){let{iScale:o,_parsed:s}=t,l=o.axis,{min:h,max:c,minDefined:u,maxDefined:d}=o.getUserBounds();u&&(r=tk(Math.min(tP(s,l,h).lo,i?n:tP(e,l,o.getPixelForValue(h)).lo),0,n-1)),a=d?tk(Math.max(tP(s,o.axis,c,!0).hi+1,i?0:tP(e,l,o.getPixelForValue(c),!0).hi+1),r,n)-r:n-r}return{start:r,count:a}}/** + * Checks if the scale ranges have changed. + * @param {object} meta - dataset meta. + * @returns {boolean} + * @private + */function tB(t){let{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;let a=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),a}const tz=t=>0===t||1===t,tV=(t,e,i)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*ts/i)),t$=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*ts/i)+1,tq={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*tu)+1,easeOutSine:t=>Math.sin(t*tu),easeInOutSine:t=>-.5*(Math.cos(to*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>tz(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(-Math.pow(2,-10*(2*t-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>tz(t)?t:tV(t,.075,.3),easeOutElastic:t=>tz(t)?t:t$(t,.075,.3),easeInOutElastic:t=>tz(t)?t:t<.5?.5*tV(2*t,.1125,.45):.5+.5*t$(2*t-1,.1125,.45),easeInBack:t=>t*t*(2.70158*t-1.70158),easeOutBack:t=>(t-=1)*t*(2.70158*t+1.70158)+1,easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-tq.easeOutBounce(1-t),easeOutBounce:t=>t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375,easeInOutBounce:t=>t<.5?.5*tq.easeInBounce(2*t):.5*tq.easeOutBounce(2*t-1)+.5};function tU(t){if(t&&"object"==typeof t){let e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function tX(t){return tU(t)?t:new O(t)}function tY(t){return tU(t)?t:new O(t).saturate(.5).darken(.1).hexString()}const tJ=["x","y","borderWidth","radius","tension"],tG=["color","borderColor","backgroundColor"],tK=new Map;function tZ(t,e,i){return(function(t,e){e=e||{};let i=t+JSON.stringify(e),n=tK.get(i);return n||(n=new Intl.NumberFormat(t,e),tK.set(i,n)),n})(e,i).format(t)}const tQ={values:t=>N(t)?t:""+t,numeric(t,e,i){let n;if(0===t)return"0";let r=this.chart.options.locale,a=t;if(i.length>1){let e;let r=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(r<1e-4||r>1e15)&&(n="scientific"),Math.abs(e=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value)>=1&&t!==Math.floor(t)&&(e=t-Math.floor(t)),a=e}let o=tp(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:n,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),tZ(t,r,l)},logarithmic(t,e,i){if(0===t)return"0";let n=i[e].significand||t/Math.pow(10,Math.floor(tp(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?tQ.numeric.call(this,t,e,i):""}};var t0,t1,t2,t5,t3,t4,t8={formatters:tQ};const t6=Object.create(null),t9=Object.create(null);function t7(t,e){if(!e)return t;let i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>tY(e.backgroundColor),this.hoverBorderColor=(t,e)=>tY(e.borderColor),this.hoverColor=(t,e)=>tY(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return et(this,t,e)}get(t){return t7(this,t)}describe(t,e){return et(t9,t,e)}override(t,e){return et(t6,t,e)}route(t,e,i,n){let r=t7(this,t),a=t7(this,i),o="_"+e;Object.defineProperties(r,{[o]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){let t=this[o],e=a[n];return H(t)?Object.assign({},e,t):z(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach(t=>t(this))}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:tG},numbers:{type:"number",properties:tJ}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",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:t8.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);/** + * @private + */function ei(t,e,i,n,r){let a=e[r];return a||(a=e[r]=t.measureText(r).width,i.push(r)),a>n&&(n=a),n}/** + * Returns the aligned pixel value to avoid anti-aliasing blur + * @param chart - The chart instance. + * @param pixel - A pixel value. + * @param width - The width of the element. + * @returns The aligned pixel value. + * @private + */function en(t,e,i){let n=t.currentDevicePixelRatio,r=0!==i?Math.max(i/2,.5):0;return Math.round((e-r)*n)/n+r}/** + * Clears the entire canvas. + */function er(t,e){(e=e||t.getContext("2d")).save(),// canvas.width and canvas.height do not consider the canvas transform, +// while clearRect does +e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function ea(t,e,i,n){// eslint-disable-next-line @typescript-eslint/no-use-before-define +eo(t,e,i,n,null)}// eslint-disable-next-line complexity +function eo(t,e,i,n,r){let a,o,s,l,h,c,u,d;let f=e.pointStyle,p=e.rotation,g=e.radius,m=(p||0)*tc;if(f&&"object"==typeof f&&("[object HTMLImageElement]"===(a=f.toString())||"[object HTMLCanvasElement]"===a)){t.save(),t.translate(i,n),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),t.restore();return}if(!isNaN(g)&&!(g<=0)){switch(t.beginPath(),f){// Default includes circle +default:r?t.ellipse(i,n,r/2,g,0,0,ts):t.arc(i,n,g,0,ts),t.closePath();break;case"triangle":c=r?r/2:g,t.moveTo(i+Math.sin(m)*c,n-Math.cos(m)*g),m+=tf,t.lineTo(i+Math.sin(m)*c,n-Math.cos(m)*g),m+=tf,t.lineTo(i+Math.sin(m)*c,n-Math.cos(m)*g),t.closePath();break;case"rectRounded":// NOTE: the rounded rect implementation changed to use `arc` instead of +// `quadraticCurveTo` since it generates better results when rect is +// almost a circle. 0.516 (instead of 0.5) produces results with visually +// closer proportion to the previous impl and it is inscribed in the +// circle with `radius`. For more details, see the following PRs: +// https://github.com/chartjs/Chart.js/issues/5597 +// https://github.com/chartjs/Chart.js/issues/5858 +h=.516*g,o=Math.cos(m+td)*(l=g-h),u=Math.cos(m+td)*(r?r/2-h:l),s=Math.sin(m+td)*l,d=Math.sin(m+td)*(r?r/2-h:l),t.arc(i-u,n-s,h,m-to,m-tu),t.arc(i+d,n-o,h,m-tu,m),t.arc(i+u,n+s,h,m,m+tu),t.arc(i-d,n+o,h,m+tu,m+to),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,c=r?r/2:l,t.rect(i-c,n-l,2*c,2*l);break}m+=td;/* falls through */case"rectRot":u=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(i-u,n-s),t.lineTo(i+d,n-o),t.lineTo(i+u,n+s),t.lineTo(i-d,n+o),t.closePath();break;case"crossRot":m+=td;/* falls through */case"cross":u=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(i-u,n-s),t.lineTo(i+u,n+s),t.moveTo(i+d,n-o),t.lineTo(i-d,n+o);break;case"star":u=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(i-u,n-s),t.lineTo(i+u,n+s),t.moveTo(i+d,n-o),t.lineTo(i-d,n+o),m+=td,u=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(i-u,n-s),t.lineTo(i+u,n+s),t.moveTo(i+d,n-o),t.lineTo(i-d,n+o);break;case"line":o=r?r/2:Math.cos(m)*g,s=Math.sin(m)*g,t.moveTo(i-o,n-s),t.lineTo(i+o,n+s);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(m)*(r?r/2:g),n+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}/** + * Returns true if the point is inside the rectangle + * @param point - The point to test + * @param area - The rectangle + * @param margin - allowed margin + * @private + */function es(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==a.strokeColor;for(t.save(),t.font=r.string,a.translation&&t.translate(a.translation[0],a.translation[1]),j(a.rotation)||t.rotate(a.rotation),a.color&&(t.fillStyle=a.color),a.textAlign&&(t.textAlign=a.textAlign),a.textBaseline&&(t.textBaseline=a.textBaseline),o=0;o+t||0;function eb(t,e){let i={},n=H(e),r=n?Object.keys(e):e,a=H(t)?n?i=>z(t[i],t[e[i]]):e=>t[e]:()=>t;for(let t of r)i[t]=em(a(t));return i}/** + * Converts the given value into a TRBL object. + * @param value - If a number, set the value to all TRBL component, + * else, if an object, use defined properties and sets undefined ones to 0. + * x / y are shorthands for same value for left/right and top/bottom. + * @returns The padding values (top, right, bottom, left) + * @since 3.0.0 + */function ev(t){return eb(t,{top:"y",right:"x",bottom:"y",left:"x"})}/** + * Converts the given value into a TRBL corners object (similar with css border-radius). + * @param value - If a number, set the value to all TRBL corner components, + * else, if an object, use defined properties and sets undefined ones to 0. + * @returns The TRBL corner values (topLeft, topRight, bottomLeft, bottomRight) + * @since 3.0.0 + */function ey(t){return eb(t,["topLeft","topRight","bottomLeft","bottomRight"])}/** + * Converts the given value into a padding object with pre-computed width/height. + * @param value - If a number, set the value to all TRBL component, + * else, if an object, use defined properties and sets undefined ones to 0. + * x / y are shorthands for same value for left/right and top/bottom. + * @returns The padding values (top, right, bottom, left, width, height) + * @since 2.7.0 + */function ex(t){let e=ev(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}/** + * Parses font options and returns the font object. + * @param options - A object that contains font options to be parsed. + * @param fallback - A object that contains fallback font options. + * @return The font object. + * @private + */function e_(t,e){t=t||{},e=e||ee.font;let i=z(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=z(t.style,e.style);n&&!(""+n).match(eg)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let r={family:z(t.family,e.family),lineHeight:/** + * @alias Chart.helpers.options + * @namespace + *//** + * Converts the given line height `value` in pixels for a specific font `size`. + * @param value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em'). + * @param size - The font size (in pixels) used to resolve relative `value`. + * @returns The effective line height in pixels (size * 1.2 if value is invalid). + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height + * @since 2.7.0 + */function(t,e){let i=(""+t).match(ep);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}(z(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:z(t.weight,e.weight),string:""};return r.string=!r||j(r.size)||j(r.family)?null:(r.style?r.style+" ":"")+(r.weight?r.weight+" ":"")+r.size+"px "+r.family,r}/** + * Evaluates the given `inputs` sequentially and returns the first defined value. + * @param inputs - An array of values, falling back to the last value. + * @param context - If defined and the current value is a function, the value + * is called with `context` as first argument and the result becomes the new input. + * @param index - If defined and the current value is an array, the value + * at `index` become the new input. + * @param info - object to return information about resolution in + * @param info.cacheable - Will be set to `false` if option is not cacheable. + * @since 2.7.0 + */function ew(t,e,i,n){let r,a,o,s=!0;for(r=0,a=t.length;rt[0]){let a=i||t;void 0===n&&(n=eI("_fallback",t));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:n,_getTarget:r,override:i=>eD([i,...t],e,a,n)};return new Proxy(o,{/** + * A trap for the delete operator. + */deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),/** + * A trap for getting property values. + */get:(i,n)=>eA(i,n,()=>(function(t,e,i,n){let r;for(let a of e)if(void 0!==(r=eI(ek(a,t),i)))return eM(t,r)?eL(i,n,t,r):r})(n,e,t,i)),/** + * A trap for Object.getOwnPropertyDescriptor. + * Also used by Object.hasOwnProperty. + */getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),/** + * A trap for Object.getPrototypeOf. + */getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),/** + * A trap for the in operator. + */has:(t,e)=>eO(t).includes(e),/** + * A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols. + */ownKeys:t=>eO(t),/** + * A trap for setting property values. + */set(t,e,i){let n=t._storage||(t._storage=r());return t[e]=n[e]=i,delete t._keys,!0}})}/** + * Returns an Proxy for resolving option values with context. + * @param proxy - The Proxy returned by `_createResolver` + * @param context - Context object for scriptable/indexable options + * @param subProxy - The proxy provided for scriptable options + * @param descriptorDefaults - Defaults for descriptors + * @private + */function eC(t,e,i,n){let r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:eT(t,n),setContext:e=>eC(t,e,i,n),override:r=>eC(t.override(r),e,i,n)};return new Proxy(r,{/** + * A trap for the delete operator. + */deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),/** + * A trap for getting property values. + */get:(t,e,i)=>eA(t,e,()=>(function(t,e,i){let{_proxy:n,_context:r,_subProxy:a,_descriptors:o}=t,s=n[e];return tr(s)&&o.isScriptable(e)&&(s=function(t,e,i,n){let{_proxy:r,_context:a,_subProxy:o,_stack:s}=i;if(s.has(t))throw Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t);let l=e(a,o||n);return s.delete(t),eM(t,l)&&(l=eL(r._scopes,r,t,l)),l}(e,s,t,i)),N(s)&&s.length&&(s=function(t,e,i,n){let{_proxy:r,_context:a,_subProxy:o,_descriptors:s}=i;if(void 0!==a.index&&n(t))return e[a.index%e.length];if(H(e[0])){// Array of objects, return array or resolvers + let i=e,n=r._scopes.filter(t=>t!==i);for(let l of(e=[],i)){let i=eL(n,r,t,l);e.push(eC(i,a,o&&o[t],s))}}return e}(e,s,t,o.isIndexable)),eM(e,s)&&(s=eC(s,r,a&&a[e],o)),s})(t,e,i)),/** + * A trap for Object.getOwnPropertyDescriptor. + * Also used by Object.hasOwnProperty. + */getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),/** + * A trap for Object.getPrototypeOf. + */getPrototypeOf:()=>Reflect.getPrototypeOf(t),/** + * A trap for the in operator. + */has:(e,i)=>Reflect.has(t,i),/** + * A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols. + */ownKeys:()=>Reflect.ownKeys(t),/** + * A trap for setting property values. + */set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}/** + * @private + */function eT(t,e={scriptable:!0,indexable:!0}){let{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:tr(i)?i:()=>i,isIndexable:tr(n)?n:()=>n}}const ek=(t,e)=>t?t+ti(e):e,eM=(t,e)=>H(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function eA(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];let n=i();return(// cache the resolved value +t[e]=n,n)}const eP=(t,e)=>!0===t?e:"string"==typeof t?te(e,t):void 0;function eL(t,e,i,n){var r;let a=e._rootScopes,o=tr(r=e._fallback)?r(i,n):r,s=[...t,...a],l=new Set;l.add(n);let h=eE(l,s,i,o||i,n);return null!==h&&(void 0===o||o===i||null!==(h=eE(l,s,o,h,n)))&&eD(Array.from(l),[""],a,o,()=>(function(t,e,i){let n=t._getTarget();e in n||(n[e]={});let r=n[e];return N(r)&&H(i)?i:r||{}})(e,i,n))}function eE(t,e,i,n,r){for(;i;)i=function(t,e,i,n,r){for(let o of e){let e=eP(i,o);if(e){var a;t.add(e);let o=tr(a=e._fallback)?a(i,r):a;if(void 0!==o&&o!==i&&o!==n)// The fallback will resume to that new scope. +return o}else if(!1===e&&void 0!==n&&i!==n)// For example `interaction` from `hover` or `plugins.tooltip` and `animation` from `animations` +return null}return!1}(t,e,i,n,r);return i}function eI(t,e){for(let i of e){if(!i)continue;let e=i[t];if(void 0!==e)return e}}function eO(t){let e=t._keys;return e||(e=t._keys=function(t){let e=new Set;for(let i of t)for(let t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function eR(t,e,i,n){let r,a,o;let{iScale:s}=t,{key:l="r"}=this._parsing,h=Array(n);for(r=0;re"x"===t?"y":"x";function eH(t,e,i){return Math.max(Math.min(t,i),e)}/** + * Note: typedefs are auto-exported, so use a made-up `dom` namespace where + * necessary to avoid duplicates with `export * from './helpers`; see + * https://github.com/microsoft/TypeScript/issues/46011 + * @typedef { import('../core/core.controller.js').default } dom.Chart + * @typedef { import('../../types').ChartEvent } ChartEvent + *//** + * @private + */function eW(){return"undefined"!=typeof window&&"undefined"!=typeof document}/** + * @private + */function eB(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}/** + * convert max-width/max-height values that may be percentages into a number + * @private + */function ez(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const eV=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),e$=["top","right","bottom","left"];function eq(t,e,i){let n={};i=i?"-"+i:"";for(let r=0;r<4;r++){let a=e$[r];n[a]=parseFloat(t[e+"-"+a+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const eU=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);/** + * Gets an event's x, y coordinates, relative to the chart area + * @param event + * @param chart + * @returns x and y coordinates of the event + */function eX(t,e){if("native"in t)return t;let{canvas:i,currentDevicePixelRatio:n}=e,r=eV(i),a="border-box"===r.boxSizing,o=eq(r,"padding"),s=eq(r,"border","width"),{x:l,y:h,box:c}=/** + * @param e + * @param canvas + * @returns Canvas position + */function(t,e){let i,n;let r=t.touches,a=r&&r.length?r[0]:t,{offsetX:o,offsetY:s}=a,l=!1;if(eU(o,s,t.target))i=o,n=s;else{let t=e.getBoundingClientRect();i=a.clientX-t.left,n=a.clientY-t.top,l=!0}return{x:i,y:n,box:l}}(t,i),u=o.left+(c&&s.left),d=o.top+(c&&s.top),{width:f,height:p}=e;return a&&(f-=o.width+s.width,p-=o.height+s.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((h-d)/p*i.height/n)}}const eY=t=>Math.round(10*t)/10;/** + * @param chart + * @param forceRatio + * @param forceStyle + * @returns True if the canvas context size or transformation has changed. + */function eJ(t,e,i){let n=e||1,r=Math.floor(t.height*n),a=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||o.height!==r||o.width!==a)&&(t.currentDevicePixelRatio=n,o.height=r,o.width=a,t.ctx.setTransform(n,0,0,n,0,0),!0)}/** + * Detects support for options object argument in addEventListener. + * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support + * @private + */const eG=function(){let t=!1;try{let e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){// continue regardless of error +}return t}();/** + * The "used" size is the final value of a dimension property after all calculations have + * been performed. This method uses the computed style of `element` but returns undefined + * if the computed style is not expressed in pixels. That can happen in some cases where + * `element` has a size relative to its parent and this last one is not yet displayed, + * for example because of `display: none` on a parent node. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value + * @returns Size in pixels or undefined if unknown. + */function eK(t,e){let i=eV(t).getPropertyValue(e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}/** + * @private + */function eZ(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}/** + * @private + */function eQ(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}/** + * @private + */function e0(t,e,i,n){let r={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},o=eZ(t,r,i),s=eZ(r,a,i),l=eZ(a,e,i),h=eZ(o,s,i),c=eZ(s,l,i);return eZ(h,c,i)}function e1(t,e,i){var n;return t?(n=i,{x:t=>e+e+n-t,setWidth(t){n=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function e2(t,e){let i,n;("ltr"===e||"rtl"===e)&&(n=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function e5(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function e3(t){return"angle"===t?{between:tT,compare:tD,normalize:tC}:{between:tM,compare:(t,e)=>t-e,normalize:t=>t}}function e4({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function e8(t,e,i){let n,r,a;if(!i)return[t];let{property:o,start:s,end:l}=i,h=e.length,{compare:c,between:u,normalize:d}=e3(o),{start:f,end:p,loop:g,style:m}=function(t,e,i){let n;let{property:r,start:a,end:o}=i,{between:s,normalize:l}=e3(r),h=e.length,{start:c,end:u,loop:d}=t;if(d){for(c+=h,u+=h,n=0;nu(s,a,n)&&0!==c(s,a),_=()=>0===c(l,n)||u(l,a,n),w=()=>v||x(),S=()=>!v||_();for(let t=f,i=f;t<=p;++t)(r=e[t%h]).skip||(n=d(r[o]))===a||(v=u(n,s,l),null===y&&w()&&(y=0===c(n,s)?t:i),null!==y&&S()&&(b.push(e4({start:y,end:t,loop:g,count:h,style:m})),y=null),i=t,a=n);return null!==y&&b.push(e4({start:y,end:p,loop:g,count:h,style:m})),b}function e6(t,e){let i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=tR.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{let r;if(!i.running||!i.items.length)return;let a=i.items,o=a.length-1,s=!1;for(;o>=0;--o)(r=a[o])._active?(r._total>i.duration&&(i.duration=r._total),r.tick(t),s=!0):(a[o]=a[a.length-1],a.pop());s&&(n.draw(),this._notify(n,i,t,"progress")),a.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=a.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){let e=this._charts,i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!!e&&!!e.running&&!!e.items.length}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let i=e.items,n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ie="transparent",ii={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){let n=tX(t||ie),r=n.valid&&tX(e||ie);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class ir{constructor(t,e,i,n){let r=e[i];n=ew([t.to,n,r,t.from]);let a=ew([t.from,r,n]);this._active=!0,this._fn=t.fn||ii[t.type||typeof a],this._easing=tq[t.easing]||tq.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=i,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);let n=this._target[this._prop],r=i-this._start,a=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=ew([t.to,e,n,t.from]),this._from=ew([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e;let i=t-this._start,n=this._duration,r=this._prop,a=this._from,o=this._loop,s=this._to;if(this._active=a!==s&&(o||i1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[r]=this._fn(a,s,e)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){let e=t?"res":"rej",i=this._promises||[];for(let t=0;t{let r=t[n];if(!H(r))return;let a={};for(let t of e)a[t]=r[t];(N(r.properties)&&r.properties||[n]).forEach(t=>{t!==n&&i.has(t)||i.set(t,a)})})}_animateOptions(t,e){let i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i){t.options=e;return}return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i}(t,i);if(!n)return[];let r=this._createAnimations(n,i);return i.$shared&&(function(t,e){let i=[],n=Object.keys(e);for(let e=0;e{t.options=i},()=>{}),r}_createAnimations(t,e){let i;let n=this._properties,r=[],a=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();for(i=o.length-1;i>=0;--i){let l=o[i];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(t,e));continue}let h=e[l],c=a[l],u=n.get(l);if(c){if(u&&c.active()){c.update(u,h,s);continue}c.cancel()}if(!u||!u.duration){t[l]=h;continue}a[l]=c=new ir(u,t,l,h),r.push(c)}return r}update(t,e){if(0===this._properties.size){Object.assign(t,e);return}let i=this._createAnimations(t,e);if(i.length)return it.add(this._chart,i),!0}}function io(t,e){let i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,a=void 0===i.max?e:0;return{start:n?a:r,end:n?r:a}}function is(t,e){let i,n;let r=[],a=t._getSortedDatasetMetas(e);for(i=0,n=a.length;i0||!i&&e<0)return r.index}return null}function iu(t,e){let i;let{chart:n,_cachedMeta:r}=t,a=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:l}=r,h=o.axis,c=s.axis,u=`${o.id}.${s.id}.${r.stack||r.type}`,d=e.length;for(let t=0;ti[t].axis===e).shift()}function ip(t,e){let i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n)for(let r of e=e||t._parsed){let t=r._stacks;if(!t||void 0===t[n]||void 0===t[n][i])return;delete t[n][i],void 0!==t[n]._visualValues&&void 0!==t[n]._visualValues[i]&&delete t[n]._visualValues[i]}}const ig=t=>"reset"===t||"none"===t,im=(t,e)=>e?t:Object.assign({},t),ib=(t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:is(i,!0),values:null};class iv{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(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ih(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&&ip(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=z(i.xAxisID,id(t,"x")),a=e.yAxisID=z(i.yAxisID,id(t,"y")),o=e.rAxisID=z(i.rAxisID,id(t,"r")),s=e.indexAxis,l=e.iAxisID=n(s,r,a,o),h=e.vAxisID=n(s,a,r,o);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),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){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&tI(this._data,this),t._stacked&&ip(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(H(e))this._data=function(t){let e,i,n;let r=Object.keys(t),a=Array(r.length);for(e=0,i=r.length;e{let i="_onData"+ti(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){let r=n.apply(this,e);return t._chartjs.listeners.forEach(t=>{"function"==typeof t[i]&&t[i](...e)}),r}})})}(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,i=this.getDataset(),n=!1;this._dataCheck();let r=e._stacked;e._stacked=ih(e.vScale,e),e.stack!==i.stack&&(n=!0,ip(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&iu(this,e._parsed)}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let i,n,r;let{_cachedMeta:a,_data:o}=this,{iScale:s,_stacked:l}=a,h=s.axis,c=0===t&&e===o.length||a._sorted,u=t>0&&a._parsed[t-1];if(!1===this._parsing)a._parsed=o,a._sorted=!0,r=o;else{r=N(o[t])?this.parseArrayData(a,o,t,e):H(o[t])?this.parseObjectData(a,o,t,e):this.parsePrimitiveData(a,o,t,e);let s=()=>null===n[h]||u&&n[h]e||d=0;--i)if(!f()){this.updateRangeFromParsed(c,t,n,h);break}}return c}getAllParsedValues(t){let e,i,n;let r=this._cachedMeta._parsed,a=[];for(e=0,i=r.length;e=0&&tthis.getContext(i,n,e),c);return f.$shared&&(f.$shared=s,r[a]=Object.freeze(im(f,s))),f}_resolveAnimations(t,e,i){let n;let r=this.chart,a=this._cachedDataOpts,o=`animation-${e}`,s=a[o];if(s)return s;if(!1!==r.options.animation){let r=this.chart.config,a=r.datasetAnimationScopeKeys(this._type,e),o=r.getOptionScopes(this.getDataset(),a);n=r.createResolver(o,this.getContext(t,i,e))}let l=new ia(r,n&&n.animations);return n&&n._cacheable&&(a[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ig(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,r=this.getSharedOptions(i),a=this.includeOptions(e,r)||r!==n;return this.updateSharedOptions(r,e,i),{sharedOptions:r,includeOptions:a}}updateElement(t,e,i,n){ig(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ig(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;let r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];let n=i.length,r=e.length,a=Math.min(r,n);a&&this.parse(0,a),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,n=t.length-1;n>=o;n--)t[n]=t[n-e]};for(s(a),n=t;nMath.abs(s)&&(l=s,h=o),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:r,end:a,min:o,max:s}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function ix(t,e,i,n){let r,a,o,s;let l=t.iScale,h=t.vScale,c=l.getLabels(),u=l===h,d=[];for(r=i,a=i+n;r"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map((e,r)=>{let a=t.getDatasetMeta(0),o=a.controller.getStyle(r);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:n,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.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){let i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,a,o=t=>+i[t];if(H(i[t])){let{key:t="value"}=this._parsing;o=e=>+te(i[e],t)}for(r=t,a=t+e;rtT(e,t,s,!0)?1:Math.max(n,n*i,r,r*i),f=(e,n,r)=>tT(e,t,s,!0)?-1:Math.min(n,n*i,r,r*i),p=d(0,l,c),g=d(tu,h,u),m=f(to,l,c),b=f(to+tu,h,u);n=(p-m)/2,r=(g-b)/2,a=-(p+m)/2,o=-(g+b)/2}return{ratioX:n,ratioY:r,offsetX:a,offsetY:o}}(c,h,s),g=(i.width-a)/u,m=(i.height-a)/d,b=$(this.options.radius,Math.max(Math.min(g,m)/2,0)),v=Math.max(b*s,0),y=(b-v)/this._getVisibleDatasetWeightTotal();this.offsetX=f*b,this.offsetY=p*b,n.total=this.calculateTotal(),this.outerRadius=b-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*l,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){let i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/ts)}updateElements(t,e,i,n){let r;let a="reset"===n,o=this.chart,s=o.chartArea,l=o.options,h=l.animation,c=(s.left+s.right)/2,u=(s.top+s.bottom)/2,d=a&&h.animateScale,f=d?0:this.innerRadius,p=d?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(e,n),b=this._getRotation();for(r=0;r0&&!isNaN(t)?ts*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=tZ(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e,i,n,r,a,o=0,s=this.chart;if(!t){for(e=0,i=s.data.datasets.length;e{let a=t.getDatasetMeta(0),o=a.controller.getStyle(r);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:n,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.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){let e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=tZ(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}parseObjectData(t,e,i,n){return eR.bind(this)(t,e,i,n)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,i)=>{let n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(ne.max&&(e.max=n))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),a=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),o=(r-a)/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){let r;let a="reset"===n,o=this.chart,s=o.options,l=s.animation,h=this._cachedMeta.rScale,c=h.xCenter,u=h.yCenter,d=h.getIndexAngle(0)-.5*to,f=d,p=360/this.countVisibleElements();for(r=0;r{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?tx(this.resolveDataElementOptions(t,e).angle||i):0}}var iT=/*#__PURE__*/Object.freeze({__proto__:null,BarController:class extends iv{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,n){return ix(t,e,i,n)}parseArrayData(t,e,i,n){return ix(t,e,i,n)}parseObjectData(t,e,i,n){let r,a,o,s;let{iScale:l,vScale:h}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,d="x"===l.axis?c:u,f="x"===h.axis?c:u,p=[];for(r=i,a=i+n;rt.x,a="left",o="right"):(r=t.baset.controller.options.grouped),r=i.options.stacked,a=[],o=t=>{let i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if(j(n)||isNaN(n))return!0};for(let i of n)if(!(void 0!==e&&o(i))&&((!1===r||-1===a.indexOf(i.stack)||void 0===r&&void 0===i.stack)&&a.push(i.stack),i.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){let n=this._getStacks(t,i),r=void 0!==e?n.indexOf(e):-1;return -1===r?n.length-1:r}_getRuler(){let t,e;let i=this.options,n=this._cachedMeta,r=n.iScale,a=[];for(t=0,e=n.data.length;tt-e))}return t._cache.$bar}(a,t.type),s=a._length,l=()=>{32767!==n&&-32768!==n&&(tn(r)&&(s=Math.min(s,Math.abs(n-r)||s)),r=n)};for(e=0,i=o.length;e=l?1:-1))*s,d===l&&(m-=i/2);let t=n.getPixelForDecimal(0),o=n.getPixelForDecimal(1);e=(m=Math.max(Math.min(m,Math.max(t,o)),Math.min(t,o)))+i,r&&!u&&(h._stacks[n.axis]._visualValues[a]=n.getValueForPixel(e)-n.getValueForPixel(m))}if(m===n.getPixelForValue(l)){let t=tg(i)*n.getLineWidthForValue(l)/2;m+=t,i-=t}return{size:i,base:m,head:e,center:e+i/2}}_calculateBarIndexPixels(t,e){let i,n;let r=e.scale,a=this.options,o=a.skipNull,s=z(a.maxBarThickness,1/0);if(e.grouped){let r=o?this._getStackCount(t):e.stackCount,l="flex"===a.barThickness?function(t,e,i,n){let r=e.pixels,a=r[t],o=t>0?r[t-1]:null,s=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:r}=e,a=this.getParsed(t),o=n.getLabelForValue(a.x),s=r.getLabelForValue(a.y),l=a._custom;return{label:i[t]||"",value:"("+o+", "+s+(l?", "+l:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){let r="reset"===n,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:s,includeOptions:l}=this._getSharedOptions(e,n),h=a.axis,c=o.axis;for(let u=e;u0&&this.getParsed(e-1);for(let i=0;i=b){v.skip=!0;continue}let x=this.getParsed(i),_=j(x[d]),w=v[u]=a.getPixelForValue(x[u],i),S=v[d]=r||_?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,x,s):x[d],i);v.skip=isNaN(w)||isNaN(S)||_,v.stop=i>0&&Math.abs(x[u]-y[u])>g,p&&(v.parsed=x,v.raw=l.data[i]),c&&(v.options=h||this.resolveDataElementOptions(i,f.active?"active":n)),m||this.updateElement(f,i,v,n),y=x}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;let r=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,a)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PieController:class extends iD{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:iC,RadarController:class extends iv{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){let e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return eR.bind(this)(t,e,i,n)}update(t){let e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){let e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);let a={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,a,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){let r=this._cachedMeta.rScale,a="reset"===n;for(let o=e;o0&&this.getParsed(e-1);for(let h=e;h0&&Math.abs(i[d]-v[d])>m,g&&(p.parsed=i,p.raw=l.data[h]),u&&(p.options=c||this.resolveDataElementOptions(h,e.active?"active":n)),b||this.updateElement(e,h,p,n),v=i}this.updateSharedOptions(c,n,h)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}let i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;let r=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,r,a)/2}}});/** + * @namespace Chart._adapters + * @since 2.8.0 + * @private + */function ik(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}/** + * Date adapter (current used by the time scale) + * @namespace Chart._adapters._date + * @memberof Chart._adapters + * @private + */class iM{/** + * Override default date adapter methods. + * Accepts type parameter to define options type. + * @example + * Chart._adapters._date.override<{myAdapterOption: string}>({ + * init() { + * console.log(this.options.myAdapterOption); + * } + * }) + */static override(t){Object.assign(iM.prototype,t)}options;constructor(t){this.options=t||{}}// eslint-disable-next-line @typescript-eslint/no-empty-function +init(){}formats(){return ik()}parse(){return ik()}format(){return ik()}add(){return ik()}diff(){return ik()}startOf(){return ik()}endOf(){return ik()}}var iA={_date:iM};function iP(t,e,i,n,r){let a=t.getSortedVisibleDatasetMetas(),o=i[e];for(let t=0,i=a.length;t{t[o](e[i],r)&&(a.push({element:t,datasetIndex:n,index:l}),s=s||t.inRange(e.x,e.y,r))}),n&&!s)?[]:a}var iO={modes:{index(t,e,i,n){let r=eX(e,t),a=i.axis||"x",o=i.includeInvisible||!1,s=i.intersect?iL(t,r,a,n,o):iE(t,r,a,!1,n,o),l=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{let e=s[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,n){let r=eX(e,t),a=i.axis||"xy",o=i.includeInvisible||!1,s=i.intersect?iL(t,r,a,n,o):iE(t,r,a,!1,n,o);if(s.length>0){let e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tt.pos===e)}function ij(t,e){return t.filter(t=>-1===iR.indexOf(t.pos)&&t.box.axis===e)}function iN(t,e){return t.sort((t,i)=>{let n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function iH(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function iW(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function iB(t,e,i,n){let r,a,o,s,l,h;let c=[];for(r=0,a=t.length,l=0;r{n[t]=Math.max(e[t],i[t])}),n}(t?["left","right"]:["top","bottom"])}(o.horizontal,e));let{same:a,other:u}=function(t,e,i,n){let{pos:r,box:a}=i,o=t.maxPadding;if(!H(r)){i.size&&(t[r]-=i.size);let e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?a.height:a.width),i.size=e.size/e.count,t[r]+=i.size}a.getPadding&&iW(o,a.getPadding());let s=Math.max(0,e.outerWidth-iH(o,t,"left","right")),l=Math.max(0,e.outerHeight-iH(o,t,"top","bottom")),h=s!==t.w,c=l!==t.h;return t.w=s,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}(e,i,o,n);l|=a&&c.length,h=h||u,s.fullSize||c.push(o)}return l&&iB(c,e,i,n)||h}function iz(t,e,i,n,r){t.top=i,t.left=e,t.right=e+n,t.bottom=i+r,t.width=n,t.height=r}function iV(t,e,i,n){let r=i.padding,{x:a,y:o}=e;for(let s of t){let t=s.box,l=n[s.stack]||{count:1,placed:0,weight:1},h=s.stackWeight/l.weight||1;if(s.horizontal){let n=e.w*h,a=l.size||t.height;tn(l.start)&&(o=l.start),t.fullSize?iz(t,r.left,o,i.outerWidth-r.right-r.left,a):iz(t,e.left+l.placed,o,n,a),l.start=o,l.placed+=n,o=t.bottom}else{let n=e.h*h,o=l.size||t.width;tn(l.start)&&(a=l.start),t.fullSize?iz(t,a,r.top,o,i.outerHeight-r.bottom-r.top):iz(t,a,e.top+l.placed,o,n),l.start=a,l.placed+=n,a=t.right}}e.x=a,e.y=o}var i$={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){let i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;let r=ex(t.options.layout.padding),a=Math.max(e-r.width,0),o=Math.max(i-r.height,0),s=function(t){let e=function(t){let e,i,n,r,a,o;let s=[];for(e=0,i=(t||[]).length;et.box.fullSize),!0),n=iN(iF(e,"left"),!0),r=iN(iF(e,"right")),a=iN(iF(e,"top"),!0),o=iN(iF(e,"bottom")),s=ij(e,"x"),l=ij(e,"y");return{fullSize:i,leftAndTop:n.concat(a),rightAndBottom:r.concat(l).concat(o).concat(s),chartArea:iF(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:a.concat(o).concat(s)}}(t.boxes),l=s.vertical,h=s.horizontal;U(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});let c=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/c,hBoxMaxHeight:o/2}),d=Object.assign({},r);iW(d,ex(n));let f=Object.assign({maxPadding:d,w:a,h:o,x:r.left,y:r.top},r),p=function(t,e){let i,n,r;let a=function(t){let e={};for(let i of t){let{stack:t,pos:n,stackWeight:r}=i;if(!t||!iR.includes(n))continue;let a=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=r}return e}(t),{vBoxMaxWidth:o,hBoxMaxHeight:s}=e;for(i=0,n=t.length;i{let i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class iq{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class iU extends iq{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const iX="$chartjs",iY={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},iJ=t=>null===t||""===t,iG=!!eG&&{passive:!0};function iK(t,e,i){t.canvas.removeEventListener(e,i,iG)}function iZ(t,e){for(let i of t)if(i===e||i.contains(e))return!0}function iQ(t,e,i){let n=t.canvas,r=new MutationObserver(t=>{let e=!1;for(let i of t)e=(e=e||iZ(i.addedNodes,n))&&!iZ(i.removedNodes,n);e&&i()});return r.observe(document,{childList:!0,subtree:!0}),r}function i0(t,e,i){let n=t.canvas,r=new MutationObserver(t=>{let e=!1;for(let i of t)e=(e=e||iZ(i.removedNodes,n))&&!iZ(i.addedNodes,n);e&&i()});return r.observe(document,{childList:!0,subtree:!0}),r}const i1=new Map;let i2=0;function i5(){let t=window.devicePixelRatio;t!==i2&&(i2=t,i1.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function i3(t,e,i){let n=t.canvas,r=n&&eB(n);if(!r)return;let a=tF((t,e)=>{let n=r.clientWidth;i(t,e),n{let e=t[0],i=e.contentRect.width,n=e.contentRect.height;(0!==i||0!==n)&&a(i,n)});return o.observe(r),i1.size||window.addEventListener("resize",i5),i1.set(t,a),o}function i4(t,e,i){i&&i.disconnect(),"resize"===e&&(i1.delete(t),i1.size||window.removeEventListener("resize",i5))}function i8(t,e,i){let n=t.canvas,r=tF(e=>{null!==t.ctx&&i(function(t,e){let i=iY[t.type]||t.type,{x:n,y:r}=eX(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))},t);return!function(t,e,i){t.addEventListener(e,i,iG)}(n,e,r),r}class i6 extends iq{acquireContext(t,e){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(!function(t,e){let i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t[iX]={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",iJ(r)){let e=eK(t,"width");void 0!==e&&(t.width=e)}if(iJ(n)){if(""===t.style.height)t.height=t.width/(e||2);else{let e=eK(t,"height");void 0!==e&&(t.height=e)}}}(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[iX])return!1;let i=e[iX].initial;["height","width"].forEach(t=>{let n=i[t];j(n)?e.removeAttribute(t):e.setAttribute(t,n)});let n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e[iX],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let n=t.$proxies||(t.$proxies={}),r={attach:iQ,detach:i0,resize:i3}[e]||i8;n[e]=r(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;let r={attach:i4,detach:i4,resize:i4}[e]||iK;r(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return(// eslint-disable-next-line complexity +function(t,e,i,n){let r=eV(t),a=eq(r,"margin"),o=ez(r.maxWidth,t,"clientWidth")||th,s=ez(r.maxHeight,t,"clientHeight")||th,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){let a=eB(t);if(a){let t=a.getBoundingClientRect(),o=eV(a),s=eq(o,"border","width"),l=eq(o,"padding");// this is the border box of the container +e=t.width-l.width-s.width,i=t.height-l.height-s.height,n=ez(o.maxWidth,a,"clientWidth"),r=ez(o.maxHeight,a,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||th,maxHeight:r||th}}(t,e,i),{width:h,height:c}=l;if("content-box"===r.boxSizing){let t=eq(r,"border","width"),e=eq(r,"padding");h-=e.width+t.width,c-=e.height+t.height}h=Math.max(0,h-a.width),c=Math.max(0,n?h/n:c-a.height),h=eY(Math.min(h,o,l.maxWidth)),c=eY(Math.min(c,s,l.maxHeight)),h&&!c&&// If the canvas has width, but no height, default to aspectRatio of 2 (canvas default) +(c=eY(h/2));let u=void 0!==e||void 0!==i;return u&&n&&l.height&&c>l.height&&(h=eY(Math.floor((c=l.height)*n))),{width:h,height:c}}(t,e,i,n))}isAttached(t){let e=eB(t);return!!(e&&e.isConnected)}}class i9{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tv(this.x)&&tv(this.y)}getProps(t,e){let i=this.$animations;if(!e||!i)return this;let n={};return t.forEach(t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),n}}function i7(t,e,i,n,r){let a,o,s;let l=z(n,0),h=Math.min(z(r,t.length),t.length),c=0;for(i=Math.ceil(i),r&&(i=(a=r-n)/Math.floor(a/i)),s=l;s<0;)s=Math.round(l+ ++c*i);for(o=Math.max(l,0);o"left"===t?"right":"right"===t?"left":t,ne=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,ni=(t,e)=>Math.min(e||t,t);function nn(t,e){let i=[],n=t.length/e,r=t.length,a=0;for(;an?n:i,n=r&&i>n?i:n,{min:B(i,B(n,i)),max:B(n,B(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){let e=this._labelItems||(this._labelItems=this._computeLabelItems(t));return e}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){q(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:n,grace:r,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=/** + * @param minmax + * @param grace + * @param beginAtZero + * @private + */function(t,e,i){let{min:n,max:r}=t,a=$(e,(r-n)/2),o=(t,e)=>i&&0===t?0:t+e;return{min:o(n,-Math.abs(a)),max:o(r,a)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let s=or)return function(t,e,i,n){let r,a=0,o=i[0];for(r=0,n=Math.ceil(n);rt-e).pop(),i}(n);for(let t=0,e=a.length-1;tr)return e}return Math.max(r,1)}(a,e,r);if(o>0){let t,i;let n=o>1?Math.round((l-s)/(o-1)):null;for(i7(e,h,c,j(n)?0:s-n,s),t=0,i=o-1;t=s||a<=1||!this.isHorizontal()){this.labelRotation=o;return}let h=this._getLabelSizes(),c=h.widest.width,u=h.highest.height,d=tk(this.chart.width-c,0,this.maxWidth);c+6>(t=n.offset?this.maxWidth/a:d/(a-1))&&(t=d/(a-(n.offset?.5:1)),e=this.maxHeight-nr(n.grid)-r.padding-na(n.title,this.chart.options.font),i=Math.sqrt(c*c+u*u),l=Math.max(o,Math.min(s,l=Math.min(Math.asin(tk((h.highest.height+6)/t,-1,1)),Math.asin(tk(e/i,-1,1))-Math.asin(tk(u/i,-1,1)))*(180/to)))),this.labelRotation=l}afterCalculateLabelRotation(){q(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){q(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){let a=na(n,e.options.font);if(o?(t.width=this.maxWidth,t.height=nr(r)+a):(t.height=this.maxHeight,t.width=nr(r)+a),i.display&&this.ticks.length){let{first:e,last:n,widest:r,highest:a}=this._getLabelSizes(),s=2*i.padding,l=tx(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(o){let e=i.mirror?0:c*r.width+h*a.height;t.height=Math.min(this.maxHeight,t.height+e+s)}else{let e=i.mirror?0:h*r.width+c*a.height;t.width=Math.min(this.maxWidth,t.width+e+s)}this._calculatePadding(e,n,c,h)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){let{ticks:{align:r,padding:a},position:o}=this.options,s=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){let o=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1),c=0,u=0;s?l?(c=n*t.width,u=i*e.height):(c=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?c=t.width:"inner"!==r&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((u-h+a)*this.width/(this.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+a,this.paddingBottom=n+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(){q(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{let i;let n=t.gc,r=n.length/2;if(r>e){for(i=0;i({width:m[t]||0,height:b[t]||0});return{first:S(0),last:S(e-1),widest:S(_),highest:S(w),widths:m,heights:b}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return tk(this._alignToPixels?en(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&to*n?o/i:s/n:s*n0}_computeGridLineItems(t){let e,i,n,r,a,o,s,l,h,c,u,d;let f=this.axis,p=this.chart,g=this.options,{grid:m,position:b,border:v}=g,y=m.offset,x=this.isHorizontal(),_=this.ticks,w=_.length+(y?1:0),S=nr(m),D=[],C=v.setContext(this.getContext()),T=C.display?C.width:0,k=T/2,M=function(t){return en(p,t,T)};if("top"===b)e=M(this.bottom),o=this.bottom-S,l=e-k,c=M(t.top)+k,d=t.bottom;else if("bottom"===b)e=M(this.top),c=t.top,d=M(t.bottom)-k,o=e+k,l=this.top+S;else if("left"===b)e=M(this.right),a=this.right-S,s=e-k,h=M(t.left)+k,u=t.right;else if("right"===b)e=M(this.left),h=t.left,u=M(t.right)-k,a=e+k,s=this.left+S;else if("x"===f){if("center"===b)e=M((t.top+t.bottom)/2+.5);else if(H(b)){let t=Object.keys(b)[0],i=b[t];e=M(this.chart.scales[t].getPixelForValue(i))}c=t.top,d=t.bottom,l=(o=e+k)+S}else if("y"===f){if("center"===b)e=M((t.left+t.right)/2);else if(H(b)){let t=Object.keys(b)[0],i=b[t];e=M(this.chart.scales[t].getPixelForValue(i))}s=(a=e-k)-S,h=t.left,u=t.right}let A=z(g.ticks.maxTicksLimit,w),P=Math.max(1,Math.ceil(w/A));for(i=0;is+1e-6)))return l}(this,i,y))&&(r=en(p,n,g),x?a=s=h=u=r:o=l=c=d=r,D.push({tx1:a,ty1:o,tx2:s,ty2:l,x1:h,y1:c,x2:u,y2:d,width:g,color:b,borderDash:_,borderDashOffset:w,tickWidth:S,tickColor:C,tickBorderDash:T,tickBorderDashOffset:k}))}return this._ticksLength=w,this._borderValue=e,D}_computeLabelItems(t){let e,i,n,r,a,o,s,l,h,c,u;let d=this.axis,f=this.options,{position:p,ticks:g}=f,m=this.isHorizontal(),b=this.ticks,{align:v,crossAlign:y,padding:x,mirror:_}=g,w=nr(f.grid),S=w+x,D=_?-x:S,C=-tx(this.labelRotation),T=[],k="middle";if("top"===p)a=this.bottom-D,o=this._getXAxisLabelAlignment();else if("bottom"===p)a=this.top+D,o=this._getXAxisLabelAlignment();else if("left"===p){let t=this._getYAxisLabelAlignment(w);o=t.textAlign,r=t.x}else if("right"===p){let t=this._getYAxisLabelAlignment(w);o=t.textAlign,r=t.x}else if("x"===d){if("center"===p)a=(t.top+t.bottom)/2+S;else if(H(p)){let t=Object.keys(p)[0],e=p[t];a=this.chart.scales[t].getPixelForValue(e)+S}o=this._getXAxisLabelAlignment()}else if("y"===d){if("center"===p)r=(t.left+t.right)/2-S;else if(H(p)){let t=Object.keys(p)[0],e=p[t];r=this.chart.scales[t].getPixelForValue(e)}o=this._getYAxisLabelAlignment(w).textAlign}"y"===d&&("start"===v?k="top":"end"===v&&(k="bottom"));let M=this._getLabelSizes();for(e=0,i=b.length;ee.value===t);if(n>=0){let t=e.setContext(this.getContext(n));return t.lineWidth}return 0}drawGrid(t){let e,i;let n=this.options.grid,r=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o=(t,e,i)=>{i.width&&i.color&&(r.save(),r.lineWidth=i.width,r.strokeStyle=i.color,r.setLineDash(i.borderDash||[]),r.lineDashOffset=i.borderDashOffset,r.beginPath(),r.moveTo(t.x,t.y),r.lineTo(e.x,e.y),r.stroke(),r.restore())};if(n.display)for(e=0,i=a.length;e{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){let e,i;let n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",a=[];for(e=0,i=n.length;e{let n=i.split("."),r=n.pop(),a=[t].concat(n).join("."),o=e[i].split("."),s=o.pop(),l=o.join(".");ee.route(a,r,l,s)})}(e,t.defaultRoutes),t.descriptors&&ee.describe(e,t.descriptors)}(t,a,e),this.override&&ee.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){let e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in ee[n]&&(delete ee[n][i],this.override&&delete t6[i])}}var nl=/* #__PURE__ */new class{constructor(){this.controllers=new ns(iv,"datasets",!0),this.elements=new ns(i9,"elements"),this.plugins=new ns(Object,"plugins"),this.scales=new ns(no,"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,i){[...e].forEach(e=>{let n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):U(e,e=>{let n=i||this._getRegistryForType(e);this._exec(t,n,e)})})}_exec(t,e,i){let n=ti(t);q(i["before"+n],[],i),e[t](i),q(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function nc(t,e){let i=ee.datasets[t]||{},n=(e.datasets||{})[t]||{};return n.indexAxis||e.indexAxis||i.indexAxis||"x"}function nu(t){if("x"===t||"y"===t||"r"===t)return t}function nd(t,...e){if(nu(t))return t;for(let n of e){var i;let e=n.axis||("top"===(i=n.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&nu(t[0].toLowerCase());if(e)return e}throw Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function nf(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function np(t){let e=t.options||(t.options={});e.plugins=z(e.plugins,{}),e.scales=function(t,e){let i=t6[t.type]||{scales:{}},n=e.scales||{},r=nc(t.type,e),a=Object.create(null);return Object.keys(n).forEach(e=>{let o=n[e];if(!H(o))return console.error(`Invalid scale configuration for scale: ${e}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);let s=nd(e,o,function(t,e){if(e.data&&e.data.datasets){let i=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(i.length)return nf(t,"x",i[0])||nf(t,"y",i[0])}return{}}(e,t),ee.scales[o.type]),l=s===r?"_index_":"_value_",h=i.scales||{};a[e]=Z(Object.create(null),[{axis:s},o,h[s],h[l]])}),t.data.datasets.forEach(i=>{let r=i.type||t.type,o=i.indexAxis||nc(r,e),s=t6[r]||{},l=s.scales||{};Object.keys(l).forEach(t=>{let e;let r=(e=t,"_index_"===t?e=o:"_value_"===t&&(e="x"===o?"y":"x"),e),s=i[r+"AxisID"]||r;a[s]=a[s]||Object.create(null),Z(a[s],[{axis:r},n[s],l[t]])})}),Object.keys(a).forEach(t=>{let e=a[t];Z(e,[ee.scales[e.type],ee.scale])}),a}(t,e)}function ng(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const nm=new Map,nb=new Set;function nv(t,e){let i=nm.get(t);return i||(i=e(),nm.set(t,i),nb.add(i)),i}const ny=(t,e,i)=>{let n=te(e,i);void 0!==n&&t.add(n)};class nx{constructor(t){var e;this._config=((e=(e=t)||{}).data=ng(e.data),np(e),e),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=ng(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),np(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return nv(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return nv(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return nv(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return nv(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let i=this._scopeCache,n=i.get(t);return(!n||e)&&(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){let{options:n,type:r}=this,a=this._cachedScopes(t,i),o=a.get(e);if(o)return o;let s=new Set;e.forEach(e=>{t&&(s.add(t),e.forEach(e=>ny(s,t,e))),e.forEach(t=>ny(s,n,t)),e.forEach(t=>ny(s,t6[r]||{},t)),e.forEach(t=>ny(s,ee,t)),e.forEach(t=>ny(s,t9,t))});let l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),nb.has(e)&&a.set(e,l),l}chartOptionScopes(){let{options:t,type:e}=this;return[t,t6[e]||{},ee.datasets[e]||{},{type:e},ee,t9]}resolveNamedOptions(t,e,i,n=[""]){let r={$shared:!0},{resolver:a,subPrefixes:o}=n_(this._resolverCache,t,n),s=a;if(function(t,e){let{isScriptable:i,isIndexable:n}=eT(t);for(let r of e){let e=i(r),a=n(r),o=(a||e)&&t[r];if(e&&(tr(o)||nw(o))||a&&N(o))return!0}return!1}(a,e)){r.$shared=!1,i=tr(i)?i():i;let e=this.createResolver(t,i,o);s=eC(a,i,e)}for(let t of e)r[t]=s[t];return r}createResolver(t,e,i=[""],n){let{resolver:r}=n_(this._resolverCache,t,i);return H(e)?eC(r,e,void 0,n):r}}function n_(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));let r=i.join(),a=n.get(r);if(!a){let t=eD(e,i);a={resolver:t,subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(r,a)}return a}const nw=t=>H(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||tr(t[i]),!1),nS=["top","bottom","left","right","chartArea"];function nD(t,e){return"top"===t||"bottom"===t||-1===nS.indexOf(t)&&"x"===e}function nC(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function nT(t){let e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),q(i&&i.onComplete,[t],e)}function nk(t){let e=t.chart,i=e.options.animation;q(i&&i.onProgress,[t],e)}function nM(t){return eW()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const nA={},nP=t=>{let e=nM(t);return Object.values(nA).filter(t=>t.canvas===e).pop()};function nL(t,e,i){return t.options.clip?t[i]:e[i]}class nE{static defaults=ee;static instances=nA;static overrides=t6;static registry=nl;static version="4.4.0";static getChart=nP;static register(...t){nl.add(...t),nI()}static unregister(...t){nl.remove(...t),nI()}constructor(t,e){var i,n;let r;let a=this.config=new nx(e),o=nM(t),s=nP(o);if(s)throw Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");let l=a.createResolver(a.chartOptionScopes(),this.getContext());this.platform=new(a.platform||(!eW()||"undefined"!=typeof OffscreenCanvas&&o instanceof OffscreenCanvas?iU:i6)),this.platform.updateConfig(a);let h=this.platform.acquireContext(o,l.aspectRatio),c=h&&h.canvas,u=c&&c.height,d=c&&c.width;if(this.id=F(),this.ctx=h,this.canvas=c,this.width=d,this.height=u,this._options=l,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 nh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(i=t=>this.update(t),n=l.resizeDelay||0,function(...t){return n?(clearTimeout(r),r=setTimeout(i,n,t)):i.apply(this,t),n}),this._dataChanges=[],nA[this.id]=this,!h||!c){console.error("Failed to create chart: can't acquire context from the given item");return}it.listen(this,"complete",nT),it.listen(this,"progress",nk),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return j(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return nl}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():eJ(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return er(this.canvas,this.ctx),this}stop(){return it.stop(this),this}resize(t,e){it.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,r),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,eJ(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),q(i.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){let t=this.options,e=t.scales||{};U(e,(t,e)=>{t.id=e})}buildOrUpdateScales(){let t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{}),r=[];e&&(r=r.concat(Object.keys(e).map(t=>{let i=e[t],n=nd(t,i),r="r"===n,a="x"===n;return{options:i,dposition:r?"chartArea":a?"bottom":"left",dtype:r?"radialLinear":a?"category":"linear"}}))),U(r,e=>{let r=e.options,a=r.id,o=nd(a,r),s=z(r.type,e.dtype);(void 0===r.position||nD(r.position,o)!==nD(e.dposition))&&(r.position=e.dposition),n[a]=!0;let l=null;if(a in i&&i[a].type===s)l=i[a];else{let t=nl.getScale(s);i[(l=new t({id:a,type:s,ctx:this.ctx,chart:this})).id]=l}l.init(r,t)}),U(n,(t,e)=>{t||delete i[e]}),U(i,t=>{i$.configure(this,t,t.options),i$.addBox(this,t)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){let t,e;let i=[],n=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=n.length;t{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let t=0,e=this.data.datasets.length;t{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(nC("z","_idx"));let{_active:o,_lastEvent:s}=this;s?this._eventHandler(s,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){U(this.scales,t=>{i$.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);ta(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:i,start:n,count:r}of e){let e="_removeElements"===i?-r:r;!function(t,e,i){let n=Object.keys(t);for(let r of n){let n=+r;if(n>=e){let a=t[r];delete t[r],(i>0||n>e)&&(t[n+i]=a)}}}(t,n,e)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),n=i(0);for(let t=1;tt.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;i$.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],U(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,i=t._clip,n=!i.disabled,r=function(t,e){let{xScale:i,yScale:n}=t;return i&&n?{left:nL(i,e,"left"),right:nL(i,e,"right"),top:nL(n,e,"top"),bottom:nL(n,e,"bottom")}:e}(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",a)&&(n&&el(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&eh(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return es(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){let r=iO.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,n=i.filter(t=>t&&t._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},i.push(n)),n}getContext(){return this.$context||(this.$context=eS(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){let i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){let n=i?"show":"hide",r=this.getDatasetMeta(t),a=r.controller._resolveAnimations(void 0,n);tn(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(r,{visible:i}),this.update(e=>e.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),it.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};U(this.options.events,t=>i(t,n))}bindResponsiveEvents(){let t;this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,i=this.platform,n=(t,n)=>{i.addEventListener(this,t,n),e[t]=n},r=(t,n)=>{e[t]&&(i.removeEventListener(this,t,n),delete e[t])},a=(t,e)=>{this.canvas&&this.resize(t,e)},o=()=>{r("attach",o),this.attached=!0,this.resize(),n("resize",a),n("detach",t)};t=()=>{this.attached=!1,r("resize",a),this._stop(),this._resize(0,0),n("attach",o)},i.isAttached(this.canvas)?o():t()}unbindEvents(){U(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},U(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let n,r,a;let o=i?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+o+"DatasetHoverStyle"](),r=0,a=t.length;r{let i=this.getDatasetMeta(t);if(!i)throw Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),n=!X(i,e);n&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,i){let n=this.options.hover,r=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),a=r(e,t),o=i?t:r(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),o.length&&n.mode&&this.updateHoverStyle(o,n.mode,!0)}_eventHandler(t,e){let i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;let r=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e,i){var n;let{_active:r=[],options:a}=this,o=this._getActiveElements(t,r,i,e),s="mouseup"===t.type||"click"===t.type||"contextmenu"===t.type,l=(n=this._lastEvent,i&&"mouseout"!==t.type?s?n:t:null);i&&(this._lastEvent=null,q(a.onHover,[t,o,this],this),s&&q(a.onClick,[t,o,this],this));let h=!X(o,r);return(h||e)&&(this._active=o,this._updateHoverStyles(o,r,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;let r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,n)}}function nI(){return U(nE.instances,t=>t._plugins.invalidate())}/** + * Convert (r, 𝜃) to (x, y) + */function nO(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}/** + * Path the arc, respecting border radius by separating into left and right halves. + * + * Start End + * + * 1--->a--->2 Outer + * / \ + * 8 3 + * | | + * | | + * 7 4 + * \ / + * 6<---b<---5 Inner + */function nR(t,e,i,n,r,a){let{x:o,y:s,startAngle:l,pixelMargin:h,innerRadius:c}=e,u=Math.max(e.outerRadius+n+i-h,0),d=c>0?c+n+i+h:0,f=0,p=r-l;if(n){let t=u>0?u-n:0,e=((c>0?c-n:0)+t)/2;f=(p-(0!==e?p*e/(e+n):p))/2}let g=Math.max(.001,p*u-i/to)/u,m=(p-g)/2,b=l+m+f,v=r-m-f,{outerStart:y,outerEnd:x,innerStart:_,innerEnd:w}=/** + * Parse border radius from the provided options + */function(t,e,i,n){let r=eb(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),a=(i-e)/2,o=Math.min(a,n*e/2),s=t=>{let e=(i-Math.min(a,t))*n/2;return tk(t,0,Math.min(a,e))};return{outerStart:s(r.outerStart),outerEnd:s(r.outerEnd),innerStart:tk(r.innerStart,0,o),innerEnd:tk(r.innerEnd,0,o)}}(e,d,u,v-b),S=u-y,D=u-x,C=b+y/S,T=v-x/D,k=d+_,M=d+w,A=b+_/k,P=v-w/M;if(t.beginPath(),a){// The first arc segments from point 1 to point a to point 2 +let e=(C+T)/2;// The corner segment from point 2 to point 3 +if(t.arc(o,s,u,C,e),t.arc(o,s,u,e,T),x>0){let e=nO(D,T,o,s);t.arc(e.x,e.y,x,T,v+tu)}// The line from point 3 to point 4 +let i=nO(M,v,o,s);// The corner segment from point 4 to point 5 +if(t.lineTo(i.x,i.y),w>0){let e=nO(M,P,o,s);t.arc(e.x,e.y,w,v+tu,P+Math.PI)}// The inner arc from point 5 to point b to point 6 +let n=(v-w/d+(b+_/d))/2;// The corner segment from point 6 to point 7 +if(t.arc(o,s,d,v-w/d,n,!0),t.arc(o,s,d,n,b+_/d,!0),_>0){let e=nO(k,A,o,s);t.arc(e.x,e.y,_,A+Math.PI,b-tu)}// The line from point 7 to point 8 +let r=nO(S,b,o,s);// The corner segment from point 8 to point 1 +if(t.lineTo(r.x,r.y),y>0){let e=nO(S,C,o,s);t.arc(e.x,e.y,y,b-tu,C)}}else{t.moveTo(o,s);let e=Math.cos(C)*u+o,i=Math.sin(C)*u+s;t.lineTo(e,i);let n=Math.cos(T)*u+o,r=Math.sin(T)*u+s;t.lineTo(n,r)}t.closePath()}function nF(t,e,i=e){t.lineCap=z(i.borderCapStyle,e.borderCapStyle),t.setLineDash(z(i.borderDash,e.borderDash)),t.lineDashOffset=z(i.borderDashOffset,e.borderDashOffset),t.lineJoin=z(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=z(i.borderWidth,e.borderWidth),t.strokeStyle=z(i.borderColor,e.borderColor)}function nj(t,e,i){t.lineTo(i.x,i.y)}function nN(t,e,i={}){let n=t.length,{start:r=0,end:a=n-1}=i,{start:o,end:s}=e,l=Math.max(r,o),h=Math.min(a,s);return{count:n,start:l,loop:e.loop,ilen:hs&&a>s)?n+h-l:h-l}}function nH(t,e,i,n){let r,a,o;let{points:s,options:l}=e,{count:h,start:c,loop:u,ilen:d}=nN(s,i,n),f=l.stepped?ec:l.tension||"monotone"===l.cubicInterpolationMode?eu:nj,{move:p=!0,reverse:g}=n||{};for(r=0;r<=d;++r)(a=s[(c+(g?d-r:r))%h]).skip||(p?(t.moveTo(a.x,a.y),p=!1):f(t,o,a,g,l.stepped),o=a);return u&&f(t,o,a=s[(c+(g?d:0))%h],g,l.stepped),!!u}function nW(t,e,i,n){let r,a,o,s,l,h;let c=e.points,{count:u,start:d,ilen:f}=nN(c,i,n),{move:p=!0,reverse:g}=n||{},m=0,b=0,v=t=>(d+(g?f-t:t))%u,y=()=>{s!==l&&(t.lineTo(m,l),t.lineTo(m,s),t.lineTo(m,h))};for(p&&(a=c[v(0)],t.moveTo(a.x,a.y)),r=0;r<=f;++r){if((a=c[v(r)]).skip)continue;let e=a.x,i=a.y,n=0|e;n===o?(il&&(l=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),o=n,b=0,s=l=i),h=i}y()}function nB(t){let e=t.options,i=e.borderDash&&e.borderDash.length,n=!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!i;return n?nW:nH}const nz="function"==typeof Path2D;class nV extends i9{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){let n=i.spanGaps?this._loop:this._fullLoop;!/** + * @private + */function(t,e,i,n,r){let a,o,s,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!/** + * This function calculates Bézier control points in a similar way than |splineCurve|, + * but preserves monotonicity of the provided data and ensures no local extremums are added + * between the dataset discrete points due to the interpolation. + * See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation + */function(t,e="x"){let i,n,r;let a=eN(e),o=t.length,s=Array(o).fill(0),l=Array(o),h=ej(t,0);for(i=0;ir&&t[a%e].skip;)a--;return{start:r,end:a%=e}}(i,r,a,n);if(!0===n)return e9(t,[{start:o,end:s,loop:a}],i,e);let l=s"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){let n=this.getProps(["x","y"],i),{angle:r,distance:a}=tw(n,{x:t,y:e}),{startAngle:o,endAngle:s,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=(this.options.spacing+this.options.borderWidth)/2,d=z(c,s-o),f=d>=ts||tT(r,o,s),p=tM(a,l+u,h+u);return f&&p}getCenterPoint(t){let{x:e,y:i,startAngle:n,endAngle:r,innerRadius:a,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:s,spacing:l}=this.options,h=(n+r)/2,c=(a+o+l+s)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:i}=this,n=(e.offset||0)/4,r=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>ts?Math.floor(i/ts):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*n,Math.sin(o)*n);let s=1-Math.sin(Math.min(to,i||0)),l=n*s;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,n,r){let{fullCircles:a,startAngle:o,circumference:s}=e,l=e.endAngle;if(a){nR(t,e,i,n,l,r);for(let e=0;er?(h=r/l,t.arc(a,o,l,i+h,n-h,!0)):t.arc(a,o,r,i+tu,n-tu),t.closePath(),t.clip()}(t,e,p),a||(nR(t,e,i,n,p,r),t.stroke())}(t,this,l,r,a),t.restore()}},BarElement:class extends i9{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){var e;let{inflateAmount:i,options:{borderColor:n,backgroundColor:r}}=this,{inner:a,outer:o}=function(t){let e=nq(t),i=e.right-e.left,n=e.bottom-e.top,r=function(t,e,i){let n=t.options.borderWidth,r=t.borderSkipped,a=ev(n);return{t:nU(r.top,a.top,0,i),r:nU(r.right,a.right,0,e),b:nU(r.bottom,a.bottom,0,i),l:nU(r.left,a.left,0,e)}}(t,i/2,n/2),a=function(t,e,i){let{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,a=ey(r),o=Math.min(e,i),s=t.borderSkipped,l=n||H(r);return{topLeft:nU(!l||s.top||s.left,a.topLeft,0,o),topRight:nU(!l||s.top||s.right,a.topRight,0,o),bottomLeft:nU(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:nU(!l||s.bottom||s.right,a.bottomRight,0,o)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:a},inner:{x:e.left+r.l,y:e.top+r.t,w:i-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}(this),s=(e=o.radius).topLeft||e.topRight||e.bottomLeft||e.bottomRight?ef:nY;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,nJ(o,i,a)),t.clip(),s(t,nJ(a,-i,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),s(t,nJ(a,i)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return nX(this,t,e,i)}inXRange(t,e){return nX(this,t,null,e)}inYRange(t,e){return nX(this,null,t,e)}getCenterPoint(t){let{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},LineElement:nV,PointElement:class extends i9{static id="point";parsed;skip;stop;/** + * @type {any} + */static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};/** + * @type {any} + */static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){let n=this.options,{x:r,y:a}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-a,2)t.replace("rgb(","rgba(").replace(")",", 0.5)"));function nQ(t){return nK[t%nK.length]}function n0(t){return nZ[t%nZ.length]}function n1(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function n2(t){if(t._decimated){let e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function n5(t){t.data.datasets.forEach(t=>{n2(t)})}function n3(t,e,i,n){if(n)return;let r=e[t],a=i[t];return"angle"===t&&(r=tC(r),a=tC(a)),{property:t,start:r,end:a}}function n4(t,e,i){for(;e>t;e--){let t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function n8(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function n6(t,e){let i=[],n=!1;return N(t)?(n=!0,i=t):i=function(t,e){let{x:i=null,y:n=null}=t||{},r=e.points,a=[];return e.segments.forEach(({start:t,end:e})=>{e=n4(t,e,r);let o=r[t],s=r[e];null!==n?(a.push({x:o.x,y:n}),a.push({x:s.x,y:n})):null!==i&&(a.push({x:i,y:o.y}),a.push({x:i,y:s.y}))}),a}(t,e),i.length?new nV({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function n9(t){return t&&!1!==t.fill}class n7{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){let{x:n,y:r,radius:a}=this;return e=e||{start:0,end:ts},t.arc(n,r,a,e.end,e.start,!0),!i.bounds}interpolate(t){let{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function rt(t,e,i){let n=function(t){let{chart:e,fill:i,line:n}=t;if(W(i))return function(t,e){let i=t.getDatasetMeta(e),n=i&&t.isDatasetVisible(e);return n?i.dataset:null}(e,i);if("stack"===i)return function(t){let{scale:e,index:i,line:n}=t,r=[],a=n.segments,o=n.points,s=function(t,e){let i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}},ra=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class ro extends i9{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,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=q(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,i)=>t.sort(e,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let t,e;let{options:i,ctx:n}=this;if(!i.display){this.width=this.height=0;return}let r=i.labels,a=e_(r.font),o=a.size,s=this._computeTitleHeight(),{boxWidth:l,itemHeight:h}=rr(r,o);n.font=a.string,this.isHorizontal()?(t=this.maxWidth,e=this._fitRows(s,o,l,h)+10):(e=this.maxHeight,t=this._fitCols(s,a,l,h)+10),this.width=Math.min(t,i.maxWidth||this.maxWidth),this.height=Math.min(e,i.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){let{ctx:r,maxWidth:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],l=this.lineWidths=[0],h=n+o,c=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-h;return this.legendItems.forEach((t,f)=>{let p=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*o>a)&&(c+=h,l[l.length-(f>0?0:1)]=0,d+=h,u++),s[f]={left:0,top:d,row:u,width:p,height:n},l[l.length-1]+=p+o}),c}_fitCols(t,e,i,n){let{ctx:r,maxHeight:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],h=a-t,c=o,u=0,d=0,f=0,p=0;return this.legendItems.forEach((t,a)=>{let{itemWidth:g,itemHeight:m}=function(t,e,i,n,r){var a;let o,s;let l=((o=n.text)&&"string"!=typeof o&&(o=o.reduce((t,e)=>t.length>e.length?t:e)),t+e.size/2+i.measureText(o).width),h=(a=e.lineHeight,s=r,"string"!=typeof n.text&&(s=rs(n,a)),s);return{itemWidth:l,itemHeight:h}}(i,e,r,t,n);a>0&&d+m+2*o>h&&(c+=u+o,l.push({width:u,height:d}),f+=u+o,p++,u=d=0),s[a]={left:f,top:d,col:p,width:g,height:m},u=Math.max(u,g),d+=m+o}),c+=u,l.push({width:u,height:d}),c}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,a=e1(r,this.left,this.width);if(this.isHorizontal()){let r=0,o=tN(i,this.left+n,this.right-this.lineWidths[r]);for(let s of e)r!==s.row&&(r=s.row,o=tN(i,this.left+n,this.right-this.lineWidths[r])),s.top+=this.top+t+n,s.left=a.leftForLtr(a.x(o),s.width),o+=s.width+n}else{let r=0,o=tN(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(let s of e)s.col!==r&&(r=s.col,o=tN(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),s.top=o,s.left+=this.left+n,s.left=a.leftForLtr(a.x(s.left),s.width),o+=s.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){let t=this.ctx;el(t,this),this._draw(),eh(t)}}_draw(){let t;let{options:e,columnSizes:i,lineWidths:n,ctx:r}=this,{align:a,labels:o}=e,s=ee.color,l=e1(e.rtl,this.left,this.width),h=e_(o.font),{padding:c}=o,u=h.size,d=u/2;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=h.string;let{boxWidth:f,boxHeight:p,itemHeight:g}=rr(o,u),m=function(t,e,i){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;r.save();let n=z(i.lineWidth,1);if(r.fillStyle=z(i.fillStyle,s),r.lineCap=z(i.lineCap,"butt"),r.lineDashOffset=z(i.lineDashOffset,0),r.lineJoin=z(i.lineJoin,"miter"),r.lineWidth=n,r.strokeStyle=z(i.strokeStyle,s),r.setLineDash(z(i.lineDash,[])),o.usePointStyle){let a={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},s=l.xPlus(t,f/2),h=e+d;eo(r,a,s,h,o.pointStyleWidth&&f)}else{let a=e+Math.max((u-p)/2,0),o=l.leftForLtr(t,f),s=ey(i.borderRadius);r.beginPath(),Object.values(s).some(t=>0!==t)?ef(r,{x:o,y:a,w:f,h:p,radius:s}):r.rect(o,a,f,p),r.fill(),0!==n&&r.stroke()}r.restore()},b=function(t,e,i){ed(r,i.text,t,e+g/2,h,{strikethrough:i.hidden,textAlign:l.textAlign(i.textAlign)})},v=this.isHorizontal(),y=this._computeTitleHeight();t=v?{x:tN(a,this.left+c,this.right-n[0]),y:this.top+c+y,line:0}:{x:this.left+c,y:tN(a,this.top+y+c,this.bottom-i[0].height),line:0},e2(this.ctx,e.textDirection);let x=g+c;this.legendItems.forEach((s,u)=>{r.strokeStyle=s.fontColor,r.fillStyle=s.fontColor;let p=r.measureText(s.text).width,g=l.textAlign(s.textAlign||(s.textAlign=o.textAlign)),_=f+d+p,w=t.x,S=t.y;l.setWidth(this.width),v?u>0&&w+_+c>this.right&&(S=t.y+=x,t.line++,w=t.x=tN(a,this.left+c,this.right-n[t.line])):u>0&&S+x>this.bottom&&(w=t.x=w+i[t.line].width+c,t.line++,S=t.y=tN(a,this.top+y+c,this.bottom-i[t.line].height));let D=l.x(w);if(m(D,S,s),w=tH(g,w+f+d,v?w+_:this.right,e.rtl),b(l.x(w),S,s),v)t.x+=_+c;else if("string"!=typeof s.text){let e=h.lineHeight;t.y+=rs(s,e)+c}else t.y+=x}),e5(this.ctx,e.textDirection)}drawTitle(){let t;let e=this.options,i=e.title,n=e_(i.font),r=ex(i.padding);if(!i.display)return;let a=e1(e.rtl,this.left,this.width),o=this.ctx,s=i.position,l=n.size/2,h=r.top+l,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),t=this.top+h,c=tN(e.align,c,this.right-u);else{let i=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);t=h+tN(e.align,this.top,this.bottom-i-e.labels.padding-this._computeTitleHeight())}let d=tN(s,c,c+u);o.textAlign=a.textAlign(tj(s)),o.textBaseline="middle",o.strokeStyle=i.color,o.fillStyle=i.color,o.font=n.string,ed(o,i.text,d,t,n)}_computeTitleHeight(){let t=this.options.title,e=e_(t.font),i=ex(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(tM(t,this.left,this.right)&&tM(e,this.top,this.bottom)){for(i=0,r=this.legendHitBoxes;i-1?t.split("\n"):t}function rf(t,e){let i=t.chart.ctx,{body:n,footer:r,title:a}=t,{boxWidth:o,boxHeight:s}=e,l=e_(e.bodyFont),h=e_(e.titleFont),c=e_(e.footerFont),u=a.length,d=r.length,f=n.length,p=ex(e.padding),g=p.height,m=0,b=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){let t=e.displayColors?Math.max(s,l.lineHeight):l.lineHeight;g+=f*t+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*c.lineHeight+(d-1)*e.footerSpacing);let v=0,y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=h.string,U(t.title,y),i.font=l.string,U(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?o+2+e.boxPadding:0,U(n,t=>{U(t.before,y),U(t.lines,y),U(t.after,y)}),v=0,i.font=c.string,U(t.footer,y),i.restore(),{width:m+=p.width,height:g}}function rp(t,e,i){let n=i.yAlign||e.yAlign||function(t,e){let{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||function(t,e,i,n){let{x:r,width:a}=i,{width:o,chartArea:{left:s,right:l}}=t,h="center";return"center"===n?h=r<=(s+l)/2?"left":"right":r<=a/2?h="left":r>=o-a/2&&(h="right"),function(t,e,i,n){let{x:r,width:a}=n,o=i.caretSize+i.caretPadding;if("left"===t&&r+a+o>e.width||"right"===t&&r-a-o<0)return!0}(h,t,e,i)&&(h="center"),h}(t,e,i,n),yAlign:n}}function rg(t,e,i,n){let{caretSize:r,caretPadding:a,cornerRadius:o}=t,{xAlign:s,yAlign:l}=i,h=r+a,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:f}=ey(o),p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,s),g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:"bottom"===e?n-=r+i:n-=r/2,n}(e,l,h);return"center"===l?"left"===s?p+=h:"right"===s&&(p-=h):"left"===s?p-=Math.max(c,d)+r:"right"===s&&(p+=Math.max(u,f)+r),{x:tk(p,0,n.width-e.width),y:tk(g,0,n.height-e.height)}}function rm(t,e,i){let n=ex(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function rb(t,e){let i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const rv={beforeTitle:R,title(t){if(t.length>0){let e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex{let e={before:[],lines:[],after:[]},r=rb(i,t);ru(e.before,rd(ry(r,"beforeLabel",this,t))),ru(e.lines,ry(r,"label",this,t)),ru(e.after,rd(ry(r,"afterLabel",this,t))),n.push(e)}),n}getAfterBody(t,e){return ru([],rd(ry(e.callbacks,"afterBody",this,t)))}getFooter(t,e){let{callbacks:i}=e,n=ry(i,"beforeFooter",this,t),r=ry(i,"footer",this,t),a=ry(i,"afterFooter",this,t),o=[];return o=ru(o,rd(n)),o=ru(o,rd(r)),o=ru(o,rd(a))}_createItems(t){let e,i;let n=this._active,r=this.chart.data,a=[],o=[],s=[],l=[];for(e=0,i=n.length;et.filter(e,i,n,r))),t.itemSort&&(l=l.sort((e,i)=>t.itemSort(e,i,r))),U(l,e=>{let i=rb(t.callbacks,e);a.push(ry(i,"labelColor",this,e)),o.push(ry(i,"labelPointStyle",this,e)),s.push(ry(i,"labelTextColor",this,e))}),this.labelColors=a,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){let i;let n=this.options.setContext(this.getContext()),r=this._active,a=[];if(r.length){let t=rc[n.position].call(this,r,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);let e=this._size=rf(this,n),o=Object.assign({},t,e),s=rp(this.chart,n,o),l=rg(n,o,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,i={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(i={opacity:0});this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){let r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){let n,r,a,o,s,l;let{xAlign:h,yAlign:c}=this,{caretSize:u,cornerRadius:d}=i,{topLeft:f,topRight:p,bottomLeft:g,bottomRight:m}=ey(d),{x:b,y:v}=t,{width:y,height:x}=e;return"center"===c?(s=v+x/2,"left"===h?(r=(n=b)-u,o=s+u,l=s-u):(r=(n=b+y)+u,o=s-u,l=s+u),a=n):(r="left"===h?b+Math.max(f,g)+u:"right"===h?b+y-Math.max(p,m)-u:this.caretX,"top"===c?(s=(o=v)-u,n=r-u,a=r+u):(s=(o=v+x)+u,n=r+u,a=r-u),l=o),{x1:n,x2:r,x3:a,y1:o,y2:s,y3:l}}drawTitle(t,e,i){let n,r,a;let o=this.title,s=o.length;if(s){let l=e1(i.rtl,this.x,this.width);for(a=0,t.x=rm(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",n=e_(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=n.string;a0!==t)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,ef(t,{x:e,y:f,w:l,h:s,radius:o}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ef(t,{x:i,y:f+1,w:l-2,h:s-2,radius:o}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,s),t.strokeRect(e,f,l,s),t.fillStyle=a.backgroundColor,t.fillRect(i,f+1,l-2,s-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let n,r,a,o,s,l,h;let{body:c}=this,{bodySpacing:u,bodyAlign:d,displayColors:f,boxHeight:p,boxWidth:g,boxPadding:m}=i,b=e_(i.bodyFont),v=b.lineHeight,y=0,x=e1(i.rtl,this.x,this.width),_=function(i){e.fillText(i,x.x(t.x+y),t.y+v/2),t.y+=v+u},w=x.textAlign(d);for(e.textAlign=d,e.textBaseline="middle",e.font=b.string,t.x=rm(this,w,i),e.fillStyle=i.bodyColor,U(this.beforeBody,_),y=f&&"right"!==w?"center"===d?g/2+m:g+2+m:0,o=0,l=c.length;o0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){let i=rc[t.position].call(this,this._active,this._eventPosition);if(!i)return;let a=this._size=rf(this,t),o=Object.assign({},i,this._size),s=rp(e,t,o),l=rg(t,o,s,e);(n._to!==l.x||r._to!==l.y)&&(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=a.width,this.height=a.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(e);let n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=.001>Math.abs(i)?0:i;let a=ex(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),e2(t,e.textDirection),r.y+=a.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),e5(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let i=this._active,n=t.map(({datasetIndex:t,index:e})=>{let i=this.chart.getDatasetMeta(t);if(!i)throw Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),r=!X(i,n),a=this._positionChanged(n,e);(r||a)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let n=this.options,r=this._active||[],a=this._getActiveElements(t,r,e,i),o=this._positionChanged(a,t),s=e||!X(a,r)||o;return s&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),s}_getActiveElements(t,e,i,n){let r=this.options;if("mouseout"===t.type)return[];if(!n)return e;let a=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&a.reverse(),a}_positionChanged(t,e){let{caretX:i,caretY:n,options:r}=this,a=rc[r.position].call(this,t,e);return!1!==a&&(i!==a.x||n!==a.y)}}var r_=/*#__PURE__*/Object.freeze({__proto__:null,Colors:{id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){let n;if(!i.enabled)return;let{data:{datasets:r},options:a}=t.config,{elements:o}=a;if(!i.forceOverride&&(n1(r)||a&&(a.borderColor||a.backgroundColor)||o&&n1(o)))return;let s=(n=0,(e,i)=>{var r,a,o;let s=t.getDatasetMeta(i).controller;s instanceof iD?(r=n,e.backgroundColor=e.data.map(()=>nQ(r++)),n=r):s instanceof iC?(a=n,e.backgroundColor=e.data.map(()=>n0(a++)),n=a):s&&(o=n,e.borderColor=nQ(o),e.backgroundColor=n0(o),n=++o)});r.forEach(s)}},Decimation:{id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled){n5(t);return}let n=t.width;t.data.datasets.forEach((e,r)=>{let a;let{_data:o,indexAxis:s}=e,l=t.getDatasetMeta(r),h=o||e.data;if("y"===ew([s,t.options.indexAxis])||!l.controller.supportsDecimation)return;let c=t.scales[l.xAxisID];if("linear"!==c.type&&"time"!==c.type||t.options.parsing)return;let{start:u,count:d}=function(t,e){let i;let n=e.length,r=0,{iScale:a}=t,{min:o,max:s,minDefined:l,maxDefined:h}=a.getUserBounds();return l&&(r=tk(tP(e,a.axis,o).lo,0,n-1)),i=h?tk(tP(e,a.axis,s).hi+1,r,n)-r:n-r,{start:r,count:i}}(l,h),f=i.threshold||4*n;if(d<=f){n2(e);return}switch(j(o)&&(e._data=h,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":a=function(t,e,i,n,r){let a,o,s,l,h;let c=r.samples||n;if(c>=i)return t.slice(e,e+i);let u=[],d=(i-2)/(c-2),f=0,p=e+i-1,g=e;for(a=0,u[f++]=t[g];as&&(s=l,o=t[n],h=n);u[f++]=o,g=h}return u[f++]=t[p],u}(h,u,d,n,i);break;case"min-max":a=function(t,e,i,n){let r,a,o,s,l,h,c,u,d,f,p=0,g=0,m=[],b=t[e].x,v=t[e+i-1].x,y=v-b;for(r=e;rf&&(f=s,c=r),p=(g*p+a.x)/++g;else{let i=r-1;if(!j(h)&&!j(c)){let e=Math.min(h,c),n=Math.max(h,c);e!==u&&e!==i&&m.push({...t[e],x:p}),n!==u&&n!==i&&m.push({...t[n],x:p})}r>0&&i!==u&&m.push(t[i]),m.push(a),l=e,g=0,d=f=s,h=c=u=r}}return m}(h,u,d,n);break;default:throw Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=a})},destroy(t){n5(t)}},Filler:{id:"filler",afterDatasetsUpdate(t,e,i){let n,r,a,o;let s=(t.data.datasets||[]).length,l=[];for(r=0;r=i)&&r):["origin","start","end","stack","shape"].indexOf(a)>=0&&a}(a,r,s),chart:t,axis:n.controller.options.indexAxis,scale:n.vScale,line:a}),n.$filler=o,l.push(o);for(r=0;r=0;--e){let i=r[e].$filler;i&&(i.line.updateControlPoints(a,i.axis),n&&i.fill&&rt(t.ctx,i,a))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;let n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){let i=n[e].$filler;n9(i)&&rt(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){let n=e.meta.$filler;n9(n)&&"beforeDatasetDraw"===i.drawTime&&rt(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Legend:{id:"legend",_element:ro,start(t,e,i){let n=t.legend=new ro({ctx:t.ctx,options:i,chart:t});i$.configure(t,n,i),i$.addBox(t,n)},stop(t){i$.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){let n=t.legend;i$.configure(t,n,i),n.options=i},afterUpdate(t){let e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){let n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:a,useBorderRadius:o,borderRadius:s}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{let l=t.controller.getStyle(i?0:void 0),h=ex(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:l.borderColor,pointStyle:n||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:o&&(s||l.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},SubTitle:{id:"subtitle",start(t,e,i){let n=new rl({ctx:t.ctx,options:i,chart:t});i$.configure(t,n,i),i$.addBox(t,n),rh.set(t,n)},stop(t){i$.removeBox(t,rh.get(t)),rh.delete(t)},beforeUpdate(t,e,i){let n=rh.get(t);i$.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Title:{id:"title",_element:rl,start(t,e,i){!function(t,e){let i=new rl({ctx:t.ctx,options:e,chart:t});i$.configure(t,i,e),i$.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){let e=t.titleBlock;i$.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){let n=t.titleBlock;i$.configure(t,n,i),n.options=i},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}},Tooltip:{id:"tooltip",_element:rx,positioners:rc,afterInit(t,e,i){i&&(t.tooltip=new rx({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){let e=t.tooltip;if(e&&e._willRender()){let i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){let i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:rv},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}});const rw=(t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i),rS=(t,e)=>null===t?null:tk(Math.round(t),0,e);function rD(t){let e=this.getLabels();return t>=0&&tn=e?n:t,o=t=>r=i?r:t;if(t){let t=tg(n),e=tg(r);t<0&&e<0?o(0):t>0&&e>0&&a(0)}if(n===r){let e=0===r?1:Math.abs(.05*r);o(r+e),t||a(n-e)}this.min=n,this.max=r}getTickLimit(){let t;let e=this.options.ticks,{maxTicksLimit:i,stepSize:n}=e;return n?(t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1)>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit();i=Math.max(2,i);let n={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},r=this._range||this,a=function(t,e){let i,n,r,a;let o=[],{bounds:s,step:l,min:h,max:c,precision:u,count:d,maxTicks:f,maxDigits:p,includeBounds:g}=t,m=l||1,b=f-1,{min:v,max:y}=e,x=!j(h),_=!j(c),w=!j(d),S=(y-v)/(p+1),D=tb((y-v)/b/m)*m;if(D<1e-14&&!x&&!_)return[{value:v},{value:y}];(a=Math.ceil(y/D)-Math.floor(v/D))>b&&(D=tb(a*D/b/m)*m),j(u)||(D=Math.ceil(D*(i=Math.pow(10,u)))/i),"ticks"===s?(n=Math.floor(v/D)*D,r=Math.ceil(y/D)*D):(n=v,r=y),x&&_&&l&&function(t,e){let i=Math.round(t);return i-e<=t&&i+e>=t}((c-h)/l,D/1e3)?(a=Math.round(Math.min((c-h)/D,f)),D=(c-h)/a,n=h,r=c):w?(n=x?h:n,D=((r=_?c:r)-n)/(a=d-1)):a=tm(a=(r-n)/D,Math.round(a),D/1e3)?Math.round(a):Math.ceil(a);let C=Math.max(t_(D),t_(n));n=Math.round(n*(i=Math.pow(10,j(u)?C:u)))/i,r=Math.round(r*i)/i;let T=0;for(x&&(g&&n!==h?(o.push({value:h}),nc)break;o.push({value:t})}return _&&g&&r!==c?o.length&&tm(o[o.length-1].value,c,rC(c,S,t))?o[o.length-1].value=c:o.push({value:c}):_&&r!==c||o.push({value:r}),o}(n,r);return"ticks"===t.bounds&&ty(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(){let t=this.ticks,e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){let n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return tZ(t,this.chart.options.locale,this.options.ticks.format)}}class rk extends rT{static id="linear";static defaults={ticks:{callback:t8.formatters.numeric}};determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=W(t)?t:0,this.max=W(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,i=tx(this.options.ticks.minRotation),n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/((t?Math.sin(i):Math.cos(i))||.001)))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const rM=t=>Math.floor(tp(t)),rA=(t,e)=>Math.pow(10,rM(t)+e);function rP(t){let e=t/Math.pow(10,rM(t));return 1===e}function rL(t,e,i){let n=Math.pow(10,i);return Math.ceil(e/n)-Math.floor(t/n)}class rE extends no{static id="logarithmic";static defaults={ticks:{callback:t8.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){let i=rT.prototype.parse.apply(this,[t,e]);if(0===i){this._zero=!0;return}return W(i)&&i>0?i:null}determineDataLimits(){let{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===rA(this.min,0)?rA(this.min,-1):rA(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),i=this.min,n=this.max,r=e=>i=t?i:e,a=t=>n=e?n:t;i===n&&(i<=0?(r(1),a(10)):(r(rA(i,-1)),a(rA(n,1)))),i<=0&&r(rA(n,-1)),n<=0&&a(rA(i,1)),this.min=i,this.max=n}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},i=function(t,{min:e,max:i}){e=B(t.min,e);let n=[],r=rM(e),a=function(t,e){let i=e-t,n=rM(i);for(;rL(t,e,n)>10;)n++;for(;10>rL(t,e,n);)n--;return Math.min(n,rM(t))}(e,i),o=a<0?Math.pow(10,Math.abs(a)):1,s=Math.pow(10,a),l=r>a?Math.pow(10,r):0,h=Math.round((e-l)*o)/o,c=Math.floor((e-l)/s/10)*s*10,u=Math.floor((h-c)/Math.pow(10,a)),d=B(t.min,Math.round((l+c+u*Math.pow(10,a))*o)/o);for(;d=10?u=u<15?15:20:u++,u>=20&&(u=2,o=++a>=0?1:o),d=Math.round((l+c+u*Math.pow(10,a))*o)/o;let f=B(t.max,d);return n.push({value:f,major:rP(f),significand:u}),n}(e,this);return"ticks"===t.bounds&&ty(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return void 0===t?"0":tZ(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=tp(t),this._valueRange=tp(this.max)-tp(t)}getPixelForValue(t){return((void 0===t||0===t)&&(t=this.min),null===t||isNaN(t))?NaN:this.getPixelForDecimal(t===this.min?0:(tp(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function rI(t){let e=t.ticks;if(e.display&&t.display){let t=ex(e.backdropPadding);return z(e.font&&e.font.size,ee.font.size)+t.height}return 0}function rO(t,e,i,n,r){return t===n||t===r?{start:e-i/2,end:e+i/2}:tr?{start:e-i,end:e}:{start:e,end:e+i}}function rR(t,e,i,n){let{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,ts);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let a=1;at,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let t=this._padding=ex(rI(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!1);this.min=W(t)&&!isNaN(t)?t:0,this.max=W(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/rI(this.options))}generateTickLabels(t){rT.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{let i=q(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){let t=this.options;t.display&&t.pointLabels.display?function(t){let e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],r=[],a=t._pointLabels.length,o=t.options.pointLabels,s=o.centerPointLabels?to/a:0;for(let c=0;ci.length){for(r=0;re.r&&(s=(n.end-e.r)/a,t.r=Math.max(t.r,e.r+s)),r.starte.b&&(l=(r.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}(i,e,p,m,b)}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){let n;let r=[],a=t._pointLabels.length,o=t.options,{centerPointLabels:s,display:l}=o.pointLabels,h={extra:rI(o)/2,additionalAngle:s?to/a:0};for(let o=0;o270||f<90)&&(n-=r),n),g=0===f||180===f?"center":f<180?"left":"right",m=(a=d.x,o=u.w,"right"===g?a-=o:"center"===g&&(a-=o/2),a);return{visible:!0,x:d.x,y:p,textAlign:g,left:m,top:p,right:m+u.w,bottom:p+u.h}}(t,o,h);r.push(a),"auto"===l&&(a.visible=function(t,e){if(!e)return!0;let{left:i,top:n,right:r,bottom:a}=t,o=es({x:i,y:n},e)||es({x:i,y:a},e)||es({x:r,y:n},e)||es({x:r,y:a},e);return!o}(a,n),a.visible&&(n=a))}return r}(t,n,r)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){let e=ts/(this._pointLabels.length||1),i=this.options.startAngle||0;return tC(t*e+tx(i))}getDistanceFromCenterForValue(t){if(j(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(j(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t=0;r--){let e=t._pointLabelItems[r];if(!e.visible)continue;let a=n.setContext(t.getPointLabelContext(r));!function(t,e,i){let{left:n,top:r,right:a,bottom:o}=i,{backdropColor:s}=e;if(!j(s)){let i=ey(e.borderRadius),l=ex(e.backdropPadding);t.fillStyle=s;let h=n-l.left,c=r-l.top,u=a-n+l.width,d=o-r+l.height;Object.values(i).some(t=>0!==t)?(t.beginPath(),ef(t,{x:h,y:c,w:u,h:d,radius:i}),t.fill()):t.fillRect(h,c,u,d)}}(i,a,e);let o=e_(a.font),{x:s,y:l,textAlign:h}=e;ed(i,t._pointLabels[r],s,l+o.lineHeight/2,o,{color:a.color,textAlign:h,textBaseline:"middle"})}}(this,l),o.display&&this.ticks.forEach((t,i)=>{if(0!==i){e=this.getDistanceFromCenterForValue(t.value);let n=this.getContext(i),r=o.setContext(n),a=s.setContext(n);!function(t,e,i,n,r){let a=t.ctx,o=e.circular,{color:s,lineWidth:l}=e;(o||n)&&s&&l&&!(i<0)&&(a.save(),a.strokeStyle=s,a.lineWidth=l,a.setLineDash(r.dash),a.lineDashOffset=r.dashOffset,a.beginPath(),rR(t,i,o,n),a.closePath(),a.stroke(),a.restore())}(this,r,e,l,a)}}),a.display){for(n.save(),t=l-1;t>=0;t--){let o=a.setContext(this.getPointLabelContext(t)),{color:s,lineWidth:l}=o;l&&s&&(n.lineWidth=l,n.strokeStyle=s,n.setLineDash(o.borderDash),n.lineDashOffset=o.borderDashOffset,e=this.getDistanceFromCenterForValue(r.ticks.reverse?this.min:this.max),i=this.getPointPosition(t,e),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(i.x,i.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){let t,e;let i=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;let a=this.getIndexAngle(0);i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(a),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((a,o)=>{if(0===o&&!n.reverse)return;let s=r.setContext(this.getContext(o)),l=e_(s.font);if(t=this.getDistanceFromCenterForValue(this.ticks[o].value),s.showLabelBackdrop){i.font=l.string,e=i.measureText(a.label).width,i.fillStyle=s.backdropColor;let n=ex(s.backdropPadding);i.fillRect(-e/2-n.left,-t-l.size/2-n.top,e+n.width,l.size+n.height)}ed(i,a.label,0,-t,l,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})}),i.restore()}drawTitle(){}}const rj={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}},rN=/* #__PURE__ */Object.keys(rj);function rH(t,e){return t-e}function rW(t,e){if(j(e))return null;let i=t._adapter,{parser:n,round:r,isoWeekday:a}=t._parseOpts,o=e;return("function"==typeof n&&(o=n(o)),W(o)||(o="string"==typeof n?i.parse(o,n):i.parse(o)),null===o)?null:(r&&(o="week"===r&&(tv(a)||!0===a)?i.startOf(o,"isoWeek",a):i.startOf(o,r)),+o)}function rB(t,e,i,n){let r=rN.length;for(let a=rN.indexOf(t);a=e?i[n]:i[r];t[a]=!0}}else t[e]=!0}function rV(t,e,i){let n,r;let a=[],o={},s=e.length;for(n=0;n=0&&(e[a].major=!0);return e}(t,a,o,i):a}class r$ extends no{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){let i=t.time||(t.time={}),n=this._adapter=new iA._date(t.adapters.date);n.init(e),Z(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:rW(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,i=t.time.unit||"day",{min:n,max:r,minDefined:a,maxDefined:o}=this.getUserBounds();function s(t){a||isNaN(t.min)||(n=Math.min(n,t.min)),o||isNaN(t.max)||(r=Math.max(r,t.max))}a&&o||(s(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&s(this.getMinMax(!1))),n=W(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=W(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){let t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);let r=this.min,a=this.max,o=/** + * Return subset of `values` between `min` and `max` inclusive. + * Values are assumed to be in sorted order. + * @param values - sorted array of values + * @param min - min value + * @param max - max value + */function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=rN.indexOf(i);a--){let i=rN[a];if(rj[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return rN[i?rN.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=rN.indexOf(t)+1,i=rN.length;e+t.value))}initOffsets(t=[]){let e,i,n=0,r=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),r=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;n=tk(n,0,a),r=tk(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){let t,e;let i=this._adapter,n=this.min,r=this.max,a=this.options,o=a.time,s=o.unit||rB(o.minUnit,n,r,this._getLabelCapacity(n)),l=z(a.ticks.stepSize,1),h="week"===s&&o.isoWeekday,c=tv(h)||!0===h,u={},d=n;if(c&&(d=+i.startOf(d,"isoWeek",h)),d=+i.startOf(d,c?"day":s),i.diff(r,n,s)>1e5*l)throw Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+s);let f="data"===a.ticks.source&&this.getDataTimestamps();for(t=d,e=0;t+t)}getLabelForValue(t){let e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){let i=this.options,n=i.time.displayFormats,r=this._unit,a=e||n[r];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,n){let r=this.options,a=r.ticks.callback;if(a)return q(a,[t,e,i],this);let o=r.time.displayFormats,s=this._unit,l=this._majorUnit,h=s&&o[s],c=l&&o[l],u=i[e],d=l&&c&&u&&u.major;return this._adapter.format(t,n||(d?c:h))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?o:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;let n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[s].pos&&e<=t[l].pos&&({lo:s,hi:l}=tP(t,"pos",e)),{pos:n,time:a}=t[s],{pos:r,time:o}=t[l]):(e>=t[s].time&&e<=t[l].time&&({lo:s,hi:l}=tP(t,"time",e)),{time:n,pos:a}=t[s],{time:r,pos:o}=t[l]);let h=r-n;return h?a+(o-a)*(e-n)/h:a}class rU extends r${static id="timeseries";static defaults=r$.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=rq(e,this.min),this._tableRange=rq(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let e,i,n;let{min:r,max:a}=this,o=[],s=[];for(e=0,i=t.length;e=r&&n<=a&&o.push(n);if(o.length<2)return[{time:r,pos:0},{time:a,pos:1}];for(e=0,i=o.length;et-e)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t}getDecimalForValue(t){return(rq(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return rq(this._table,i*this._tableRange+this._minPos,!0)}}var rX=/*#__PURE__*/Object.freeze({__proto__:null,CategoryScale:class extends no{static id="category";static defaults={ticks:{callback:rD}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let t=this.getLabels();for(let{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(j(t))return null;let i=this.getLabels();return rS(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){let r=t.indexOf(e);if(-1===r)return rw(t,e,i,n);let a=t.lastIndexOf(e);return r!==a?i:r}(i,t,z(e,t),this._addedLabels),i.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:i,max:n}=this.getMinMax(!0);"ticks"!==this.options.bounds||(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){let t=this.min,e=this.max,i=this.options.offset,n=[],r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){return rD.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:rk,LogarithmicScale:rE,RadialLinearScale:rF,TimeScale:r$,TimeSeriesScale:rU});const rY=[iT,nG,r_,rX];nE.register(...rY);/*! DataTables Bootstrap 3 integration + * ©2011-2015 SpryMedia Ltd - datatables.net/license + */var rJ={};t0="undefined"!=typeof window?window:rJ,t1=function(t,e){var i,n=[],r=Object.getPrototypeOf,a=n.slice,o=n.flat?function(t){return n.flat.call(t)}:function(t){return n.concat.apply([],t)},s=n.push,l=n.indexOf,h={},c=h.toString,u=h.hasOwnProperty,d=u.toString,f=d.call(Object),p={},g=function(t){// Support: Chrome <=57, Firefox <=52 +// In some browsers, typeof returns "function" for HTML elements +// (i.e., `typeof document.createElement( "object" ) === "function"`). +// We don't want to classify *any* DOM node as a function. +// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 +// Plus for old WebKit, typeof returns "function" for HTML collections +// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) +return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},m=function(t){return null!=t&&t===t.window},b=t.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(t,e,i){var n,r,a=(i=i||b).createElement("script");if(a.text=t,e)for(n in v)// Support: Firefox 64+, Edge 18+ +// Some browsers don't support the "nonce" property on scripts. +// On the other hand, just using `getAttribute` is not enough as +// the `nonce` attribute is reset to an empty string whenever it +// becomes browsing-context connected. +// See https://github.com/whatwg/html/issues/2369 +// See https://html.spec.whatwg.org/#nonce-attributes +// The `node.getAttribute` check was added for the sake of +// `jQuery.globalEval` so that it can fake a nonce-containing node +// via an object. +(r=e[n]||e.getAttribute&&e.getAttribute(n))&&a.setAttribute(n,r);i.head.appendChild(a).parentNode.removeChild(a)}function x(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?h[c.call(t)]||"object":typeof t}/* global Symbol */// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module +var _="3.7.1",w=/HTML$/i,S=function(t,e){// The jQuery object is actually just the init constructor 'enhanced' +// Need init if jQuery is called (just allow error to be thrown if not included) +return new S.fn.init(t,e)};function D(t){// Support: real iOS 8.2 only (not reproducible in simulator) +// `in` check used to prevent JIT error (gh-2145) +// hasOwn isn't used here due to false negatives +// regarding Nodelist length in IE +var e=!!t&&"length"in t&&t.length,i=x(t);return!(g(t)||m(t))&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function C(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}S.fn=S.prototype={// The current version of jQuery being used +jquery:_,constructor:S,// The default length of a jQuery object is 0 +length:0,toArray:function(){return a.call(this)},// Get the Nth element in the matched element set OR +// Get the whole matched element set as a clean array +get:function(t){return(// Return all the elements in a clean array +null==t?a.call(this):t<0?this[t+this.length]:this[t])},// Take an array of elements and push it onto the stack +// (returning the new matched element set) +pushStack:function(t){// Build a new jQuery matched element set +var e=S.merge(this.constructor(),t);// Return the newly-formed element set +return(// Add the old object onto the stack (as a reference) +e.prevObject=this,e)},// Execute a callback for every element in the matched set. +each:function(t){return S.each(this,t)},map:function(t){return this.pushStack(S.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(t,e){return e%2}))},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i+~]|"+A+")"+A+"*"),B=RegExp(A+"|>"),z=new RegExp(j),V=RegExp("^"+R+"$"),$={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R+"|[*])"),ATTR:RegExp("^"+F),PSEUDO:RegExp("^"+j),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),bool:RegExp("^(?:"+O+")$","i"),// For use in libraries implementing .is() +// We use this for POS matching in `select` +needsContext:RegExp("^"+A+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+A+"*((?:-\\d)?\\d*)"+A+"*\\)|)(?=[^-]|$)","i")},q=/^(?:input|select|textarea|button)$/i,U=/^h\d$/i,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters +J=RegExp("\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\([^\\r\\n\\f])","g"),G=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},// Support: IE 9 - 11+, Edge 12 - 18+ +// Removing the function wrapper causes a "Permission Denied" +// error in IE/Edge. +K=function(){to()},Z=tc(function(t){return!0===t.disabled&&C(t,"fieldset")},{dir:"parentNode",next:"legend"});// Optimize for push.apply( _, NodeList ) +try{v.apply(n=a.call(b.childNodes),b.childNodes),// Support: Android <=4.0 +// Detect silently failing push.apply +// eslint-disable-next-line no-unused-expressions +n[b.childNodes.length].nodeType}catch(t){v={apply:function(t,e){s.apply(t,a.call(e))},call:function(t){s.apply(t,a.call(arguments,1))}}}function Q(t,e,i,n){var r,a,o,s,l,h,u,d=e&&e.ownerDocument,m=e?e.nodeType:9;// Return early from calls with invalid selector or context +if(i=i||[],"string"!=typeof t||!t||1!==m&&9!==m&&11!==m)return i;// Try to shortcut find operations (as opposed to filters) in HTML documents +if(!n&&(to(e),e=e||c,f)){// If the selector is sufficiently simple, try using a "get*By*" DOM method +// (excepting DocumentFragment context, where the methods don't exist) +if(11!==m&&(l=X.exec(t))){// ID selector +if(r=l[1]){// Document context +if(9===m){if(!(o=e.getElementById(r)))return i;if(o.id===r)return v.call(i,o),i;// Element context +}else // getElementById can match elements by name instead of ID +if(d&&(o=d.getElementById(r))&&Q.contains(e,o)&&o.id===r)return v.call(i,o),i}else if(l[2])return v.apply(i,e.getElementsByTagName(t)),i;else if((r=l[3])&&e.getElementsByClassName)return v.apply(i,e.getElementsByClassName(r)),i}// Take advantage of querySelectorAll +if(!E[t+" "]&&(!g||!g.test(t))){// qSA considers elements outside a scoping root when evaluating child or +// descendant combinators, which is not what we want. +// In such cases, we work around the behavior by prefixing every selector in the +// list with an ID selector referencing the scope context. +// The technique has to be used as well when a leading combinator is used +// as such selectors are not recognized by querySelectorAll. +// Thanks to Andrew Dupont for this technique. +if(u=t,d=e,1===m&&(B.test(t)||W.test(t))){for(// Expand context for sibling selectors +(d=Y.test(t)&&ta(e.parentNode)||e)==e&&p.scope||((s=e.getAttribute("id"))?s=S.escapeSelector(s):e.setAttribute("id",s=y)),a=// Prefix every selector in the list +(h=tl(t)).length;a--;)h[a]=(s?"#"+s:":scope")+" "+th(h[a]);u=h.join(",")}try{return v.apply(i,d.querySelectorAll(u)),i}catch(e){E(t,!0)}finally{s===y&&e.removeAttribute("id")}}}// All others +return tp(t.replace(P,"$1"),e,i,n)}/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */function tt(){var t=[];function e(n,r){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=r}return e}/** + * Mark a function for special use by jQuery selector module + * @param {Function} fn The function to mark + */function te(t){return t[y]=!0,t}/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */function ti(t){var e=c.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),// release memory in IE +e=null}}/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */function tn(t){// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable +return function(e){// Only certain elements can match :enabled or :disabled +// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled +// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled +if("form"in e)return(// Check for inherited disabledness on relevant non-disabled elements: +// * listed form-associated elements in a disabled fieldset +// https://html.spec.whatwg.org/multipage/forms.html#category-listed +// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled +// * option elements in a disabled optgroup +// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled +// All such elements have a "form" property. +e.parentNode&&!1===e.disabled?// Option elements defer to a parent optgroup if present +"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||// Where there is no isDisabled, check manually +!t!==e.isDisabled&&Z(e)===t:e.disabled===t);return"label"in e&&e.disabled===t}}/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */function tr(t){return te(function(e){return e=+e,te(function(i,n){// Match elements found at the specified indexes +for(var r,a=t([],i.length,e),o=a.length;o--;)i[r=a[o]]&&(i[r]=!(n[r]=i[r]))})})}/** + * Checks a node for validity as a jQuery selector context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */function ta(t){return t&&void 0!==t.getElementsByTagName&&t}/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [node] An element or document object to use to set the document + * @returns {Object} Returns the current document + */function to(t){var e,n=t?t.ownerDocument||t:b;return n!=c&&9===n.nodeType&&n.documentElement&&(d=// Update global variables +(c=n).documentElement,f=!S.isXMLDoc(c),// Support: iOS 7 only, IE 9 - 11+ +// Older browsers didn't support unprefixed `matches`. +m=d.matches||d.webkitMatchesSelector||d.msMatchesSelector,d.msMatchesSelector&&// Support: IE 11+, Edge 17 - 18+ +// IE/Edge sometimes throw a "Permission denied" error when strict-comparing +// two documents; shallow comparisons work. +// eslint-disable-next-line eqeqeq +b!=c&&(e=c.defaultView)&&e.top!==e&&e.addEventListener("unload",K),// Support: IE <10 +// Check if getElementById returns elements by name +// The broken getElementById methods don't pick up programmatically-set names, +// so use a roundabout getElementsByName test +p.getById=ti(function(t){return d.appendChild(t).id=S.expando,!c.getElementsByName||!c.getElementsByName(S.expando).length}),// Support: IE 9 only +// Check to see if it's possible to do matchesSelector +// on a disconnected node. +p.disconnectedMatch=ti(function(t){return m.call(t,"*")}),// Support: IE 9 - 11+, Edge 12 - 18+ +// IE/Edge don't support the :scope pseudo-class. +p.scope=ti(function(){return c.querySelectorAll(":scope")}),// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only +// Make sure the `:has()` argument is parsed unforgivingly. +// We include `*` in the test to detect buggy implementations that are +// _selectively_ forgiving (specifically when the list includes at least +// one valid selector). +// Note that we treat complete lack of support for `:has()` as if it were +// spec-compliant support, which is fine because use of `:has()` in such +// environments will fail in the qSA path and fall back to jQuery traversal +// anyway. +p.cssHas=ti(function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}}),p.getById?(i.filter.ID=function(t){var e=t.replace(J,G);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&f){var i=e.getElementById(t);return i?[i]:[]}}):(i.filter.ID=function(t){var e=t.replace(J,G);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},// Support: IE 6 - 7 only +// getElementById is not reliable as a find shortcut +i.find.ID=function(t,e){if(void 0!==e.getElementById&&f){var i,n,r,a=e.getElementById(t);if(a){if(// Verify the id attribute +(i=a.getAttributeNode("id"))&&i.value===t)return[a];for(// Fall back on getElementsByName +r=e.getElementsByName(t),n=0;a=r[n++];)if((i=a.getAttributeNode("id"))&&i.value===t)return[a]}return[]}}),// Tag +i.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},// Class +i.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&f)return e.getElementsByClassName(t)},/* QSA/matchesSelector + ---------------------------------------------------------------------- */// QSA and matchesSelector support +g=[],// Build QSA regex +// Regex strategy adopted from Diego Perini +ti(function(t){var e;d.appendChild(t).innerHTML="",t.querySelectorAll("[selected]").length||g.push("\\["+A+"*(?:value|"+O+")"),t.querySelectorAll("[id~="+y+"-]").length||g.push("~="),t.querySelectorAll("a#"+y+"+*").length||g.push(".#.+[+~]"),t.querySelectorAll(":checked").length||g.push(":checked"),// Support: Windows 8 Native Apps +// The type and name attributes are restricted during .innerHTML assignment +(e=c.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),// Support: IE 9 - 11+ +// IE's :disabled selector does not pick up the children of disabled fieldsets +// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+ +// In some of the document kinds, these selectors wouldn't work natively. +// This is probably OK but for backwards compatibility we want to maintain +// handling them through jQuery traversal in jQuery 3.x. +d.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),// Support: IE 11+, Edge 15 - 18+ +// IE 11/Edge don't find elements on a `[name='']` query in some cases. +// Adding a temporary attribute to the document before the selection works +// around the issue. +// Interestingly, IE 10 & older don't seem to have the issue. +(e=c.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||g.push("\\["+A+"*name"+A+"*="+A+"*(?:''|\"\")")}),p.cssHas||// Our regular `try-catch` mechanism fails to detect natively-unsupported +// pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`) +// in browsers that parse the `:has()` argument as a forgiving selector list. +// https://drafts.csswg.org/selectors/#relational now requires the argument +// to be parsed unforgivingly, but browsers have not yet fully adjusted. +g.push(":has"),g=g.length&&new RegExp(g.join("|")),/* Sorting + ---------------------------------------------------------------------- */// Document order sorting +I=function(t,e){// Flag for duplicate removal +if(t===e)return h=!0,0;// Sort on method existence if only one input has compareDocumentPosition +var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&// Calculate position if both inputs belong to the same document +// Support: IE 11+, Edge 17 - 18+ +// IE/Edge sometimes throw a "Permission denied" error when strict-comparing +// two documents; shallow comparisons work. +// eslint-disable-next-line eqeqeq +(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!p.sortDetached&&e.compareDocumentPosition(t)===i?// Choose the first element that is related to our preferred document +// Support: IE 11+, Edge 17 - 18+ +// IE/Edge sometimes throw a "Permission denied" error when strict-comparing +// two documents; shallow comparisons work. +// eslint-disable-next-line eqeqeq +t===c||t.ownerDocument==b&&Q.contains(b,t)?-1:e===c||e.ownerDocument==b&&Q.contains(b,e)?1:o?l.call(o,t)-l.call(o,e):0:4&i?-1:1)}),c}// Add button/input type pseudos +for(e in Q.matches=function(t,e){return Q(t,null,null,e)},Q.matchesSelector=function(t,e){if(to(t),f&&!E[e+" "]&&(!g||!g.test(e)))try{var i=m.call(t,e);// IE 9's matchesSelector returns false on disconnected nodes +if(i||p.disconnectedMatch||// As well, disconnected nodes are said to be in a document +// fragment in IE 9 +t.document&&11!==t.document.nodeType)return i}catch(t){E(e,!0)}return Q(e,c,null,[t]).length>0},Q.contains=function(t,e){return(t.ownerDocument||t)!=c&&to(t),S.contains(t,e)},Q.attr=function(t,e){// Set document vars if needed +// Support: IE 11+, Edge 17 - 18+ +// IE/Edge sometimes throw a "Permission denied" error when strict-comparing +// two documents; shallow comparisons work. +// eslint-disable-next-line eqeqeq +(t.ownerDocument||t)!=c&&to(t);var n=i.attrHandle[e.toLowerCase()],r=n&&u.call(i.attrHandle,e.toLowerCase())?n(t,e,!f):void 0;return void 0!==r?r:t.getAttribute(e)},Q.error=function(t){throw Error("Syntax error, unrecognized expression: "+t)},/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */S.uniqueSort=function(t){var e,i=[],n=0,r=0;if(// Unless we *know* we can detect duplicates, assume their presence +// +// Support: Android <=4.0+ +// Testing for detecting duplicates is unpredictable so instead assume we can't +// depend on duplicate detection in all browsers without a stable sort. +h=!p.sortStable,o=!p.sortStable&&a.call(t,0),k.call(t,I),h){for(;e=t[r++];)e===t[r]&&(n=i.push(r));for(;n--;)M.call(t,i[n],1)}return(// Clear input after sorting to release objects +// See https://github.com/jquery/sizzle/pull/225 +o=null,t)},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(a.apply(this)))},(i=S.expr={// Can be adjusted by the user +cacheLength:50,createPseudo:te,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(J,G),// Move the given value to match[3] whether quoted or unquoted +t[3]=(t[3]||t[4]||t[5]||"").replace(J,G),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return(/* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Q.error(t[0]),// numeric x and y parameters for Expr.filter.CHILD +// remember that false/true cast respectively to 0/1 +t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Q.error(t[0]),t)},PSEUDO:function(t){var e,i=!t[6]&&t[2];return $.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&z.test(i)&&// Get excess from tokenize (recursively) +(e=tl(i,!0))&&// advance to the next closing parenthesis +(e=i.indexOf(")",i.length-e)-i.length)&&(// excess is a negative index +t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(J,G).toLowerCase();return"*"===t?function(){return!0}:function(t){return C(t,e)}},CLASS:function(t){var e=w[t+" "];return e||(e=RegExp("(^|"+A+")"+t+"("+A+"|$)"),w(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var r=Q.attr(n,t);return null==r?"!="===e:!e||((r+="","="===e)?r===i:"!="===e?r!==i:"^="===e?i&&0===r.indexOf(i):"*="===e?i&&r.indexOf(i)>-1:"$="===e?i&&r.slice(-i.length)===i:"~="===e?(" "+r.replace(N," ")+" ").indexOf(i)>-1:"|="===e&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,r){var a="nth"!==t.slice(0,3),o="last"!==t.slice(-4),s="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var h,c,u,d,f,p=a!==o?"nextSibling":"previousSibling",g=e.parentNode,m=s&&e.nodeName.toLowerCase(),b=!l&&!s,v=!1;if(g){// :(first|last|only)-(child|of-type) +if(a){for(;p;){for(u=e;u=u[p];)if(s?C(u,m):1===u.nodeType)return!1;// Reverse direction for :only-* (if we haven't yet done so) +f=p="only"===t&&!f&&"nextSibling"}return!0}// non-xml :nth-child(...) stores cache data on `parent` +if(f=[o?g.firstChild:g.lastChild],o&&b){for(v=(d=(h=// Seek `elem` from a previously-cached index +(c=g[y]||(g[y]={}))[t]||[])[0]===x&&h[1])&&h[2],u=d&&g.childNodes[d];u=++d&&u&&u[p]||// Fallback to seeking `elem` from the start +(v=d=0)||f.pop();)if(1===u.nodeType&&++v&&u===e){c[t]=[x,d,v];break}}else // xml :nth-child(...) +// or :nth-last-child(...) or :nth(-last)?-of-type(...) +if(b&&(v=d=(h=(c=e[y]||(e[y]={}))[t]||[])[0]===x&&h[1]),!1===v)// Use the same loop as above to seek `elem` from the start +for(;(u=++d&&u&&u[p]||(v=d=0)||f.pop())&&(!((s?C(u,m):1===u.nodeType)&&++v)||(b&&((c=u[y]||(u[y]={}))[t]=[x,v]),u!==e)););return(// Incorporate the offset, then check against cycle size +(v-=r)===n||v%n==0&&v/n>=0)}}},PSEUDO:function(t,e){// pseudo-class names are case-insensitive +// https://www.w3.org/TR/selectors/#pseudo-classes +// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters +// Remember that setFilters inherits from pseudos +var n,r=i.pseudos[t]||i.setFilters[t.toLowerCase()]||Q.error("unsupported pseudo: "+t);return(// The user may use createPseudo to indicate that +// arguments are needed to create the filter function +// just as jQuery does +r[y]?r(e):r.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?te(function(t,i){for(var n,a=r(t,e),o=a.length;o--;)n=l.call(t,a[o]),t[n]=!(i[n]=a[o])}):function(t){return r(t,0,n)}):r)}},pseudos:{// Potentially complex pseudos +not:te(function(t){// Trim the selector passed to compile +// to avoid treating leading and trailing +// spaces as combinators +var e=[],i=[],n=tf(t.replace(P,"$1"));return n[y]?te(function(t,e,i,r){// Match elements unmatched by `matcher` +for(var a,o=n(t,null,r,[]),s=t.length;s--;)(a=o[s])&&(t[s]=!(e[s]=a))}):function(t,r,a){return e[0]=t,n(e,null,a,i),// Don't keep the element +// (see https://github.com/jquery/sizzle/issues/299) +e[0]=null,!i.pop()}}),has:te(function(t){return function(e){return Q(t,e).length>0}}),contains:te(function(t){return t=t.replace(J,G),function(e){return(e.textContent||S.text(e)).indexOf(t)>-1}}),// "Whether an element is represented by a :lang() selector +// is based solely on the element's language value +// being equal to the identifier C, +// or beginning with the identifier C immediately followed by "-". +// The matching of C against the element's language value is performed case-insensitively. +// The identifier C does not have to be a valid language name." +// https://www.w3.org/TR/selectors/#lang-pseudo +lang:te(function(t){return V.test(t||"")||Q.error("unsupported lang: "+t),t=t.replace(J,G).toLowerCase(),function(e){var i;do if(i=f?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType)return!1}}),// Miscellaneous +target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===d},focus:function(t){return t===// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function(){try{return c.activeElement}catch(t){}}()&&c.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},// Boolean properties +enabled:tn(!1),disabled:tn(!0),checked:function(t){// In CSS3, :checked should return both checked and selected elements +// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked +return C(t,"input")&&!!t.checked||C(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},// Contents +empty:function(t){// https://www.w3.org/TR/selectors/#empty-pseudo +// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), +// but not by others (comment: 8; processing instruction: 7; etc.) +// nodeType < 6 works because attributes (2) do not appear as children +for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},// Element/input types +header:function(t){return U.test(t.nodeName)},input:function(t){return q.test(t.nodeName)},button:function(t){return C(t,"input")&&"button"===t.type||C(t,"button")},text:function(t){var e;return C(t,"input")&&"text"===t.type&&// Support: IE <10 only +// New HTML5 attribute values (e.g., "search") appear +// with elem.type === "text" +(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},// Position-in-collection +first:tr(function(){return[0]}),last:tr(function(t,e){return[e-1]}),eq:tr(function(t,e,i){return[i<0?i+e:i]}),even:tr(function(t,e){for(var i=0;ie?e:i;--n>=0;)t.push(n);return t}),gt:tr(function(t,e,i){for(var n=i<0?i+e:i;++n1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function td(t,e,i,n,r){for(var a,o=[],s=0,l=t.length,h=null!=e;s-1},c,!0),p=[function(t,e,i){// Support: IE 11+, Edge 17 - 18+ +// IE/Edge sometimes throw a "Permission denied" error when strict-comparing +// two documents; shallow comparisons work. +// eslint-disable-next-line eqeqeq +var a=!h&&(i||e!=r)||((n=e).nodeType?d(t,e,i):f(t,e,i));return(// Avoid hanging onto element +// (see https://github.com/jquery/sizzle/issues/299) +n=null,a)}];u-1&&(t[c]=!(o[c]=d))}}else f=td(f===o?f.splice(m,f.length):f),a?a(null,o,f,h):v.apply(o,f)})}(u>1&&tu(p),u>1&&th(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(P,"$1"),a,u0,a=u.length>0,o=function(t,e,o,s,l){var d,p,g,m=0,b="0",y=t&&[],_=[],w=r,D=t||a&&i.find.TAG("*",l),C=x+=null==w?1:Math.random()||.1,k=D.length;// Add elements passing elementMatchers directly to results +// Support: iOS <=7 - 9 only +// Tolerate NodeList properties (IE: "length"; Safari: ) matching +// elements by id. (see trac-14142) +for(l&&// IE/Edge sometimes throw a "Permission denied" error when strict-comparing +// two documents; shallow comparisons work. +// eslint-disable-next-line eqeqeq +(r=e==c||e||l);b!==k&&null!=(d=D[b]);b++){if(a&&d){for(p=0,e||d.ownerDocument==c||(to(d),o=!f);g=u[p++];)if(g(d,e||c,o)){v.call(s,d);break}l&&(x=C)}// Track unmatched elements for set filters +n&&((d=!g&&d)&&m--,t&&y.push(d))}// Apply set filters to unmatched elements +// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` +// equals `i`), unless we didn't visit _any_ elements in the above loop because we have +// no element matchers and no seed. +// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that +// case, which will result in a "00" `matchedCount` that differs from `i` but is also +// numerically zero. +if(// `i` is now the count of elements visited above, and adding it to `matchedCount` +// makes the latter nonnegative. +m+=b,n&&b!==m){for(p=0;g=h[p++];)g(y,_,e,o);if(t){// Reintegrate element matches to eliminate the need for sorting +if(m>0)for(;b--;)y[b]||_[b]||(_[b]=T.call(s));// Discard index placeholder values to get only actual matches +_=td(_)}// Add matches to results +v.apply(s,_),l&&!t&&_.length>0&&m+h.length>1&&S.uniqueSort(s)}return l&&(x=C,r=w),y},n?te(o):o))).selector=t}return d}/** + * A low-level selection function that works with jQuery's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with jQuery selector compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */function tp(t,e,n,r){var a,o,s,l,h,c="function"==typeof t&&t,u=!r&&tl(t=c.selector||t);// Try to minimize operations if there is only one selector in the list and no seed +// (the latter of which guarantees us context) +if(n=n||[],1===u.length){if(// Reduce context if the leading compound selector is an ID +(o=u[0]=u[0].slice(0)).length>2&&"ID"===(s=o[0]).type&&9===e.nodeType&&f&&i.relative[o[1].type]){if(!(e=(i.find.ID(s.matches[0].replace(J,G),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(// Fetch a seed set for right-to-left matching +a=$.needsContext.test(t)?0:o.length;// Abort if we hit a combinator +a--&&(s=o[a],!i.relative[l=s.type]);)if((h=i.find[l])&&(r=h(s.matches[0].replace(J,G),Y.test(o[0].type)&&ta(e.parentNode)||e))){if(// If seed is empty or no tokens remain, we can return early +o.splice(a,1),!(t=r.length&&th(o)))return v.apply(n,r),n;break}}return(// Compile and execute a filtering function if one is not provided +// Provide `match` to avoid retokenization if we modified the selector above +(c||tf(t,u))(r,e,!f,n,!e||Y.test(t)&&ta(e.parentNode)||e),n)}ts.prototype=i.filters=i.pseudos,i.setFilters=new ts,// One-time assignments +// Support: Android <=4.0 - 4.1+ +// Sort stability +p.sortStable=y.split("").sort(I).join("")===y,// Initialize against the default document +to(),// Support: Android <=4.0 - 4.1+ +// Detached nodes confoundingly follow *each other* +p.sortDetached=ti(function(t){// Should return 1, but returns 4 (following) +return 1&t.compareDocumentPosition(c.createElement("fieldset"))}),S.find=Q,// Deprecated +S.expr[":"]=S.expr.pseudos,S.unique=S.uniqueSort,// These have always been private, but they used to be documented as part of +// Sizzle so let's maintain them for now for backwards compatibility purposes. +Q.compile=tf,Q.select=tp,Q.setDocument=to,Q.tokenize=tl,Q.escape=S.escapeSelector,Q.getText=S.text,Q.isXML=S.isXMLDoc,Q.selectors=S.expr,Q.support=S.support,Q.uniqueSort=S.uniqueSort;/* eslint-enable */}();var I=function(t,e,i){for(var n=[],r=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&S(t).is(i))break;n.push(t)}return n},O=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},R=S.expr.match.needsContext,F=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;// Implement the identical functionality for filter and not +function j(t,e,i){return g(e)?S.grep(t,function(t,n){return!!e.call(t,n,t)!==i}):e.nodeType?S.grep(t,function(t){return t===e!==i}):"string"!=typeof e?S.grep(t,function(t){return l.call(e,t)>-1!==i}):S.filter(e,t,i)}S.filter=function(t,e,i){var n=e[0];return(i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType)?S.find.matchesSelector(n,t)?[n]:[]:S.find.matches(t,S.grep(e,function(t){return 1===t.nodeType}))},S.fn.extend({find:function(t){var e,i,n=this.length,r=this;if("string"!=typeof t)return this.pushStack(S(t).filter(function(){for(e=0;e1?S.uniqueSort(i):i},filter:function(t){return this.pushStack(j(this,t||[],!1))},not:function(t){return this.pushStack(j(this,t||[],!0))},is:function(t){return!!j(this,// so $("p:first").is("p:last") won't return true for a doc with two "p". +"string"==typeof t&&R.test(t)?S(t):t||[],!1).length}});// Initialize a jQuery object +// A central reference to the root jQuery(document) +var N,// Prioritize #id over to avoid XSS via location.hash (trac-9521) +// Strict HTML recognition (trac-11290: must start with <) +// Shortcut simple #id case for speed +H=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;// Give the init function the jQuery prototype for later instantiation +(S.fn.init=function(t,e,i){var n,r;// HANDLE: $(""), $(null), $(undefined), $(false) +if(!t)return this;// Handle HTML strings +if(// Method init() accepts an alternate rootjQuery +// so migrate can support jQuery.sub (gh-2101) +i=i||N,"string"==typeof t){// Match html or make sure no context is specified for #id +if((n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:H.exec(t))&&(n[1]||!e)){// HANDLE: $(html) -> $(array) +if(!n[1])return(r=b.getElementById(n[2]))&&(// Inject the element directly into the jQuery object +this[0]=r,this.length=1),this;// HANDLE: $(html, props) +if(e=e instanceof S?e[0]:e,// Option to run scripts is true for back-compat +// Intentionally let the error be thrown if parseHTML is not present +S.merge(this,S.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),F.test(n[1])&&S.isPlainObject(e))for(n in e)g(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);// HANDLE: $(DOMElement) +}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==i.ready?i.ready(t):t(S):S.makeArray(t,this)}).prototype=S.fn,// Initialize central reference +N=S(b);var W=/^(?:parents|prev(?:Until|All))/,B={children:!0,contents:!0,next:!0,prev:!0};function z(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}S.fn.extend({has:function(t){var e=S(t,this),i=e.length;return this.filter(function(){for(var t=0;t-1:1===i.nodeType&&S.find.matchesSelector(i,t))){a.push(i);break}}return this.pushStack(a.length>1?S.uniqueSort(a):a)},// Determine the position of an element within the set +index:function(t){return(// No argument, return index in parent +t?"string"==typeof t?l.call(S(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1)},add:function(t,e){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),S.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return I(t,"parentNode")},parentsUntil:function(t,e,i){return I(t,"parentNode",i)},next:function(t){return z(t,"nextSibling")},prev:function(t){return z(t,"previousSibling")},nextAll:function(t){return I(t,"nextSibling")},prevAll:function(t){return I(t,"previousSibling")},nextUntil:function(t,e,i){return I(t,"nextSibling",i)},prevUntil:function(t,e,i){return I(t,"previousSibling",i)},siblings:function(t){return O((t.parentNode||{}).firstChild,t)},children:function(t){return O(t.firstChild)},contents:function(t){return null!=t.contentDocument&&// Support: IE 11+ +// elements with no `data` attribute has an object +// `contentDocument` with a `null` prototype. +r(t.contentDocument)?t.contentDocument:(C(t,"template")&&(t=t.content||t),S.merge([],t.childNodes))}},function(t,e){S.fn[t]=function(i,n){var r=S.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=S.filter(n,r)),this.length>1&&(B[t]||S.uniqueSort(r),W.test(t)&&r.reverse()),this.pushStack(r)}});var V=/[^\x20\t\r\n\f]+/g;function $(t){return t}function q(t){throw t}function U(t,e,i,n){var r;try{// Check for promise aspect first to privilege synchronous behavior +t&&g(r=t.promise)?r.call(t).done(e).fail(i):t&&g(r=t.then)?r.call(t,e,i):// * false: [ value ].slice( 0 ) => resolve( value ) +// * true: [ value ].slice( 1 ) => resolve() +e.apply(void 0,[t].slice(n));// For Promises/A+, convert exceptions into rejections +// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in +// Deferred#then to conditionally suppress rejection. +}catch(t){// Support: Android 4.0 only +// Strict mode functions invoked without .call/.apply get global-object context +i.apply(void 0,[t])}}/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */S.Callbacks=function(t){// Convert options from String-formatted to Object-formatted if needed +// (we check in cache first) +t="string"==typeof t?(e=t,i={},S.each(e.match(V)||[],function(t,e){i[e]=!0}),i):S.extend({},t);var e,i,n,r,a,o,s=[],l=[],h=-1,c=function(){for(// Enforce single-firing +o=o||t.once,// Execute callbacks for all pending executions, +// respecting firingIndex overrides and runtime changes +a=n=!0;l.length;h=-1)for(r=l.shift();++h-1;)s.splice(i,1),i<=h&&h--}),this},// Check if a given callback is in the list. +// If no argument is given, return whether or not list has callbacks attached. +has:function(t){return t?S.inArray(t,s)>-1:s.length>0},// Remove all callbacks from the list +empty:function(){return s&&(s=[]),this},// Disable .fire and .add +// Abort any current/pending executions +// Clear all callbacks and values +disable:function(){return o=l=[],s=r="",this},disabled:function(){return!s},// Disable .fire +// Also disable .add unless we have memory (since it would have no effect) +// Abort any pending executions +lock:function(){return o=l=[],r||n||(s=r=""),this},locked:function(){return!!o},// Call all callbacks with the given context and arguments +fireWith:function(t,e){return o||(e=[t,(e=e||[]).slice?e.slice():e],l.push(e),n||c()),this},// Call all the callbacks with the given arguments +fire:function(){return u.fireWith(this,arguments),this},// To know if the callbacks have already been called at least once +fired:function(){return!!a}};return u},S.extend({Deferred:function(e){var i=[// action, add listener, callbacks, +// ... .then handlers, argument index, [final state] +["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},// Keep pipe for back-compat +pipe:function(){var t=arguments;return S.Deferred(function(e){S.each(i,function(i,n){// Map tuples (progress, done, fail) to arguments (done, fail, progress) +var r=g(t[n[4]])&&t[n[4]];// deferred.progress(function() { bind to newDefer or newDefer.notify }) +// deferred.done(function() { bind to newDefer or newDefer.resolve }) +// deferred.fail(function() { bind to newDefer or newDefer.reject }) +a[n[1]](function(){var t=r&&r.apply(this,arguments);t&&g(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[n[0]+"With"](this,r?[t]:arguments)})}),t=null}).promise()},then:function(e,n,r){var a=0;function o(e,i,n,r){return function(){var s=this,l=arguments,h=function(){var t,h;// Support: Promises/A+ section 2.3.3.3.3 +// https://promisesaplus.com/#point-59 +// Ignore double-resolution attempts +if(!(e=a&&(n!==q&&(s=void 0,l=[t]),i.rejectWith(s,l))}};// Support: Promises/A+ section 2.3.3.3.1 +// https://promisesaplus.com/#point-57 +// Re-resolve promises immediately to dodge false rejection from +// subsequent errors +e?c():(S.Deferred.getErrorHook?c.error=S.Deferred.getErrorHook():S.Deferred.getStackHook&&(c.error=S.Deferred.getStackHook()),t.setTimeout(c))}}return S.Deferred(function(t){// progress_handlers.add( ... ) +i[0][3].add(o(0,t,g(r)?r:$,t.notifyWith)),// fulfilled_handlers.add( ... ) +i[1][3].add(o(0,t,g(e)?e:$)),// rejected_handlers.add( ... ) +i[2][3].add(o(0,t,g(n)?n:q))}).promise()},// Get a promise for this deferred +// If obj is provided, the promise aspect is added to the object +promise:function(t){return null!=t?S.extend(t,r):r}},a={};// All done! +return(// Add list-specific methods +S.each(i,function(t,e){var o=e[2],s=e[5];// promise.progress = list.add +// promise.done = list.add +// promise.fail = list.add +r[e[1]]=o.add,s&&o.add(function(){// state = "resolved" (i.e., fulfilled) +// state = "rejected" +n=s},// fulfilled_callbacks.disable +i[3-t][2].disable,// fulfilled_handlers.disable +i[3-t][3].disable,i[0][2].lock,i[0][3].lock),// progress_handlers.fire +// fulfilled_handlers.fire +// rejected_handlers.fire +o.add(e[3].fire),// deferred.notify = function() { deferred.notifyWith(...) } +// deferred.resolve = function() { deferred.resolveWith(...) } +// deferred.reject = function() { deferred.rejectWith(...) } +a[e[0]]=function(){return a[e[0]+"With"](this===a?void 0:this,arguments),this},// deferred.notifyWith = list.fireWith +// deferred.resolveWith = list.fireWith +// deferred.rejectWith = list.fireWith +a[e[0]+"With"]=o.fireWith}),// Make the deferred a promise +r.promise(a),e&&e.call(a,a),a)},// Deferred helper +when:function(t){var e=arguments.length,i=e,n=Array(i),r=a.call(arguments),o=S.Deferred(),s=function(t){return function(i){n[t]=this,r[t]=arguments.length>1?a.call(arguments):i,--e||o.resolveWith(n,r)}};// Single- and empty arguments are adopted like Promise.resolve +if(e<=1&&(U(t,o.done(s(i)).resolve,o.reject,!e),"pending"===o.state()||g(r[i]&&r[i].then)))return o.then();// Multiple arguments are aggregated like Promise.all array elements +for(;i--;)U(r[i],s(i),o.reject);return o.promise()}});// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var X=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error +// captured before the async barrier to get the original error cause +// which may otherwise be hidden. +S.Deferred.exceptionHook=function(e,i){// Support: IE 8 - 9 only +// Console exists when dev tools are open, which can happen at any time +t.console&&t.console.warn&&e&&X.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,i)},S.readyException=function(e){t.setTimeout(function(){throw e})};// The deferred used on DOM ready +var Y=S.Deferred();// The ready event handler and self cleanup method +function J(){b.removeEventListener("DOMContentLoaded",J),t.removeEventListener("load",J),S.ready()}S.fn.ready=function(t){return Y.then(t)// Wrap jQuery.readyException in a function so that the lookup +// happens at the time of error handling instead of callback +// registration. +.catch(function(t){S.readyException(t)}),this},S.extend({// Is the DOM ready to be used? Set to true once it occurs. +isReady:!1,// A counter to track how many items to wait for before +// the ready event fires. See trac-6781 +readyWait:1,// Handle when the DOM is ready +ready:function(t){// Abort if there are pending holds or we're already ready +!(!0===t?--S.readyWait:S.isReady)&&(// Remember that the DOM is ready +S.isReady=!0,!0!==t&&--S.readyWait>0||// If there are functions bound, to execute +Y.resolveWith(b,[S]))}}),S.ready.then=Y.then,"complete"!==b.readyState&&("loading"===b.readyState||b.documentElement.doScroll)?(// Use the handy event callback +b.addEventListener("DOMContentLoaded",J),// A fallback to window.onload, that will always work +t.addEventListener("load",J)):t.setTimeout(S.ready);// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var G=function(t,e,i,n,r,a,o){var s=0,l=t.length,h=null==i;// Sets many values +if("object"===x(i))for(s in r=!0,i)G(t,e,s,i[s],!0,a,o);else if(void 0!==n&&(r=!0,g(n)||(o=!0),h&&(o?(e.call(t,n),e=null):(h=e,e=function(t,e,i){return h.call(S(t),i)})),e))for(;s1,null,!0))},removeData:function(t){return this.each(function(){tr.remove(this,t)})}}),S.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=tn.get(t,e),i&&(!n||Array.isArray(i)?n=tn.access(t,e,S.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=S.queue(t,e),n=i.length,r=i.shift(),a=S._queueHooks(t,e);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===e&&i.unshift("inprogress"),// Clear up the last queue stop function +delete a.stop,r.call(t,function(){S.dequeue(t,e)},a)),!n&&a&&a.empty.fire()},// Not public - generate a queueHooks object, or return the current one +_queueHooks:function(t,e){var i=e+"queueHooks";return tn.get(t,i)||tn.access(t,i,{empty:S.Callbacks("once memory").add(function(){tn.remove(t,[e+"queue",i])})})}}),S.fn.extend({queue:function(t,e){var i=2;return("string"!=typeof t&&(e=t,t="fx",i--),arguments.length\x20\t\r\n\f]*)/i,tx=/^$|^module$|\/(?:java|ecma)script/i;t3=b.createDocumentFragment().appendChild(b.createElement("div")),// Support: Android 4.0 - 4.3 only +// Check state lost if the name is set (trac-11217) +// Support: Windows Web Apps (WWA) +// `name` and `type` must use .setAttribute for WWA (trac-14901) +(t4=b.createElement("input")).setAttribute("type","radio"),t4.setAttribute("checked","checked"),t4.setAttribute("name","t"),t3.appendChild(t4),// Support: Android <=4.1 only +// Older WebKit doesn't clone checked state correctly in fragments +p.checkClone=t3.cloneNode(!0).cloneNode(!0).lastChild.checked,// Support: IE <=11 only +// Make sure textarea (and checkbox) defaultValue is properly cloned +t3.innerHTML="",p.noCloneChecked=!!t3.cloneNode(!0).lastChild.defaultValue,// Support: IE <=9 only +// IE <=9 replaces ",p.option=!!t3.lastChild;// We have to close these tags to support XHTML (trac-13200) +var t_={// XHTML parsers do not magically insert elements in the +// same way that tag soup parsers do. So we cannot shorten +// this by omitting or other required elements. +thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function tw(t,e){// Support: IE <=9 - 11 only +// Use typeof to avoid zero-argument method invocation on host objects (trac-15151) +var i;return(i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&C(t,e))?S.merge([t],i):i}// Mark scripts as having already been evaluated +function tS(t,e){for(var i=0,n=t.length;i",""]);var tD=/<|&#?\w+;/;function tC(t,e,i,n,r){for(var a,o,s,l,h,c=e.createDocumentFragment(),u=[],d=0,f=t.length;d-1){r&&r.push(a);continue}// Capture executables +if(l=td(a),// Append to fragment +o=tw(c.appendChild(a),"script"),l&&tS(o),i)for(h=0;a=o[h++];)tx.test(a.type||"")&&i.push(a)}return c}var tT=/^([^.]*)(?:\.(.+)|)/;function tk(){return!0}function tM(){return!1}function tA(t,e,i,n,r,a){var o,s;// Types can be a map of types/handlers +if("object"==typeof e){for(s in"string"!=typeof i&&(// ( types-Object, data ) +n=n||i,i=void 0),e)tA(t,s,i,n,e[s],a);return t}if(null==n&&null==r?(// ( types, fn ) +r=i,n=i=void 0):null==r&&("string"==typeof i?(// ( types, selector, fn ) +r=n,n=void 0):(// ( types, data, fn ) +r=n,n=i,i=void 0)),!1===r)r=tM;else if(!r)return t;return 1===a&&(o=r,// Use same guid so caller can remove using origFn +(r=function(t){return(// Can use an empty set, since event contains the info +S().off(t),o.apply(this,arguments))}).guid=o.guid||(o.guid=S.guid++)),t.each(function(){S.event.add(this,e,r,n,i)})}// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function tP(t,e,i){// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add +if(!i){void 0===tn.get(t,e)&&S.event.add(t,e,tk);return}// Register the controller as a special universal handler for all event namespaces +tn.set(t,e,!1),S.event.add(t,e,{namespace:!1,handler:function(t){var i,n=tn.get(this,e);if(1&t.isTrigger&&this[e]){// Interrupt processing of the outer synthetic .trigger()ed event +if(n)(S.event.special[e]||{}).delegateType&&t.stopPropagation();else if(// Store arguments for use when handling the inner native event +// There will always be at least one argument (an event object), so this array +// will not be confused with a leftover capture object. +n=a.call(arguments),tn.set(this,e,n),// Trigger the native event and capture its result +this[e](),i=tn.get(this,e),tn.set(this,e,!1),n!==i)return(// Cancel the outer synthetic event +t.stopImmediatePropagation(),t.preventDefault(),i)}else n&&(// ...and capture the result +tn.set(this,e,S.event.trigger(n[0],n.slice(1),this)),// Abort handling of the native event by all jQuery handlers while allowing +// native handlers on the same element to run. On target, this is achieved +// by stopping immediate propagation just on the jQuery event. However, +// the native event is re-wrapped by a jQuery one on each level of the +// propagation so the only way to stop it for jQuery is to stop it for +// everyone via native `stopPropagation()`. This is not a problem for +// focus/blur which don't bubble, but it does also stop click on checkboxes +// and radios. We accept this limitation. +t.stopPropagation(),t.isImmediatePropagationStopped=tk)}})}/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */S.event={global:{},add:function(t,e,i,n,r){var a,o,s,l,h,c,u,d,f,p,g,m=tn.get(t);// Only attach events to objects that accept data +if(te(t))for(i.handler&&(i=(a=i).handler,r=a.selector),r&&S.find.matchesSelector(tu,r),i.guid||(i.guid=S.guid++),(l=m.events)||(l=m.events=Object.create(null)),(o=m.handle)||(o=m.handle=function(e){// Discard the second event of a jQuery.event.trigger() and +// when an event is called after a page has unloaded +return S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),h=// Handle multiple events separated by a space +(e=(e||"").match(V)||[""]).length;h--;)// There *must* be a type, no attaching namespace-only handlers +f=g=(s=tT.exec(e[h])||[])[1],p=(s[2]||"").split(".").sort(),f&&(// If event changes its type, use the special event handlers for the changed type +u=S.event.special[f]||{},// If selector defined, determine special event api type, otherwise given type +f=(r?u.delegateType:u.bindType)||f,// Update special based on newly reset type +u=S.event.special[f]||{},// handleObj is passed to all event handlers +c=S.extend({type:f,origType:g,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&S.expr.match.needsContext.test(r),namespace:p.join(".")},a),(d=l[f])||((d=l[f]=[]).delegateCount=0,(!u.setup||!1===u.setup.call(t,n,p,o))&&t.addEventListener&&t.addEventListener(f,o)),u.add&&(u.add.call(t,c),c.handler.guid||(c.handler.guid=i.guid)),r?d.splice(d.delegateCount++,0,c):d.push(c),// Keep track of which events have ever been used, for event optimization +S.event.global[f]=!0)},// Detach an event or set of events from an element +remove:function(t,e,i,n,r){var a,o,s,l,h,c,u,d,f,p,g,m=tn.hasData(t)&&tn.get(t);if(m&&(l=m.events)){for(h=// Once for each type.namespace in types; type may be omitted +(e=(e||"").match(V)||[""]).length;h--;){// Unbind all events (on this namespace, if provided) for the element +if(f=g=(s=tT.exec(e[h])||[])[1],p=(s[2]||"").split(".").sort(),!f){for(f in l)S.event.remove(t,f+e[h],i,n,!0);continue}for(u=S.event.special[f]||{},d=l[f=(n?u.delegateType:u.bindType)||f]||[],s=s[2]&&RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),// Remove matching events +o=a=d.length;a--;)c=d[a],(r||g===c.origType)&&(!i||i.guid===c.guid)&&(!s||s.test(c.namespace))&&(!n||n===c.selector||"**"===n&&c.selector)&&(d.splice(a,1),c.selector&&d.delegateCount--,u.remove&&u.remove.call(t,c));o&&!d.length&&(u.teardown&&!1!==u.teardown.call(t,p,m.handle)||S.removeEvent(t,f,m.handle),delete l[f])}S.isEmptyObject(l)&&tn.remove(t,"handle events")}},dispatch:function(t){var e,i,n,r,a,o,s=Array(arguments.length),l=S.event.fix(t),h=(tn.get(this,"events")||Object.create(null))[l.type]||[],c=S.event.special[l.type]||{};for(e=1,// Use the fix-ed jQuery.Event rather than the (read-only) native event +s[0]=l;e instance trees (trac-13180) +h.nodeType&&// Support: Firefox <=42 +// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) +// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click +// Support: IE 11 only +// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) +!("click"===t.type&&t.button>=1)){for(;h!==this;h=h.parentNode||this)// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764) +if(1===h.nodeType&&!("click"===t.type&&!0===h.disabled)){for(i=0,a=[],o={};i-1:S.find(r,this,null,[h]).length),o[r]&&a.push(n);a.length&&s.push({elem:h,handlers:a})}}return(// Add the remaining (directly-bound) handlers +h=this,l\s*$/g;// Prefer a tbody over its parent table for containing new rows +function tO(t,e){return C(t,"table")&&C(11!==e.nodeType?e:e.firstChild,"tr")&&S(t).children("tbody")[0]||t}// Replace/restore the type attribute of script elements for safe DOM manipulation +function tR(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function tF(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function tj(t,e){var i,n,r,a,o,s;if(1===e.nodeType){// 1. Copy private data: events, handlers, etc. +if(tn.hasData(t)&&(s=tn.get(t).events))for(r in tn.remove(e,"handle events"),s)for(i=0,n=s[r].length;i1&&"string"==typeof m&&!p.checkClone&&tE.test(m))return t.each(function(r){var a=t.eq(r);b&&(e[0]=m.call(this,r,a.html())),tN(a,e,i,n)});if(d&&(a=(r=tC(e,t[0].ownerDocument,!1,t,n)).firstChild,1===r.childNodes.length&&(r=a),a||n)){// Use the original fragment for the last item +// instead of the first because it can end up +// being emptied incorrectly in certain situations (trac-8070). +for(l=(s=S.map(tw(r,"script"),tR)).length;u0&&tS(o,!l&&tw(t,"script")),s)},cleanData:function(t){for(var e,i,n,r=S.event.special,a=0;void 0!==(i=t[a]);a++)if(te(i)){if(e=i[tn.expando]){if(e.events)for(n in e.events)r[n]?S.event.remove(i,n):S.removeEvent(i,n,e.handle);// Support: Chrome <=35 - 45+ +// Assign undefined instead of using delete, see Data#remove +i[tn.expando]=void 0}i[tr.expando]&&// Assign undefined instead of using delete, see Data#remove +(i[tr.expando]=void 0)}}}),S.fn.extend({detach:function(t){return tH(this,t,!0)},remove:function(t){return tH(this,t)},text:function(t){return G(this,function(t){return void 0===t?S.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=t)})},null,t,arguments.length)},append:function(){return tN(this,arguments,function(t){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&tO(this,t).appendChild(t)})},prepend:function(){return tN(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=tO(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return tN(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return tN(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(// Prevent memory leaks +S.cleanData(tw(t,!1)),// Remove any remaining nodes +t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return S.clone(this,t,e)})},html:function(t){return G(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;// See if we can take a shortcut and just use innerHTML +if("string"==typeof t&&!tL.test(t)&&!t_[(ty.exec(t)||["",""])[1].toLowerCase()]){t=S.htmlPrefilter(t);try{for(;iS.inArray(this,t)&&(S.cleanData(tw(this)),i&&i.replaceChild(e,this));// Force callback invocation +},t)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){S.fn[t]=function(t){for(var i,n=[],r=S(t),a=r.length-1,o=0;o<=a;o++)i=o===a?this:this.clone(!0),S(r[o])[e](i),// Support: Android <=4.0 only, PhantomJS 1 only +// .get() because push.apply(_, arraylike) throws on ancient WebKit +s.apply(n,i.get());return this.pushStack(n)}});var tW=RegExp("^("+tl+")(?!px)[a-z%]+$","i"),tB=/^--/,tz=function(e){// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150) +// IE throws on elements created in popups +// FF meanwhile throws on frame elements through "defaultView.getComputedStyle" +var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},tV=function(t,e,i){var n,r,a={};// Remember the old values, and insert the new ones +for(r in e)a[r]=t.style[r],t.style[r]=e[r];// Revert the old values +for(r in n=i.call(t),e)t.style[r]=a[r];return n},t$=RegExp(tc.join("|"),"i");function tq(t,e,i){var n,r,a,o,s=tB.test(e),// Retrieving style before computed somehow +// fixes an issue with getting wrong values +// on detached elements +l=t.style;return(i=i||tz(t))&&(// Support: IE <=9 - 11+ +// IE only supports `"float"` in `getPropertyValue`; in computed styles +// it's only available as `"cssFloat"`. We no longer modify properties +// sent to `.css()` apart from camelCasing, so we need to check both. +// Normally, this would create difference in behavior: if +// `getPropertyValue` returns an empty string, the value returned +// by `.css()` would be `undefined`. This is usually the case for +// disconnected elements. However, in IE even disconnected elements +// with no styles return `"none"` for `getPropertyValue( "float" )` +o=i.getPropertyValue(e)||i[e],s&&o&&// Spec requires trimming whitespace for custom properties (gh-4926). +// Firefox only trims leading whitespace. Chrome just collapses +// both leading & trailing whitespace to a single space. +// +// Fall back to `undefined` if empty string returned. +// This collapses a missing definition with property defined +// and set to an empty string but there's no standard API +// allowing us to differentiate them without a performance penalty +// and returning `undefined` aligns with older jQuery. +// +// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED +// as whitespace while CSS does not, but this is not a problem +// because CSS preprocessing replaces them with U+000A LINE FEED +// (which *is* CSS whitespace) +// https://www.w3.org/TR/css-syntax-3/#input-preprocessing +(o=o.replace(P,"$1")||void 0),""!==o||td(t)||(o=S.style(t,e)),!p.pixelBoxStyles()&&tW.test(o)&&t$.test(e)&&(// Remember the original values +n=l.width,r=l.minWidth,a=l.maxWidth,// Put in the new values to get a computed value out +l.minWidth=l.maxWidth=l.width=o,o=i.width,// Revert the changed values +l.width=n,l.minWidth=r,l.maxWidth=a)),void 0!==o?// IE returns zIndex value as an integer. +o+"":o}function tU(t,e){// Define the hook, we'll check on the first run if it's really needed. +return{get:function(){if(t()){// Hook not needed (or it's not possible to use it due +// to missing dependency), remove it. +delete this.get;return}// Hook needed; redefine it so that the support test is not executed again. +return(this.get=e).apply(this,arguments)}}}!function(){// Executing both pixelPosition & boxSizingReliable tests require only one layout +// so they're executed at the same time to save the second computation. +function e(){// This is a singleton, we need to execute it only once +if(c){h.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",tu.appendChild(h).appendChild(c);var e=t.getComputedStyle(c);n="1%"!==e.top,// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 +l=12===i(e.marginLeft),// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 +// Some styles come back with percentage values, even though they shouldn't +c.style.right="60%",o=36===i(e.right),// Support: IE 9 - 11 only +// Detect misreporting of content dimensions for box-sizing:border-box elements +r=36===i(e.width),// Support: IE 9 only +// Detect overflow:scroll screwiness (gh-3699) +// Support: Chrome <=64 +// Don't get tricked when zoom affects offsetWidth (gh-4029) +c.style.position="absolute",a=12===i(c.offsetWidth/3),tu.removeChild(h),// Nullify the div so it wouldn't be stored in the memory and +// it will also be a sign that checks already performed +c=null}}function i(t){return Math.round(parseFloat(t))}var n,r,a,o,s,l,h=b.createElement("div"),c=b.createElement("div");// Finish early in limited (non-browser) environments +c.style&&(// Support: IE <=9 - 11 only +// Style of cloned element affects source element cloned (trac-8908) +c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===c.style.backgroundClip,S.extend(p,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),a},// Support: IE 9 - 11+, Edge 15 - 18+ +// IE/Edge misreport `getComputedStyle` of table rows with width/height +// set in CSS while `offset*` properties report correct values. +// Behavior in IE 9 is more subtle than in newer versions & it passes +// some versions of this test; make sure not to make it pass there! +// +// Support: Firefox 70+ +// Only Firefox includes border widths +// in computed dimensions. (gh-4529) +reliableTrDimensions:function(){var e,i,n,r;return null==s&&(e=b.createElement("table"),i=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",i.style.cssText="box-sizing:content-box;border:1px solid",// Support: Chrome 86+ +// Height set through cssText does not get applied. +// Computed height then comes back as 0. +i.style.height="1px",n.style.height="9px",// Support: Android 8 Chrome 86+ +// In our bodyBackground.html iframe, +// display for all div elements is set to "inline", +// which causes a problem only in Android 8 Chrome 86. +// Ensuring the div is `display: block` +// gets around this issue. +n.style.display="block",tu.appendChild(e).appendChild(i).appendChild(n),s=parseInt((r=t.getComputedStyle(i)).height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===i.offsetHeight,tu.removeChild(e)),s}}))}();var tX=["Webkit","Moz","ms"],tY=b.createElement("div").style,tJ={};// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function tG(t){return S.cssProps[t]||tJ[t]||(t in tY?t:tJ[t]=// Return a vendor-prefixed property or undefined +function(t){for(// Check for vendor prefixed names +var e=t[0].toUpperCase()+t.slice(1),i=tX.length;i--;)if((t=tX[i]+e)in tY)return t}(t)||t)}var // except "table", "table-cell", or "table-caption" +// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display +tK=/^(none|table(?!-c[ea]).+)/,tZ={position:"absolute",visibility:"hidden",display:"block"},tQ={letterSpacing:"0",fontWeight:"400"};function t0(t,e,i){// Any relative (+/-) values have already been +// normalized at this point +var n=th.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function t1(t,e,i,n,r,a){var o="width"===e?1:0,s=0,l=0,h=0;// Adjustment may not be necessary +if(i===(n?"border":"content"))return 0;for(;o<4;o+=2)"margin"===i&&(h+=S.css(t,i+tc[o],!0,r)),n?("content"===i&&(l-=S.css(t,"padding"+tc[o],!0,r)),"margin"!==i&&(l-=S.css(t,"border"+tc[o]+"Width",!0,r))):(// Add padding +l+=S.css(t,"padding"+tc[o],!0,r),"padding"!==i?l+=S.css(t,"border"+tc[o]+"Width",!0,r):s+=S.css(t,"border"+tc[o]+"Width",!0,r));return!n&&a>=0&&// Assuming integer scroll gutter, subtract the rest and round down +(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-a-l-s-.5))||0),l+h}function t2(t,e,i){// Start with computed style +var n=tz(t),r=(!p.boxSizingReliable()||i)&&"border-box"===S.css(t,"boxSizing",!1,n),a=r,o=tq(t,e,n),s="offset"+e[0].toUpperCase()+e.slice(1);// Support: Firefox <=54 +// Return a confounding non-pixel value or feign ignorance, as appropriate. +if(tW.test(o)){if(!i)return o;o="auto"}// Adjust for the element's box model +return(!p.boxSizingReliable()&&r||// Support: IE 10 - 11+, Edge 15 - 18+ +// IE/Edge misreport `getComputedStyle` of table rows with width/height +// set in CSS while `offset*` properties report correct values. +// Interestingly, in some cases IE 9 doesn't suffer from this issue. +!p.reliableTrDimensions()&&C(t,"tr")||// Fall back to offsetWidth/offsetHeight when value is "auto" +// This happens for inline elements with no explicit setting (gh-3571) +"auto"===o||// Support: Android <=4.1 - 4.3 only +// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) +!parseFloat(o)&&"inline"===S.css(t,"display",!1,n))&&// Make sure the element is visible & connected +t.getClientRects().length&&(r="border-box"===S.css(t,"boxSizing",!1,n),// Where available, offsetWidth/offsetHeight approximate border box dimensions. +// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the +// retrieved value as a content box dimension. +(a=s in t)&&(o=t[s])),// Normalize "" and auto +(o=parseFloat(o)||0)+t1(t,e,i||(r?"border":"content"),a,n,o)+"px"}function t5(t,e,i,n,r){return new t5.prototype.init(t,e,i,n,r)}S.extend({// Add in style property hooks for overriding the default +// behavior of getting and setting a style property +cssHooks:{opacity:{get:function(t,e){if(e){// We should always get a number back from opacity +var i=tq(t,"opacity");return""===i?"1":i}}}},// Don't automatically add "px" to these possibly-unitless properties +cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,// SVG-related +fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},// Add in properties whose names you wish to fix before +// setting or getting the value +cssProps:{},// Get and set the style property on a DOM Node +style:function(t,e,i,n){// Don't set styles on text and comment nodes +if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){// Make sure that we're working with the right name +var r,a,o,s=tt(e),l=tB.test(e),h=t.style;// Check if we're setting a value +if(l||(e=tG(s)),// Gets hook for the prefixed version, then unprefixed version +o=S.cssHooks[e]||S.cssHooks[s],void 0===i)return(// If a hook was provided get the non-computed value from there +o&&"get"in o&&void 0!==(r=o.get(t,!1,n))?r:h[e]);// Make sure that null and NaN values aren't set (trac-7116) +"string"==(a=typeof i)&&(r=th.exec(i))&&r[1]&&(i=tg(t,e,r),// Fixes bug trac-9237 +a="number"),null!=i&&i==i&&("number"!==a||l||(i+=r&&r[3]||(S.cssNumber[s]?"":"px")),p.clearCloneStyle||""!==i||0!==e.indexOf("background")||(h[e]="inherit"),o&&"set"in o&&void 0===(i=o.set(t,i,n))||(l?h.setProperty(e,i):h[e]=i))}},css:function(t,e,i,n){var r,a,o,s=tt(e);return(// Make numeric if forced or a qualifier was provided and val looks numeric +(tB.test(e)||(e=tG(s)),// Try prefixed name followed by the unprefixed name +(o=S.cssHooks[e]||S.cssHooks[s])&&"get"in o&&(r=o.get(t,!0,i)),void 0===r&&(r=tq(t,e,n)),"normal"===r&&e in tQ&&(r=tQ[e]),""===i||i)?(a=parseFloat(r),!0===i||isFinite(a)?a||0:r):r)}}),S.each(["height","width"],function(t,e){S.cssHooks[e]={get:function(t,i,n){if(i)// but it must have a current display style that would benefit +return!tK.test(S.css(t,"display"))||// Support: Safari 8+ +// Table columns in Safari have non-zero offsetWidth & zero +// getBoundingClientRect().width unless display is changed. +// Support: IE <=11 only +// Running getBoundingClientRect on a disconnected node +// in IE throws an error. +t.getClientRects().length&&t.getBoundingClientRect().width?t2(t,e,n):tV(t,tZ,function(){return t2(t,e,n)})},set:function(t,i,n){var r,a=tz(t),// to avoid forcing a reflow. +o=!p.scrollboxSize()&&"absolute"===a.position,s=(o||n)&&"border-box"===S.css(t,"boxSizing",!1,a),l=n?t1(t,e,n,s,a):0;return s&&o&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(a[e])-t1(t,e,"border",!1,a)-.5)),l&&(r=th.exec(i))&&"px"!==(r[3]||"px")&&(t.style[e]=i,i=S.css(t,e)),t0(t,i,l)}}}),S.cssHooks.marginLeft=tU(p.reliableMarginLeft,function(t,e){if(e)return(parseFloat(tq(t,"marginLeft"))||t.getBoundingClientRect().left-tV(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),// These hooks are used by animate to expand properties +S.each({margin:"",padding:"",border:"Width"},function(t,e){S.cssHooks[t+e]={expand:function(i){for(var n=0,r={},a="string"==typeof i?i.split(" "):[i];n<4;n++)r[t+tc[n]+e]=a[n]||a[n-2]||a[0];return r}},"margin"!==t&&(S.cssHooks[t+e].set=t0)}),S.fn.extend({css:function(t,e){return G(this,function(t,e,i){var n,r,a={},o=0;if(Array.isArray(e)){for(n=tz(t),r=e.length;o1)}}),S.Tween=t5,t5.prototype={constructor:t5,init:function(t,e,i,n,r,a){this.elem=t,this.prop=i,this.easing=r||S.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=a||(S.cssNumber[i]?"":"px")},cur:function(){var t=t5.propHooks[this.prop];return t&&t.get?t.get(this):t5.propHooks._default.get(this)},run:function(t){var e,i=t5.propHooks[this.prop];return this.options.duration?this.pos=e=S.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):t5.propHooks._default.set(this),this}},t5.prototype.init.prototype=t5.prototype,t5.propHooks={_default:{get:function(t){var e;return(// Use a property on the element directly when it is not a DOM element, +// or when there is no matching style property that exists. +1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:// Passing an empty string as a 3rd parameter to .css will automatically +// attempt a parseFloat and fallback to a string if the parse fails. +// Simple values such as "10px" are parsed to Float; +// complex values such as "rotate(1rad)" are returned as-is. +(e=S.css(t.elem,t.prop,""))&&"auto"!==e?e:0)},set:function(t){// Use step hook for back compat. +// Use cssHook if its there. +// Use .style if available and use plain properties where available. +S.fx.step[t.prop]?S.fx.step[t.prop](t):1===t.elem.nodeType&&(S.cssHooks[t.prop]||null!=t.elem.style[tG(t.prop)])?S.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +t5.propHooks.scrollTop=t5.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},S.easing={linear:function(t){return t},swing:function(t){return .5-Math.cos(t*Math.PI)/2},_default:"swing"},S.fx=t5.prototype.init,// Back compat <1.8 extension point +S.fx.step={};var t3,t4,t8,t6,t9=/^(?:toggle|show|hide)$/,t7=/queueHooks$/;// Animations created synchronously will run synchronously +function et(){return t.setTimeout(function(){t8=void 0}),t8=Date.now()}// Generate parameters to create a standard animation +function ee(t,e){var i,n=0,r={height:t};for(// If we include width, step value is 1 to do all cssExpand values, +// otherwise step value is 2 to skip over Left and Right +e=e?1:0;n<4;n+=2-e)r["margin"+(i=tc[n])]=r["padding"+i]=t;return e&&(r.opacity=r.width=t),r}function ei(t,e,i){for(var n,r=(en.tweeners[e]||[]).concat(en.tweeners["*"]),a=0,o=r.length;a