/*! For license information please see 708.4be1cfd9088aa0dba454.js.LICENSE.txt */ (self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[708],{88143:(t,e,i)=>{"use strict";i.d(e,{Z:()=>Zs});const n="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function o(t,e,i){const o=i||(t=>Array.prototype.slice.call(t));let s=!1,r=[];return function(...i){r=o(i),s||(s=!0,n.call(window,(()=>{s=!1,t.apply(e,r)})))}}const s=t=>"start"===t?"left":"end"===t?"right":"center",r=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function a(){}const l=function(){let t=0;return function(){return t++}}();function h(t){return null==t}function c(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function u(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const d=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function g(t,e){return d(t)?t:e}function f(t,e){return void 0===t?e:t}const p=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function m(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function b(t,e,i,n){let o,s,r;if(c(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;oi;)t=t[e.slice(i,n)],i=n+1,n=R(e,i);return t}function I(t){return t.charAt(0).toUpperCase()+t.slice(1)}const A=t=>void 0!==t,E=t=>"function"==typeof t,O=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},D=Math.PI,F=2*D,T=F+D,L=Number.POSITIVE_INFINITY,V=D/180,z=D/2,N=D/4,B=2*D/3,H=Math.log10,j=Math.sign;function W(t){const e=Math.round(t);t=G(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(H(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function $(t){return!isNaN(parseFloat(t))&&isFinite(t)}function G(t,e,i){return Math.abs(t-e)l&&h=Math.min(e,i)-n&&t<=Math.max(e,i)+n}const nt=t=>0===t||1===t,ot=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*F/i),st=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*F/i)+1,rt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*z),easeOutSine:t=>Math.sin(t*z),easeInOutSine:t=>-.5*(Math.cos(D*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>nt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>nt(t)?t:ot(t,.075,.3),easeOutElastic:t=>nt(t)?t:st(t,.075,.3),easeInOutElastic(t){const e=.1125;return nt(t)?t:t<.5?.5*ot(2*t,e,.45):.5+.5*st(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-rt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*rt.easeInBounce(2*t):.5*rt.easeOutBounce(2*t-1)+.5};function at(t){return t+.5|0}const lt=(t,e,i)=>Math.max(Math.min(t,i),e);function ht(t){return lt(at(2.55*t),0,255)}function ct(t){return lt(at(255*t),0,255)}function ut(t){return lt(at(t/2.55)/100,0,1)}function dt(t){return lt(at(100*t),0,100)}const gt={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},ft=[..."0123456789ABCDEF"],pt=t=>ft[15&t],mt=t=>ft[(240&t)>>4]+ft[15&t],bt=t=>(240&t)>>4==(15&t);const vt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function xt(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function yt(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function _t(t,e,i){const n=xt(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function wt(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),r=(o+s)/2;let a,l,h;return o!==s&&(h=o-s,l=r>.5?h/(2-o-s):h/(o+s),a=function(t,e,i,n,o){return t===o?(e-i)/n+(et<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Et=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Ot(t,e,i){if(t){let n=wt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Mt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Dt(t,e){return t?Object.assign(e||{},t):t}function Ft(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=ct(t[3]))):(e=Dt(t,{r:0,g:0,b:0,a:1})).a=ct(e.a),e}function Tt(t){return"r"===t.charAt(0)?function(t){const e=It.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=e[8]?ht(t):lt(255*t,0,255)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?ht(i):lt(i,0,255)),n=255&(e[4]?ht(n):lt(n,0,255)),o=255&(e[6]?ht(o):lt(o,0,255)),{r:i,g:n,b:o,a:s}}}(t):function(t){const e=vt.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?ht(+e[5]):ct(+e[5]));const o=Ct(+e[2]),s=+e[3]/100,r=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return St(_t,t,e,i)}(o,s,r):"hsv"===e[1]?function(t,e,i){return St(yt,t,e,i)}(o,s,r):Mt(o,s,r),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class Lt{constructor(t){if(t instanceof Lt)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=Ft(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===s?17*gt[n[4]]:255}:7!==s&&9!==s||(o={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===s?gt[n[7]]<<4|gt[n[8]]:255})),i=o||function(t){Pt||(Pt=function(){const t={},e=Object.keys(Rt),i=Object.keys(kt);let n,o,s,r,a;for(n=0;n>16&255,s>>8&255,255&s]}return t}(),Pt.transparent=[0,0,0,0]);const e=Pt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Tt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Dt(this._rgb);return t&&(t.a=ut(t.a)),t}set rgb(t){this._rgb=Ft(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ut(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>bt(t.r)&&bt(t.g)&&bt(t.b)&&bt(t.a))(t)?pt:mt,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=wt(t),i=e[0],n=dt(e[1]),o=dt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${ut(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let o;const s=e===o?.5:e,r=2*s-1,a=i.a-n.a,l=((r*a==-1?r:(r+a)/(1+r*a))+1)/2;o=1-l,i.r=255&l*i.r+o*n.r+.5,i.g=255&l*i.g+o*n.g+.5,i.b=255&l*i.b+o*n.b+.5,i.a=s*i.a+(1-s)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=Et(ut(t.r)),o=Et(ut(t.g)),s=Et(ut(t.b));return{r:ct(At(n+i*(Et(ut(e.r))-n))),g:ct(At(o+i*(Et(ut(e.g))-o))),b:ct(At(s+i*(Et(ut(e.b))-s))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Lt(this.rgb)}alpha(t){return this._rgb.a=ct(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=at(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ot(this._rgb,2,t),this}darken(t){return Ot(this._rgb,2,-t),this}saturate(t){return Ot(this._rgb,1,t),this}desaturate(t){return Ot(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=wt(t);i[0]=Ct(i[0]+e),i=Mt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Vt(t){return new Lt(t)}function zt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Nt(t){return zt(t)?t:Vt(t)}function Bt(t){return zt(t)?t:Vt(t).saturate(.5).darken(.1).hexString()}const Ht=Object.create(null),jt=Object.create(null);function Wt(t,e){if(!e)return t;const 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)=>Bt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Bt(e.borderColor),this.hoverColor=(t,e)=>Bt(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)}set(t,e){return $t(this,t,e)}get(t){return Wt(this,t)}describe(t,e){return $t(jt,t,e)}override(t,e){return $t(Ht,t,e)}route(t,e,i,n){const o=Wt(this,t),s=Wt(this,i),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=s[n];return u(t)?Object.assign({},e,t):f(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Ut(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function Yt(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const a=i.length;let l,h,u,d,g;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function Zt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==s.strokeColor;let l,u;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),h(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l+t||0;function ce(t,e){const i={},n=u(e),o=n?Object.keys(e):e,s=u(t)?n?i=>f(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=he(s(t));return i}function ue(t){return ce(t,{top:"y",right:"x",bottom:"y",left:"x"})}function de(t){return ce(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ge(t){const e=ue(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function fe(t,e){t=t||{},e=e||Gt.font;let i=f(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=f(t.style,e.style);n&&!(""+n).match(ae)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:f(t.family,e.family),lineHeight:le(f(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:f(t.weight,e.weight),string:""};return o.string=function(t){return!t||h(t.size)||h(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(o),o}function pe(t,e,i,n){let o,s,r,a=!0;for(o=0,s=t.length;ot[i]1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const ve=(t,e,i)=>be(t,i,(n=>t[n][e]be(t,i,(n=>t[n][e]>=i)),ye=["push","pop","shift","splice","unshift"];function _e(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(ye.forEach((e=>{delete t[e]})),delete t._chartjs)}function we(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){A(n)||(n=Fe("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>Se([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Pe(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=Fe(ke(s,t),i),A(o))return Re(t,o)?Oe(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Te(t).includes(e),ownKeys:t=>Te(t),set(t,e,i){const n=t._storage||(t._storage=o());return t[e]=n[e]=i,delete t._keys,!0}})}function Me(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ce(t,n),setContext:e=>Me(t,e,i,n),override:o=>Me(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Pe(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:r}=t;let a=n[e];return E(a)&&r.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:r,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);return a.add(t),e=e(s,r||n),a.delete(t),Re(t,e)&&(e=Oe(o._scopes,o,t,e)),e}(e,a,t,i)),c(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:r,_descriptors:a}=i;if(A(s.index)&&n(t))e=e[s.index%e.length];else if(u(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Oe(n,o,t,l);e.push(Me(i,s,r&&r[t],a))}}return e}(e,a,t,r.isIndexable)),Re(e,a)&&(a=Me(a,o,s&&s[e],r)),a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Ce(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:E(i)?i:()=>i,isIndexable:E(n)?n:()=>n}}const ke=(t,e)=>t?t+I(e):e,Re=(t,e)=>u(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Pe(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Ie(t,e,i){return E(t)?t(e,i):t}const Ae=(t,e)=>!0===t?e:"string"==typeof t?P(e,t):void 0;function Ee(t,e,i,n,o){for(const s of e){const e=Ae(i,s);if(e){t.add(e);const s=Ie(e._fallback,i,o);if(A(s)&&s!==i&&s!==n)return s}else if(!1===e&&A(n)&&i!==n)return null}return!1}function Oe(t,e,i,n){const o=e._rootScopes,s=Ie(e._fallback,i,n),r=[...t,...o],a=new Set;a.add(n);let l=De(a,r,i,s||i,n);return null!==l&&(!A(s)||s===i||(l=De(a,r,s,l,n),null!==l))&&Se(Array.from(a),[""],o,s,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];return c(o)&&u(i)?i:o}(e,i,n)))}function De(t,e,i,n,o){for(;i;)i=Ee(t,e,i,n,o);return i}function Fe(t,e){for(const i of e){if(!i)continue;const e=i[t];if(A(e))return e}}function Te(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function Le(t,e,i,n){const{iScale:o}=t,{key:s="r"}=this._parsing,r=new Array(n);let a,l,h,c;for(a=0,l=n;ae"x"===t?"y":"x";function Be(t,e,i,n){const o=t.skip?e:t,s=e,r=i.skip?e:i,a=K(s,o),l=K(r,s);let h=a/(a+l),c=l/(a+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const u=n*h,d=n*c;return{previous:{x:s.x-u*(r.x-o.x),y:s.y-u*(r.y-o.y)},next:{x:s.x+d*(r.x-o.x),y:s.y+d*(r.y-o.y)}}}function He(t,e,i){return Math.max(Math.min(t,i),e)}function je(t,e,i,n,o){let s,r,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Ne(e),n=t.length,o=Array(n).fill(0),s=Array(n);let r,a,l,h=ze(t,0);for(r=0;rwindow.getComputedStyle(t,null),Ye=["top","right","bottom","left"];function qe(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=Ye[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Xe=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function Je(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,o=Ue(i),s="border-box"===o.boxSizing,r=qe(o,"padding"),a=qe(o,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:o,offsetY:s}=n;let r,a,l=!1;if(Xe(o,s,t.target))r=o,a=s;else{const t=e.getBoundingClientRect();r=n.clientX-t.left,a=n.clientY-t.top,l=!0}return{x:r,y:a,box:l}}(t,i),u=r.left+(c&&a.left),d=r.top+(c&&a.top);let{width:g,height:f}=e;return s&&(g-=r.width+a.width,f-=r.height+a.height),{x:Math.round((l-u)/g*i.width/n),y:Math.round((h-d)/f*i.height/n)}}const Ke=t=>Math.round(10*t)/10;function Ze(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/n;const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||r.height!==o||r.width!==s)&&(t.currentDevicePixelRatio=n,r.height=o,r.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Qe=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ti(t,e){const i=function(t,e){return Ue(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function ei(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ii(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}}function ni(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},r=ei(t,o,i),a=ei(o,s,i),l=ei(s,e,i),h=ei(r,a,i),c=ei(a,l,i);return ei(h,c,i)}const oi=new Map;function si(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=oi.get(i);return n||(n=new Intl.NumberFormat(t,e),oi.set(i,n)),n}(e,i).format(t)}function ri(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ai(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function li(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function hi(t){return"angle"===t?{between:tt,compare:Z,normalize:Q}:{between:it,compare:(t,e)=>t-e,normalize:t=>t}}function ci({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function ui(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,r=e.length,{compare:a,between:l,normalize:h}=hi(n),{start:c,end:u,loop:d,style:g}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:r,normalize:a}=hi(n),l=e.length;let h,c,{start:u,end:d,loop:g}=t;if(g){for(u+=l,d+=l,h=0,c=l;hn({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){this._request||(this._running=!0,this._request=n.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const o=i.items;let s,r=o.length-1,a=!1;for(;r>=0;--r)s=o[r],s._active?(s._total>i.duration&&(i.duration=s._total),s.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),o.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=o.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let 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){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let 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 mi="transparent",bi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Nt(t||mi),o=n.valid&&Nt(e||mi);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class vi{constructor(t,e,i,n){const o=e[i];n=pe([t.to,n,o,t.from]);const s=pe([t.from,o,n]);this._active=!0,this._fn=t.fn||bi[t.type||typeof s],this._easing=rt[t.easing]||rt.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=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],o=i-this._start,s=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=pe([t.to,e,n,t.from]),this._from=pe([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,o=this._from,s=this._loop,r=this._to;let a;if(this._active=o!==r&&(s||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(o,r,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Gt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Gt.describe("animations",{_fallback:"animation"}),Gt.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}}}});class yi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!u(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!u(n))return;const o={};for(const t of xi)o[t]=n[t];(c(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),r=Date.now();let a;for(a=s.length-1;a>=0;--a){const l=s[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const h=e[l];let c=o[l];const u=i.get(l);if(c){if(u&&c.active()){c.update(u,h,r);continue}c.cancel()}u&&u.duration?(o[l]=c=new vi(u,t,l,h),n.push(c)):t[l]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(pi.add(this._chart,i),!0):void 0}}function _i(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function wi(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o0||!i&&e<0)return o.index}return null}function Ri(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:r,index:a}=n,l=s.axis,h=r.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,r,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Ii(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const Ai=t=>"reset"===t||"none"===t,Ei=(t,e)=>e?t:Object.assign({},t);class Oi{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.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Mi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Ii(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,o=e.xAxisID=f(i.xAxisID,Pi(t,"x")),s=e.yAxisID=f(i.yAxisID,Pi(t,"y")),r=e.rAxisID=f(i.rAxisID,Pi(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,o,s,r),h=e.vAxisID=n(a,s,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(r),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){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&_e(this._data,this),t._stacked&&Ii(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(u(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n{const e="_onData"+I(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const o=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),o}})})))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Mi(e.vScale,e),e.stack!==i.stack&&(n=!0,Ii(e),e.stack=i.stack),this._resyncElements(t),(n||o!==e._stacked)&&Ri(this,e._parsed)}configure(){const 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){const{_cachedMeta:i,_data:n}=this,{iScale:o,_stacked:s}=i,r=o.axis;let a,l,h,d=0===t&&e===n.length||i._sorted,g=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,h=n;else{h=c(n[t])?this.parseArrayData(i,n,t,e):u(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const o=()=>null===l[r]||g&&l[r]t&&!e.hidden&&e._stacked&&{keys:wi(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(r);let u,g;function f(){g=n[u];const e=g[r.axis];return!d(g[t.axis])||h>e||c=0;--u)if(!f()){this.updateRangeFromParsed(l,t,g,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n=0&&tthis.getContext(i,n)),c);return g.$shared&&(g.$shared=a,o[s]=Object.freeze(Ei(g,a))),g}_resolveAnimations(t,e,i){const n=this.chart,o=this._cachedDataOpts,s=`animation-${e}`,r=o[s];if(r)return r;let a;if(!1!==n.options.animation){const n=this.chart.config,o=n.datasetAnimationScopeKeys(this._type,e),s=n.getOptionScopes(this.getDataset(),o);a=n.createResolver(s,this.getContext(t,i,e))}const l=new yi(n,a&&a.animations);return a&&a._cacheable&&(o[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ai(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(i),s=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:s}}updateElement(t,e,i,n){Ai(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Ai(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,o=e.length,s=Math.min(o,n);s&&this.parse(0,s),o>n?this._insertElements(n,o-n,t):o{for(t.length+=e,r=t.length-1;r>=s;r--)t[r]=t[r-e]};for(a(o),r=t;rt-e)))}return t._cache.$bar}(e,t.type);let n,o,s,r,a=e._length;const l=()=>{32767!==s&&-32768!==s&&(A(r)&&(a=Math.min(a,Math.abs(s-r)||a)),r=s)};for(n=0,o=i.length;nMath.abs(a)&&(l=a,h=r),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:o,end:s,min:r,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Ti(t,e,i,n){const o=t.iScale,s=t.vScale,r=o.getLabels(),a=o===s,l=[];let h,c,u,d;for(h=i,c=i+n;ht.x,i="left",n="right"):(e=t.baset.controller.options.grouped)),o=i.options.stacked,s=[],r=t=>{const i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if(h(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!r(i))&&((!1===o||-1===s.indexOf(i.stack)||void 0===o&&void 0===i.stack)&&s.push(i.stack),i.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let o,s;for(o=0,s=e.data.length;o=i?1:-1)}(u,e,s)*o,d===s&&(m-=u/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),n=Math.min(t,i),r=Math.max(t,i);m=Math.max(Math.min(m,r),n),c=m+u}if(m===e.getPixelForValue(s)){const t=j(u)*e.getLineWidthForValue(s)/2;m+=t,u-=t}return{size:u,base:m,head:c,center:c+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,o=n.skipNull,s=f(n.maxBarThickness,1/0);let r,a;if(e.grouped){const i=o?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let r=t>0?o[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),r=n.getLabelForValue(o.y),a=o._custom;return{label:e.label,value:"("+s+", "+r+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o="reset"===n,{iScale:s,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,n),h=s.axis,c=r.axis;for(let u=e;u""}}}};class Wi extends Oi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let o,s,r=t=>+i[t];if(u(i[t])){const{key:t="value"}=this._parsing;r=e=>+P(i[e],t)}for(o=t,s=t+e;ott(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>tt(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),p=g(0,h,u),m=g(z,c,d),b=f(D,h,u),v=f(D+z,c,d);n=(p-b)/2,o=(m-v)/2,s=-(p+b)/2,r=-(m+v)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:r}}(d,u,a),v=(i.width-s)/g,x=(i.height-s)/f,y=Math.max(Math.min(v,x)/2,0),_=p(this.options.radius,y),w=(_-Math.max(_*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*_,this.offsetY=b*_,n.total=this.calculateTotal(),this.outerRadius=_-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,o=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]*o/F)}updateElements(t,e,i,n){const o="reset"===n,s=this.chart,r=s.chartArea,a=s.options.animation,l=(r.left+r.right)/2,h=(r.top+r.bottom)/2,c=o&&a.animateScale,u=c?0:this.innerRadius,d=c?0:this.outerRadius,{sharedOptions:g,includeOptions:f}=this._getSharedOptions(e,n);let p,m=this._getRotation();for(p=0;p0&&!isNaN(t)?F*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=si(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,o,s,r,a;if(!t)for(n=0,o=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Wi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return c(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class $i extends Oi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:o}=e,s=this.chart._animationsDisabled;let{start:r,count:a}=function(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:r,_parsed:a}=t,l=r.axis,{min:h,max:c,minDefined:u,maxDefined:d}=r.getUserBounds();u&&(o=et(Math.min(ve(a,r.axis,h).lo,i?n:ve(e,l,r.getPixelForValue(h)).lo),0,n-1)),s=d?et(Math.max(ve(a,r.axis,c).hi+1,i?0:ve(e,l,r.getPixelForValue(c)).hi+1),o,n)-o:n-o}return{start:o,count:s}}(e,n,s);this._drawStart=r,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}(e)&&(r=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},t),this.updateElements(n,r,a,t)}updateElements(t,e,i,n){const o="reset"===n,{iScale:s,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,n),d=s.axis,g=r.axis,{spanGaps:f,segment:p}=this.options,m=$(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||"none"===n;let v=e>0&&this.getParsed(e-1);for(let f=e;f0&&Math.abs(i[d]-v[d])>m,p&&(x.parsed=i,x.raw=l.data[f]),u&&(x.options=c||this.resolveDataElementOptions(f,e.active?"active":n)),b||this.updateElement(e,f,x,n),v=i}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}$i.id="line",$i.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},$i.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Gi extends Oi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=si(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}parseObjectData(t,e,i,n){return Le.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(ne.max&&(e.max=n))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(n/2,0),s=(o-Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,i,n){const o="reset"===n,s=this.chart,r=s.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,h=a.yCenter,c=a.getIndexAngle(0)-.5*D;let u,d=c;const g=360/this.countVisibleElements();for(u=0;u{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Y(this.resolveDataElementOptions(t,e).angle||i):0}}Gi.id="polarArea",Gi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Gi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Ui extends Wi{}Ui.id="pie",Ui.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Yi extends Oi{getLabelAndValue(t){const 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 Le.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],o=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===n.length,options:e};this.updateElement(i,void 0,s,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const o=this._cachedMeta.rScale,s="reset"===n;for(let r=e;r"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Xi=Object.freeze({__proto__:null,BarController:Hi,BubbleController:ji,DoughnutController:Wi,LineController:$i,PolarAreaController:Gi,PieController:Ui,RadarController:Yi,ScatterController:qi});function Ji(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ki{constructor(t){this.options=t||{}}formats(){return Ji()}parse(t,e){return Ji()}format(t,e){return Ji()}add(t,e,i){return Ji()}diff(t,e,i){return Ji()}startOf(t,e,i){return Ji()}endOf(t,e){return Ji()}}Ki.override=function(t){Object.assign(Ki.prototype,t)};var Zi={_date:Ki};function Qi(t,e,i,n){const{controller:o,data:s,_sorted:r}=t,a=o._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&r&&s.length){const t=a._reversePixels?xe:ve;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),r=t(s,e,i+o);return{lo:n.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function tn(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=s.length;t{t[r](e[i],o)&&(s.push({element:t,datasetIndex:n,index:l}),a=a||t.inRange(e.x,e.y,o))})),n&&!a?[]:s}var sn={evaluateInteractionItems:tn,modes:{index(t,e,i,n){const o=Je(e,t),s=i.axis||"x",r=i.includeInvisible||!1,a=i.intersect?en(t,o,s,n,r):nn(t,o,s,!1,n,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,n){const o=Je(e,t),s=i.axis||"xy",r=i.includeInvisible||!1;let a=i.intersect?en(t,o,s,n,r):nn(t,o,s,!1,n,r);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;ten(t,Je(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const o=Je(e,t),s=i.axis||"xy",r=i.includeInvisible||!1;return nn(t,o,s,i.intersect,n,r)},x:(t,e,i,n)=>on(t,Je(e,t),"x",i.intersect,n),y:(t,e,i,n)=>on(t,Je(e,t),"y",i.intersect,n)}};const rn=["left","top","right","bottom"];function an(t,e){return t.filter((t=>t.pos===e))}function ln(t,e){return t.filter((t=>-1===rn.indexOf(t.pos)&&t.box.axis===e))}function hn(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function cn(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function un(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 dn(t,e,i,n){const{pos:o,box:s}=i,r=t.maxPadding;if(!u(o)){i.size&&(t[o]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[o]+=i.size}s.getPadding&&un(r,s.getPadding());const a=Math.max(0,e.outerWidth-cn(r,t,"left","right")),l=Math.max(0,e.outerHeight-cn(r,t,"top","bottom")),h=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function gn(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}(t?["left","right"]:["top","bottom"])}function fn(t,e,i,n){const o=[];let s,r,a,l,h,c;for(s=0,r=t.length,h=0;st.box.fullSize)),!0),n=hn(an(e,"left"),!0),o=hn(an(e,"right")),s=hn(an(e,"top"),!0),r=hn(an(e,"bottom")),a=ln(e,"x"),l=ln(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(r).concat(a),chartArea:an(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(r).concat(a)}}(t.boxes),l=a.vertical,h=a.horizontal;b(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const 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:o,availableWidth:s,availableHeight:r,vBoxMaxWidth:s/2/c,hBoxMaxHeight:r/2}),d=Object.assign({},o);un(d,ge(n));const g=Object.assign({maxPadding:d,w:s,h:r,x:o.left,y:o.top},o),f=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:o}=i;if(!t||!rn.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;let s,r,a;for(s=0,r=t.length;s{const i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})}))}};class vn{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 xn extends vn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const yn="$chartjs",_n={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},wn=t=>null===t||""===t,Sn=!!Qe&&{passive:!0};function Mn(t,e,i){t.canvas.removeEventListener(e,i,Sn)}function Cn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function kn(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Cn(i.addedNodes,n),e=e&&!Cn(i.removedNodes,n);e&&i()}));return o.observe(document,{childList:!0,subtree:!0}),o}function Rn(t,e,i){const n=t.canvas,o=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Cn(i.removedNodes,n),e=e&&!Cn(i.addedNodes,n);e&&i()}));return o.observe(document,{childList:!0,subtree:!0}),o}const Pn=new Map;let In=0;function An(){const t=window.devicePixelRatio;t!==In&&(In=t,Pn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function En(t,e,i){const n=t.canvas,s=n&&$e(n);if(!s)return;const r=o(((t,e)=>{const n=s.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||r(i,n)}));return a.observe(s),function(t,e){Pn.size||window.addEventListener("resize",An),Pn.set(t,e)}(t,r),a}function On(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Pn.delete(t),Pn.size||window.removeEventListener("resize",An)}(t)}function Dn(t,e,i){const n=t.canvas,s=o((e=>{null!==t.ctx&&i(function(t,e){const i=_n[t.type]||t.type,{x:n,y:o}=Je(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Sn)}(n,e,s),s}class Fn extends vn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[yn]={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",wn(o)){const e=ti(t,"width");void 0!==e&&(t.width=e)}if(wn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ti(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[yn])return!1;const i=e[yn].initial;["height","width"].forEach((t=>{const n=i[t];h(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e[yn],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),o={attach:kn,detach:Rn,resize:En}[e]||Dn;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:On,detach:On,resize:On}[e]||Mn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const o=Ue(t),s=qe(o,"margin"),r=Ge(o.maxWidth,t,"clientWidth")||L,a=Ge(o.maxHeight,t,"clientHeight")||L,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=$e(t);if(s){const t=s.getBoundingClientRect(),r=Ue(s),a=qe(r,"border","width"),l=qe(r,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ge(r.maxWidth,s,"clientWidth"),o=Ge(r.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||L,maxHeight:o||L}}(t,e,i);let{width:h,height:c}=l;if("content-box"===o.boxSizing){const t=qe(o,"border","width"),e=qe(o,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-s.width),c=Math.max(0,n?Math.floor(h/n):c-s.height),h=Ke(Math.min(h,r,l.maxWidth)),c=Ke(Math.min(c,a,l.maxHeight)),h&&!c&&(c=Ke(h/2)),{width:h,height:c}}(t,e,i,n)}isAttached(t){const e=$e(t);return!(!e||!e.isConnected)}}class Tn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return $(this.x)&&$(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Tn.defaults={},Tn.defaultRoutes=void 0;const Ln={values:t=>c(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const r=H(Math.abs(s)),a=Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:o,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),si(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(H(t)));return 1===n||2===n||5===n?Ln.numeric.call(this,t,e,i):""}};var Vn={formatters:Ln};function zn(t,e,i,n,o){const s=f(n,0),r=Math.min(f(o,t.length),t.length);let a,l,h,c=0;for(i=Math.ceil(i),o&&(a=o-n,i=a/Math.floor(a/i)),h=s;h<0;)c++,h=Math.round(s+c*i);for(l=Math.max(s,0);le.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:Vn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Gt.route("scale.ticks","color","","color"),Gt.route("scale.grid","color","","borderColor"),Gt.route("scale.grid","borderColor","","borderColor"),Gt.route("scale.title","color","","color"),Gt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Gt.describe("scales",{_fallback:"scale"}),Gt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Nn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Bn(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;sr+a)))return h}function jn(t){return t.drawTicks?t.tickLength:0}function Wn(t,e){if(!t.display)return 0;const i=fe(t.font,e),n=ge(t.padding);return(c(t.text)?t.text.length:1)*i.lineHeight+n.height}function $n(t,e,i){let n=s(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class Gn extends Tn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=g(t,Number.POSITIVE_INFINITY),e=g(e,Number.NEGATIVE_INFINITY),i=g(i,Number.POSITIVE_INFINITY),n=g(n,Number.NEGATIVE_INFINITY),{min:g(t,i),max:g(e,n),minDefined:d(t),maxDefined:d(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:o,maxDefined:s}=this.getUserBounds();if(o&&s)return{min:i,max:n};const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;an?n:i,n=o&&i>n?i:n,{min:g(i,g(n,i)),max:g(n,g(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(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){m(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:o,ticks:s}=this.options,r=s.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=function(t,e,i){const{min:n,max:o}=t,s=p(e,(o-n)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(n,-Math.abs(s)),max:r(o,s)}}(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=rn)return function(t,e,i,n){let o,s=0,r=i[0];for(n=Math.ceil(n),o=0;ot-e)).pop(),e}(n);for(let t=0,e=s.length-1;to)return e}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((a-r)/(s-1)):null;for(zn(e,l,c,h(n)?0:r-n,r),t=0,i=s-1;t=o||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const h=this._getLabelSizes(),c=h.widest.width,u=h.highest.height,d=et(this.chart.width-c,0,this.maxWidth);s=t.offset?this.maxWidth/i:d/(i-1),c+6>s&&(s=d/(i-(t.offset?.5:1)),r=this.maxHeight-jn(t.grid)-e.padding-Wn(t.title,this.chart.options.font),a=Math.sqrt(c*c+u*u),l=q(Math.min(Math.asin(et((h.highest.height+6)/s,-1,1)),Math.asin(et(r/a,-1,1))-Math.asin(et(u/a,-1,1)))),l=Math.max(n,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){m(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){m(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:o}}=this,s=this._isVisible(),r=this.isHorizontal();if(s){const s=Wn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=jn(o)+s):(t.height=this.maxHeight,t.width=jn(o)+s),i.display&&this.ticks.length){const{first:e,last:n,widest:o,highest:s}=this._getLabelSizes(),a=2*i.padding,l=Y(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(r){const e=i.mirror?0:c*o.width+h*s.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:h*o.width+c*s.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,c,h)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:o,padding:s},position:r}=this.options,a=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,u=0;a?l?(c=n*t.width,u=i*e.height):(c=i*t.height,u=n*e.width):"start"===o?u=e.width:"end"===o?c=t.width:"inner"!==o&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-r+s)*this.width/(this.width-r),0),this.paddingRight=Math.max((u-h+s)*this.width/(this.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===o?(i=0,n=t.height):"end"===o&&(i=e.height,n=0),this.paddingTop=i+s,this.paddingBottom=n+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){m(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o({width:o[t]||0,height:s[t]||0});return{first:M(0),last:M(e-1),widest:M(w),highest:M(S),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return et(this._alignToPixels?qt(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&tr*n?r/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:o,position:s}=n,r=o.offset,a=this.isHorizontal(),l=this.ticks.length+(r?1:0),h=jn(o),c=[],d=o.setContext(this.getContext()),g=d.drawBorder?d.borderWidth:0,p=g/2,m=function(t){return qt(i,t,g)};let b,v,x,y,_,w,S,M,C,k,R,P;if("top"===s)b=m(this.bottom),w=this.bottom-h,M=b-p,k=m(t.top)+p,P=t.bottom;else if("bottom"===s)b=m(this.top),k=t.top,P=m(t.bottom)-p,w=b+p,M=this.top+h;else if("left"===s)b=m(this.right),_=this.right-h,S=b-p,C=m(t.left)+p,R=t.right;else if("right"===s)b=m(this.left),C=t.left,R=m(t.right)-p,_=b+p,S=this.left+h;else if("x"===e){if("center"===s)b=m((t.top+t.bottom)/2+.5);else if(u(s)){const t=Object.keys(s)[0],e=s[t];b=m(this.chart.scales[t].getPixelForValue(e))}k=t.top,P=t.bottom,w=b+p,M=w+h}else if("y"===e){if("center"===s)b=m((t.left+t.right)/2);else if(u(s)){const t=Object.keys(s)[0],e=s[t];b=m(this.chart.scales[t].getPixelForValue(e))}_=b-p,S=_-h,C=t.left,R=t.right}const I=f(n.ticks.maxTicksLimit,l),A=Math.max(1,Math.ceil(l/I));for(v=0;ve.value===t));return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const r=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(o=0,s=n.length;o{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let o,s;for(o=0,s=e.length;o{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),r=e[i].split("."),a=r.pop(),l=r.join(".");Gt.route(s,o,l,a)}))}(e,t.defaultRoutes),t.descriptors&&Gt.describe(e,t.descriptors)}(t,s,i),this.override&&Gt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Gt[n]&&(delete Gt[n][i],this.override&&delete Ht[i])}}var Yn=new class{constructor(){this.controllers=new Un(Oi,"datasets",!0),this.elements=new Un(Tn,"elements"),this.plugins=new Un(Object,"plugins"),this.scales=new Un(Gn,"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=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):b(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=I(t);m(i["before"+n],[],i),e[t](i),m(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 Xn(t,e){return e||!1!==t?!0===t?{}:t:null}function Jn(t,{plugin:e,local:i},n,o){const s=t.pluginScopeKeys(e),r=t.getOptionScopes(n,s);return i&&e.defaults&&r.push(e.defaults),t.createResolver(r,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Kn(t,e){const i=Gt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Zn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Qn(t){const e=t.options||(t.options={});e.plugins=f(e.plugins,{}),e.scales=function(t,e){const i=Ht[t.type]||{scales:{}},n=e.scales||{},o=Kn(t.type,e),s=Object.create(null),r=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!u(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=Zn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,o),h=i.scales||{};s[a]=s[a]||t,r[t]=S(Object.create(null),[{axis:a},e,h[a],h[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,a=i.indexAxis||Kn(o,e),l=(Ht[o]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),o=i[e+"AxisID"]||s[e]||e;r[o]=r[o]||Object.create(null),S(r[o],[{axis:e},n[o],l[t]])}))})),Object.keys(r).forEach((t=>{const e=r[t];S(e,[Gt.scales[e.type],Gt.scale])})),r}(t,e)}function to(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const eo=new Map,io=new Set;function no(t,e){let i=eo.get(t);return i||(i=e(),eo.set(t,i),io.add(i)),i}const oo=(t,e,i)=>{const n=P(e,i);void 0!==n&&t.add(n)};class so{constructor(t){this._config=function(t){return(t=t||{}).data=to(t.data),Qn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=to(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Qn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return no(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return no(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return no(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return no(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,s=this._cachedScopes(t,i),r=s.get(e);if(r)return r;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>oo(a,t,e)))),e.forEach((t=>oo(a,n,t))),e.forEach((t=>oo(a,Ht[o]||{},t))),e.forEach((t=>oo(a,Gt,t))),e.forEach((t=>oo(a,jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),io.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ht[e]||{},Gt.datasets[e]||{},{type:e},Gt,jt]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:r}=ro(this._resolverCache,t,n);let a=s;(function(t,e){const{isScriptable:i,isIndexable:n}=Ce(t);for(const o of e){const e=i(o),s=n(o),r=(s||e)&&t[o];if(e&&(E(r)||ao(r))||s&&c(r))return!0}return!1})(s,e)&&(o.$shared=!1,a=Me(s,i=E(i)?i():i,this.createResolver(t,i,r)));for(const t of e)o[t]=a[t];return o}createResolver(t,e,i=[""],n){const{resolver:o}=ro(this._resolverCache,t,i);return u(e)?Me(o,e,void 0,n):o}}function ro(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);return s||(s={resolver:Se(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)),s}const ao=t=>u(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||E(t[i])),!1),lo=["top","bottom","left","right","chartArea"];function ho(t,e){return"top"===t||"bottom"===t||-1===lo.indexOf(t)&&"x"===e}function co(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function uo(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),m(i&&i.onComplete,[t],e)}function go(t){const e=t.chart,i=e.options.animation;m(i&&i.onProgress,[t],e)}function fo(t){return We()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const po={},mo=t=>{const e=fo(t);return Object.values(po).filter((t=>t.canvas===e)).pop()};function bo(t,e,i){const n=Object.keys(t);for(const o of n){const n=+o;if(n>=e){const s=t[o];delete t[o],(i>0||n>e)&&(t[n+i]=s)}}}class vo{constructor(t,e){const i=this.config=new so(e),n=fo(t),o=mo(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!We()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?xn:Fn}(n)),this.platform.updateConfig(i);const r=this.platform.acquireContext(n,s.aspectRatio),a=r&&r.canvas,h=a&&a.height,c=a&&a.width;this.id=l(),this.ctx=r,this.canvas=a,this.width=c,this.height=h,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new qn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),s.resizeDelay||0),this._dataChanges=[],po[this.id]=this,r&&a?(pi.listen(this,"complete",uo),pi.listen(this,"progress",go),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return h(t)?e&&o?o: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}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ze(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Xt(this.canvas,this.ctx),this}stop(){return pi.stop(this),this}resize(t,e){pi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(n,t,e,o),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Ze(this,r,!0)&&(this.notifyPlugins("resize",{size:s}),m(i.onResize,[this,s],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){b(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let o=[];e&&(o=o.concat(Object.keys(e).map((t=>{const i=e[t],n=Zn(t,i),o="r"===n,s="x"===n;return{options:i,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),b(o,(e=>{const o=e.options,s=o.id,r=Zn(s,o),a=f(o.type,e.dtype);void 0!==o.position&&ho(o.position,r)===ho(e.dposition)||(o.position=e.dposition),n[s]=!0;let l=null;s in i&&i[s].type===a?l=i[s]:(l=new(Yn.getScale(a))({id:s,type:a,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(o,t)})),b(n,((t,e)=>{t||delete i[e]})),b(i,(t=>{bn.configure(this,t,t.options),bn.addBox(this,t)}))}_updateMetasets(){const 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(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const 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;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(co("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){b(this.scales,(t=>{bn.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);O(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:o}of e)bo(t,n,"_removeElements"===i?-o:o)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const 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;bn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],b(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){const e=this.ctx,i=t._clip,n=!i.disabled,o=this.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(n&&Qt(e,{left:!1===i.left?0:o.left-i.left,right:!1===i.right?this.width:o.right+i.right,top:!1===i.top?0:o.top-i.top,bottom:!1===i.bottom?this.height:o.bottom+i.bottom}),t.controller.draw(),n&&te(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Zt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const o=sn.modes[e];return"function"==typeof o?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let 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=me(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,n);A(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(o,{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){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),pi.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)};b(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},o=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",o),i("detach",s)};s=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():s()}unbindEvents(){b(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},b(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,r,a;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),r=0,a=t.length;r{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!v(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,o=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),s=o(e,t),r=i?t:o(t,e);s.length&&this.updateHoverStyle(s,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const 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;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:o}=this,s=e,r=this._getActiveElements(t,n,i,s),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,m(o.onHover,[t,r,this],this),a&&m(o.onClick,[t,r,this],this));const h=!v(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}const xo=()=>b(vo.instances,(t=>t._plugins.invalidate())),yo=!0;function _o(t,e,i){const{startAngle:n,pixelMargin:o,x:s,y:r,outerRadius:a,innerRadius:l}=e;let h=o/a;t.beginPath(),t.arc(s,r,a,n-h,i+h),l>o?(h=o/l,t.arc(s,r,l,i+h,n-h,!0)):t.arc(s,r,o,i+z,n-z),t.closePath(),t.clip()}function wo(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function So(t,e,i,n,o){const{x:s,y:r,startAngle:a,pixelMargin:l,innerRadius:h}=e,c=Math.max(e.outerRadius+n+i-l,0),u=h>0?h+n+i+l:0;let d=0;const g=o-a;if(n){const t=((h>0?h-n:0)+(c>0?c-n:0))/2;d=(g-(0!==t?g*t/(t+n):g))/2}const f=(g-Math.max(.001,g*c-i/D)/c)/2,p=a+f+d,m=o-f-d,{outerStart:b,outerEnd:v,innerStart:x,innerEnd:y}=function(t,e,i,n){const o=ce(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),s=(i-e)/2,r=Math.min(s,n*e/2),a=t=>{const e=(i-Math.min(s,t))*n/2;return et(t,0,Math.min(s,e))};return{outerStart:a(o.outerStart),outerEnd:a(o.outerEnd),innerStart:et(o.innerStart,0,r),innerEnd:et(o.innerEnd,0,r)}}(e,u,c,m-p),_=c-b,w=c-v,S=p+b/_,M=m-v/w,C=u+x,k=u+y,R=p+x/C,P=m-y/k;if(t.beginPath(),t.arc(s,r,c,S,M),v>0){const e=wo(w,M,s,r);t.arc(e.x,e.y,v,M,m+z)}const I=wo(k,m,s,r);if(t.lineTo(I.x,I.y),y>0){const e=wo(k,P,s,r);t.arc(e.x,e.y,y,m+z,P+Math.PI)}if(t.arc(s,r,u,m-y/u,p+x/u,!0),x>0){const e=wo(C,R,s,r);t.arc(e.x,e.y,x,R+Math.PI,p-z)}const A=wo(_,p,s,r);if(t.lineTo(A.x,A.y),b>0){const e=wo(_,S,s,r);t.arc(e.x,e.y,b,p-z,S)}t.closePath()}Object.defineProperties(vo,{defaults:{enumerable:yo,value:Gt},instances:{enumerable:yo,value:po},overrides:{enumerable:yo,value:Ht},registry:{enumerable:yo,value:Yn},version:{enumerable:yo,value:"3.8.2"},getChart:{enumerable:yo,value:mo},register:{enumerable:yo,value:(...t)=>{Yn.add(...t),xo()}},unregister:{enumerable:yo,value:(...t)=>{Yn.remove(...t),xo()}}});class Mo extends Tn{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){const n=this.getProps(["x","y"],i),{angle:o,distance:s}=J(n,{x:t,y:e}),{startAngle:r,endAngle:a,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2,d=f(c,a-r)>=F||tt(o,r,a),g=it(s,l+u,h+u);return d&&g}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,h=(n+o)/2,c=(s+r+l+a)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,o=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>F?Math.floor(i/F):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let s=0;if(n){s=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*s,Math.sin(e)*s),this.circumference>=D&&(s=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const r=function(t,e,i,n){const{fullCircles:o,startAngle:s,circumference:r}=e;let a=e.endAngle;if(o){So(t,e,i,n,s+F);for(let e=0;ea&&s>a;return{count:n,start:l,loop:e.loop,ilen:h(r+(h?a-t:t))%s,x=()=>{g!==f&&(t.lineTo(m,f),t.lineTo(m,g),t.lineTo(m,p))};for(l&&(u=o[v(0)],t.moveTo(u.x,u.y)),c=0;c<=a;++c){if(u=o[v(c)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(if&&(f=i),m=(b*m+e)/++b):(x(),t.lineTo(e,i),d=n,b=0,g=f=i),p=i}x()}function Ao(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?Po:Io}Mo.id="arc",Mo.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Mo.defaultRoutes={backgroundColor:"backgroundColor"};const Eo="function"==typeof Path2D;class Oo extends Tn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;je(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:r,end:a}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;oo&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const o=t._chart.getContext(),s=gi(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,l=i.length,h=[];let c=s,u=e[0].start,d=u;function g(t,e,n,o){const s=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=s;for(;i[e%l].skip;)e+=s;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:n,style:o}),c=o,u=e%l)}}for(const t of e){u=a?u:t.start;let e,s=i[u%l];for(d=u+1;d<=t.end;d++){const a=i[d%l];e=gi(n.setContext(me(o,{type:"segment",p0:s,p1:a,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:r}))),fi(e,c)&&g(u,d-1,t.loop,c),s=a,c=e}u"borderDash"!==t&&"fill"!==t};class Fo extends Tn{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){const n=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2){jo(t)}))}var $o={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Wo(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:r}=e,a=t.getDatasetMeta(o),l=s||e.data;if("y"===pe([r,t.options.indexAxis]))return;if(!a.controller.supportsDecimation)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let u,{start:d,count:g}=function(t,e){const i=e.length;let n,o=0;const{iScale:s}=t,{min:r,max:a,minDefined:l,maxDefined:h}=s.getUserBounds();return l&&(o=et(ve(e,s.axis,r).lo,0,i-1)),n=h?et(ve(e,s.axis,a).hi+1,o,i)-o:i-o,{start:o,count:n}}(a,l);if(g<=(i.threshold||4*n))jo(e);else{switch(h(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,n,o){const s=o.samples||n;if(s>=i)return t.slice(e,e+i);const r=[],a=(i-2)/(s-2);let l=0;const h=e+i-1;let c,u,d,g,f,p=e;for(r[l++]=t[p],c=0;cd&&(d=g,u=t[n],f=n);r[l++]=u,p=f}return r[l++]=t[h],r}(l,d,g,n,i);break;case"min-max":u=function(t,e,i,n){let o,s,r,a,l,c,u,d,g,f,p=0,m=0;const b=[],v=e+i-1,x=t[e].x,y=t[v].x-x;for(o=e;of&&(f=a,u=o),p=(m*p+s.x)/++m;else{const i=o-1;if(!h(c)&&!h(u)){const e=Math.min(c,u),n=Math.max(c,u);e!==d&&e!==i&&b.push({...t[e],x:p}),n!==d&&n!==i&&b.push({...t[n],x:p})}o>0&&i!==d&&b.push(t[i]),b.push(s),l=e,m=0,g=f=a,c=u=d=o}}return b}(l,d,g,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}}))},destroy(t){Wo(t)}};function Go(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=Q(o),s=Q(s)),{property:t,start:o,end:s}}function Uo(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Yo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function qo(t,e){let i=[],n=!1;return c(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach((({start:t,end:e})=>{e=Uo(t,e,o);const r=o[t],a=o[e];null!==n?(s.push({x:r.x,y:n}),s.push({x:a.x,y:n})):null!==i&&(s.push({x:i,y:r.y}),s.push({x:i,y:a.y}))})),s}(t,e),i.length?new Oo({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Xo(t){return t&&!1!==t.fill}function Jo(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!d(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function Ko(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=f(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(u(n))return!isNaN(n.value)&&n;let o=parseFloat(n);return d(o)&&Math.floor(o)===o?function(t,e,i,n){return"-"!==t&&"+"!==t||(i=e+i),!(i===e||i<0||i>=n)&&i}(n[0],e,o,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Zo(t,e,i){const n=[];for(let o=0;o=0;--e){const i=o[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&i.fill&&es(t.ctx,i,s))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;Xo(i)&&es(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;Xo(n)&&"beforeDatasetDraw"===i.drawTime&&es(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const as=(t,e)=>{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)}};class ls extends Tn{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(){const t=this.options.labels||{};let e=m(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(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=fe(i.font),o=n.size,s=this._computeTitleHeight(),{boxWidth:r,itemHeight:a}=as(i,o);let l,h;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(s,o,r,a)+10):(h=this.maxHeight,l=this._fitCols(s,o,r,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:o,maxWidth:s,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],h=n+r;let c=t;o.textAlign="left",o.textBaseline="middle";let u=-1,d=-h;return this.legendItems.forEach(((t,g)=>{const f=i+e/2+o.measureText(t.text).width;(0===g||l[l.length-1]+f+2*r>s)&&(c+=h,l[l.length-(g>0?0:1)]=0,d+=h,u++),a[g]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+r})),c}_fitCols(t,e,i,n){const{ctx:o,maxHeight:s,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],h=s-t;let c=r,u=0,d=0,g=0,f=0;return this.legendItems.forEach(((t,s)=>{const p=i+e/2+o.measureText(t.text).width;s>0&&d+n+2*r>h&&(c+=u+r,l.push({width:u,height:d}),g+=u+r,f++,u=d=0),a[s]={left:g,top:d,col:f,width:p,height:n},u=Math.max(u,p),d+=n+r})),c+=u,l.push({width:u,height:d}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:o}}=this,s=ri(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=r(i,this.left+n,this.right-this.lineWidths[o]);for(const l of e)o!==l.row&&(o=l.row,a=r(i,this.left+n,this.right-this.lineWidths[o])),l.top+=this.top+t+n,l.left=s.leftForLtr(s.x(a),l.width),a+=l.width+n}else{let o=0,a=r(i,this.top+t+n,this.bottom-this.columnSizes[o].height);for(const l of e)l.col!==o&&(o=l.col,a=r(i,this.top+t+n,this.bottom-this.columnSizes[o].height)),l.top=a,l.left+=this.left+n,l.left=s.leftForLtr(s.x(l.left),l.width),a+=l.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Qt(t,this),this._draw(),te(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:o,labels:s}=t,a=Gt.color,l=ri(t.rtl,this.left,this.width),h=fe(s.font),{color:c,padding:u}=s,d=h.size,g=d/2;let p;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=h.string;const{boxWidth:m,boxHeight:b,itemHeight:v}=as(s,d),x=this.isHorizontal(),y=this._computeTitleHeight();p=x?{x:r(o,this.left+u,this.right-i[0]),y:this.top+u+y,line:0}:{x:this.left+u,y:r(o,this.top+y+u,this.bottom-e[0].height),line:0},ai(this.ctx,t.textDirection);const _=v+u;this.legendItems.forEach(((w,S)=>{n.strokeStyle=w.fontColor||c,n.fillStyle=w.fontColor||c;const M=n.measureText(w.text).width,C=l.textAlign(w.textAlign||(w.textAlign=s.textAlign)),k=m+g+M;let R=p.x,P=p.y;l.setWidth(this.width),x?S>0&&R+k+u>this.right&&(P=p.y+=_,p.line++,R=p.x=r(o,this.left+u,this.right-i[p.line])):S>0&&P+_>this.bottom&&(R=p.x=R+e[p.line].width+u,p.line++,P=p.y=r(o,this.top+y+u,this.bottom-e[p.line].height)),function(t,e,i){if(isNaN(m)||m<=0||isNaN(b)||b<0)return;n.save();const o=f(i.lineWidth,1);if(n.fillStyle=f(i.fillStyle,a),n.lineCap=f(i.lineCap,"butt"),n.lineDashOffset=f(i.lineDashOffset,0),n.lineJoin=f(i.lineJoin,"miter"),n.lineWidth=o,n.strokeStyle=f(i.strokeStyle,a),n.setLineDash(f(i.lineDash,[])),s.usePointStyle){const s={radius:b*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:o},r=l.xPlus(t,m/2);Kt(n,s,r,e+g,m)}else{const s=e+Math.max((d-b)/2,0),r=l.leftForLtr(t,m),a=de(i.borderRadius);n.beginPath(),Object.values(a).some((t=>0!==t))?se(n,{x:r,y:s,w:m,h:b,radius:a}):n.rect(r,s,m,b),n.fill(),0!==o&&n.stroke()}n.restore()}(l.x(R),P,w),R=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(C,R+m+g,x?R+k:this.right,t.rtl),function(t,e,i){ne(n,i.text,t,e+v/2,h,{strikethrough:i.hidden,textAlign:l.textAlign(i.textAlign)})}(l.x(R),P,w),x?p.x+=k+u:p.y+=_})),li(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=fe(e.font),n=ge(e.padding);if(!e.display)return;const o=ri(t.rtl,this.left,this.width),a=this.ctx,l=e.position,h=i.size/2,c=n.top+h;let u,d=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),u=this.top+c,d=r(t.align,d,this.right-g);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=c+r(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const f=r(l,d,d+g);a.textAlign=o.textAlign(s(l)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,ne(a,e.text,f,u,i)}_computeTitleHeight(){const t=this.options.title,e=fe(t.font),i=ge(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,o;if(it(t,this.left,this.right)&&it(e,this.top,this.bottom))for(o=this.legendHitBoxes,i=0;it.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:o,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const r=t.controller.getStyle(i?0:void 0),a=ge(r.borderWidth);return{text:e[t.index].label,fillStyle:r.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:r.borderColor,pointStyle:n||r.pointStyle,rotation:r.rotation,textAlign:o||r.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class cs extends Tn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=c(i.text)?i.text.length:1;this._padding=ge(i.padding);const o=n*fe(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:o,options:s}=this,a=s.align;let l,h,c,u=0;return this.isHorizontal()?(h=r(a,i,o),c=e+t,l=o-i):("left"===s.position?(h=i+t,c=r(a,n,e),u=-.5*D):(h=o-t,c=r(a,e,n),u=.5*D),l=n-e),{titleX:h,titleY:c,maxWidth:l,rotation:u}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=fe(e.font),n=i.lineHeight/2+this._padding.top,{titleX:o,titleY:r,maxWidth:a,rotation:l}=this._drawArgs(n);ne(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:l,textAlign:s(e.align),textBaseline:"middle",translation:[o,r]})}}var us={id:"title",_element:cs,start(t,e,i){!function(t,e){const i=new cs({ctx:t.ctx,options:e,chart:t});bn.configure(t,i,e),bn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;bn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;bn.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}};const ds=new WeakMap;var gs={id:"subtitle",start(t,e,i){const n=new cs({ctx:t.ctx,options:i,chart:t});bn.configure(t,n,i),bn.addBox(t,n),ds.set(t,n)},stop(t){bn.removeBox(t,ds.get(t)),ds.delete(t)},beforeUpdate(t,e,i){const n=ds.get(t);bn.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}};const fs={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function bs(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:r,value:a}=s.getLabelAndValue(o);return{chart:t,label:r,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:a,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function vs(t,e){const i=t.chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:r,boxHeight:a}=e,l=fe(e.bodyFont),h=fe(e.titleFont),c=fe(e.footerFont),u=s.length,d=o.length,g=n.length,f=ge(e.padding);let p=f.height,m=0,v=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);v+=t.beforeBody.length+t.afterBody.length,u&&(p+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),v&&(p+=g*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(v-g)*l.lineHeight+(v-1)*e.bodySpacing),d&&(p+=e.footerMarginTop+d*c.lineHeight+(d-1)*e.footerSpacing);let x=0;const y=function(t){m=Math.max(m,i.measureText(t).width+x)};return i.save(),i.font=h.string,b(t.title,y),i.font=l.string,b(t.beforeBody.concat(t.afterBody),y),x=e.displayColors?r+2+e.boxPadding:0,b(n,(t=>{b(t.before,y),b(t.lines,y),b(t.after,y)})),x=0,i.font=c.string,b(t.footer,y),i.restore(),m+=f.width,{width:m,height:p}}function xs(t,e,i,n){const{x:o,width:s}=i,{width:r,chartArea:{left:a,right:l}}=t;let h="center";return"center"===n?h=o<=(a+l)/2?"left":"right":o<=s/2?h="left":o>=r-s/2&&(h="right"),function(t,e,i,n){const{x:o,width:s}=n,r=i.caretSize+i.caretPadding;return"left"===t&&o+s+r>e.width||"right"===t&&o-s-r<0||void 0}(h,t,e,i)&&(h="center"),h}function ys(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||xs(t,e,i,n),yAlign:n}}function _s(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:r}=t,{xAlign:a,yAlign:l}=i,h=o+s,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:g}=de(r);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const p=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,h);return"center"===l?"left"===a?f+=h:"right"===a&&(f-=h):"left"===a?f-=Math.max(c,d)+o:"right"===a&&(f+=Math.max(u,g)+o),{x:et(f,0,n.width-e.width),y:et(p,0,n.height-e.height)}}function ws(t,e,i){const n=ge(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Ss(t){return ps([],ms(t))}function Ms(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Cs extends Tn{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,o=new yi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=(this,me(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),o=i.title.apply(this,[t]),s=i.afterTitle.apply(this,[t]);let r=[];return r=ps(r,ms(n)),r=ps(r,ms(o)),r=ps(r,ms(s)),r}getBeforeBody(t,e){return Ss(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return b(t,(t=>{const e={before:[],lines:[],after:[]},o=Ms(i,t);ps(e.before,ms(o.beforeLabel.call(this,t))),ps(e.lines,o.label.call(this,t)),ps(e.after,ms(o.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Ss(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),o=i.footer.apply(this,[t]),s=i.afterFooter.apply(this,[t]);let r=[];return r=ps(r,ms(n)),r=ps(r,ms(o)),r=ps(r,ms(s)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],o=[],s=[];let r,a,l=[];for(r=0,a=e.length;rt.filter(e,n,o,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),b(l,(e=>{const i=Ms(t.callbacks,e);n.push(i.labelColor.call(this,e)),o.push(i.labelPointStyle.call(this,e)),s.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let o,s=[];if(n.length){const t=fs[i.position].call(this,n,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const e=this._size=vs(this,i),r=Object.assign({},t,e),a=ys(this.chart,i,r),l=_s(i,r,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,o={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{caretSize:s,cornerRadius:r}=i,{topLeft:a,topRight:l,bottomLeft:h,bottomRight:c}=de(r),{x:u,y:d}=t,{width:g,height:f}=e;let p,m,b,v,x,y;return"center"===o?(x=d+f/2,"left"===n?(p=u,m=p-s,v=x+s,y=x-s):(p=u+g,m=p+s,v=x-s,y=x+s),b=p):(m="left"===n?u+Math.max(a,h)+s:"right"===n?u+g-Math.max(l,c)-s:this.caretX,"top"===o?(v=d,x=v-s,p=m-s,b=m+s):(v=d+f,x=v+s,p=m+s,b=m-s),y=v),{x1:p,x2:m,x3:b,y1:v,y2:x,y3:y}}drawTitle(t,e,i){const n=this.title,o=n.length;let s,r,a;if(o){const l=ri(i.rtl,this.x,this.width);for(t.x=ws(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=fe(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,se(t,{x:e,y:p,w:l,h:a,radius:r}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),se(t,{x:i,y:p+1,w:l-2,h:a-2,radius:r}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=s.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:o,bodyAlign:s,displayColors:r,boxHeight:a,boxWidth:l,boxPadding:h}=i,c=fe(i.bodyFont);let u=c.lineHeight,d=0;const g=ri(i.rtl,this.x,this.width),f=function(i){e.fillText(i,g.x(t.x+d),t.y+u/2),t.y+=u+o},p=g.textAlign(s);let m,v,x,y,_,w,S;for(e.textAlign=s,e.textBaseline="middle",e.font=c.string,t.x=ws(this,p,i),e.fillStyle=i.bodyColor,b(this.beforeBody,f),d=r&&"right"!==p?"center"===s?l/2+h:l+2+h:0,y=0,w=n.length;y0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,o=i&&i.y;if(n||o){const i=fs[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=vs(this,t),r=Object.assign({},i,this._size),a=ys(e,t,r),l=_s(t,r,a,e);n._to===l.x&&o._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=ge(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,n,e),ai(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),li(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),o=!v(i,n),s=this._positionChanged(n,e);(o||s)&&(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;const n=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,i),r=this._positionChanged(s,t),a=e||!v(s,o)||r;return a&&(this._active=s,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const o=this.options;if("mouseout"===t.type)return[];if(!n)return e;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,s=fs[o.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}Cs.positioners=fs;var ks={id:"tooltip",_element:Cs,positioners:fs,afterInit(t,e,i){i&&(t.tooltip=new Cs({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){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const 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:{beforeTitle:a,title(t){if(t.length>0){const 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"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Rs=Object.freeze({__proto__:null,Decimation:$o,Filler:rs,Legend:hs,SubTitle:gs,Title:us,Tooltip:ks});class Ps extends Gn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(h(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:et(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const o=t.indexOf(e);return-1===o?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):o!==t.lastIndexOf(e)?i:o}(i,t,f(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{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(){const t=this.min,e=this.max,i=this.options.offset,n=[];let o=this.getLabels();o=0===t&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.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){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Is(t,e,{horizontal:i,minRotation:n}){const o=Y(n),s=(i?Math.sin(o):Math.cos(o))||.001,r=.75*e*(""+t).length;return Math.min(e/s,r)}Ps.id="category",Ps.defaults={ticks:{callback:Ps.prototype.getLabelForValue}};class As extends Gn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return h(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:o}=this;const s=t=>n=e?n:t,r=t=>o=i?o:t;if(t){const t=j(n),e=j(o);t<0&&e<0?r(0):t>0&&e>0&&s(0)}if(n===o){let e=1;(o>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*o)),r(o+e),t||s(n-e)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:o,min:s,max:r,precision:a,count:l,maxTicks:c,maxDigits:u,includeBounds:d}=t,g=o||1,f=c-1,{min:p,max:m}=e,b=!h(s),v=!h(r),x=!h(l),y=(m-p)/(u+1);let _,w,S,M,C=W((m-p)/f/g)*g;if(C<1e-14&&!b&&!v)return[{value:p},{value:m}];M=Math.ceil(m/C)-Math.floor(p/C),M>f&&(C=W(M*C/f/g)*g),h(a)||(_=Math.pow(10,a),C=Math.ceil(C*_)/_),"ticks"===n?(w=Math.floor(p/C)*C,S=Math.ceil(m/C)*C):(w=p,S=m),b&&v&&o&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((r-s)/o,C/1e3)?(M=Math.round(Math.min((r-s)/C,c)),C=(r-s)/M,w=s,S=r):x?(w=b?s:w,S=v?r:S,M=l-1,C=(S-w)/M):(M=(S-w)/C,M=G(M,Math.round(M),C/1e3)?Math.round(M):Math.ceil(M));const k=Math.max(X(C),X(w));_=Math.pow(10,h(a)?k:a),w=Math.round(w*_)/_,S=Math.round(S*_)/_;let R=0;for(b&&(d&&w!==s?(i.push({value:s}),w0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=d(t)?Math.max(0,t):null,this.max=d(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const o=e=>i=t?i:e,s=t=>n=e?n:t,r=(t,e)=>Math.pow(10,Math.floor(H(t))+e);i===n&&(i<=0?(o(1),s(10)):(o(r(i,-1)),s(r(n,1)))),i<=0&&o(r(n,-1)),n<=0&&s(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&o(r(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(H(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=g(t.min,Math.pow(10,Math.floor(H(e.min)))),r=Math.floor(H(s)),a=Math.floor(s/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;do{o.push({value:s,major:Os(s)}),++a,10===a&&(a=1,++r,l=r>=0?1:l),s=Math.round(a*Math.pow(10,r)*l)/l}while(ro?{start:e-i,end:e}:{start:e,end:e+i}}function Ls(t,e,i,n,o){const s=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let a=0,l=0;n.starte.r&&(a=(n.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),o.starte.b&&(l=(o.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function Vs(t){return 0===t||180===t?"center":t<180?"left":"right"}function zs(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Ns(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,F);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s{const i=m(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],o=[],s=t._pointLabels.length,r=t.options.pointLabels,a=r.centerPointLabels?D/s:0;for(let d=0;d=0&&t=0;o--){const e=n.setContext(t.getPointLabelContext(o)),s=fe(e.font),{x:r,y:a,textAlign:l,left:c,top:u,right:d,bottom:g}=t._pointLabelItems[o],{backdropColor:f}=e;if(!h(f)){const t=de(e.borderRadius),n=ge(e.backdropPadding);i.fillStyle=f;const o=c-n.left,s=u-n.top,r=d-c+n.width,a=g-u+n.height;Object.values(t).some((t=>0!==t))?(i.beginPath(),se(i,{x:o,y:s,w:r,h:a,radius:t}),i.fill()):i.fillRect(o,s,r,a)}ne(i,t._pointLabels[o],r,a+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,o),n.display&&this.ticks.forEach(((t,e)=>{0!==e&&(r=this.getDistanceFromCenterForValue(t.value),function(t,e,i,n){const o=t.ctx,s=e.circular,{color:r,lineWidth:a}=e;!s&&!n||!r||!a||i<0||(o.save(),o.strokeStyle=r,o.lineWidth=a,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),Ns(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(this,n.setContext(this.getContext(e-1)),r,o))})),i.display){for(t.save(),s=o-1;s>=0;s--){const n=i.setContext(this.getPointLabelContext(s)),{color:o,lineWidth:l}=n;l&&o&&(t.lineWidth=l,t.strokeStyle=o,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(s,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,r)=>{if(0===r&&!e.reverse)return;const a=i.setContext(this.getContext(r)),l=fe(a.font);if(o=this.getDistanceFromCenterForValue(this.ticks[r].value),a.showLabelBackdrop){t.font=l.string,s=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=ge(a.backdropPadding);t.fillRect(-s/2-e.left,-o-l.size/2-e.top,s+e.width,l.size+e.height)}ne(t,n.label,0,-o,l,{color:a.color})})),t.restore()}drawTitle(){}}Bs.id="radialLinear",Bs.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Vn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},Bs.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Bs.descriptors={angleLines:{_fallback:"grid"}};const Hs={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}},js=Object.keys(Hs);function Ws(t,e){return t-e}function $s(t,e){if(h(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:s}=t._parseOpts;let r=e;return"function"==typeof n&&(r=n(r)),d(r)||(r="string"==typeof n?i.parse(r,n):i.parse(r)),null===r?null:(o&&(r="week"!==o||!$(s)&&!0!==s?i.startOf(r,o):i.startOf(r,"isoWeek",s)),+r)}function Gs(t,e,i,n){const o=js.length;for(let s=js.indexOf(t);s=e?i[n]:i[o]]=!0}}else t[e]=!0}function Ys(t,e,i){const n=[],o={},s=e.length;let r,a;for(r=0;r=0&&(e[l].major=!0);return e}(t,n,o,i):n}class qs extends Gn{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new Zi._date(t.adapters.date);S(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:$s(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:o,minDefined:s,maxDefined:r}=this.getUserBounds();function a(t){s||isNaN(t.min)||(n=Math.min(n,t.min)),r||isNaN(t.max)||(o=Math.max(o,t.max))}s&&r||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=d(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),o=d(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const 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]);const o=this.min,s=function(t,e,i){let n=0,o=t.length;for(;nn&&t[o-1]>i;)o--;return n>0||o=js.indexOf(i);s--){const i=js[s];if(Hs[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return js[i?js.indexOf(i):0]}(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=js.indexOf(t)+1,i=js.length;e+t.value)))}initOffsets(t){let e,i,n=0,o=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]),o=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=et(n,0,s),o=et(o,0,s),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,o=n.time,s=o.unit||Gs(o.minUnit,e,i,this._getLabelCapacity(e)),r=f(o.stepSize,1),a="week"===s&&o.isoWeekday,l=$(a)||!0===a,h={};let c,u,d=e;if(l&&(d=+t.startOf(d,"isoWeek",a)),d=+t.startOf(d,l?"day":s),t.diff(i,e,s)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+s);const g="data"===n.ticks.source&&this.getDataTimestamps();for(c=d,u=0;ct-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const o=this.options,s=o.time.displayFormats,r=this._unit,a=this._majorUnit,l=r&&s[r],h=a&&s[a],c=i[e],u=a&&h&&c&&c.major,d=this._adapter.format(t,n||(u?h:l)),g=o.ticks.callback;return g?m(g,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const 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[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=ve(t,"pos",e)),({pos:n,time:s}=t[a]),({pos:o,time:r}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=ve(t,"time",e)),({time:n,pos:s}=t[a]),({time:o,pos:r}=t[l]));const h=o-n;return h?s+(r-s)*(e-n)/h:s}qs.id="time",qs.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Js extends qs{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Xs(e,this.min),this._tableRange=Xs(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let s,r,a,l,h;for(s=0,r=t.length;s=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,r=n.length;s{"use strict";var n,o,s,r=i(33363),a=i(25283),l=i(22086),h=i(90930),c=i(28759),u=i(49606),d=i(90375),g=i(9268),f=i(72585),p=i(1343),m=i(77826).f,b=i(95516),v=i(62130),x=i(77530),y=i(50211),_=i(65422),w=i(83278),S=w.enforce,M=w.get,C=l.Int8Array,k=C&&C.prototype,R=l.Uint8ClampedArray,P=R&&R.prototype,I=C&&v(C),A=k&&v(k),E=Object.prototype,O=l.TypeError,D=y("toStringTag"),F=_("TYPED_ARRAY_TAG"),T="TypedArrayConstructor",L=r&&!!x&&"Opera"!==d(l.opera),V=!1,z={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},N={BigInt64Array:8,BigUint64Array:8},B=function(t){var e=v(t);if(c(e)){var i=M(e);return i&&u(i,T)?i[T]:B(e)}},H=function(t){if(!c(t))return!1;var e=d(t);return u(z,e)||u(N,e)};for(n in z)(s=(o=l[n])&&o.prototype)?S(s)[T]=o:L=!1;for(n in N)(s=(o=l[n])&&o.prototype)&&(S(s)[T]=o);if((!L||!h(I)||I===Function.prototype)&&(I=function(){throw O("Incorrect invocation")},L))for(n in z)l[n]&&x(l[n],I);if((!L||!A||A===E)&&(A=I.prototype,L))for(n in z)l[n]&&x(l[n].prototype,A);if(L&&v(P)!==A&&x(P,A),a&&!u(A,D))for(n in V=!0,m(A,D,{get:function(){return c(this)?this[F]:void 0}}),z)l[n]&&f(l[n],F,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:V&&F,aTypedArray:function(t){if(H(t))return t;throw O("Target is not a typed array")},aTypedArrayConstructor:function(t){if(h(t)&&(!x||b(I,t)))return t;throw O(g(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,i,n){if(a){if(i)for(var o in z){var s=l[o];if(s&&u(s.prototype,t))try{delete s.prototype[t]}catch(i){try{s.prototype[t]=e}catch(t){}}}A[t]&&!i||p(A,t,i?e:L&&k[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,i){var n,o;if(a){if(x){if(i)for(n in z)if((o=l[n])&&u(o,t))try{delete o[t]}catch(t){}if(I[t]&&!i)return;try{return p(I,t,i?e:L&&I[t]||e)}catch(t){}}for(n in z)!(o=l[n])||o[t]&&!i||p(o,t,e)}},getTypedArrayConstructor:B,isView:function(t){if(!c(t))return!1;var e=d(t);return"DataView"===e||u(z,e)||u(N,e)},isTypedArray:H,TypedArray:I,TypedArrayPrototype:A}},28062:(t,e,i)=>{var n=i(18516),o=i(78240),s=i(95974),r=i(3060),a=i(82871),l=i(85574),h=o([].push),c=function(t){var e=1==t,i=2==t,o=3==t,c=4==t,u=6==t,d=7==t,g=5==t||u;return function(f,p,m,b){for(var v,x,y=r(f),_=s(y),w=n(p,m),S=a(_),M=0,C=b||l,k=e?C(f,S):i||d?C(f,0):void 0;S>M;M++)if((g||M in _)&&(x=w(v=_[M],M,y),t))if(e)k[M]=x;else if(x)switch(t){case 3:return!0;case 5:return v;case 6:return M;case 2:h(k,v)}else switch(t){case 4:return!1;case 7:h(k,v)}return u?-1:o||c?c:k}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},16713:(t,e,i)=>{var n=i(90375),o=i(78240)("".slice);t.exports=function(t){return"Big"===o(n(t),0,3)}},19443:(t,e,i)=>{var n=i(28759),o=Math.floor;t.exports=Number.isInteger||function(t){return!n(t)&&isFinite(t)&&o(t)===t}},94769:(t,e,i)=>{var n=i(1288),o=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw o("Can't convert number to bigint");return BigInt(e)}},55421:(t,e,i)=>{var n=i(84706),o=RangeError;t.exports=function(t,e){var i=n(t);if(i%e)throw o("Wrong offset");return i}},84706:(t,e,i)=>{var n=i(69502),o=RangeError;t.exports=function(t){var e=n(t);if(e<0)throw o("The argument can't be less than 0");return e}},45412:(t,e,i)=>{"use strict";var n=i(51695),o=i(22086),s=i(59413),r=i(25283),a=i(18315),l=i(83466),h=i(99185),c=i(51855),u=i(55736),d=i(72585),g=i(19443),f=i(24005),p=i(13687),m=i(55421),b=i(2258),v=i(49606),x=i(90375),y=i(28759),_=i(92071),w=i(44710),S=i(95516),M=i(77530),C=i(20062).f,k=i(96654),R=i(28062).forEach,P=i(67420),I=i(77826),A=i(94399),E=i(83278),O=i(15070),D=E.get,F=E.set,T=E.enforce,L=I.f,V=A.f,z=Math.round,N=o.RangeError,B=h.ArrayBuffer,H=B.prototype,j=h.DataView,W=l.NATIVE_ARRAY_BUFFER_VIEWS,$=l.TYPED_ARRAY_TAG,G=l.TypedArray,U=l.TypedArrayPrototype,Y=l.aTypedArrayConstructor,q=l.isTypedArray,X="BYTES_PER_ELEMENT",J="Wrong length",K=function(t,e){Y(t);for(var i=0,n=e.length,o=new t(n);n>i;)o[i]=e[i++];return o},Z=function(t,e){L(t,e,{get:function(){return D(this)[e]}})},Q=function(t){var e;return S(H,t)||"ArrayBuffer"==(e=x(t))||"SharedArrayBuffer"==e},tt=function(t,e){return q(t)&&!_(e)&&e in t&&g(+e)&&e>=0},et=function(t,e){return e=b(e),tt(t,e)?u(2,t[e]):V(t,e)},it=function(t,e,i){return e=b(e),!(tt(t,e)&&y(i)&&v(i,"value"))||v(i,"get")||v(i,"set")||i.configurable||v(i,"writable")&&!i.writable||v(i,"enumerable")&&!i.enumerable?L(t,e,i):(t[e]=i.value,t)};r?(W||(A.f=et,I.f=it,Z(U,"buffer"),Z(U,"byteOffset"),Z(U,"byteLength"),Z(U,"length")),n({target:"Object",stat:!0,forced:!W},{getOwnPropertyDescriptor:et,defineProperty:it}),t.exports=function(t,e,i){var r=t.match(/\d+$/)[0]/8,l=t+(i?"Clamped":"")+"Array",h="get"+t,u="set"+t,g=o[l],b=g,v=b&&b.prototype,x={},_=function(t,e){L(t,e,{get:function(){return function(t,e){var i=D(t);return i.view[h](e*r+i.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,n){var o=D(t);i&&(n=(n=z(n))<0?0:n>255?255:255&n),o.view[u](e*r+o.byteOffset,n,!0)}(this,e,t)},enumerable:!0})};W?a&&(b=e((function(t,e,i,n){return c(t,v),O(y(e)?Q(e)?void 0!==n?new g(e,m(i,r),n):void 0!==i?new g(e,m(i,r)):new g(e):q(e)?K(b,e):s(k,b,e):new g(p(e)),t,b)})),M&&M(b,G),R(C(g),(function(t){t in b||d(b,t,g[t])})),b.prototype=v):(b=e((function(t,e,i,n){c(t,v);var o,a,l,h=0,u=0;if(y(e)){if(!Q(e))return q(e)?K(b,e):s(k,b,e);o=e,u=m(i,r);var d=e.byteLength;if(void 0===n){if(d%r)throw N(J);if((a=d-u)<0)throw N(J)}else if((a=f(n)*r)+u>d)throw N(J);l=a/r}else l=p(e),o=new B(a=l*r);for(F(t,{buffer:o,byteOffset:u,byteLength:a,length:l,view:new j(o)});h{var n=i(22086),o=i(63677),s=i(68939),r=i(83466).NATIVE_ARRAY_BUFFER_VIEWS,a=n.ArrayBuffer,l=n.Int8Array;t.exports=!r||!o((function(){l(1)}))||!o((function(){new l(-1)}))||!s((function(t){new l,new l(null),new l(1.5),new l(t)}),!0)||o((function(){return 1!==new l(new a(2),1,void 0).length}))},96654:(t,e,i)=>{var n=i(18516),o=i(59413),s=i(41449),r=i(3060),a=i(82871),l=i(73546),h=i(61667),c=i(92814),u=i(16713),d=i(83466).aTypedArrayConstructor,g=i(94769);t.exports=function(t){var e,i,f,p,m,b,v,x,y=s(this),_=r(t),w=arguments.length,S=w>1?arguments[1]:void 0,M=void 0!==S,C=h(_);if(C&&!c(C))for(x=(v=l(_,C)).next,_=[];!(b=o(x,v)).done;)_.push(b.value);for(M&&w>2&&(S=n(S,arguments[2])),i=a(_),f=new(d(y))(i),p=u(f),e=0;i>e;e++)m=M?S(_[e],e):_[e],f[e]=p?g(m):+m;return f}},32107:(t,e,i)=>{"use strict";var n=i(51695),o=i(59413),s=i(45089),r=i(98722),a=i(54522),l=i(94722);n({target:"Promise",stat:!0},{allSettled:function(t){var e=this,i=r.f(e),n=i.resolve,h=i.reject,c=a((function(){var i=s(e.resolve),r=[],a=0,h=1;l(t,(function(t){var s=a++,l=!1;h++,o(i,e,t).then((function(t){l||(l=!0,r[s]={status:"fulfilled",value:t},--h||n(r))}),(function(t){l||(l=!0,r[s]={status:"rejected",reason:t},--h||n(r))}))})),--h||n(r)}));return c.error&&h(c.value),i.promise}})},61370:(t,e,i)=>{"use strict";var n=i(51695),o=i(43296),s=i(81237),r=i(63677),a=i(10563),l=i(90930),h=i(48515),c=i(10880),u=i(1343),d=s&&s.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!s&&r((function(){d.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=h(this,a("Promise")),i=l(t);return this.then(i?function(i){return c(e,t()).then((function(){return i}))}:t,i?function(i){return c(e,t()).then((function(){throw i}))}:t)}}),!o&&l(s)){var g=a("Promise").prototype.finally;d.finally!==g&&u(d,"finally",g,{unsafe:!0})}},6160:(t,e,i)=>{"use strict";var n=i(83466),o=i(20435),s=i(94769),r=i(90375),a=i(59413),l=i(78240),h=i(63677),c=n.aTypedArray,u=n.exportTypedArrayMethod,d=l("".slice);u("fill",(function(t){var e=arguments.length;c(this);var i="Big"===d(r(this),0,3)?s(t):+t;return a(o,this,i,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),h((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},62925:(t,e,i)=>{"use strict";var n=i(22086),o=i(59413),s=i(83466),r=i(82871),a=i(55421),l=i(3060),h=i(63677),c=n.RangeError,u=n.Int8Array,d=u&&u.prototype,g=d&&d.set,f=s.aTypedArray,p=s.exportTypedArrayMethod,m=!h((function(){var t=new Uint8ClampedArray(2);return o(g,t,{length:1,0:3},1),3!==t[1]})),b=m&&s.NATIVE_ARRAY_BUFFER_VIEWS&&h((function(){var t=new u(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));p("set",(function(t){f(this);var e=a(arguments.length>1?arguments[1]:void 0,1),i=l(t);if(m)return o(g,this,i,e);var n=this.length,s=r(i),h=0;if(s+e>n)throw c("Wrong length");for(;h{"use strict";var n=i(22086),o=i(78240),s=i(63677),r=i(45089),a=i(91147),l=i(83466),h=i(81799),c=i(34172),u=i(21448),d=i(49804),g=l.aTypedArray,f=l.exportTypedArrayMethod,p=n.Uint16Array,m=p&&o(p.prototype.sort),b=!(!m||s((function(){m(new p(2),null)}))&&s((function(){m(new p(2),{})}))),v=!!m&&!s((function(){if(u)return u<74;if(h)return h<67;if(c)return!0;if(d)return d<602;var t,e,i=new p(516),n=Array(516);for(t=0;t<516;t++)e=t%4,i[t]=515-t,n[t]=t-2*e+3;for(m(i,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(i[t]!==n[t])return!0}));f("sort",(function(t){return void 0!==t&&r(t),v?m(this,t):a(g(this),function(t){return function(e,i){return void 0!==t?+t(e,i)||0:i!=i?-1:e!=e?1:0===e&&0===i?1/e>0&&1/i<0?1:-1:e>i}}(t))}),!v||b)},34950:(t,e,i)=>{"use strict";var n=i(22086),o=i(67258),s=i(83466),r=i(63677),a=i(70745),l=n.Int8Array,h=s.aTypedArray,c=s.exportTypedArrayMethod,u=[].toLocaleString,d=!!l&&r((function(){u.call(new l(1))}));c("toLocaleString",(function(){return o(u,d?a(h(this)):h(this),a(arguments))}),r((function(){return[1,2].toLocaleString()!=new l([1,2]).toLocaleString()}))||!r((function(){l.prototype.toLocaleString.call([1,2])})))},57148:(t,e,i)=>{i(45412)("Uint32",(function(t){return function(e,i,n){return t(this,e,i,n)}}))},11620:(t,e,i)=>{i(32107)},3155:function(t,e,i){"use strict";function n(t){var e=0;return function(){return e=n&&(this.D=this.i),this.D===this.i&&(this.cache&&this.u.set(e,this.A),this.H&&this.H(this.A))),this}function o(t){var e,i=M();for(e in t)if(t.hasOwnProperty(e)){var n=t[e];x(n)?i[e]=n.slice(0):_(n)?i[e]=o(n):i[e]=n}return i}function s(t,e){for(var i=t.length,n=y(e),o=[],s=0,r=0;s=r&&((t=(t=t[a-(o+.5>>0)])[i]||(t[i]=[]))[t.length]=n),o)}function u(t,e){if(t)for(var i=Object.keys(t),n=0,o=i.length;n(t=t.length-e.length)?1:t?-1:0}function f(t,e){return(t=t[R])<(e=e[R])?-1:t>e?1:0}function p(t,e){for(var i=R.length,n=0;ne?1:0}function m(t,e,i){return t?{page:t,next:e?""+e:null,result:i}:i}function b(t,e,i,n,o,s,r){var a=[];if(!0===i){i="0";var l=""}else l=i&&i.split(":");var h=t.length;if(1r&&(l=0);var F=(l=l||0)+e;F=this.b.length&&(this.w=0),this.b[this.w].postMessage({add:!0,id:t,content:e}),this.f[r]=""+this.w,i&&i(),this;if(!o){if(this.async&&"function"!=typeof importScripts){var a=this;return r=new Promise((function(i){setTimeout((function(){a.add(t,e,null,n,!0),a=null,i()}))})),i?(r.then(i),this):r}if(i)return this.add(t,e,null,n,!0),i(),this}if(!(e=this.encode(e)).length)return this;o=y(i=this.g)?i(e):e.split(this.split),this.filter&&(o=s(o,this.filter));var l=M();l._ctx=M();for(var h=o.length,u=this.threshold,d=this.depth,g=this.c,f=this.s,p=this.G,m=0;mk;P--)c(f,l,C=b.substring(k,P),t,R,w,u,g-1);break;default:if(x=c(f,l,b,t,1,w,u,g-1),d&&1=u)for(x=l._ctx[b]||(l._ctx[b]=M()),b=this.o[b]||(this.o[b]=S(g-(u||0))),0>(w=m-d)&&(w=0),(C=m+d+1)>h&&(C=h);wo;i--)r=s[i-1],s[i]=r,n[r]=i;s[o]=t,n[t]=o}}}return e},t}();return i}(function(){var t={},e="undefined"!=typeof Blob&&"undefined"!=typeof URL&&URL.createObjectURL;return function(i,n,o,s,r){return o=e?URL.createObjectURL(new Blob(["("+o.toString()+")()"],{type:"text/javascript"})):i+".es5.js",t[i+="-"+n]||(t[i]=[]),t[i][r]=new Worker(o),t[i][r].onmessage=s,console.log("Register Worker: "+i+"@"+r),t[i][r]}}()),this)},50483:function(t){!function(e){"use strict";const i="(0?\\d+|0x[a-f0-9]+)",n={fourOctet:new RegExp(`^${i}\\.${i}\\.${i}\\.${i}$`,"i"),threeOctet:new RegExp(`^${i}\\.${i}\\.${i}$`,"i"),twoOctet:new RegExp(`^${i}\\.${i}$`,"i"),longValue:new RegExp(`^${i}$`,"i")},o=new RegExp("^0[0-7]+$","i"),s=new RegExp("^0x[a-f0-9]+$","i"),r="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",l={zoneIndex:new RegExp(r,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${r})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${i}\\.${i}\\.${i}\\.${i}(${r})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${i}\\.${i}\\.${i}\\.${i}(${r})?$`,"i")};function h(t,e){if(t.indexOf("::")!==t.lastIndexOf("::"))return null;let i,n,o=0,s=-1,r=(t.match(l.zoneIndex)||[])[0];for(r&&(r=r.substring(1),t=t.replace(/%.+$/,""));(s=t.indexOf(":",s+1))>=0;)o++;if("::"===t.substr(0,2)&&o--,"::"===t.substr(-2,2)&&o--,o>e)return null;for(n=e-o,i=":";n--;)i+="0:";return":"===(t=t.replace("::",i))[0]&&(t=t.slice(1)),":"===t[t.length-1]&&(t=t.slice(0,-1)),{parts:e=function(){const e=t.split(":"),i=[];for(let t=0;t0;){if(o=i-n,o<0&&(o=0),t[s]>>o!=e[s]>>o)return!1;n-=i,s+=1}return!0}function u(t){if(s.test(t))return parseInt(t,16);if("0"===t[0]&&!isNaN(parseInt(t[1],10))){if(o.test(t))return parseInt(t,8);throw new Error(`ipaddr: cannot parse ${t} as octal`)}return parseInt(t,10)}function d(t,e){for(;t.length=0;n-=1){if(o=this.octets[n],!(o in i))return null;if(s=i[o],e&&0!==s)return null;8!==s&&(e=!0),t+=s}return 32-t},t.prototype.range=function(){return g.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){return this.octets.slice(0)},t.prototype.toIPv4MappedAddress=function(){return g.IPv6.parse(`::ffff:${this.toString()}`)},t.prototype.toNormalizedString=function(){return this.toString()},t.prototype.toString=function(){return this.octets.join(".")},t}(),g.IPv4.broadcastAddressFromCIDR=function(t){try{const e=this.parseCIDR(t),i=e[0].toByteArray(),n=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),o=[];let s=0;for(;s<4;)o.push(parseInt(i[s],10)|255^parseInt(n[s],10)),s++;return new this(o)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},g.IPv4.isIPv4=function(t){return null!==this.parser(t)},g.IPv4.isValid=function(t){try{return new this(this.parser(t)),!0}catch(t){return!1}},g.IPv4.isValidFourPartDecimal=function(t){return!(!g.IPv4.isValid(t)||!t.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},g.IPv4.networkAddressFromCIDR=function(t){let e,i,n,o,s;try{for(e=this.parseCIDR(t),n=e[0].toByteArray(),s=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),o=[],i=0;i<4;)o.push(parseInt(n[i],10)&parseInt(s[i],10)),i++;return new this(o)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},g.IPv4.parse=function(t){const e=this.parser(t);if(null===e)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(e)},g.IPv4.parseCIDR=function(t){let e;if(e=t.match(/^(.+)\/(\d+)$/)){const t=parseInt(e[2]);if(t>=0&&t<=32){const i=[this.parse(e[1]),t];return Object.defineProperty(i,"toString",{value:function(){return this.join("/")}}),i}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},g.IPv4.parser=function(t){let e,i,o;if(e=t.match(n.fourOctet))return function(){const t=e.slice(1,6),n=[];for(let e=0;e4294967295||o<0)throw new Error("ipaddr: address outside defined range");return function(){const t=[];let e;for(e=0;e<=24;e+=8)t.push(o>>e&255);return t}().reverse()}return(e=t.match(n.twoOctet))?function(){const t=e.slice(1,4),i=[];if(o=u(t[1]),o>16777215||o<0)throw new Error("ipaddr: address outside defined range");return i.push(u(t[0])),i.push(o>>16&255),i.push(o>>8&255),i.push(255&o),i}():(e=t.match(n.threeOctet))?function(){const t=e.slice(1,5),i=[];if(o=u(t[2]),o>65535||o<0)throw new Error("ipaddr: address outside defined range");return i.push(u(t[0])),i.push(u(t[1])),i.push(o>>8&255),i.push(255&o),i}():null},g.IPv4.subnetMaskFromPrefixLength=function(t){if((t=parseInt(t))<0||t>32)throw new Error("ipaddr: invalid IPv4 prefix length");const e=[0,0,0,0];let i=0;const n=Math.floor(t/8);for(;i=0;s-=1){if(n=this.parts[s],!(n in i))return null;if(o=i[n],e&&0!==o)return null;16!==o&&(e=!0),t+=o}return 128-t},t.prototype.range=function(){return g.subnetMatch(this,this.SpecialRanges)},t.prototype.toByteArray=function(){let t;const e=[],i=this.parts;for(let n=0;n>8),e.push(255&t);return e},t.prototype.toFixedLengthString=function(){const t=function(){const t=[];for(let e=0;e>8,255&e,i>>8,255&i])},t.prototype.toNormalizedString=function(){const t=function(){const t=[];for(let e=0;eo&&(n=i.index,o=i[0].length);return o<0?e:`${e.substring(0,n)}::${e.substring(n+o)}`},t.prototype.toString=function(){return this.toRFC5952String()},t}(),g.IPv6.broadcastAddressFromCIDR=function(t){try{const e=this.parseCIDR(t),i=e[0].toByteArray(),n=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),o=[];let s=0;for(;s<16;)o.push(parseInt(i[s],10)|255^parseInt(n[s],10)),s++;return new this(o)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},g.IPv6.isIPv6=function(t){return null!==this.parser(t)},g.IPv6.isValid=function(t){if("string"==typeof t&&-1===t.indexOf(":"))return!1;try{const e=this.parser(t);return new this(e.parts,e.zoneId),!0}catch(t){return!1}},g.IPv6.networkAddressFromCIDR=function(t){let e,i,n,o,s;try{for(e=this.parseCIDR(t),n=e[0].toByteArray(),s=this.subnetMaskFromPrefixLength(e[1]).toByteArray(),o=[],i=0;i<16;)o.push(parseInt(n[i],10)&parseInt(s[i],10)),i++;return new this(o)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},g.IPv6.parse=function(t){const e=this.parser(t);if(null===e.parts)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(e.parts,e.zoneId)},g.IPv6.parseCIDR=function(t){let e,i,n;if((i=t.match(/^(.+)\/(\d+)$/))&&(e=parseInt(i[2]),e>=0&&e<=128))return n=[this.parse(i[1]),e],Object.defineProperty(n,"toString",{value:function(){return this.join("/")}}),n;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},g.IPv6.parser=function(t){let e,i,n,o,s,r;if(n=t.match(l.deprecatedTransitional))return this.parser(`::ffff:${n[1]}`);if(l.native.test(t))return h(t,8);if((n=t.match(l.transitional))&&(r=n[6]||"",e=h(n[1].slice(0,-1)+r,6),e.parts)){for(s=[parseInt(n[2]),parseInt(n[3]),parseInt(n[4]),parseInt(n[5])],i=0;i128)throw new Error("ipaddr: invalid IPv6 prefix length");const e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let i=0;const n=Math.floor(t/8);for(;i{var n=i(52485),o=i(58095),s=i(21796),r=i(66070),a=i(39334),l=i(65581);t.exports=function(t,e,i,h){var c=-1,u=o,d=!0,g=t.length,f=[],p=e.length;if(!g)return f;i&&(e=r(e,a(i))),h?(u=s,d=!1):e.length>=200&&(u=l,d=!1,e=new n(e));t:for(;++c{var n=i(97141),o=i(72889);t.exports=function t(e,i,s,r,a){var l=-1,h=e.length;for(s||(s=o),a||(a=[]);++l0&&s(c)?i>1?t(c,i-1,s,r,a):n(a,c):r||(a[a.length]=c)}return a}},72889:(t,e,i)=>{var n=i(96539),o=i(2900),s=i(19785),r=n?n.isConcatSpreadable:void 0;t.exports=function(t){return s(t)||o(t)||!!(r&&t&&t[r])}},22346:(t,e,i)=>{var n=i(11005),o=i(23545),s=i(1197),r=i(36468),a=s((function(t,e){return r(t)?n(t,o(e,1,r,!0)):[]}));t.exports=a},28312:function(t){t.exports=function(){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;e(this,t),this.ctx=i,this.iframes=n,this.exclude=o,this.iframesTimeout=s}return i(t,[{key:"getContexts",value:function(){var t=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(e){var i=t.filter((function(t){return t.contains(e)})).length>0;-1!==t.indexOf(e)||i||t.push(e)})),t}},{key:"getIframeContents",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n=void 0;try{var o=t.contentWindow;if(n=o.document,!o||!n)throw new Error("iframe inaccessible")}catch(t){i()}n&&e(n)}},{key:"isIframeBlank",value:function(t){var e="about:blank",i=t.getAttribute("src").trim();return t.contentWindow.location.href===e&&i!==e&&i}},{key:"observeIframeLoad",value:function(t,e,i){var n=this,o=!1,s=null,r=function r(){if(!o){o=!0,clearTimeout(s);try{n.isIframeBlank(t)||(t.removeEventListener("load",r),n.getIframeContents(t,e,i))}catch(t){i()}}};t.addEventListener("load",r),s=setTimeout(r,this.iframesTimeout)}},{key:"onIframeReady",value:function(t,e,i){try{"complete"===t.contentWindow.document.readyState?this.isIframeBlank(t)?this.observeIframeLoad(t,e,i):this.getIframeContents(t,e,i):this.observeIframeLoad(t,e,i)}catch(t){i()}}},{key:"waitForIframes",value:function(t,e){var i=this,n=0;this.forEachIframe(t,(function(){return!0}),(function(t){n++,i.waitForIframes(t.querySelector("html"),(function(){--n||e()}))}),(function(t){t||e()}))}},{key:"forEachIframe",value:function(e,i,n){var o=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},r=e.querySelectorAll("iframe"),a=r.length,l=0;r=Array.prototype.slice.call(r);var h=function(){--a<=0&&s(l)};a||h(),r.forEach((function(e){t.matches(e,o.exclude)?h():o.onIframeReady(e,(function(t){i(e)&&(l++,n(t)),h()}),h)}))}},{key:"createIterator",value:function(t,e,i){return document.createNodeIterator(t,e,i,!1)}},{key:"createInstanceOnIframe",value:function(e){return new t(e.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(t,e,i){if(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING){if(null===e)return!0;if(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(t){var e=t.previousNode();return{prevNode:e,node:(null===e||t.nextNode())&&t.nextNode()}}},{key:"checkIframeFilter",value:function(t,e,i,n){var o=!1,s=!1;return n.forEach((function(t,e){t.val===i&&(o=e,s=t.handled)})),this.compareNodeIframe(t,e,i)?(!1!==o||s?!1===o||s||(n[o].handled=!0):n.push({val:i,handled:!0}),!0):(!1===o&&n.push({val:i,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(t,e,i,n){var o=this;t.forEach((function(t){t.handled||o.getIframeContents(t.val,(function(t){o.createInstanceOnIframe(t).forEachNode(e,i,n)}))}))}},{key:"iterateThroughNodes",value:function(t,e,i,n,o){for(var s=this,r=this.createIterator(e,t,n),a=[],l=[],h=void 0,c=void 0;u=void 0,u=s.getIteratorNode(r),c=u.prevNode,h=u.node;)this.iframes&&this.forEachIframe(e,(function(t){return s.checkIframeFilter(h,c,t,a)}),(function(e){s.createInstanceOnIframe(e).forEachNode(t,(function(t){return l.push(t)}),n)})),l.push(h);var u;l.forEach((function(t){i(t)})),this.iframes&&this.handleOpenIframes(a,t,i,n),o()}},{key:"forEachNode",value:function(t,e,i){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},s=this.getContexts(),r=s.length;r||o(),s.forEach((function(s){var a=function(){n.iterateThroughNodes(t,s,e,i,(function(){--r<=0&&o()}))};n.iframes?n.waitForIframes(s,a):a()}))}}],[{key:"matches",value:function(t,e){var i="string"==typeof e?[e]:e,n=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;if(n){var o=!1;return i.every((function(e){return!n.call(t,e)||(o=!0,!1)})),o}return!1}}]),t}(),s=function(){function s(t){e(this,s),this.ctx=t,this.ie=!1;var i=window.navigator.userAgent;(i.indexOf("MSIE")>-1||i.indexOf("Trident")>-1)&&(this.ie=!0)}return i(s,[{key:"log",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",n=this.opt.log;this.opt.debug&&"object"===(void 0===n?"undefined":t(n))&&"function"==typeof n[i]&&n[i]("mark.js: "+e)}},{key:"escapeStr",value:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(t){return"disabled"!==this.opt.wildcards&&(t=this.setupWildcardsRegExp(t)),t=this.escapeStr(t),Object.keys(this.opt.synonyms).length&&(t=this.createSynonymsRegExp(t)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),this.opt.diacritics&&(t=this.createDiacriticsRegExp(t)),t=this.createMergedBlanksRegExp(t),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.createJoinersRegExp(t)),"disabled"!==this.opt.wildcards&&(t=this.createWildcardsRegExp(t)),this.createAccuracyRegExp(t)}},{key:"createSynonymsRegExp",value:function(t){var e=this.opt.synonyms,i=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var o in e)if(e.hasOwnProperty(o)){var s=e[o],r="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(s):this.escapeStr(s);""!==r&&""!==a&&(t=t.replace(new RegExp("("+this.escapeStr(r)+"|"+this.escapeStr(a)+")","gm"+i),n+"("+this.processSynomyms(r)+"|"+this.processSynomyms(a)+")"+n))}return t}},{key:"processSynomyms",value:function(t){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),t}},{key:"setupWildcardsRegExp",value:function(t){return(t=t.replace(/(?:\\)*\?/g,(function(t){return"\\"===t.charAt(0)?"?":""}))).replace(/(?:\\)*\*/g,(function(t){return"\\"===t.charAt(0)?"*":""}))}},{key:"createWildcardsRegExp",value:function(t){var e="withSpaces"===this.opt.wildcards;return t.replace(/\u0001/g,e?"[\\S\\s]?":"\\S?").replace(/\u0002/g,e?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(t){return t.replace(/[^(|)\\]/g,(function(t,e,i){var n=i.charAt(e+1);return/[(|)\\]/.test(n)||""===n?t:t+"\0"}))}},{key:"createJoinersRegExp",value:function(t){var e=[],i=this.opt.ignorePunctuation;return Array.isArray(i)&&i.length&&e.push(this.escapeStr(i.join(""))),this.opt.ignoreJoiners&&e.push("\\u00ad\\u200b\\u200c\\u200d"),e.length?t.split(/\u0000+/).join("["+e.join("")+"]*"):t}},{key:"createDiacriticsRegExp",value:function(t){var e=this.opt.caseSensitive?"":"i",i=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],n=[];return t.split("").forEach((function(o){i.every((function(i){if(-1!==i.indexOf(o)){if(n.indexOf(i)>-1)return!1;t=t.replace(new RegExp("["+i+"]","gm"+e),"["+i+"]"),n.push(i)}return!0}))})),t}},{key:"createMergedBlanksRegExp",value:function(t){return t.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(t){var e=this,i=this.opt.accuracy,n="string"==typeof i?i:i.value,o="string"==typeof i?[]:i.limiters,s="";switch(o.forEach((function(t){s+="|"+e.escapeStr(t)})),n){case"partially":default:return"()("+t+")";case"complementary":return"()([^"+(s="\\s"+(s||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+t+"[^"+s+"]*)";case"exactly":return"(^|\\s"+s+")("+t+")(?=$|\\s"+s+")"}}},{key:"getSeparatedKeywords",value:function(t){var e=this,i=[];return t.forEach((function(t){e.opt.separateWordSearch?t.split(" ").forEach((function(t){t.trim()&&-1===i.indexOf(t)&&i.push(t)})):t.trim()&&-1===i.indexOf(t)&&i.push(t)})),{keywords:i.sort((function(t,e){return e.length-t.length})),length:i.length}}},{key:"isNumeric",value:function(t){return Number(parseFloat(t))==t}},{key:"checkRanges",value:function(t){var e=this;if(!Array.isArray(t)||"[object Object]"!==Object.prototype.toString.call(t[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(t),[];var i=[],n=0;return t.sort((function(t,e){return t.start-e.start})).forEach((function(t){var o=e.callNoMatchOnInvalidRanges(t,n),s=o.start,r=o.end;o.valid&&(t.start=s,t.length=r-s,i.push(t),n=r)})),i}},{key:"callNoMatchOnInvalidRanges",value:function(t,e){var i=void 0,n=void 0,o=!1;return t&&void 0!==t.start?(n=(i=parseInt(t.start,10))+parseInt(t.length,10),this.isNumeric(t.start)&&this.isNumeric(t.length)&&n-e>0&&n-i>0?o=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(t)),this.opt.noMatch(t))):(this.log("Ignoring invalid range: "+JSON.stringify(t)),this.opt.noMatch(t)),{start:i,end:n,valid:o}}},{key:"checkWhitespaceRanges",value:function(t,e,i){var n=void 0,o=!0,s=i.length,r=e-s,a=parseInt(t.start,10)-r;return(n=(a=a>s?s:a)+parseInt(t.length,10))>s&&(n=s,this.log("End range automatically set to the max value of "+s)),a<0||n-a<0||a>s||n>s?(o=!1,this.log("Invalid range: "+JSON.stringify(t)),this.opt.noMatch(t)):""===i.substring(a,n).replace(/\s+/g,"")&&(o=!1,this.log("Skipping whitespace only range: "+JSON.stringify(t)),this.opt.noMatch(t)),{start:a,end:n,valid:o}}},{key:"getTextNodes",value:function(t){var e=this,i="",n=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(t){n.push({start:i.length,end:(i+=t.textContent).length,node:t})}),(function(t){return e.matchesExclude(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){t({value:i,nodes:n})}))}},{key:"matchesExclude",value:function(t){return o.matches(t,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(t,e,i){var n=this.opt.element?this.opt.element:"mark",o=t.splitText(e),s=o.splitText(i-e),r=document.createElement(n);return r.setAttribute("data-markjs","true"),this.opt.className&&r.setAttribute("class",this.opt.className),r.textContent=o.textContent,o.parentNode.replaceChild(r,o),s}},{key:"wrapRangeInMappedTextNode",value:function(t,e,i,n,o){var s=this;t.nodes.every((function(r,a){var l=t.nodes[a+1];if(void 0===l||l.start>e){if(!n(r.node))return!1;var h=e-r.start,c=(i>r.end?r.end:i)-r.start,u=t.value.substr(0,r.start),d=t.value.substr(c+r.start);if(r.node=s.wrapRangeInTextNode(r.node,h,c),t.value=u+d,t.nodes.forEach((function(e,i){i>=a&&(t.nodes[i].start>0&&i!==a&&(t.nodes[i].start-=c),t.nodes[i].end-=c)})),i-=c,o(r.node.previousSibling,r.start),!(i>r.end))return!1;e=r.end}return!0}))}},{key:"wrapMatches",value:function(t,e,i,n,o){var s=this,r=0===e?0:e+1;this.getTextNodes((function(e){e.nodes.forEach((function(e){e=e.node;for(var o=void 0;null!==(o=t.exec(e.textContent))&&""!==o[r];)if(i(o[r],e)){var a=o.index;if(0!==r)for(var l=1;l{"use strict";i.d(e,{b7:()=>r,ie:()=>s});var n=i(84390),o=i(92222);function s(t,e){return t?function(t){return"function"==typeof t&&(()=>{const e=Object.getPrototypeOf(t);return e.prototype&&e.prototype.isReactComponent})()}(i=t)||"function"==typeof i||function(t){return"object"==typeof t&&"symbol"==typeof t.$$typeof&&["react.memo","react.forward_ref"].includes(t.$$typeof.description)}(i)?n.createElement(t,e):t:null;var i}function r(t){const e={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[i]=n.useState((()=>({current:(0,o.W_)(e)}))),[s,r]=n.useState((()=>i.current.initialState));return i.current.setOptions((e=>({...e,...t,state:{...s,...t.state},onStateChange:e=>{r(e),null==t.onStateChange||t.onStateChange(e)}}))),i.current}},92222:(t,e,i)=>{"use strict";function n(t,e){return"function"==typeof t?t(e):t}function o(t,e){return i=>{e.setState((e=>({...e,[t]:n(i,e[t])})))}}function s(t){return t instanceof Function}function r(t,e,i){let n,o=[];return()=>{let s;i.key&&i.debug&&(s=Date.now());const r=t();if(r.length===o.length&&!r.some(((t,e)=>o[e]!==t)))return n;let a;if(o=r,i.key&&i.debug&&(a=Date.now()),n=e(...r),null==i||null==i.onChange||i.onChange(n),i.key&&i.debug&&null!=i&&i.debug()){const t=Math.round(100*(Date.now()-s))/100,e=Math.round(100*(Date.now()-a))/100,n=e/16,o=(t,e)=>{for(t=String(t);t.length{const t=[],e=i=>{i.subHeaders&&i.subHeaders.length&&i.subHeaders.map(e),t.push(i)};return e(o),t},getContext:()=>({table:t,header:o,column:e})};return t._features.forEach((e=>{null==e.createHeader||e.createHeader(o,t)})),o}i.d(e,{Cl:()=>H,W_:()=>N,sC:()=>j,tj:()=>W});const l={createTable:t=>{t.getHeaderGroups=r((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,i,n,o)=>{var s,r;const a=null!=(s=null==n?void 0:n.map((t=>i.find((e=>e.id===t)))).filter(Boolean))?s:[],l=null!=(r=null==o?void 0:o.map((t=>i.find((e=>e.id===t)))).filter(Boolean))?r:[];return h(e,[...a,...i.filter((t=>!(null!=n&&n.includes(t.id)||null!=o&&o.includes(t.id)))),...l],t)}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getCenterHeaderGroups=r((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,i,n,o)=>h(e,i=i.filter((t=>!(null!=n&&n.includes(t.id)||null!=o&&o.includes(t.id)))),t,"center")),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getLeftHeaderGroups=r((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left]),((e,i,n)=>{var o;return h(e,null!=(o=null==n?void 0:n.map((t=>i.find((e=>e.id===t)))).filter(Boolean))?o:[],t,"left")}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getRightHeaderGroups=r((()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right]),((e,i,n)=>{var o;return h(e,null!=(o=null==n?void 0:n.map((t=>i.find((e=>e.id===t)))).filter(Boolean))?o:[],t,"right")}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getFooterGroups=r((()=>[t.getHeaderGroups()]),(t=>[...t].reverse()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getLeftFooterGroups=r((()=>[t.getLeftHeaderGroups()]),(t=>[...t].reverse()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getCenterFooterGroups=r((()=>[t.getCenterHeaderGroups()]),(t=>[...t].reverse()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getRightFooterGroups=r((()=>[t.getRightHeaderGroups()]),(t=>[...t].reverse()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getFlatHeaders=r((()=>[t.getHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getLeftFlatHeaders=r((()=>[t.getLeftHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getCenterFlatHeaders=r((()=>[t.getCenterHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getRightFlatHeaders=r((()=>[t.getRightHeaderGroups()]),(t=>t.map((t=>t.headers)).flat()),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getCenterLeafHeaders=r((()=>[t.getCenterFlatHeaders()]),(t=>t.filter((t=>{var e;return!(null!=(e=t.subHeaders)&&e.length)}))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getLeftLeafHeaders=r((()=>[t.getLeftFlatHeaders()]),(t=>t.filter((t=>{var e;return!(null!=(e=t.subHeaders)&&e.length)}))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getRightLeafHeaders=r((()=>[t.getRightFlatHeaders()]),(t=>t.filter((t=>{var e;return!(null!=(e=t.subHeaders)&&e.length)}))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}}),t.getLeafHeaders=r((()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()]),((t,e,i)=>{var n,o,s,r,a,l;return[...null!=(n=null==(o=t[0])?void 0:o.headers)?n:[],...null!=(s=null==(r=e[0])?void 0:r.headers)?s:[],...null!=(a=null==(l=i[0])?void 0:l.headers)?a:[]].map((t=>t.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugHeaders}})}};function h(t,e,i,n){var o,s;let r=0;const l=function(t,e){void 0===e&&(e=1),r=Math.max(r,e),t.filter((t=>t.getIsVisible())).forEach((t=>{var i;null!=(i=t.columns)&&i.length&&l(t.columns,e+1)}),0)};l(t);let h=[];const c=(t,e)=>{const o={depth:e,id:[n,`${e}`].filter(Boolean).join("_"),headers:[]},s=[];t.forEach((t=>{const r=[...s].reverse()[0];let l,h=!1;if(t.column.depth===o.depth&&t.column.parent?l=t.column.parent:(l=t.column,h=!0),r&&(null==r?void 0:r.column)===l)r.subHeaders.push(t);else{const o=a(i,l,{id:[n,e,l.id,null==t?void 0:t.id].filter(Boolean).join("_"),isPlaceholder:h,placeholderId:h?`${s.filter((t=>t.column===l)).length}`:void 0,depth:e,index:s.length});o.subHeaders.push(t),s.push(o)}o.headers.push(t),t.headerGroup=o})),h.push(o),e>0&&c(s,e-1)},u=e.map(((t,e)=>a(i,t,{depth:r,index:e})));c(u,r-1),h.reverse();const d=t=>t.filter((t=>t.column.getIsVisible())).map((t=>{let e=0,i=0,n=[0];return t.subHeaders&&t.subHeaders.length?(n=[],d(t.subHeaders).forEach((t=>{let{colSpan:i,rowSpan:o}=t;e+=i,n.push(o)}))):e=1,i+=Math.min(...n),t.colSpan=e,t.rowSpan=i,{colSpan:e,rowSpan:i}}));return d(null!=(o=null==(s=h[0])?void 0:s.headers)?o:[]),h}const c={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},u={getDefaultColumnDef:()=>c,getInitialState:t=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",onColumnSizingChange:o("columnSizing",t),onColumnSizingInfoChange:o("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var i,n,o;const s=e.getState().columnSizing[t.id];return Math.min(Math.max(null!=(i=t.columnDef.minSize)?i:c.minSize,null!=(n=null!=s?s:t.columnDef.size)?n:c.size),null!=(o=t.columnDef.maxSize)?o:c.maxSize)},t.getStart=i=>{const n=i?"left"===i?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns(),o=n.findIndex((e=>e.id===t.id));if(o>0){const t=n[o-1];return t.getStart(i)+t.getSize()}return 0},t.resetSize=()=>{e.setColumnSizing((e=>{let{[t.id]:i,...n}=e;return n}))},t.getCanResize=()=>{var i,n;return(null==(i=t.columnDef.enableResizing)||i)&&(null==(n=e.options.enableColumnResizing)||n)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let e=0;const i=t=>{var n;t.subHeaders.length?t.subHeaders.forEach(i):e+=null!=(n=t.column.getSize())?n:0};return i(t),e},t.getStart=()=>{if(t.index>0){const e=t.headerGroup.headers[t.index-1];return e.getStart()+e.getSize()}return 0},t.getResizeHandler=()=>{const i=e.getColumn(t.column.id),n=null==i?void 0:i.getCanResize();return o=>{if(!i||!n)return;if(null==o.persist||o.persist(),g(o)&&o.touches&&o.touches.length>1)return;const s=t.getSize(),r=t?t.getLeafHeaders().map((t=>[t.column.id,t.column.getSize()])):[[i.id,i.getSize()]],a=g(o)?Math.round(o.touches[0].clientX):o.clientX,l={},h=(t,i)=>{"number"==typeof i&&(e.setColumnSizingInfo((t=>{var e,n;const o=i-(null!=(e=null==t?void 0:t.startOffset)?e:0),s=Math.max(o/(null!=(n=null==t?void 0:t.startSize)?n:0),-.999999);return t.columnSizingStart.forEach((t=>{let[e,i]=t;l[e]=Math.round(100*Math.max(i+i*s,0))/100})),{...t,deltaOffset:o,deltaPercentage:s}})),"onChange"!==e.options.columnResizeMode&&"end"!==t||e.setColumnSizing((t=>({...t,...l}))))},c=t=>h("move",t),u=t=>{h("end",t),e.setColumnSizingInfo((t=>({...t,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},f={moveHandler:t=>c(t.clientX),upHandler:t=>{document.removeEventListener("mousemove",f.moveHandler),document.removeEventListener("mouseup",f.upHandler),u(t.clientX)}},p={moveHandler:t=>(t.cancelable&&(t.preventDefault(),t.stopPropagation()),c(t.touches[0].clientX),!1),upHandler:t=>{var e;document.removeEventListener("touchmove",p.moveHandler),document.removeEventListener("touchend",p.upHandler),t.cancelable&&(t.preventDefault(),t.stopPropagation()),u(null==(e=t.touches[0])?void 0:e.clientX)}},m=!!function(){if("boolean"==typeof d)return d;let t=!1;try{const e={get passive(){return t=!0,!1}},i=()=>{};window.addEventListener("test",i,e),window.removeEventListener("test",i)}catch(e){t=!1}return d=t,d}()&&{passive:!1};g(o)?(document.addEventListener("touchmove",p.moveHandler,m),document.addEventListener("touchend",p.upHandler,m)):(document.addEventListener("mousemove",f.moveHandler,m),document.addEventListener("mouseup",f.upHandler,m)),e.setColumnSizingInfo((t=>({...t,startOffset:a,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:r,isResizingColumn:i.id})))}}},createTable:t=>{t.setColumnSizing=e=>null==t.options.onColumnSizingChange?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>null==t.options.onColumnSizingInfoChange?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var i;t.setColumnSizing(e?{}:null!=(i=t.initialState.columnSizing)?i:{})},t.resetHeaderSizeInfo=e=>{var i;t.setColumnSizingInfo(e?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(i=t.initialState.columnSizingInfo)?i:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},t.getTotalSize=()=>{var e,i;return null!=(e=null==(i=t.getHeaderGroups()[0])?void 0:i.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0},t.getLeftTotalSize=()=>{var e,i;return null!=(e=null==(i=t.getLeftHeaderGroups()[0])?void 0:i.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0},t.getCenterTotalSize=()=>{var e,i;return null!=(e=null==(i=t.getCenterHeaderGroups()[0])?void 0:i.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0},t.getRightTotalSize=()=>{var e,i;return null!=(e=null==(i=t.getRightHeaderGroups()[0])?void 0:i.headers.reduce(((t,e)=>t+e.getSize()),0))?e:0}}};let d=null;function g(t){return"touchstart"===t.type}const f={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:o("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,i=!1;t._autoResetExpanded=()=>{var n,o;if(e){if(null!=(n=null!=(o=t.options.autoResetAll)?o:t.options.autoResetExpanded)?n:!t.options.manualExpanding){if(i)return;i=!0,t._queue((()=>{t.resetExpanded(),i=!1}))}}else t._queue((()=>{e=!0}))},t.setExpanded=e=>null==t.options.onExpandedChange?void 0:t.options.onExpandedChange(e),t.toggleAllRowsExpanded=e=>{(null!=e?e:!t.getIsAllRowsExpanded())?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=e=>{var i,n;t.setExpanded(e?{}:null!=(i=null==(n=t.initialState)?void 0:n.expanded)?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some((t=>t.getCanExpand())),t.getToggleAllRowsExpandedHandler=()=>e=>{null==e.persist||e.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const e=t.getState().expanded;return!0===e||Object.values(e).some(Boolean)},t.getIsAllRowsExpanded=()=>{const e=t.getState().expanded;return"boolean"==typeof e?!0===e:!!Object.keys(e).length&&!t.getRowModel().flatRows.some((t=>!t.getIsExpanded()))},t.getExpandedDepth=()=>{let e=0;return(!0===t.getState().expanded?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach((t=>{const i=t.split(".");e=Math.max(e,i.length)})),e},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=i=>{e.setExpanded((n=>{var o;const s=!0===n||!(null==n||!n[t.id]);let r={};if(!0===n?Object.keys(e.getRowModel().rowsById).forEach((t=>{r[t]=!0})):r=n,i=null!=(o=i)?o:!s,!s&&i)return{...r,[t.id]:!0};if(s&&!i){const{[t.id]:e,...i}=r;return i}return n}))},t.getIsExpanded=()=>{var i;const n=e.getState().expanded;return!!(null!=(i=null==e.options.getIsRowExpanded?void 0:e.options.getIsRowExpanded(t))?i:!0===n||(null==n?void 0:n[t.id]))},t.getCanExpand=()=>{var i,n,o;return null!=(i=null==e.options.getRowCanExpand?void 0:e.options.getRowCanExpand(t))?i:(null==(n=e.options.enableExpanding)||n)&&!(null==(o=t.subRows)||!o.length)},t.getIsAllParentsExpanded=()=>{let i=!0,n=t;for(;i&&n.parentId;)n=e.getRow(n.parentId,!0),i=n.getIsExpanded();return i},t.getToggleExpandedHandler=()=>{const e=t.getCanExpand();return()=>{e&&t.toggleExpanded()}}}},p=(t,e,i)=>{var n;const o=i.toLowerCase();return Boolean(null==(n=t.getValue(e))||null==(n=n.toString())||null==(n=n.toLowerCase())?void 0:n.includes(o))};p.autoRemove=t=>C(t);const m=(t,e,i)=>{var n;return Boolean(null==(n=t.getValue(e))||null==(n=n.toString())?void 0:n.includes(i))};m.autoRemove=t=>C(t);const b=(t,e,i)=>{var n;return(null==(n=t.getValue(e))||null==(n=n.toString())?void 0:n.toLowerCase())===(null==i?void 0:i.toLowerCase())};b.autoRemove=t=>C(t);const v=(t,e,i)=>{var n;return null==(n=t.getValue(e))?void 0:n.includes(i)};v.autoRemove=t=>C(t)||!(null!=t&&t.length);const x=(t,e,i)=>!i.some((i=>{var n;return!(null!=(n=t.getValue(e))&&n.includes(i))}));x.autoRemove=t=>C(t)||!(null!=t&&t.length);const y=(t,e,i)=>i.some((i=>{var n;return null==(n=t.getValue(e))?void 0:n.includes(i)}));y.autoRemove=t=>C(t)||!(null!=t&&t.length);const _=(t,e,i)=>t.getValue(e)===i;_.autoRemove=t=>C(t);const w=(t,e,i)=>t.getValue(e)==i;w.autoRemove=t=>C(t);const S=(t,e,i)=>{let[n,o]=i;const s=t.getValue(e);return s>=n&&s<=o};S.resolveFilterValue=t=>{let[e,i]=t,n="number"!=typeof e?parseFloat(e):e,o="number"!=typeof i?parseFloat(i):i,s=null===e||Number.isNaN(n)?-1/0:n,r=null===i||Number.isNaN(o)?1/0:o;if(s>r){const t=s;s=r,r=t}return[s,r]},S.autoRemove=t=>C(t)||C(t[0])&&C(t[1]);const M={includesString:p,includesStringSensitive:m,equalsString:b,arrIncludes:v,arrIncludesAll:x,arrIncludesSome:y,equals:_,weakEquals:w,inNumberRange:S};function C(t){return null==t||""===t}function k(t,e,i){return!(!t||!t.autoRemove)&&t.autoRemove(e,i)||void 0===e||"string"==typeof e&&!e}const R={sum:(t,e,i)=>i.reduce(((e,i)=>{const n=i.getValue(t);return e+("number"==typeof n?n:0)}),0),min:(t,e,i)=>{let n;return i.forEach((e=>{const i=e.getValue(t);null!=i&&(n>i||void 0===n&&i>=i)&&(n=i)})),n},max:(t,e,i)=>{let n;return i.forEach((e=>{const i=e.getValue(t);null!=i&&(n=i)&&(n=i)})),n},extent:(t,e,i)=>{let n,o;return i.forEach((e=>{const i=e.getValue(t);null!=i&&(void 0===n?i>=i&&(n=o=i):(n>i&&(n=i),o{let i=0,n=0;if(e.forEach((e=>{let o=e.getValue(t);null!=o&&(o=+o)>=o&&(++i,n+=o)})),i)return n/i},median:(t,e)=>{if(!e.length)return;const i=e.map((e=>e.getValue(t)));if(n=i,!Array.isArray(n)||!n.every((t=>"number"==typeof t)))return;var n;if(1===i.length)return i[0];const o=Math.floor(i.length/2),s=i.sort(((t,e)=>t-e));return i.length%2!=0?s[o]:(s[o-1]+s[o])/2},unique:(t,e)=>Array.from(new Set(e.map((e=>e.getValue(t)))).values()),uniqueCount:(t,e)=>new Set(e.map((e=>e.getValue(t)))).size,count:(t,e)=>e.length},P={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:o("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>null==t.options.onRowSelectionChange?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var i;return t.setRowSelection(e?{}:null!=(i=t.initialState.rowSelection)?i:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection((i=>{e=void 0!==e?e:!t.getIsAllRowsSelected();const n={...i},o=t.getPreGroupedRowModel().flatRows;return e?o.forEach((t=>{t.getCanSelect()&&(n[t.id]=!0)})):o.forEach((t=>{delete n[t.id]})),n}))},t.toggleAllPageRowsSelected=e=>t.setRowSelection((i=>{const n=void 0!==e?e:!t.getIsAllPageRowsSelected(),o={...i};return t.getRowModel().rows.forEach((e=>{I(o,e.id,n,!0,t)})),o})),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=r((()=>[t.getState().rowSelection,t.getCoreRowModel()]),((e,i)=>Object.keys(e).length?A(t,i):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable}}),t.getFilteredSelectedRowModel=r((()=>[t.getState().rowSelection,t.getFilteredRowModel()]),((e,i)=>Object.keys(e).length?A(t,i):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable}}),t.getGroupedSelectedRowModel=r((()=>[t.getState().rowSelection,t.getSortedRowModel()]),((e,i)=>Object.keys(e).length?A(t,i):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable}}),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:i}=t.getState();let n=Boolean(e.length&&Object.keys(i).length);return n&&e.some((t=>t.getCanSelect()&&!i[t.id]))&&(n=!1),n},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter((t=>t.getCanSelect())),{rowSelection:i}=t.getState();let n=!!e.length;return n&&e.some((t=>!i[t.id]))&&(n=!1),n},t.getIsSomeRowsSelected=()=>{var e;const i=Object.keys(null!=(e=t.getState().rowSelection)?e:{}).length;return i>0&&i{const e=t.getPaginationRowModel().flatRows;return!t.getIsAllPageRowsSelected()&&e.filter((t=>t.getCanSelect())).some((t=>t.getIsSelected()||t.getIsSomeSelected()))},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(i,n)=>{const o=t.getIsSelected();e.setRowSelection((s=>{var r;if(i=void 0!==i?i:!o,t.getCanSelect()&&o===i)return s;const a={...s};return I(a,t.id,i,null==(r=null==n?void 0:n.selectChildren)||r,e),a}))},t.getIsSelected=()=>{const{rowSelection:i}=e.getState();return E(t,i)},t.getIsSomeSelected=()=>{const{rowSelection:i}=e.getState();return"some"===O(t,i)},t.getIsAllSubRowsSelected=()=>{const{rowSelection:i}=e.getState();return"all"===O(t,i)},t.getCanSelect=()=>{var i;return"function"==typeof e.options.enableRowSelection?e.options.enableRowSelection(t):null==(i=e.options.enableRowSelection)||i},t.getCanSelectSubRows=()=>{var i;return"function"==typeof e.options.enableSubRowSelection?e.options.enableSubRowSelection(t):null==(i=e.options.enableSubRowSelection)||i},t.getCanMultiSelect=()=>{var i;return"function"==typeof e.options.enableMultiRowSelection?e.options.enableMultiRowSelection(t):null==(i=e.options.enableMultiRowSelection)||i},t.getToggleSelectedHandler=()=>{const e=t.getCanSelect();return i=>{var n;e&&t.toggleSelected(null==(n=i.target)?void 0:n.checked)}}}},I=(t,e,i,n,o)=>{var s;const r=o.getRow(e);i?(r.getCanMultiSelect()||Object.keys(t).forEach((e=>delete t[e])),r.getCanSelect()&&(t[e]=!0)):delete t[e],n&&null!=(s=r.subRows)&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach((e=>I(t,e.id,i,n,o)))};function A(t,e){const i=t.getState().rowSelection,n=[],o={},s=function(t,e){return t.map((t=>{var e;const r=E(t,i);if(r&&(n.push(t),o[t.id]=t),null!=(e=t.subRows)&&e.length&&(t={...t,subRows:s(t.subRows)}),r)return t})).filter(Boolean)};return{rows:s(e.rows),flatRows:n,rowsById:o}}function E(t,e){var i;return null!=(i=e[t.id])&&i}function O(t,e,i){var n;if(null==(n=t.subRows)||!n.length)return!1;let o=!0,s=!1;return t.subRows.forEach((t=>{if((!s||o)&&(t.getCanSelect()&&(E(t,e)?s=!0:o=!1),t.subRows&&t.subRows.length)){const i=O(t,e);"all"===i?s=!0:"some"===i?(s=!0,o=!1):o=!1}})),o?"all":!!s&&"some"}const D=/([0-9]+)/gm;function F(t,e){return t===e?0:t>e?1:-1}function T(t){return"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?"":String(t):"string"==typeof t?t:""}function L(t,e){const i=t.split(D).filter(Boolean),n=e.split(D).filter(Boolean);for(;i.length&&n.length;){const t=i.shift(),e=n.shift(),o=parseInt(t,10),s=parseInt(e,10),r=[o,s].sort();if(isNaN(r[0])){if(t>e)return 1;if(e>t)return-1}else{if(isNaN(r[1]))return isNaN(o)?-1:1;if(o>s)return 1;if(s>o)return-1}}return i.length-n.length}const V={alphanumeric:(t,e,i)=>L(T(t.getValue(i)).toLowerCase(),T(e.getValue(i)).toLowerCase()),alphanumericCaseSensitive:(t,e,i)=>L(T(t.getValue(i)),T(e.getValue(i))),text:(t,e,i)=>F(T(t.getValue(i)).toLowerCase(),T(e.getValue(i)).toLowerCase()),textCaseSensitive:(t,e,i)=>F(T(t.getValue(i)),T(e.getValue(i))),datetime:(t,e,i)=>{const n=t.getValue(i),o=e.getValue(i);return n>o?1:nF(t.getValue(i),e.getValue(i))},z=[l,{getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:o("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=i=>{t.getCanHide()&&e.setColumnVisibility((e=>({...e,[t.id]:null!=i?i:!t.getIsVisible()})))},t.getIsVisible=()=>{var i,n;return null==(i=null==(n=e.getState().columnVisibility)?void 0:n[t.id])||i},t.getCanHide=()=>{var i,n;return(null==(i=t.columnDef.enableHiding)||i)&&(null==(n=e.options.enableHiding)||n)},t.getToggleVisibilityHandler=()=>e=>{null==t.toggleVisibility||t.toggleVisibility(e.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=r((()=>[t.getAllCells(),e.getState().columnVisibility]),(t=>t.filter((t=>t.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),t.getVisibleCells=r((()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()]),((t,e,i)=>[...t,...e,...i]),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})},createTable:t=>{const e=(e,i)=>r((()=>[i(),i().filter((t=>t.getIsVisible())).map((t=>t.id)).join("_")]),(t=>t.filter((t=>null==t.getIsVisible?void 0:t.getIsVisible()))),{key:e,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}});t.getVisibleFlatColumns=e("getVisibleFlatColumns",(()=>t.getAllFlatColumns())),t.getVisibleLeafColumns=e("getVisibleLeafColumns",(()=>t.getAllLeafColumns())),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",(()=>t.getLeftLeafColumns())),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",(()=>t.getRightLeafColumns())),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",(()=>t.getCenterLeafColumns())),t.setColumnVisibility=e=>null==t.options.onColumnVisibilityChange?void 0:t.options.onColumnVisibilityChange(e),t.resetColumnVisibility=e=>{var i;t.setColumnVisibility(e?{}:null!=(i=t.initialState.columnVisibility)?i:{})},t.toggleAllColumnsVisible=e=>{var i;e=null!=(i=e)?i:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce(((t,i)=>({...t,[i.id]:e||!(null!=i.getCanHide&&i.getCanHide())})),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some((t=>!(null!=t.getIsVisible&&t.getIsVisible()))),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some((t=>null==t.getIsVisible?void 0:t.getIsVisible())),t.getToggleAllColumnsVisibilityHandler=()=>e=>{var i;t.toggleAllColumnsVisible(null==(i=e.target)?void 0:i.checked)}}},{getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:o("columnOrder",t)}),createTable:t=>{t.setColumnOrder=e=>null==t.options.onColumnOrderChange?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var i;t.setColumnOrder(e?[]:null!=(i=t.initialState.columnOrder)?i:[])},t._getOrderColumnsFn=r((()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode]),((t,e,i)=>n=>{let o=[];if(null!=t&&t.length){const e=[...t],i=[...n];for(;i.length&&e.length;){const t=e.shift(),n=i.findIndex((e=>e.id===t));n>-1&&o.push(i.splice(n,1)[0])}o=[...o,...i]}else o=n;return function(t,e,i){if(null==e||!e.length||!i)return t;const n=t.filter((t=>!e.includes(t.id)));return"remove"===i?n:[...e.map((e=>t.find((t=>t.id===e)))).filter(Boolean),...n]}(o,e,i)}),{key:!1})}},{getInitialState:t=>({columnPinning:{left:[],right:[]},rowPinning:{top:[],bottom:[]},...t}),getDefaultOptions:t=>({onColumnPinningChange:o("columnPinning",t),onRowPinningChange:o("rowPinning",t)}),createColumn:(t,e)=>{t.pin=i=>{const n=t.getLeafColumns().map((t=>t.id)).filter(Boolean);e.setColumnPinning((t=>{var e,o,s,r,a,l;return"right"===i?{left:(null!=(s=null==t?void 0:t.left)?s:[]).filter((t=>!(null!=n&&n.includes(t)))),right:[...(null!=(r=null==t?void 0:t.right)?r:[]).filter((t=>!(null!=n&&n.includes(t)))),...n]}:"left"===i?{left:[...(null!=(a=null==t?void 0:t.left)?a:[]).filter((t=>!(null!=n&&n.includes(t)))),...n],right:(null!=(l=null==t?void 0:t.right)?l:[]).filter((t=>!(null!=n&&n.includes(t))))}:{left:(null!=(e=null==t?void 0:t.left)?e:[]).filter((t=>!(null!=n&&n.includes(t)))),right:(null!=(o=null==t?void 0:t.right)?o:[]).filter((t=>!(null!=n&&n.includes(t))))}}))},t.getCanPin=()=>t.getLeafColumns().some((t=>{var i,n,o;return(null==(i=t.columnDef.enablePinning)||i)&&(null==(n=null!=(o=e.options.enableColumnPinning)?o:e.options.enablePinning)||n)})),t.getIsPinned=()=>{const i=t.getLeafColumns().map((t=>t.id)),{left:n,right:o}=e.getState().columnPinning,s=i.some((t=>null==n?void 0:n.includes(t))),r=i.some((t=>null==o?void 0:o.includes(t)));return s?"left":!!r&&"right"},t.getPinnedIndex=()=>{var i,n;const o=t.getIsPinned();return o?null!=(i=null==(n=e.getState().columnPinning)||null==(n=n[o])?void 0:n.indexOf(t.id))?i:-1:0}},createRow:(t,e)=>{t.pin=(i,n,o)=>{const s=n?t.getLeafRows().map((t=>{let{id:e}=t;return e})):[],r=o?t.getParentRows().map((t=>{let{id:e}=t;return e})):[],a=new Set([...r,t.id,...s]);e.setRowPinning((t=>{var e,n,o,s,r,l;return"bottom"===i?{top:(null!=(o=null==t?void 0:t.top)?o:[]).filter((t=>!(null!=a&&a.has(t)))),bottom:[...(null!=(s=null==t?void 0:t.bottom)?s:[]).filter((t=>!(null!=a&&a.has(t)))),...Array.from(a)]}:"top"===i?{top:[...(null!=(r=null==t?void 0:t.top)?r:[]).filter((t=>!(null!=a&&a.has(t)))),...Array.from(a)],bottom:(null!=(l=null==t?void 0:t.bottom)?l:[]).filter((t=>!(null!=a&&a.has(t))))}:{top:(null!=(e=null==t?void 0:t.top)?e:[]).filter((t=>!(null!=a&&a.has(t)))),bottom:(null!=(n=null==t?void 0:t.bottom)?n:[]).filter((t=>!(null!=a&&a.has(t))))}}))},t.getCanPin=()=>{var i;const{enableRowPinning:n,enablePinning:o}=e.options;return"function"==typeof n?n(t):null==(i=null!=n?n:o)||i},t.getIsPinned=()=>{const i=[t.id],{top:n,bottom:o}=e.getState().rowPinning,s=i.some((t=>null==n?void 0:n.includes(t))),r=i.some((t=>null==o?void 0:o.includes(t)));return s?"top":!!r&&"bottom"},t.getPinnedIndex=()=>{var i,n;const o=t.getIsPinned();if(!o)return-1;const s=null==(i=e._getPinnedRows(o))?void 0:i.map((t=>{let{id:e}=t;return e}));return null!=(n=null==s?void 0:s.indexOf(t.id))?n:-1},t.getCenterVisibleCells=r((()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,e,i)=>{const n=[...null!=e?e:[],...null!=i?i:[]];return t.filter((t=>!n.includes(t.column.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),t.getLeftVisibleCells=r((()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,,]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.column.id===e)))).filter(Boolean).map((t=>({...t,position:"left"})))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),t.getRightVisibleCells=r((()=>[t._getAllVisibleCells(),e.getState().columnPinning.right]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.column.id===e)))).filter(Boolean).map((t=>({...t,position:"right"})))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})},createTable:t=>{t.setColumnPinning=e=>null==t.options.onColumnPinningChange?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var i,n;return t.setColumnPinning(e?{left:[],right:[]}:null!=(i=null==(n=t.initialState)?void 0:n.columnPinning)?i:{left:[],right:[]})},t.getIsSomeColumnsPinned=e=>{var i;const n=t.getState().columnPinning;var o,s;return e?Boolean(null==(i=n[e])?void 0:i.length):Boolean((null==(o=n.left)?void 0:o.length)||(null==(s=n.right)?void 0:s.length))},t.getLeftLeafColumns=r((()=>[t.getAllLeafColumns(),t.getState().columnPinning.left]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.id===e)))).filter(Boolean)),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}}),t.getRightLeafColumns=r((()=>[t.getAllLeafColumns(),t.getState().columnPinning.right]),((t,e)=>(null!=e?e:[]).map((e=>t.find((t=>t.id===e)))).filter(Boolean)),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}}),t.getCenterLeafColumns=r((()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((t,e,i)=>{const n=[...null!=e?e:[],...null!=i?i:[]];return t.filter((t=>!n.includes(t.id)))}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}}),t.setRowPinning=e=>null==t.options.onRowPinningChange?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var i,n;return t.setRowPinning(e?{top:[],bottom:[]}:null!=(i=null==(n=t.initialState)?void 0:n.rowPinning)?i:{top:[],bottom:[]})},t.getIsSomeRowsPinned=e=>{var i;const n=t.getState().rowPinning;var o,s;return e?Boolean(null==(i=n[e])?void 0:i.length):Boolean((null==(o=n.top)?void 0:o.length)||(null==(s=n.bottom)?void 0:s.length))},t._getPinnedRows=e=>r((()=>[t.getRowModel().rows,t.getState().rowPinning[e]]),((i,n)=>{var o;return(null==(o=t.options.keepPinnedRows)||o?(null!=n?n:[]).map((e=>{const i=t.getRow(e,!0);return i.getIsAllParentsExpanded()?i:null})):(null!=n?n:[]).map((t=>i.find((e=>e.id===t))))).filter(Boolean).map((t=>({...t,position:e})))}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})(),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=r((()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom]),((t,e,i)=>{const n=new Set([...null!=e?e:[],...null!=i?i:[]]);return t.filter((t=>!n.has(t.id)))}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}},{getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:o("columnFilters",t),onGlobalFilterChange:o("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var i;const n=null==(i=t.getCoreRowModel().flatRows[0])||null==(i=i._getAllCellsByColumnId()[e.id])?void 0:i.getValue();return"string"==typeof n||"number"==typeof n}}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const i=e.getCoreRowModel().flatRows[0],n=null==i?void 0:i.getValue(t.id);return"string"==typeof n?M.includesString:"number"==typeof n?M.inNumberRange:"boolean"==typeof n||null!==n&&"object"==typeof n?M.equals:Array.isArray(n)?M.arrIncludes:M.weakEquals},t.getFilterFn=()=>{var i,n;return s(t.columnDef.filterFn)?t.columnDef.filterFn:"auto"===t.columnDef.filterFn?t.getAutoFilterFn():null!=(i=null==(n=e.options.filterFns)?void 0:n[t.columnDef.filterFn])?i:M[t.columnDef.filterFn]},t.getCanFilter=()=>{var i,n,o;return(null==(i=t.columnDef.enableColumnFilter)||i)&&(null==(n=e.options.enableColumnFilters)||n)&&(null==(o=e.options.enableFilters)||o)&&!!t.accessorFn},t.getCanGlobalFilter=()=>{var i,n,o,s;return(null==(i=t.columnDef.enableGlobalFilter)||i)&&(null==(n=e.options.enableGlobalFilter)||n)&&(null==(o=e.options.enableFilters)||o)&&(null==(s=null==e.options.getColumnCanGlobalFilter?void 0:e.options.getColumnCanGlobalFilter(t))||s)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var i;return null==(i=e.getState().columnFilters)||null==(i=i.find((e=>e.id===t.id)))?void 0:i.value},t.getFilterIndex=()=>{var i,n;return null!=(i=null==(n=e.getState().columnFilters)?void 0:n.findIndex((e=>e.id===t.id)))?i:-1},t.setFilterValue=i=>{e.setColumnFilters((e=>{const o=t.getFilterFn(),s=null==e?void 0:e.find((e=>e.id===t.id)),r=n(i,s?s.value:void 0);var a;if(k(o,r,t))return null!=(a=null==e?void 0:e.filter((e=>e.id!==t.id)))?a:[];const l={id:t.id,value:r};var h;return s?null!=(h=null==e?void 0:e.map((e=>e.id===t.id?l:e)))?h:[]:null!=e&&e.length?[...e,l]:[l]}))},t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.getGlobalAutoFilterFn=()=>M.includesString,t.getGlobalFilterFn=()=>{var e,i;const{globalFilterFn:n}=t.options;return s(n)?n:"auto"===n?t.getGlobalAutoFilterFn():null!=(e=null==(i=t.options.filterFns)?void 0:i[n])?e:M[n]},t.setColumnFilters=e=>{const i=t.getAllLeafColumns();null==t.options.onColumnFiltersChange||t.options.onColumnFiltersChange((t=>{var o;return null==(o=n(e,t))?void 0:o.filter((t=>{const e=i.find((e=>e.id===t.id));return!e||!k(e.getFilterFn(),t.value,e)}))}))},t.setGlobalFilter=e=>{null==t.options.onGlobalFilterChange||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},t.resetColumnFilters=e=>{var i,n;t.setColumnFilters(e?[]:null!=(i=null==(n=t.initialState)?void 0:n.columnFilters)?i:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}},{getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:o("sorting",t),isMultiSortEvent:t=>t.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const i=e.getFilteredRowModel().flatRows.slice(10);let n=!1;for(const e of i){const i=null==e?void 0:e.getValue(t.id);if("[object Date]"===Object.prototype.toString.call(i))return V.datetime;if("string"==typeof i&&(n=!0,i.split(D).length>1))return V.alphanumeric}return n?V.text:V.basic},t.getAutoSortDir=()=>{const i=e.getFilteredRowModel().flatRows[0];return"string"==typeof(null==i?void 0:i.getValue(t.id))?"asc":"desc"},t.getSortingFn=()=>{var i,n;if(!t)throw new Error;return s(t.columnDef.sortingFn)?t.columnDef.sortingFn:"auto"===t.columnDef.sortingFn?t.getAutoSortingFn():null!=(i=null==(n=e.options.sortingFns)?void 0:n[t.columnDef.sortingFn])?i:V[t.columnDef.sortingFn]},t.toggleSorting=(i,n)=>{const o=t.getNextSortingOrder(),s=null!=i;e.setSorting((r=>{const a=null==r?void 0:r.find((e=>e.id===t.id)),l=null==r?void 0:r.findIndex((e=>e.id===t.id));let h,c=[],u=s?i:"desc"===o;var d;return h=null!=r&&r.length&&t.getCanMultiSort()&&n?a?"toggle":"add":null!=r&&r.length&&l!==r.length-1?"replace":a?"toggle":"replace","toggle"===h&&(s||o||(h="remove")),"add"===h?(c=[...r,{id:t.id,desc:u}],c.splice(0,c.length-(null!=(d=e.options.maxMultiSortColCount)?d:Number.MAX_SAFE_INTEGER))):c="toggle"===h?r.map((e=>e.id===t.id?{...e,desc:u}:e)):"remove"===h?r.filter((e=>e.id!==t.id)):[{id:t.id,desc:u}],c}))},t.getFirstSortDir=()=>{var i,n;return(null!=(i=null!=(n=t.columnDef.sortDescFirst)?n:e.options.sortDescFirst)?i:"desc"===t.getAutoSortDir())?"desc":"asc"},t.getNextSortingOrder=i=>{var n,o;const s=t.getFirstSortDir(),r=t.getIsSorted();return r?!!(r===s||null!=(n=e.options.enableSortingRemoval)&&!n||i&&null!=(o=e.options.enableMultiRemove)&&!o)&&("desc"===r?"asc":"desc"):s},t.getCanSort=()=>{var i,n;return(null==(i=t.columnDef.enableSorting)||i)&&(null==(n=e.options.enableSorting)||n)&&!!t.accessorFn},t.getCanMultiSort=()=>{var i,n;return null!=(i=null!=(n=t.columnDef.enableMultiSort)?n:e.options.enableMultiSort)?i:!!t.accessorFn},t.getIsSorted=()=>{var i;const n=null==(i=e.getState().sorting)?void 0:i.find((e=>e.id===t.id));return!!n&&(n.desc?"desc":"asc")},t.getSortIndex=()=>{var i,n;return null!=(i=null==(n=e.getState().sorting)?void 0:n.findIndex((e=>e.id===t.id)))?i:-1},t.clearSorting=()=>{e.setSorting((e=>null!=e&&e.length?e.filter((e=>e.id!==t.id)):[]))},t.getToggleSortingHandler=()=>{const i=t.getCanSort();return n=>{i&&(null==n.persist||n.persist(),null==t.toggleSorting||t.toggleSorting(void 0,!!t.getCanMultiSort()&&(null==e.options.isMultiSortEvent?void 0:e.options.isMultiSortEvent(n))))}}},createTable:t=>{t.setSorting=e=>null==t.options.onSortingChange?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var i,n;t.setSorting(e?[]:null!=(i=null==(n=t.initialState)?void 0:n.sorting)?i:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},{getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,i;return null!=(e=null==(i=t.getValue())||null==i.toString?void 0:i.toString())?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:o("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping((e=>null!=e&&e.includes(t.id)?e.filter((e=>e!==t.id)):[...null!=e?e:[],t.id]))},t.getCanGroup=()=>{var i,n,o,s;return null!=(i=null==(n=null!=(o=null==(s=t.columnDef.enableGrouping)||s)?o:e.options.enableGrouping)||n)?i:!!t.accessorFn},t.getIsGrouped=()=>{var i;return null==(i=e.getState().grouping)?void 0:i.includes(t.id)},t.getGroupedIndex=()=>{var i;return null==(i=e.getState().grouping)?void 0:i.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const e=t.getCanGroup();return()=>{e&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const i=e.getCoreRowModel().flatRows[0],n=null==i?void 0:i.getValue(t.id);return"number"==typeof n?R.sum:"[object Date]"===Object.prototype.toString.call(n)?R.extent:void 0},t.getAggregationFn=()=>{var i,n;if(!t)throw new Error;return s(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:"auto"===t.columnDef.aggregationFn?t.getAutoAggregationFn():null!=(i=null==(n=e.options.aggregationFns)?void 0:n[t.columnDef.aggregationFn])?i:R[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>null==t.options.onGroupingChange?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var i,n;t.setGrouping(e?[]:null!=(i=null==(n=t.initialState)?void 0:n.grouping)?i:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=i=>{if(t._groupingValuesCache.hasOwnProperty(i))return t._groupingValuesCache[i];const n=e.getColumn(i);return null!=n&&n.columnDef.getGroupingValue?(t._groupingValuesCache[i]=n.columnDef.getGroupingValue(t.original),t._groupingValuesCache[i]):t.getValue(i)},t._groupingValuesCache={}},createCell:(t,e,i,n)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===i.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var e;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!(null==(e=i.subRows)||!e.length)}}},f,{getInitialState:t=>({...t,pagination:{pageIndex:0,pageSize:10,...null==t?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:o("pagination",t)}),createTable:t=>{let e=!1,i=!1;t._autoResetPageIndex=()=>{var n,o;if(e){if(null!=(n=null!=(o=t.options.autoResetAll)?o:t.options.autoResetPageIndex)?n:!t.options.manualPagination){if(i)return;i=!0,t._queue((()=>{t.resetPageIndex(),i=!1}))}}else t._queue((()=>{e=!0}))},t.setPagination=e=>null==t.options.onPaginationChange?void 0:t.options.onPaginationChange((t=>n(e,t))),t.resetPagination=e=>{var i;t.setPagination(e?{pageIndex:0,pageSize:10}:null!=(i=t.initialState.pagination)?i:{pageIndex:0,pageSize:10})},t.setPageIndex=e=>{t.setPagination((i=>{let o=n(e,i.pageIndex);const s=void 0===t.options.pageCount||-1===t.options.pageCount?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return o=Math.max(0,Math.min(o,s)),{...i,pageIndex:o}}))},t.resetPageIndex=e=>{var i,n;t.setPageIndex(e?0:null!=(i=null==(n=t.initialState)||null==(n=n.pagination)?void 0:n.pageIndex)?i:0)},t.resetPageSize=e=>{var i,n;t.setPageSize(e?10:null!=(i=null==(n=t.initialState)||null==(n=n.pagination)?void 0:n.pageSize)?i:10)},t.setPageSize=e=>{t.setPagination((t=>{const i=Math.max(1,n(e,t.pageSize)),o=t.pageSize*t.pageIndex,s=Math.floor(o/i);return{...t,pageIndex:s,pageSize:i}}))},t.setPageCount=e=>t.setPagination((i=>{var o;let s=n(e,null!=(o=t.options.pageCount)?o:-1);return"number"==typeof s&&(s=Math.max(-1,s)),{...i,pageCount:s}})),t.getPageOptions=r((()=>[t.getPageCount()]),(t=>{let e=[];return t&&t>0&&(e=[...new Array(t)].fill(null).map(((t,e)=>e))),e}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable}}),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:e}=t.getState().pagination,i=t.getPageCount();return-1===i||0!==i&&et.setPageIndex((t=>t-1)),t.nextPage=()=>t.setPageIndex((t=>t+1)),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var e;return null!=(e=t.options.pageCount)?e:Math.ceil(t.getPrePaginationRowModel().rows.length/t.getState().pagination.pageSize)}}},P,u];function N(t){var e;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let i={_features:z};const o=i._features.reduce(((t,e)=>Object.assign(t,null==e.getDefaultOptions?void 0:e.getDefaultOptions(i))),{});let s={...null!=(e=t.initialState)?e:{}};i._features.forEach((t=>{var e;s=null!=(e=null==t.getInitialState?void 0:t.getInitialState(s))?e:s}));const a=[];let l=!1;const h={_features:z,options:{...o,...t},initialState:s,_queue:t=>{a.push(t),l||(l=!0,Promise.resolve().then((()=>{for(;a.length;)a.shift()();l=!1})).catch((t=>setTimeout((()=>{throw t})))))},reset:()=>{i.setState(i.initialState)},setOptions:t=>{const e=n(t,i.options);i.options=(t=>i.options.mergeOptions?i.options.mergeOptions(o,t):{...o,...t})(e)},getState:()=>i.options.state,setState:t=>{null==i.options.onStateChange||i.options.onStateChange(t)},_getRowId:(t,e,n)=>{var o;return null!=(o=null==i.options.getRowId?void 0:i.options.getRowId(t,e,n))?o:`${n?[n.id,e].join("."):e}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(t,e)=>{const n=(e?i.getCoreRowModel():i.getRowModel()).rowsById[t];if(!n)throw new Error;return n},_getDefaultColumnDef:r((()=>[i.options.defaultColumn]),(t=>{var e;return t=null!=(e=t)?e:{},{header:t=>{const e=t.header.column.columnDef;return e.accessorKey?e.accessorKey:e.accessorFn?e.id:null},cell:t=>{var e,i;return null!=(e=null==(i=t.renderValue())||null==i.toString?void 0:i.toString())?e:null},...i._features.reduce(((t,e)=>Object.assign(t,null==e.getDefaultColumnDef?void 0:e.getDefaultColumnDef())),{}),...t}}),{debug:()=>{var t;return null!=(t=i.options.debugAll)?t:i.options.debugColumns},key:!1}),_getColumnDefs:()=>i.options.columns,getAllColumns:r((()=>[i._getColumnDefs()]),(t=>{const e=function(t,n,o){return void 0===o&&(o=0),t.map((t=>{const s=function(t,e,i,n){var o,s;const a={...t._getDefaultColumnDef(),...e},l=a.accessorKey;let h,c=null!=(o=null!=(s=a.id)?s:l?l.replace(".","_"):void 0)?o:"string"==typeof a.header?a.header:void 0;if(a.accessorFn?h=a.accessorFn:l&&(h=l.includes(".")?t=>{let e=t;for(const t of l.split(".")){var i;e=null==(i=e)?void 0:i[t]}return e}:t=>t[a.accessorKey]),!c)throw new Error;let u={id:`${String(c)}`,accessorFn:h,parent:n,depth:i,columnDef:a,columns:[],getFlatColumns:r((()=>[!0]),(()=>{var t;return[u,...null==(t=u.columns)?void 0:t.flatMap((t=>t.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}}),getLeafColumns:r((()=>[t._getOrderColumnsFn()]),(t=>{var e;if(null!=(e=u.columns)&&e.length){let e=u.columns.flatMap((t=>t.getLeafColumns()));return t(e)}return[u]}),{key:"column.getLeafColumns",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugColumns}})};for(const e of t._features)null==e.createColumn||e.createColumn(u,t);return u}(i,t,o,n),a=t;return s.columns=a.columns?e(a.columns,s,o+1):[],s}))};return e(t)}),{key:!1,debug:()=>{var t;return null!=(t=i.options.debugAll)?t:i.options.debugColumns}}),getAllFlatColumns:r((()=>[i.getAllColumns()]),(t=>t.flatMap((t=>t.getFlatColumns()))),{key:!1,debug:()=>{var t;return null!=(t=i.options.debugAll)?t:i.options.debugColumns}}),_getAllFlatColumnsById:r((()=>[i.getAllFlatColumns()]),(t=>t.reduce(((t,e)=>(t[e.id]=e,t)),{})),{key:!1,debug:()=>{var t;return null!=(t=i.options.debugAll)?t:i.options.debugColumns}}),getAllLeafColumns:r((()=>[i.getAllColumns(),i._getOrderColumnsFn()]),((t,e)=>e(t.flatMap((t=>t.getLeafColumns())))),{key:!1,debug:()=>{var t;return null!=(t=i.options.debugAll)?t:i.options.debugColumns}}),getColumn:t=>i._getAllFlatColumnsById()[t]};Object.assign(i,h);for(let t=0;t{let l={id:e,index:n,original:i,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:e=>{if(l._valuesCache.hasOwnProperty(e))return l._valuesCache[e];const i=t.getColumn(e);return null!=i&&i.accessorFn?(l._valuesCache[e]=i.accessorFn(l.original,n),l._valuesCache[e]):void 0},getUniqueValues:e=>{if(l._uniqueValuesCache.hasOwnProperty(e))return l._uniqueValuesCache[e];const i=t.getColumn(e);return null!=i&&i.accessorFn?i.columnDef.getUniqueValues?(l._uniqueValuesCache[e]=i.columnDef.getUniqueValues(l.original,n),l._uniqueValuesCache[e]):(l._uniqueValuesCache[e]=[l.getValue(e)],l._uniqueValuesCache[e]):void 0},renderValue:e=>{var i;return null!=(i=l.getValue(e))?i:t.options.renderFallbackValue},subRows:null!=s?s:[],getLeafRows:()=>function(t,e){const i=[],n=t=>{t.forEach((t=>{i.push(t);const o=e(t);null!=o&&o.length&&n(o)}))};return n(t),i}(l.subRows,(t=>t.subRows)),getParentRow:()=>l.parentId?t.getRow(l.parentId,!0):void 0,getParentRows:()=>{let t=[],e=l;for(;;){const i=e.getParentRow();if(!i)break;t.push(i),e=i}return t.reverse()},getAllCells:r((()=>[t.getAllLeafColumns()]),(e=>e.map((e=>function(t,e,i,n){const o={id:`${e.id}_${i.id}`,row:e,column:i,getValue:()=>e.getValue(n),renderValue:()=>{var e;return null!=(e=o.getValue())?e:t.options.renderFallbackValue},getContext:r((()=>[t,i,e,o]),((t,e,i,n)=>({table:t,column:e,row:i,cell:n,getValue:n.getValue,renderValue:n.renderValue})),{key:!1,debug:()=>t.options.debugAll})};return t._features.forEach((n=>{null==n.createCell||n.createCell(o,i,e,t)}),{}),o}(t,l,e,e.id)))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),_getAllCellsByColumnId:r((()=>[l.getAllCells()]),(t=>t.reduce(((t,e)=>(t[e.column.id]=e,t)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})};for(let e=0;e"function"==typeof t?{...e,accessorFn:t}:{...e,accessorKey:t},display:t=>t,group:t=>t}}function j(){return t=>r((()=>[t.options.data]),(e=>{const i={rows:[],flatRows:[],rowsById:{}},n=function(e,o,s){void 0===o&&(o=0);const r=[];for(let l=0;l{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function W(){return t=>r((()=>[t.getState().sorting,t.getPreSortedRowModel()]),((e,i)=>{if(!i.rows.length||null==e||!e.length)return i;const n=t.getState().sorting,o=[],s=n.filter((e=>{var i;return null==(i=t.getColumn(e.id))?void 0:i.getCanSort()})),r={};s.forEach((e=>{const i=t.getColumn(e.id);i&&(r[e.id]={sortUndefined:i.columnDef.sortUndefined,invertSorting:i.columnDef.invertSorting,sortingFn:i.getSortingFn()})}));const a=t=>{const e=t.map((t=>({...t})));return e.sort(((t,e)=>{for(let n=0;n{var e;o.push(t),null!=(e=t.subRows)&&e.length&&(t.subRows=a(t.subRows))})),e};return{rows:a(i.rows),flatRows:o,rowsById:i.rowsById}}),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}}}]); //# sourceMappingURL=708.4be1cfd9088aa0dba454.js.map