s(lt,O)?(D[V]=lt,D[U]=F,V=U):(D[V]=O,D[Z]=F,V=Z);else if(Us(lt,F))D[V]=lt,D[U]=F,V=U;else break t}}return $}function s(D,$){var F=D.sortIndex-$.sortIndex;return F!==0?F:D.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,h=3,f=!1,p=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(D){for(var $=n(c);$!==null;){if($.callback===null)i(c);else if($.startTime<=D)i(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(c)}}function _(D){if(m=!1,x(D),!p)if(n(l)!==null)p=!0,R(w);else{var $=n(c);$!==null&&B(_,$.startTime-D)}}function w(D,$){p=!1,m&&(m=!1,y(M),M=-1),f=!0;var F=h;try{for(x($),d=n(l);d!==null&&(!(d.expirationTime>$)||D&&!A());){var V=d.callback;if(typeof V=="function"){d.callback=null,h=d.priorityLevel;var W=V(d.expirationTime<=$);$=e.unstable_now(),typeof W=="function"?d.callback=W:d===n(l)&&i(l),x($)}else i(l);d=n(l)}if(d!==null)var et=!0;else{var Z=n(c);Z!==null&&B(_,Z.startTime-$),et=!1}return et}finally{d=null,h=F,f=!1}}var S=!1,C=null,M=-1,P=5,T=-1;function A(){return!(e.unstable_now()-TD||125V?(D.sortIndex=F,t(c,D),n(l)===null&&D===n(c)&&(m?(y(M),M=-1):m=!0,B(_,F-V))):(D.sortIndex=W,t(l,D),p||f||(p=!0,R(w))),D},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(D){var $=h;return function(){var F=h;h=$;try{return D.apply(this,arguments)}finally{h=F}}}})(Dw);Tw.exports=Dw;var lD=Tw.exports;/**
+ */(function(e){function t(D,$){var F=D.length;D.push($);t:for(;0>>1,W=D[V];if(0>>1;Vs(O,F))Us(lt,O)?(D[V]=lt,D[U]=F,V=U):(D[V]=O,D[Z]=F,V=Z);else if(Us(lt,F))D[V]=lt,D[U]=F,V=U;else break t}}return $}function s(D,$){var F=D.sortIndex-$.sortIndex;return F!==0?F:D.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,h=3,f=!1,p=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(D){for(var $=n(c);$!==null;){if($.callback===null)i(c);else if($.startTime<=D)i(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(c)}}function _(D){if(m=!1,x(D),!p)if(n(l)!==null)p=!0,L(w);else{var $=n(c);$!==null&&B(_,$.startTime-D)}}function w(D,$){p=!1,m&&(m=!1,y(M),M=-1),f=!0;var F=h;try{for(x($),d=n(l);d!==null&&(!(d.expirationTime>$)||D&&!A());){var V=d.callback;if(typeof V=="function"){d.callback=null,h=d.priorityLevel;var W=V(d.expirationTime<=$);$=e.unstable_now(),typeof W=="function"?d.callback=W:d===n(l)&&i(l),x($)}else i(l);d=n(l)}if(d!==null)var et=!0;else{var Z=n(c);Z!==null&&B(_,Z.startTime-$),et=!1}return et}finally{d=null,h=F,f=!1}}var S=!1,C=null,M=-1,P=5,T=-1;function A(){return!(e.unstable_now()-TD||125V?(D.sortIndex=F,t(c,D),n(l)===null&&D===n(c)&&(m?(y(M),M=-1):m=!0,B(_,F-V))):(D.sortIndex=W,t(l,D),p||f||(p=!0,L(w))),D},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(D){var $=h;return function(){var F=h;h=$;try{return D.apply(this,arguments)}finally{h=F}}}})(Dw);Tw.exports=Dw;var lD=Tw.exports;/**
* @license React
* react-dom.production.min.js
*
@@ -30,31 +30,31 @@ var FT=Object.defineProperty;var BT=(e,t,n)=>t in e?FT(e,t,{enumerable:!0,config
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var Ew=k,_n=lD;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mp=Object.prototype.hasOwnProperty,cD=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,j0={},$0={};function uD(e){return Mp.call($0,e)?!0:Mp.call(j0,e)?!1:cD.test(e)?$0[e]=!0:(j0[e]=!0,!1)}function dD(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hD(e,t,n,i){if(t===null||typeof t>"u"||dD(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Xe(e,t,n,i,s,r,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=r,this.removeEmptyString=o}var Ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ee[e]=new Xe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ee[t]=new Xe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ee[e]=new Xe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ee[e]=new Xe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ee[e]=new Xe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ee[e]=new Xe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ee[e]=new Xe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ee[e]=new Xe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ee[e]=new Xe(e,5,!1,e.toLowerCase(),null,!1,!1)});var fg=/[\-:]([a-z])/g;function pg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(fg,pg);Ee[t]=new Xe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(fg,pg);Ee[t]=new Xe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(fg,pg);Ee[t]=new Xe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ee[e]=new Xe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ee.xlinkHref=new Xe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ee[e]=new Xe(e,1,!1,e.toLowerCase(),null,!0,!0)});function mg(e,t,n,i){var s=Ee.hasOwnProperty(t)?Ee[t]:null;(s!==null?s.type!==0:i||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mp=Object.prototype.hasOwnProperty,cD=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,j0={},$0={};function uD(e){return Mp.call($0,e)?!0:Mp.call(j0,e)?!1:cD.test(e)?$0[e]=!0:(j0[e]=!0,!1)}function dD(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hD(e,t,n,i){if(t===null||typeof t>"u"||dD(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Xe(e,t,n,i,s,r,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=r,this.removeEmptyString=o}var Ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ee[e]=new Xe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ee[t]=new Xe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ee[e]=new Xe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ee[e]=new Xe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ee[e]=new Xe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ee[e]=new Xe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ee[e]=new Xe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ee[e]=new Xe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ee[e]=new Xe(e,5,!1,e.toLowerCase(),null,!1,!1)});var fg=/[\-:]([a-z])/g;function pg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(fg,pg);Ee[t]=new Xe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(fg,pg);Ee[t]=new Xe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(fg,pg);Ee[t]=new Xe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ee[e]=new Xe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ee.xlinkHref=new Xe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ee[e]=new Xe(e,1,!1,e.toLowerCase(),null,!0,!0)});function mg(e,t,n,i){var s=Ee.hasOwnProperty(t)?Ee[t]:null;(s!==null?s.type!==0:i||!(2a||s[o]!==r[a]){var l=`
-`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{cf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ha(e):""}function fD(e){switch(e.tag){case 5:return Ha(e.type);case 16:return Ha("Lazy");case 13:return Ha("Suspense");case 19:return Ha("SuspenseList");case 0:case 2:case 15:return e=uf(e.type,!1),e;case 11:return e=uf(e.type.render,!1),e;case 1:return e=uf(e.type,!0),e;default:return""}}function Dp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case co:return"Fragment";case lo:return"Portal";case Cp:return"Profiler";case gg:return"StrictMode";case Pp:return"Suspense";case Tp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Lw:return(e.displayName||"Context")+".Consumer";case Ow:return(e._context.displayName||"Context")+".Provider";case yg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vg:return t=e.displayName||null,t!==null?t:Dp(e.type)||"Memo";case ms:t=e._payload,e=e._init;try{return Dp(e(t))}catch{}}return null}function pD(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Dp(t);case 8:return t===gg?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Bs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mD(e){var t=Nw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){i=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lc(e){e._valueTracker||(e._valueTracker=mD(e))}function jw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Nw(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function cd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ep(e,t){var n=t.checked;return se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function F0(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=Bs(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $w(e,t){t=t.checked,t!=null&&mg(e,"checked",t,!1)}function Ap(e,t){$w(e,t);var n=Bs(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Op(e,t.type,n):t.hasOwnProperty("defaultValue")&&Op(e,t.type,Bs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function B0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Op(e,t,n){(t!=="number"||cd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ua=Array.isArray;function Co(e,t,n,i){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Rc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var el={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},gD=["Webkit","ms","Moz","O"];Object.keys(el).forEach(function(e){gD.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),el[t]=el[e]})});function Vw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||el.hasOwnProperty(e)&&el[e]?(""+t).trim():t+"px"}function zw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,s=Vw(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}var yD=se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Np(e,t){if(t){if(yD[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function jp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $p=null;function xg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ip=null,Po=null,To=null;function W0(e){if(e=cc(e)){if(typeof Ip!="function")throw Error(H(280));var t=e.stateNode;t&&(t=ph(t),Ip(e.stateNode,e.type,t))}}function Ww(e){Po?To?To.push(e):To=[e]:Po=e}function Hw(){if(Po){var e=Po,t=To;if(To=Po=null,W0(e),t)for(e=0;e>>=0,e===0?32:31-(TD(e)/DD|0)|0}var Nc=64,jc=4194304;function Ya(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fd(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,s=e.suspendedLanes,r=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?i=Ya(a):(r&=o,r!==0&&(i=Ya(r)))}else o=n&~s,o!==0?i=Ya(o):r!==0&&(i=Ya(r));if(i===0)return 0;if(t!==0&&t!==i&&!(t&s)&&(s=i&-i,r=t&-t,s>=r||s===16&&(r&4194240)!==0))return t;if(i&4&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0n;n++)t.push(e);return t}function ac(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ei(t),e[t]=n}function LD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0=il),Z0=" ",J0=!1;function uk(e,t){switch(e){case"keyup":return aE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var uo=!1;function cE(e,t){switch(e){case"compositionend":return dk(t);case"keypress":return t.which!==32?null:(J0=!0,Z0);case"textInput":return e=t.data,e===Z0&&J0?null:e;default:return null}}function uE(e,t){if(uo)return e==="compositionend"||!Pg&&uk(e,t)?(e=lk(),zu=Sg=_s=null,uo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=i}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=iv(n)}}function mk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gk(){for(var e=window,t=cd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=cd(e.document)}return t}function Tg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xE(e){var t=gk(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mk(n.ownerDocument.documentElement,n)){if(i!==null&&Tg(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,r=Math.min(i.start,s);i=i.end===void 0?r:Math.min(i.end,s),!e.extend&&r>i&&(s=i,i=r,r=s),s=sv(n,r);var o=sv(n,i);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),r>i?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ho=null,Hp=null,rl=null,Up=!1;function rv(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Up||ho==null||ho!==cd(i)||(i=ho,"selectionStart"in i&&Tg(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),rl&&Ol(rl,i)||(rl=i,i=gd(Hp,"onSelect"),0mo||(e.current=Qp[mo],Qp[mo]=null,mo--)}function Bt(e,t){mo++,Qp[mo]=e.current,e.current=t}var Vs={},Ve=Gs(Vs),rn=Gs(!1),Lr=Vs;function $o(e,t){var n=e.type.contextTypes;if(!n)return Vs;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var s={},r;for(r in n)s[r]=t[r];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function on(e){return e=e.childContextTypes,e!=null}function vd(){Yt(rn),Yt(Ve)}function hv(e,t,n){if(Ve.current!==Vs)throw Error(H(168));Bt(Ve,t),Bt(rn,n)}function Mk(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var s in i)if(!(s in t))throw Error(H(108,pD(e)||"Unknown",s));return se({},n,i)}function xd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vs,Lr=Ve.current,Bt(Ve,e),Bt(rn,rn.current),!0}function fv(e,t,n){var i=e.stateNode;if(!i)throw Error(H(169));n?(e=Mk(e,t,Lr),i.__reactInternalMemoizedMergedChildContext=e,Yt(rn),Yt(Ve),Bt(Ve,e)):Yt(rn),Bt(rn,n)}var ji=null,mh=!1,Sf=!1;function Ck(e){ji===null?ji=[e]:ji.push(e)}function AE(e){mh=!0,Ck(e)}function qs(){if(!Sf&&ji!==null){Sf=!0;var e=0,t=Ot;try{var n=ji;for(Ot=1;e>=o,s-=o,Fi=1<<32-ei(t)+s|n<M?(P=C,C=null):P=C.sibling;var T=h(y,C,x[M],_);if(T===null){C===null&&(C=P);break}e&&C&&T.alternate===null&&t(y,C),g=r(T,g,M),S===null?w=T:S.sibling=T,S=T,C=P}if(M===x.length)return n(y,C),Gt&&dr(y,M),w;if(C===null){for(;MM?(P=C,C=null):P=C.sibling;var A=h(y,C,T.value,_);if(A===null){C===null&&(C=P);break}e&&C&&A.alternate===null&&t(y,C),g=r(A,g,M),S===null?w=A:S.sibling=A,S=A,C=P}if(T.done)return n(y,C),Gt&&dr(y,M),w;if(C===null){for(;!T.done;M++,T=x.next())T=d(y,T.value,_),T!==null&&(g=r(T,g,M),S===null?w=T:S.sibling=T,S=T);return Gt&&dr(y,M),w}for(C=i(y,C);!T.done;M++,T=x.next())T=f(C,y,M,T.value,_),T!==null&&(e&&T.alternate!==null&&C.delete(T.key===null?M:T.key),g=r(T,g,M),S===null?w=T:S.sibling=T,S=T);return e&&C.forEach(function(E){return t(y,E)}),Gt&&dr(y,M),w}function v(y,g,x,_){if(typeof x=="object"&&x!==null&&x.type===co&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Oc:t:{for(var w=x.key,S=g;S!==null;){if(S.key===w){if(w=x.type,w===co){if(S.tag===7){n(y,S.sibling),g=s(S,x.props.children),g.return=y,y=g;break t}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===ms&&bv(w)===S.type){n(y,S.sibling),g=s(S,x.props),g.ref=ga(y,S,x),g.return=y,y=g;break t}n(y,S);break}else t(y,S);S=S.sibling}x.type===co?(g=Mr(x.props.children,y.mode,_,x.key),g.return=y,y=g):(_=qu(x.type,x.key,x.props,null,y.mode,_),_.ref=ga(y,g,x),_.return=y,y=_)}return o(y);case lo:t:{for(S=x.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(y,g.sibling),g=s(g,x.children||[]),g.return=y,y=g;break t}else{n(y,g);break}else t(y,g);g=g.sibling}g=Of(x,y.mode,_),g.return=y,y=g}return o(y);case ms:return S=x._init,v(y,g,S(x._payload),_)}if(Ua(x))return p(y,g,x,_);if(da(x))return m(y,g,x,_);Wc(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(y,g.sibling),g=s(g,x),g.return=y,y=g):(n(y,g),g=Af(x,y.mode,_),g.return=y,y=g),o(y)):n(y,g)}return v}var Fo=Rk(!0),Nk=Rk(!1),uc={},yi=Gs(uc),jl=Gs(uc),$l=Gs(uc);function wr(e){if(e===uc)throw Error(H(174));return e}function $g(e,t){switch(Bt($l,t),Bt(jl,e),Bt(yi,uc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Rp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Rp(t,e)}Yt(yi),Bt(yi,t)}function Bo(){Yt(yi),Yt(jl),Yt($l)}function jk(e){wr($l.current);var t=wr(yi.current),n=Rp(t,e.type);t!==n&&(Bt(jl,e),Bt(yi,n))}function Ig(e){jl.current===e&&(Yt(yi),Yt(jl))}var te=Gs(0);function Md(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mf=[];function Fg(){for(var e=0;en?n:4,e(!0);var i=Cf.transition;Cf.transition={};try{e(!1),t()}finally{Ot=n,Cf.transition=i}}function Zk(){return Vn().memoizedState}function NE(e,t,n){var i=Ns(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Jk(e))tS(t,n);else if(n=Ek(e,t,n,i),n!==null){var s=Ue();ni(n,e,i,s),eS(n,t,i)}}function jE(e,t,n){var i=Ns(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Jk(e))tS(t,s);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var o=t.lastRenderedState,a=r(o,n);if(s.hasEagerState=!0,s.eagerState=a,ii(a,o)){var l=t.interleaved;l===null?(s.next=s,Ng(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Ek(e,t,s,i),n!==null&&(s=Ue(),ni(n,e,i,s),eS(n,t,i))}}function Jk(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function tS(e,t){ol=Cd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function eS(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,_g(e,n)}}var Pd={readContext:Bn,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},$E={readContext:Bn,useCallback:function(e,t){return di().memoizedState=[e,t===void 0?null:t],e},useContext:Bn,useEffect:wv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yu(4194308,4,Xk.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yu(4,2,e,t)},useMemo:function(e,t){var n=di();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=di();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=NE.bind(null,ie,e),[i.memoizedState,e]},useRef:function(e){var t=di();return e={current:e},t.memoizedState=e},useState:_v,useDebugValue:Hg,useDeferredValue:function(e){return di().memoizedState=e},useTransition:function(){var e=_v(!1),t=e[0];return e=RE.bind(null,e[1]),di().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=ie,s=di();if(Gt){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),Se===null)throw Error(H(349));Nr&30||Fk(i,t,n)}s.memoizedState=n;var r={value:n,getSnapshot:t};return s.queue=r,wv(Vk.bind(null,i,r,e),[e]),i.flags|=2048,Bl(9,Bk.bind(null,i,r,n,t),void 0,null),n},useId:function(){var e=di(),t=Se.identifierPrefix;if(Gt){var n=Bi,i=Fi;n=(i&~(1<<32-ei(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Il++,0")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{cf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ha(e):""}function fD(e){switch(e.tag){case 5:return Ha(e.type);case 16:return Ha("Lazy");case 13:return Ha("Suspense");case 19:return Ha("SuspenseList");case 0:case 2:case 15:return e=uf(e.type,!1),e;case 11:return e=uf(e.type.render,!1),e;case 1:return e=uf(e.type,!0),e;default:return""}}function Dp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case co:return"Fragment";case lo:return"Portal";case Cp:return"Profiler";case gg:return"StrictMode";case Pp:return"Suspense";case Tp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Rw:return(e.displayName||"Context")+".Consumer";case Ow:return(e._context.displayName||"Context")+".Provider";case yg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vg:return t=e.displayName||null,t!==null?t:Dp(e.type)||"Memo";case ms:t=e._payload,e=e._init;try{return Dp(e(t))}catch{}}return null}function pD(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Dp(t);case 8:return t===gg?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Bs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mD(e){var t=Nw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){i=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lc(e){e._valueTracker||(e._valueTracker=mD(e))}function jw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Nw(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function cd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ep(e,t){var n=t.checked;return se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function F0(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=Bs(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $w(e,t){t=t.checked,t!=null&&mg(e,"checked",t,!1)}function Ap(e,t){$w(e,t);var n=Bs(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Op(e,t.type,n):t.hasOwnProperty("defaultValue")&&Op(e,t.type,Bs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function B0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Op(e,t,n){(t!=="number"||cd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ua=Array.isArray;function Co(e,t,n,i){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Nc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var nl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},gD=["Webkit","ms","Moz","O"];Object.keys(nl).forEach(function(e){gD.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nl[t]=nl[e]})});function Vw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||nl.hasOwnProperty(e)&&nl[e]?(""+t).trim():t+"px"}function zw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,s=Vw(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,s):e[n]=s}}var yD=se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Np(e,t){if(t){if(yD[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function jp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $p=null;function xg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ip=null,Po=null,To=null;function W0(e){if(e=uc(e)){if(typeof Ip!="function")throw Error(H(280));var t=e.stateNode;t&&(t=ph(t),Ip(e.stateNode,e.type,t))}}function Ww(e){Po?To?To.push(e):To=[e]:Po=e}function Hw(){if(Po){var e=Po,t=To;if(To=Po=null,W0(e),t)for(e=0;e>>=0,e===0?32:31-(TD(e)/DD|0)|0}var jc=64,$c=4194304;function Ya(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fd(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,s=e.suspendedLanes,r=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?i=Ya(a):(r&=o,r!==0&&(i=Ya(r)))}else o=n&~s,o!==0?i=Ya(o):r!==0&&(i=Ya(r));if(i===0)return 0;if(t!==0&&t!==i&&!(t&s)&&(s=i&-i,r=t&-t,s>=r||s===16&&(r&4194240)!==0))return t;if(i&4&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0n;n++)t.push(e);return t}function lc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ei(t),e[t]=n}function RD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0=sl),Z0=" ",J0=!1;function uk(e,t){switch(e){case"keyup":return aE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var uo=!1;function cE(e,t){switch(e){case"compositionend":return dk(t);case"keypress":return t.which!==32?null:(J0=!0,Z0);case"textInput":return e=t.data,e===Z0&&J0?null:e;default:return null}}function uE(e,t){if(uo)return e==="compositionend"||!Pg&&uk(e,t)?(e=lk(),Wu=Sg=_s=null,uo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=i}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=iv(n)}}function mk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gk(){for(var e=window,t=cd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=cd(e.document)}return t}function Tg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xE(e){var t=gk(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mk(n.ownerDocument.documentElement,n)){if(i!==null&&Tg(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,r=Math.min(i.start,s);i=i.end===void 0?r:Math.min(i.end,s),!e.extend&&r>i&&(s=i,i=r,r=s),s=sv(n,r);var o=sv(n,i);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),r>i?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ho=null,Hp=null,ol=null,Up=!1;function rv(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Up||ho==null||ho!==cd(i)||(i=ho,"selectionStart"in i&&Tg(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ol&&Rl(ol,i)||(ol=i,i=gd(Hp,"onSelect"),0mo||(e.current=Qp[mo],Qp[mo]=null,mo--)}function Bt(e,t){mo++,Qp[mo]=e.current,e.current=t}var Vs={},Ve=Gs(Vs),rn=Gs(!1),Rr=Vs;function $o(e,t){var n=e.type.contextTypes;if(!n)return Vs;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var s={},r;for(r in n)s[r]=t[r];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function on(e){return e=e.childContextTypes,e!=null}function vd(){Yt(rn),Yt(Ve)}function hv(e,t,n){if(Ve.current!==Vs)throw Error(H(168));Bt(Ve,t),Bt(rn,n)}function Mk(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var s in i)if(!(s in t))throw Error(H(108,pD(e)||"Unknown",s));return se({},n,i)}function xd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vs,Rr=Ve.current,Bt(Ve,e),Bt(rn,rn.current),!0}function fv(e,t,n){var i=e.stateNode;if(!i)throw Error(H(169));n?(e=Mk(e,t,Rr),i.__reactInternalMemoizedMergedChildContext=e,Yt(rn),Yt(Ve),Bt(Ve,e)):Yt(rn),Bt(rn,n)}var ji=null,mh=!1,Sf=!1;function Ck(e){ji===null?ji=[e]:ji.push(e)}function AE(e){mh=!0,Ck(e)}function qs(){if(!Sf&&ji!==null){Sf=!0;var e=0,t=Ot;try{var n=ji;for(Ot=1;e>=o,s-=o,Fi=1<<32-ei(t)+s|n<M?(P=C,C=null):P=C.sibling;var T=h(y,C,x[M],_);if(T===null){C===null&&(C=P);break}e&&C&&T.alternate===null&&t(y,C),g=r(T,g,M),S===null?w=T:S.sibling=T,S=T,C=P}if(M===x.length)return n(y,C),Gt&&dr(y,M),w;if(C===null){for(;MM?(P=C,C=null):P=C.sibling;var A=h(y,C,T.value,_);if(A===null){C===null&&(C=P);break}e&&C&&A.alternate===null&&t(y,C),g=r(A,g,M),S===null?w=A:S.sibling=A,S=A,C=P}if(T.done)return n(y,C),Gt&&dr(y,M),w;if(C===null){for(;!T.done;M++,T=x.next())T=d(y,T.value,_),T!==null&&(g=r(T,g,M),S===null?w=T:S.sibling=T,S=T);return Gt&&dr(y,M),w}for(C=i(y,C);!T.done;M++,T=x.next())T=f(C,y,M,T.value,_),T!==null&&(e&&T.alternate!==null&&C.delete(T.key===null?M:T.key),g=r(T,g,M),S===null?w=T:S.sibling=T,S=T);return e&&C.forEach(function(E){return t(y,E)}),Gt&&dr(y,M),w}function v(y,g,x,_){if(typeof x=="object"&&x!==null&&x.type===co&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Rc:t:{for(var w=x.key,S=g;S!==null;){if(S.key===w){if(w=x.type,w===co){if(S.tag===7){n(y,S.sibling),g=s(S,x.props.children),g.return=y,y=g;break t}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===ms&&bv(w)===S.type){n(y,S.sibling),g=s(S,x.props),g.ref=ga(y,S,x),g.return=y,y=g;break t}n(y,S);break}else t(y,S);S=S.sibling}x.type===co?(g=Mr(x.props.children,y.mode,_,x.key),g.return=y,y=g):(_=Qu(x.type,x.key,x.props,null,y.mode,_),_.ref=ga(y,g,x),_.return=y,y=_)}return o(y);case lo:t:{for(S=x.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(y,g.sibling),g=s(g,x.children||[]),g.return=y,y=g;break t}else{n(y,g);break}else t(y,g);g=g.sibling}g=Of(x,y.mode,_),g.return=y,y=g}return o(y);case ms:return S=x._init,v(y,g,S(x._payload),_)}if(Ua(x))return p(y,g,x,_);if(da(x))return m(y,g,x,_);Hc(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(y,g.sibling),g=s(g,x),g.return=y,y=g):(n(y,g),g=Af(x,y.mode,_),g.return=y,y=g),o(y)):n(y,g)}return v}var Fo=Lk(!0),Nk=Lk(!1),dc={},yi=Gs(dc),$l=Gs(dc),Il=Gs(dc);function wr(e){if(e===dc)throw Error(H(174));return e}function $g(e,t){switch(Bt(Il,t),Bt($l,e),Bt(yi,dc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lp(t,e)}Yt(yi),Bt(yi,t)}function Bo(){Yt(yi),Yt($l),Yt(Il)}function jk(e){wr(Il.current);var t=wr(yi.current),n=Lp(t,e.type);t!==n&&(Bt($l,e),Bt(yi,n))}function Ig(e){$l.current===e&&(Yt(yi),Yt($l))}var te=Gs(0);function Md(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mf=[];function Fg(){for(var e=0;en?n:4,e(!0);var i=Cf.transition;Cf.transition={};try{e(!1),t()}finally{Ot=n,Cf.transition=i}}function Zk(){return Vn().memoizedState}function NE(e,t,n){var i=Ns(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Jk(e))tS(t,n);else if(n=Ek(e,t,n,i),n!==null){var s=Ue();ni(n,e,i,s),eS(n,t,i)}}function jE(e,t,n){var i=Ns(e),s={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Jk(e))tS(t,s);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var o=t.lastRenderedState,a=r(o,n);if(s.hasEagerState=!0,s.eagerState=a,ii(a,o)){var l=t.interleaved;l===null?(s.next=s,Ng(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Ek(e,t,s,i),n!==null&&(s=Ue(),ni(n,e,i,s),eS(n,t,i))}}function Jk(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function tS(e,t){al=Cd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function eS(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,_g(e,n)}}var Pd={readContext:Bn,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useInsertionEffect:Re,useLayoutEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useMutableSource:Re,useSyncExternalStore:Re,useId:Re,unstable_isNewReconciler:!1},$E={readContext:Bn,useCallback:function(e,t){return di().memoizedState=[e,t===void 0?null:t],e},useContext:Bn,useEffect:wv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Xu(4194308,4,Xk.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xu(4,2,e,t)},useMemo:function(e,t){var n=di();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=di();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=NE.bind(null,ie,e),[i.memoizedState,e]},useRef:function(e){var t=di();return e={current:e},t.memoizedState=e},useState:_v,useDebugValue:Hg,useDeferredValue:function(e){return di().memoizedState=e},useTransition:function(){var e=_v(!1),t=e[0];return e=LE.bind(null,e[1]),di().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=ie,s=di();if(Gt){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),Se===null)throw Error(H(349));Nr&30||Fk(i,t,n)}s.memoizedState=n;var r={value:n,getSnapshot:t};return s.queue=r,wv(Vk.bind(null,i,r,e),[e]),i.flags|=2048,Vl(9,Bk.bind(null,i,r,n,t),void 0,null),n},useId:function(){var e=di(),t=Se.identifierPrefix;if(Gt){var n=Bi,i=Fi;n=(i&~(1<<32-ei(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=o.createElement(n,{is:i.is}):(e=o.createElement(n),n==="select"&&(o=e,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):e=o.createElementNS(e,n),e[fi]=t,e[Nl]=i,uS(e,t,!1,!1),t.stateNode=e;t:{switch(o=jp(n,i),n){case"dialog":Wt("cancel",e),Wt("close",e),s=i;break;case"iframe":case"object":case"embed":Wt("load",e),s=i;break;case"video":case"audio":for(s=0;szo&&(t.flags|=128,i=!0,ya(r,!1),t.lanes=4194304)}else{if(!i)if(e=Md(o),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ya(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!Gt)return Re(t),null}else 2*le()-r.renderingStartTime>zo&&n!==1073741824&&(t.flags|=128,i=!0,ya(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(n=r.last,n!==null?n.sibling=o:t.child=o,r.last=o)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=le(),t.sibling=null,n=te.current,Bt(te,i?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return qg(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?gn&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function UE(e,t){switch(Eg(t),t.tag){case 1:return on(t.type)&&vd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bo(),Yt(rn),Yt(Ve),Fg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ig(t),null;case 13:if(Yt(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Io()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Yt(te),null;case 4:return Bo(),null;case 10:return Rg(t.type._context),null;case 22:case 23:return qg(),null;case 24:return null;default:return null}}var Uc=!1,Ie=!1,YE=typeof WeakSet=="function"?WeakSet:Set,tt=null;function xo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){re(e,t,i)}else n.current=null}function cm(e,t,n){try{n()}catch(i){re(e,t,i)}}var Av=!1;function XE(e,t){if(Yp=pd,e=gk(),Tg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else t:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var s=i.anchorOffset,r=i.focusNode;i=i.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break t}var o=0,a=-1,l=-1,c=0,u=0,d=e,h=null;e:for(;;){for(var f;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==r||i!==0&&d.nodeType!==3||(l=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===e)break e;if(h===n&&++c===s&&(a=o),h===r&&++u===i&&(l=o),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xp={focusedElem:e,selectionRange:n},pd=!1,tt=t;tt!==null;)if(t=tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,tt=e;else for(;tt!==null;){t=tt;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,v=p.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:qn(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(_){re(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,tt=e;break}tt=t.return}return p=Av,Av=!1,p}function al(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var s=i=i.next;do{if((s.tag&e)===e){var r=s.destroy;s.destroy=void 0,r!==void 0&&cm(t,n,r)}s=s.next}while(s!==i)}}function vh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function um(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function fS(e){var t=e.alternate;t!==null&&(e.alternate=null,fS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fi],delete t[Nl],delete t[qp],delete t[DE],delete t[EE])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function pS(e){return e.tag===5||e.tag===3||e.tag===4}function Ov(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||pS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function dm(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yd));else if(i!==4&&(e=e.child,e!==null))for(dm(e,t,n),e=e.sibling;e!==null;)dm(e,t,n),e=e.sibling}function hm(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(hm(e,t,n),e=e.sibling;e!==null;)hm(e,t,n),e=e.sibling}var Pe=null,Qn=!1;function ds(e,t,n){for(n=n.child;n!==null;)mS(e,t,n),n=n.sibling}function mS(e,t,n){if(gi&&typeof gi.onCommitFiberUnmount=="function")try{gi.onCommitFiberUnmount(uh,n)}catch{}switch(n.tag){case 5:Ie||xo(n,t);case 6:var i=Pe,s=Qn;Pe=null,ds(e,t,n),Pe=i,Qn=s,Pe!==null&&(Qn?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(Qn?(e=Pe,n=n.stateNode,e.nodeType===8?kf(e.parentNode,n):e.nodeType===1&&kf(e,n),El(e)):kf(Pe,n.stateNode));break;case 4:i=Pe,s=Qn,Pe=n.stateNode.containerInfo,Qn=!0,ds(e,t,n),Pe=i,Qn=s;break;case 0:case 11:case 14:case 15:if(!Ie&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){s=i=i.next;do{var r=s,o=r.destroy;r=r.tag,o!==void 0&&(r&2||r&4)&&cm(n,t,o),s=s.next}while(s!==i)}ds(e,t,n);break;case 1:if(!Ie&&(xo(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){re(n,t,a)}ds(e,t,n);break;case 21:ds(e,t,n);break;case 22:n.mode&1?(Ie=(i=Ie)||n.memoizedState!==null,ds(e,t,n),Ie=i):ds(e,t,n);break;default:ds(e,t,n)}}function Lv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new YE),t.forEach(function(i){var s=nA.bind(null,e,i);n.has(i)||(n.add(i),i.then(s,s))})}}function Gn(e,t){var n=t.deletions;if(n!==null)for(var i=0;is&&(s=o),i&=~r}if(i=s,i=le()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*GE(i/1960))-i,10e?16:e,ws===null)var i=!1;else{if(e=ws,ws=null,Ed=0,St&6)throw Error(H(331));var s=St;for(St|=4,tt=e.current;tt!==null;){var r=tt,o=r.child;if(tt.flags&16){var a=r.deletions;if(a!==null){for(var l=0;lle()-Kg?Sr(e,0):Xg|=n),an(e,t)}function kS(e,t){t===0&&(e.mode&1?(t=jc,jc<<=1,!(jc&130023424)&&(jc=4194304)):t=1);var n=Ue();e=ts(e,t),e!==null&&(ac(e,t,n),an(e,n))}function eA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),kS(e,n)}function nA(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(H(314))}i!==null&&i.delete(t),kS(e,n)}var SS;SS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||rn.current)nn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nn=!1,WE(e,t,n);nn=!!(e.flags&131072)}else nn=!1,Gt&&t.flags&1048576&&Pk(t,_d,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Xu(e,t),e=t.pendingProps;var s=$o(t,Ve.current);Eo(t,n),s=Vg(null,t,i,e,s,n);var r=zg();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,on(i)?(r=!0,xd(t)):r=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,jg(t),s.updater=gh,t.stateNode=s,s._reactInternals=t,nm(t,i,e,n),t=rm(null,t,i,!0,r,n)):(t.tag=0,Gt&&r&&Dg(t),He(null,t,s,n),t=t.child),t;case 16:i=t.elementType;t:{switch(Xu(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=sA(i),e=qn(i,e),s){case 0:t=sm(null,t,i,e,n);break t;case 1:t=Tv(null,t,i,e,n);break t;case 11:t=Cv(null,t,i,e,n);break t;case 14:t=Pv(null,t,i,qn(i.type,e),n);break t}throw Error(H(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:qn(i,s),sm(e,t,i,s,n);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:qn(i,s),Tv(e,t,i,s,n);case 3:t:{if(aS(t),e===null)throw Error(H(387));i=t.pendingProps,r=t.memoizedState,s=r.element,Ak(e,t),Sd(t,i,null,n);var o=t.memoizedState;if(i=o.element,r.isDehydrated)if(r={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){s=Vo(Error(H(423)),t),t=Dv(e,t,i,n,s);break t}else if(i!==s){s=Vo(Error(H(424)),t),t=Dv(e,t,i,n,s);break t}else for(xn=Os(t.stateNode.containerInfo.firstChild),bn=t,Gt=!0,Zn=null,n=Nk(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Io(),i===s){t=es(e,t,n);break t}He(e,t,i,n)}t=t.child}return t;case 5:return jk(t),e===null&&Jp(t),i=t.type,s=t.pendingProps,r=e!==null?e.memoizedProps:null,o=s.children,Kp(i,s)?o=null:r!==null&&Kp(i,r)&&(t.flags|=32),oS(e,t),He(e,t,o,n),t.child;case 6:return e===null&&Jp(t),null;case 13:return lS(e,t,n);case 4:return $g(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Fo(t,null,i,n):He(e,t,i,n),t.child;case 11:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:qn(i,s),Cv(e,t,i,s,n);case 7:return He(e,t,t.pendingProps,n),t.child;case 8:return He(e,t,t.pendingProps.children,n),t.child;case 12:return He(e,t,t.pendingProps.children,n),t.child;case 10:t:{if(i=t.type._context,s=t.pendingProps,r=t.memoizedProps,o=s.value,Bt(wd,i._currentValue),i._currentValue=o,r!==null)if(ii(r.value,o)){if(r.children===s.children&&!rn.current){t=es(e,t,n);break t}}else for(r=t.child,r!==null&&(r.return=t);r!==null;){var a=r.dependencies;if(a!==null){o=r.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(r.tag===1){l=Gi(-1,n&-n),l.tag=2;var c=r.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}r.lanes|=n,l=r.alternate,l!==null&&(l.lanes|=n),tm(r.return,n,t),a.lanes|=n;break}l=l.next}}else if(r.tag===10)o=r.type===t.type?null:r.child;else if(r.tag===18){if(o=r.return,o===null)throw Error(H(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),tm(o,n,t),o=r.sibling}else o=r.child;if(o!==null)o.return=r;else for(o=r;o!==null;){if(o===t){o=null;break}if(r=o.sibling,r!==null){r.return=o.return,o=r;break}o=o.return}r=o}He(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,Eo(t,n),s=Bn(s),i=i(s),t.flags|=1,He(e,t,i,n),t.child;case 14:return i=t.type,s=qn(i,t.pendingProps),s=qn(i.type,s),Pv(e,t,i,s,n);case 15:return sS(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:qn(i,s),Xu(e,t),t.tag=1,on(i)?(e=!0,xd(t)):e=!1,Eo(t,n),Lk(t,i,s),nm(t,i,s,n),rm(null,t,i,!0,e,n);case 19:return cS(e,t,n);case 22:return rS(e,t,n)}throw Error(H(156,t.tag))};function MS(e,t){return Qw(e,t)}function iA(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $n(e,t,n,i){return new iA(e,t,n,i)}function Zg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sA(e){if(typeof e=="function")return Zg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yg)return 11;if(e===vg)return 14}return 2}function js(e,t){var n=e.alternate;return n===null?(n=$n(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function qu(e,t,n,i,s,r){var o=2;if(i=e,typeof e=="function")Zg(e)&&(o=1);else if(typeof e=="string")o=5;else t:switch(e){case co:return Mr(n.children,s,r,t);case gg:o=8,s|=8;break;case Cp:return e=$n(12,n,t,s|2),e.elementType=Cp,e.lanes=r,e;case Pp:return e=$n(13,n,t,s),e.elementType=Pp,e.lanes=r,e;case Tp:return e=$n(19,n,t,s),e.elementType=Tp,e.lanes=r,e;case Rw:return bh(n,s,r,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ow:o=10;break t;case Lw:o=9;break t;case yg:o=11;break t;case vg:o=14;break t;case ms:o=16,i=null;break t}throw Error(H(130,e==null?e:typeof e,""))}return t=$n(o,n,t,s),t.elementType=e,t.type=i,t.lanes=r,t}function Mr(e,t,n,i){return e=$n(7,e,i,t),e.lanes=n,e}function bh(e,t,n,i){return e=$n(22,e,i,t),e.elementType=Rw,e.lanes=n,e.stateNode={isHidden:!1},e}function Af(e,t,n){return e=$n(6,e,null,t),e.lanes=n,e}function Of(e,t,n){return t=$n(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rA(e,t,n,i,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hf(0),this.expirationTimes=hf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hf(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Jg(e,t,n,i,s,r,o,a,l){return e=new rA(e,t,n,a,l),t===1?(t=1,r===!0&&(t|=8)):t=0,r=$n(3,null,null,t),e.current=r,r.stateNode=e,r.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jg(r),e}function oA(e,t,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(DS)}catch(e){console.error(e)}}DS(),Pw.exports=kn;var iy=Pw.exports,Vv=iy;Sp.createRoot=Vv.createRoot,Sp.hydrateRoot=Vv.hydrateRoot;/*!
+`+r.stack}return{value:e,source:t,stack:s,digest:null}}function Df(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function im(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var BE=typeof WeakMap=="function"?WeakMap:Map;function nS(e,t,n){n=Gi(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Dd||(Dd=!0,fm=i),im(e,t)},n}function iS(e,t,n){n=Gi(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var s=t.value;n.payload=function(){return i(s)},n.callback=function(){im(e,t)}}var r=e.stateNode;return r!==null&&typeof r.componentDidCatch=="function"&&(n.callback=function(){im(e,t),typeof i!="function"&&(Ls===null?Ls=new Set([this]):Ls.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function kv(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new BE;var s=new Set;i.set(t,s)}else s=i.get(t),s===void 0&&(s=new Set,i.set(t,s));s.has(n)||(s.add(n),e=tA.bind(null,e,t,n),t.then(e,e))}function Sv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Mv(e,t,n,i,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Gi(-1,1),t.tag=2,Rs(n,t,1))),n.lanes|=1),e)}var VE=rs.ReactCurrentOwner,nn=!1;function He(e,t,n,i){t.child=e===null?Nk(t,null,n,i):Fo(t,e.child,n,i)}function Cv(e,t,n,i,s){n=n.render;var r=t.ref;return Eo(t,s),i=Vg(e,t,n,i,r,s),n=zg(),e!==null&&!nn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,es(e,t,s)):(Gt&&n&&Dg(t),t.flags|=1,He(e,t,i,s),t.child)}function Pv(e,t,n,i,s){if(e===null){var r=n.type;return typeof r=="function"&&!Zg(r)&&r.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=r,sS(e,t,r,i,s)):(e=Qu(n.type,null,i,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!(e.lanes&s)){var o=r.memoizedProps;if(n=n.compare,n=n!==null?n:Rl,n(o,i)&&e.ref===t.ref)return es(e,t,s)}return t.flags|=1,e=js(r,i),e.ref=t.ref,e.return=t,t.child=e}function sS(e,t,n,i,s){if(e!==null){var r=e.memoizedProps;if(Rl(r,i)&&e.ref===t.ref)if(nn=!1,t.pendingProps=i=r,(e.lanes&s)!==0)e.flags&131072&&(nn=!0);else return t.lanes=e.lanes,es(e,t,s)}return sm(e,t,n,i,s)}function rS(e,t,n){var i=t.pendingProps,s=i.children,r=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bt(bo,gn),gn|=n;else{if(!(n&1073741824))return e=r!==null?r.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Bt(bo,gn),gn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=r!==null?r.baseLanes:n,Bt(bo,gn),gn|=i}else r!==null?(i=r.baseLanes|n,t.memoizedState=null):i=n,Bt(bo,gn),gn|=i;return He(e,t,s,n),t.child}function oS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function sm(e,t,n,i,s){var r=on(n)?Rr:Ve.current;return r=$o(t,r),Eo(t,s),n=Vg(e,t,n,i,r,s),i=zg(),e!==null&&!nn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,es(e,t,s)):(Gt&&i&&Dg(t),t.flags|=1,He(e,t,n,s),t.child)}function Tv(e,t,n,i,s){if(on(n)){var r=!0;xd(t)}else r=!1;if(Eo(t,s),t.stateNode===null)Ku(e,t),Rk(t,n,i),nm(t,n,i,s),i=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Bn(c):(c=on(n)?Rr:Ve.current,c=$o(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||l!==c)&&xv(t,o,i,c),gs=!1;var h=t.memoizedState;o.state=h,Sd(t,i,o,s),l=t.memoizedState,a!==i||h!==l||rn.current||gs?(typeof u=="function"&&(em(t,n,u,i),l=t.memoizedState),(a=gs||vv(t,n,a,i,h,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),o.props=i,o.state=l,o.context=c,i=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,Ak(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:qn(t.type,a),o.props=c,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Bn(l):(l=on(n)?Rr:Ve.current,l=$o(t,l));var f=n.getDerivedStateFromProps;(u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&xv(t,o,i,l),gs=!1,h=t.memoizedState,o.state=h,Sd(t,i,o,s);var p=t.memoizedState;a!==d||h!==p||rn.current||gs?(typeof f=="function"&&(em(t,n,f,i),p=t.memoizedState),(c=gs||vv(t,n,c,i,h,p,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,p,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=p),o.props=i,o.state=p,o.context=l,i=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return rm(e,t,n,i,r,s)}function rm(e,t,n,i,s,r){oS(e,t);var o=(t.flags&128)!==0;if(!i&&!o)return s&&fv(t,n,!1),es(e,t,r);i=t.stateNode,VE.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&o?(t.child=Fo(t,e.child,null,r),t.child=Fo(t,null,a,r)):He(e,t,a,r),t.memoizedState=i.state,s&&fv(t,n,!0),t.child}function aS(e){var t=e.stateNode;t.pendingContext?hv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hv(e,t.context,!1),$g(e,t.containerInfo)}function Dv(e,t,n,i,s){return Io(),Ag(s),t.flags|=256,He(e,t,n,i),t.child}var om={dehydrated:null,treeContext:null,retryLane:0};function am(e){return{baseLanes:e,cachePool:null,transitions:null}}function lS(e,t,n){var i=t.pendingProps,s=te.current,r=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(r=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Bt(te,s&1),e===null)return Jp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=i.children,e=i.fallback,r?(i=t.mode,r=t.child,o={mode:"hidden",children:o},!(i&1)&&r!==null?(r.childLanes=0,r.pendingProps=o):r=bh(o,i,0,null),e=Mr(e,i,n,null),r.return=t,e.return=t,r.sibling=e,t.child=r,t.child.memoizedState=am(n),t.memoizedState=om,e):Ug(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return zE(e,t,o,i,a,s,n);if(r){r=i.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:i.children};return!(o&1)&&t.child!==s?(i=t.child,i.childLanes=0,i.pendingProps=l,t.deletions=null):(i=js(s,l),i.subtreeFlags=s.subtreeFlags&14680064),a!==null?r=js(a,r):(r=Mr(r,o,n,null),r.flags|=2),r.return=t,i.return=t,i.sibling=r,t.child=i,i=r,r=t.child,o=e.child.memoizedState,o=o===null?am(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},r.memoizedState=o,r.childLanes=e.childLanes&~n,t.memoizedState=om,i}return r=e.child,e=r.sibling,i=js(r,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=n),i.return=t,i.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Ug(e,t){return t=bh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Uc(e,t,n,i){return i!==null&&Ag(i),Fo(t,e.child,null,n),e=Ug(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zE(e,t,n,i,s,r,o){if(n)return t.flags&256?(t.flags&=-257,i=Df(Error(H(422))),Uc(e,t,o,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(r=i.fallback,s=t.mode,i=bh({mode:"visible",children:i.children},s,0,null),r=Mr(r,s,o,null),r.flags|=2,i.return=t,r.return=t,i.sibling=r,t.child=i,t.mode&1&&Fo(t,e.child,null,o),t.child.memoizedState=am(o),t.memoizedState=om,r);if(!(t.mode&1))return Uc(e,t,o,null);if(s.data==="$!"){if(i=s.nextSibling&&s.nextSibling.dataset,i)var a=i.dgst;return i=a,r=Error(H(419)),i=Df(r,i,void 0),Uc(e,t,o,i)}if(a=(o&e.childLanes)!==0,nn||a){if(i=Se,i!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(i.suspendedLanes|o)?0:s,s!==0&&s!==r.retryLane&&(r.retryLane=s,ts(e,s),ni(i,e,s,-1))}return Qg(),i=Df(Error(H(421))),Uc(e,t,o,i)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=eA.bind(null,e),s._reactRetry=t,null):(e=r.treeContext,xn=Os(s.nextSibling),bn=t,Gt=!0,Zn=null,e!==null&&(Ln[Nn++]=Fi,Ln[Nn++]=Bi,Ln[Nn++]=Lr,Fi=e.id,Bi=e.overflow,Lr=t),t=Ug(t,i.children),t.flags|=4096,t)}function Ev(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),tm(e.return,t,n)}function Ef(e,t,n,i,s){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:s}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=i,r.tail=n,r.tailMode=s)}function cS(e,t,n){var i=t.pendingProps,s=i.revealOrder,r=i.tail;if(He(e,t,i.children,n),i=te.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)t:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ev(e,n,t);else if(e.tag===19)Ev(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(Bt(te,i),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Md(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ef(t,!1,s,n,r);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Md(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ef(t,!0,n,null,r);break;case"together":Ef(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ku(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function es(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),jr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=js(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=js(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function WE(e,t,n){switch(t.tag){case 3:aS(t),Io();break;case 5:jk(t);break;case 1:on(t.type)&&xd(t);break;case 4:$g(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,s=t.memoizedProps.value;Bt(wd,i._currentValue),i._currentValue=s;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(Bt(te,te.current&1),t.flags|=128,null):n&t.child.childLanes?lS(e,t,n):(Bt(te,te.current&1),e=es(e,t,n),e!==null?e.sibling:null);Bt(te,te.current&1);break;case 19:if(i=(n&t.childLanes)!==0,e.flags&128){if(i)return cS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Bt(te,te.current),i)break;return null;case 22:case 23:return t.lanes=0,rS(e,t,n)}return es(e,t,n)}var uS,lm,dS,hS;uS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};lm=function(){};dS=function(e,t,n,i){var s=e.memoizedProps;if(s!==i){e=t.stateNode,wr(yi.current);var r=null;switch(n){case"input":s=Ep(e,s),i=Ep(e,i),r=[];break;case"select":s=se({},s,{value:void 0}),i=se({},i,{value:void 0}),r=[];break;case"textarea":s=Rp(e,s),i=Rp(e,i),r=[];break;default:typeof s.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=yd)}Np(n,i);var o;n=null;for(c in s)if(!i.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Cl.hasOwnProperty(c)?r||(r=[]):(r=r||[]).push(c,null));for(c in i){var l=i[c];if(a=s!=null?s[c]:void 0,i.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(r||(r=[]),r.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(r=r||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(r=r||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Cl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Wt("scroll",e),r||a===l||(r=[])):(r=r||[]).push(c,l))}n&&(r=r||[]).push("style",n);var c=r;(t.updateQueue=c)&&(t.flags|=4)}};hS=function(e,t,n,i){n!==i&&(t.flags|=4)};function ya(e,t){if(!Gt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,i|=s.subtreeFlags&14680064,i|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,i|=s.subtreeFlags,i|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function HE(e,t,n){var i=t.pendingProps;switch(Eg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return on(t.type)&&vd(),Le(t),null;case 3:return i=t.stateNode,Bo(),Yt(rn),Yt(Ve),Fg(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Wc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zn!==null&&(gm(Zn),Zn=null))),lm(e,t),Le(t),null;case 5:Ig(t);var s=wr(Il.current);if(n=t.type,e!==null&&t.stateNode!=null)dS(e,t,n,i,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(H(166));return Le(t),null}if(e=wr(yi.current),Wc(t)){i=t.stateNode,n=t.type;var r=t.memoizedProps;switch(i[fi]=t,i[jl]=r,e=(t.mode&1)!==0,n){case"dialog":Wt("cancel",i),Wt("close",i);break;case"iframe":case"object":case"embed":Wt("load",i);break;case"video":case"audio":for(s=0;s<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=o.createElement(n,{is:i.is}):(e=o.createElement(n),n==="select"&&(o=e,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):e=o.createElementNS(e,n),e[fi]=t,e[jl]=i,uS(e,t,!1,!1),t.stateNode=e;t:{switch(o=jp(n,i),n){case"dialog":Wt("cancel",e),Wt("close",e),s=i;break;case"iframe":case"object":case"embed":Wt("load",e),s=i;break;case"video":case"audio":for(s=0;szo&&(t.flags|=128,i=!0,ya(r,!1),t.lanes=4194304)}else{if(!i)if(e=Md(o),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ya(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!Gt)return Le(t),null}else 2*le()-r.renderingStartTime>zo&&n!==1073741824&&(t.flags|=128,i=!0,ya(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(n=r.last,n!==null?n.sibling=o:t.child=o,r.last=o)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=le(),t.sibling=null,n=te.current,Bt(te,i?n&1|2:n&1),t):(Le(t),null);case 22:case 23:return qg(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?gn&1073741824&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function UE(e,t){switch(Eg(t),t.tag){case 1:return on(t.type)&&vd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bo(),Yt(rn),Yt(Ve),Fg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ig(t),null;case 13:if(Yt(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Io()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Yt(te),null;case 4:return Bo(),null;case 10:return Lg(t.type._context),null;case 22:case 23:return qg(),null;case 24:return null;default:return null}}var Yc=!1,Ie=!1,YE=typeof WeakSet=="function"?WeakSet:Set,tt=null;function xo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){re(e,t,i)}else n.current=null}function cm(e,t,n){try{n()}catch(i){re(e,t,i)}}var Av=!1;function XE(e,t){if(Yp=pd,e=gk(),Tg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else t:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var s=i.anchorOffset,r=i.focusNode;i=i.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break t}var o=0,a=-1,l=-1,c=0,u=0,d=e,h=null;e:for(;;){for(var f;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==r||i!==0&&d.nodeType!==3||(l=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===e)break e;if(h===n&&++c===s&&(a=o),h===r&&++u===i&&(l=o),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xp={focusedElem:e,selectionRange:n},pd=!1,tt=t;tt!==null;)if(t=tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,tt=e;else for(;tt!==null;){t=tt;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,v=p.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:qn(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(_){re(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,tt=e;break}tt=t.return}return p=Av,Av=!1,p}function ll(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var s=i=i.next;do{if((s.tag&e)===e){var r=s.destroy;s.destroy=void 0,r!==void 0&&cm(t,n,r)}s=s.next}while(s!==i)}}function vh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function um(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function fS(e){var t=e.alternate;t!==null&&(e.alternate=null,fS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fi],delete t[jl],delete t[qp],delete t[DE],delete t[EE])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function pS(e){return e.tag===5||e.tag===3||e.tag===4}function Ov(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||pS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function dm(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yd));else if(i!==4&&(e=e.child,e!==null))for(dm(e,t,n),e=e.sibling;e!==null;)dm(e,t,n),e=e.sibling}function hm(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(hm(e,t,n),e=e.sibling;e!==null;)hm(e,t,n),e=e.sibling}var Pe=null,Qn=!1;function ds(e,t,n){for(n=n.child;n!==null;)mS(e,t,n),n=n.sibling}function mS(e,t,n){if(gi&&typeof gi.onCommitFiberUnmount=="function")try{gi.onCommitFiberUnmount(uh,n)}catch{}switch(n.tag){case 5:Ie||xo(n,t);case 6:var i=Pe,s=Qn;Pe=null,ds(e,t,n),Pe=i,Qn=s,Pe!==null&&(Qn?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(Qn?(e=Pe,n=n.stateNode,e.nodeType===8?kf(e.parentNode,n):e.nodeType===1&&kf(e,n),Al(e)):kf(Pe,n.stateNode));break;case 4:i=Pe,s=Qn,Pe=n.stateNode.containerInfo,Qn=!0,ds(e,t,n),Pe=i,Qn=s;break;case 0:case 11:case 14:case 15:if(!Ie&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){s=i=i.next;do{var r=s,o=r.destroy;r=r.tag,o!==void 0&&(r&2||r&4)&&cm(n,t,o),s=s.next}while(s!==i)}ds(e,t,n);break;case 1:if(!Ie&&(xo(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){re(n,t,a)}ds(e,t,n);break;case 21:ds(e,t,n);break;case 22:n.mode&1?(Ie=(i=Ie)||n.memoizedState!==null,ds(e,t,n),Ie=i):ds(e,t,n);break;default:ds(e,t,n)}}function Rv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new YE),t.forEach(function(i){var s=nA.bind(null,e,i);n.has(i)||(n.add(i),i.then(s,s))})}}function Gn(e,t){var n=t.deletions;if(n!==null)for(var i=0;is&&(s=o),i&=~r}if(i=s,i=le()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*GE(i/1960))-i,10e?16:e,ws===null)var i=!1;else{if(e=ws,ws=null,Ed=0,St&6)throw Error(H(331));var s=St;for(St|=4,tt=e.current;tt!==null;){var r=tt,o=r.child;if(tt.flags&16){var a=r.deletions;if(a!==null){for(var l=0;lle()-Kg?Sr(e,0):Xg|=n),an(e,t)}function kS(e,t){t===0&&(e.mode&1?(t=$c,$c<<=1,!($c&130023424)&&($c=4194304)):t=1);var n=Ue();e=ts(e,t),e!==null&&(lc(e,t,n),an(e,n))}function eA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),kS(e,n)}function nA(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(H(314))}i!==null&&i.delete(t),kS(e,n)}var SS;SS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||rn.current)nn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nn=!1,WE(e,t,n);nn=!!(e.flags&131072)}else nn=!1,Gt&&t.flags&1048576&&Pk(t,_d,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Ku(e,t),e=t.pendingProps;var s=$o(t,Ve.current);Eo(t,n),s=Vg(null,t,i,e,s,n);var r=zg();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,on(i)?(r=!0,xd(t)):r=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,jg(t),s.updater=gh,t.stateNode=s,s._reactInternals=t,nm(t,i,e,n),t=rm(null,t,i,!0,r,n)):(t.tag=0,Gt&&r&&Dg(t),He(null,t,s,n),t=t.child),t;case 16:i=t.elementType;t:{switch(Ku(e,t),e=t.pendingProps,s=i._init,i=s(i._payload),t.type=i,s=t.tag=sA(i),e=qn(i,e),s){case 0:t=sm(null,t,i,e,n);break t;case 1:t=Tv(null,t,i,e,n);break t;case 11:t=Cv(null,t,i,e,n);break t;case 14:t=Pv(null,t,i,qn(i.type,e),n);break t}throw Error(H(306,i,""))}return t;case 0:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:qn(i,s),sm(e,t,i,s,n);case 1:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:qn(i,s),Tv(e,t,i,s,n);case 3:t:{if(aS(t),e===null)throw Error(H(387));i=t.pendingProps,r=t.memoizedState,s=r.element,Ak(e,t),Sd(t,i,null,n);var o=t.memoizedState;if(i=o.element,r.isDehydrated)if(r={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){s=Vo(Error(H(423)),t),t=Dv(e,t,i,n,s);break t}else if(i!==s){s=Vo(Error(H(424)),t),t=Dv(e,t,i,n,s);break t}else for(xn=Os(t.stateNode.containerInfo.firstChild),bn=t,Gt=!0,Zn=null,n=Nk(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Io(),i===s){t=es(e,t,n);break t}He(e,t,i,n)}t=t.child}return t;case 5:return jk(t),e===null&&Jp(t),i=t.type,s=t.pendingProps,r=e!==null?e.memoizedProps:null,o=s.children,Kp(i,s)?o=null:r!==null&&Kp(i,r)&&(t.flags|=32),oS(e,t),He(e,t,o,n),t.child;case 6:return e===null&&Jp(t),null;case 13:return lS(e,t,n);case 4:return $g(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Fo(t,null,i,n):He(e,t,i,n),t.child;case 11:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:qn(i,s),Cv(e,t,i,s,n);case 7:return He(e,t,t.pendingProps,n),t.child;case 8:return He(e,t,t.pendingProps.children,n),t.child;case 12:return He(e,t,t.pendingProps.children,n),t.child;case 10:t:{if(i=t.type._context,s=t.pendingProps,r=t.memoizedProps,o=s.value,Bt(wd,i._currentValue),i._currentValue=o,r!==null)if(ii(r.value,o)){if(r.children===s.children&&!rn.current){t=es(e,t,n);break t}}else for(r=t.child,r!==null&&(r.return=t);r!==null;){var a=r.dependencies;if(a!==null){o=r.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(r.tag===1){l=Gi(-1,n&-n),l.tag=2;var c=r.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}r.lanes|=n,l=r.alternate,l!==null&&(l.lanes|=n),tm(r.return,n,t),a.lanes|=n;break}l=l.next}}else if(r.tag===10)o=r.type===t.type?null:r.child;else if(r.tag===18){if(o=r.return,o===null)throw Error(H(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),tm(o,n,t),o=r.sibling}else o=r.child;if(o!==null)o.return=r;else for(o=r;o!==null;){if(o===t){o=null;break}if(r=o.sibling,r!==null){r.return=o.return,o=r;break}o=o.return}r=o}He(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,i=t.pendingProps.children,Eo(t,n),s=Bn(s),i=i(s),t.flags|=1,He(e,t,i,n),t.child;case 14:return i=t.type,s=qn(i,t.pendingProps),s=qn(i.type,s),Pv(e,t,i,s,n);case 15:return sS(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,s=t.pendingProps,s=t.elementType===i?s:qn(i,s),Ku(e,t),t.tag=1,on(i)?(e=!0,xd(t)):e=!1,Eo(t,n),Rk(t,i,s),nm(t,i,s,n),rm(null,t,i,!0,e,n);case 19:return cS(e,t,n);case 22:return rS(e,t,n)}throw Error(H(156,t.tag))};function MS(e,t){return Qw(e,t)}function iA(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $n(e,t,n,i){return new iA(e,t,n,i)}function Zg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sA(e){if(typeof e=="function")return Zg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yg)return 11;if(e===vg)return 14}return 2}function js(e,t){var n=e.alternate;return n===null?(n=$n(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qu(e,t,n,i,s,r){var o=2;if(i=e,typeof e=="function")Zg(e)&&(o=1);else if(typeof e=="string")o=5;else t:switch(e){case co:return Mr(n.children,s,r,t);case gg:o=8,s|=8;break;case Cp:return e=$n(12,n,t,s|2),e.elementType=Cp,e.lanes=r,e;case Pp:return e=$n(13,n,t,s),e.elementType=Pp,e.lanes=r,e;case Tp:return e=$n(19,n,t,s),e.elementType=Tp,e.lanes=r,e;case Lw:return bh(n,s,r,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ow:o=10;break t;case Rw:o=9;break t;case yg:o=11;break t;case vg:o=14;break t;case ms:o=16,i=null;break t}throw Error(H(130,e==null?e:typeof e,""))}return t=$n(o,n,t,s),t.elementType=e,t.type=i,t.lanes=r,t}function Mr(e,t,n,i){return e=$n(7,e,i,t),e.lanes=n,e}function bh(e,t,n,i){return e=$n(22,e,i,t),e.elementType=Lw,e.lanes=n,e.stateNode={isHidden:!1},e}function Af(e,t,n){return e=$n(6,e,null,t),e.lanes=n,e}function Of(e,t,n){return t=$n(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rA(e,t,n,i,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hf(0),this.expirationTimes=hf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hf(0),this.identifierPrefix=i,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Jg(e,t,n,i,s,r,o,a,l){return e=new rA(e,t,n,a,l),t===1?(t=1,r===!0&&(t|=8)):t=0,r=$n(3,null,null,t),e.current=r,r.stateNode=e,r.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jg(r),e}function oA(e,t,n){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(DS)}catch(e){console.error(e)}}DS(),Pw.exports=kn;var iy=Pw.exports,Vv=iy;Sp.createRoot=Vv.createRoot,Sp.hydrateRoot=Vv.hydrateRoot;/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
- */function dc(e){return e+.5|0}const ks=(e,t,n)=>Math.max(Math.min(e,n),t);function Ka(e){return ks(dc(e*2.55),0,255)}function $s(e){return ks(dc(e*255),0,255)}function $i(e){return ks(dc(e/2.55)/100,0,1)}function zv(e){return ks(dc(e*100),0,100)}const Tn={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},ym=[..."0123456789ABCDEF"],dA=e=>ym[e&15],hA=e=>ym[(e&240)>>4]+ym[e&15],Kc=e=>(e&240)>>4===(e&15),fA=e=>Kc(e.r)&&Kc(e.g)&&Kc(e.b)&&Kc(e.a);function pA(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Tn[e[1]]*17,g:255&Tn[e[2]]*17,b:255&Tn[e[3]]*17,a:t===5?Tn[e[4]]*17:255}:(t===7||t===9)&&(n={r:Tn[e[1]]<<4|Tn[e[2]],g:Tn[e[3]]<<4|Tn[e[4]],b:Tn[e[5]]<<4|Tn[e[6]],a:t===9?Tn[e[7]]<<4|Tn[e[8]]:255})),n}const mA=(e,t)=>e<255?t(e):"";function gA(e){var t=fA(e)?dA:hA;return e?"#"+t(e.r)+t(e.g)+t(e.b)+mA(e.a,t):void 0}const yA=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ES(e,t,n){const i=t*Math.min(n,1-n),s=(r,o=(r+e/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function vA(e,t,n){const i=(s,r=(s+e/60)%6)=>n-n*t*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function xA(e,t,n){const i=ES(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)i[s]*=1-t-n,i[s]+=t;return i}function bA(e,t,n,i,s){return e===s?(t-n)/i+(t.5?u/(2-r-o):u/(r+o),l=bA(n,i,s,u,r),l=l*60+.5),[l|0,c||0,a]}function ry(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map($s)}function oy(e,t,n){return ry(ES,e,t,n)}function _A(e,t,n){return ry(xA,e,t,n)}function wA(e,t,n){return ry(vA,e,t,n)}function AS(e){return(e%360+360)%360}function kA(e){const t=yA.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?Ka(+t[5]):$s(+t[5]));const s=AS(+t[2]),r=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=_A(s,r,o):t[1]==="hsv"?i=wA(s,r,o):i=oy(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}function SA(e,t){var n=sy(e);n[0]=AS(n[0]+t),n=oy(n),e.r=n[0],e.g=n[1],e.b=n[2]}function MA(e){if(!e)return;const t=sy(e),n=t[0],i=zv(t[1]),s=zv(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${s}%, ${$i(e.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const Wv={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Hv={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function CA(){const e={},t=Object.keys(Hv),n=Object.keys(Wv);let i,s,r,o,a;for(i=0;i>16&255,r>>8&255,r&255]}return e}let Gc;function PA(e){Gc||(Gc=CA(),Gc.transparent=[0,0,0,0]);const t=Gc[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const TA=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function DA(e){const t=TA.exec(e);let n=255,i,s,r;if(t){if(t[7]!==i){const o=+t[7];n=t[8]?Ka(o):ks(o*255,0,255)}return i=+t[1],s=+t[3],r=+t[5],i=255&(t[2]?Ka(i):ks(i,0,255)),s=255&(t[4]?Ka(s):ks(s,0,255)),r=255&(t[6]?Ka(r):ks(r,0,255)),{r:i,g:s,b:r,a:n}}}function EA(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${$i(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Lf=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Qr=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function AA(e,t,n){const i=Qr($i(e.r)),s=Qr($i(e.g)),r=Qr($i(e.b));return{r:$s(Lf(i+n*(Qr($i(t.r))-i))),g:$s(Lf(s+n*(Qr($i(t.g))-s))),b:$s(Lf(r+n*(Qr($i(t.b))-r))),a:e.a+n*(t.a-e.a)}}function qc(e,t,n){if(e){let i=sy(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=oy(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function OS(e,t){return e&&Object.assign(t||{},e)}function Uv(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=$s(e[3]))):(t=OS(e,{r:0,g:0,b:0,a:1}),t.a=$s(t.a)),t}function OA(e){return e.charAt(0)==="r"?DA(e):kA(e)}let LS=class vm{constructor(t){if(t instanceof vm)return t;const n=typeof t;let i;n==="object"?i=Uv(t):n==="string"&&(i=pA(t)||PA(t)||OA(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=OS(this._rgb);return t&&(t.a=$i(t.a)),t}set rgb(t){this._rgb=Uv(t)}rgbString(){return this._valid?EA(this._rgb):void 0}hexString(){return this._valid?gA(this._rgb):void 0}hslString(){return this._valid?MA(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,s=t.rgb;let r;const o=n===r?.5:n,a=2*o-1,l=i.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,i.r=255&c*i.r+r*s.r+.5,i.g=255&c*i.g+r*s.g+.5,i.b=255&c*i.b+r*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=AA(this._rgb,t._rgb,n)),this}clone(){return new vm(this.rgb)}alpha(t){return this._rgb.a=$s(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=dc(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.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 qc(this._rgb,2,t),this}darken(t){return qc(this._rgb,2,-t),this}saturate(t){return qc(this._rgb,1,t),this}desaturate(t){return qc(this._rgb,1,-t),this}rotate(t){return SA(this._rgb,t),this}};/*!
+ */function hc(e){return e+.5|0}const ks=(e,t,n)=>Math.max(Math.min(e,n),t);function Ka(e){return ks(hc(e*2.55),0,255)}function $s(e){return ks(hc(e*255),0,255)}function $i(e){return ks(hc(e/2.55)/100,0,1)}function zv(e){return ks(hc(e*100),0,100)}const Tn={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},ym=[..."0123456789ABCDEF"],dA=e=>ym[e&15],hA=e=>ym[(e&240)>>4]+ym[e&15],Gc=e=>(e&240)>>4===(e&15),fA=e=>Gc(e.r)&&Gc(e.g)&&Gc(e.b)&&Gc(e.a);function pA(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Tn[e[1]]*17,g:255&Tn[e[2]]*17,b:255&Tn[e[3]]*17,a:t===5?Tn[e[4]]*17:255}:(t===7||t===9)&&(n={r:Tn[e[1]]<<4|Tn[e[2]],g:Tn[e[3]]<<4|Tn[e[4]],b:Tn[e[5]]<<4|Tn[e[6]],a:t===9?Tn[e[7]]<<4|Tn[e[8]]:255})),n}const mA=(e,t)=>e<255?t(e):"";function gA(e){var t=fA(e)?dA:hA;return e?"#"+t(e.r)+t(e.g)+t(e.b)+mA(e.a,t):void 0}const yA=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ES(e,t,n){const i=t*Math.min(n,1-n),s=(r,o=(r+e/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function vA(e,t,n){const i=(s,r=(s+e/60)%6)=>n-n*t*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function xA(e,t,n){const i=ES(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)i[s]*=1-t-n,i[s]+=t;return i}function bA(e,t,n,i,s){return e===s?(t-n)/i+(t.5?u/(2-r-o):u/(r+o),l=bA(n,i,s,u,r),l=l*60+.5),[l|0,c||0,a]}function ry(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map($s)}function oy(e,t,n){return ry(ES,e,t,n)}function _A(e,t,n){return ry(xA,e,t,n)}function wA(e,t,n){return ry(vA,e,t,n)}function AS(e){return(e%360+360)%360}function kA(e){const t=yA.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?Ka(+t[5]):$s(+t[5]));const s=AS(+t[2]),r=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=_A(s,r,o):t[1]==="hsv"?i=wA(s,r,o):i=oy(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}function SA(e,t){var n=sy(e);n[0]=AS(n[0]+t),n=oy(n),e.r=n[0],e.g=n[1],e.b=n[2]}function MA(e){if(!e)return;const t=sy(e),n=t[0],i=zv(t[1]),s=zv(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${s}%, ${$i(e.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const Wv={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Hv={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function CA(){const e={},t=Object.keys(Hv),n=Object.keys(Wv);let i,s,r,o,a;for(i=0;i>16&255,r>>8&255,r&255]}return e}let qc;function PA(e){qc||(qc=CA(),qc.transparent=[0,0,0,0]);const t=qc[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const TA=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function DA(e){const t=TA.exec(e);let n=255,i,s,r;if(t){if(t[7]!==i){const o=+t[7];n=t[8]?Ka(o):ks(o*255,0,255)}return i=+t[1],s=+t[3],r=+t[5],i=255&(t[2]?Ka(i):ks(i,0,255)),s=255&(t[4]?Ka(s):ks(s,0,255)),r=255&(t[6]?Ka(r):ks(r,0,255)),{r:i,g:s,b:r,a:n}}}function EA(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${$i(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Rf=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Qr=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function AA(e,t,n){const i=Qr($i(e.r)),s=Qr($i(e.g)),r=Qr($i(e.b));return{r:$s(Rf(i+n*(Qr($i(t.r))-i))),g:$s(Rf(s+n*(Qr($i(t.g))-s))),b:$s(Rf(r+n*(Qr($i(t.b))-r))),a:e.a+n*(t.a-e.a)}}function Qc(e,t,n){if(e){let i=sy(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=oy(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function OS(e,t){return e&&Object.assign(t||{},e)}function Uv(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=$s(e[3]))):(t=OS(e,{r:0,g:0,b:0,a:1}),t.a=$s(t.a)),t}function OA(e){return e.charAt(0)==="r"?DA(e):kA(e)}let RS=class vm{constructor(t){if(t instanceof vm)return t;const n=typeof t;let i;n==="object"?i=Uv(t):n==="string"&&(i=pA(t)||PA(t)||OA(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=OS(this._rgb);return t&&(t.a=$i(t.a)),t}set rgb(t){this._rgb=Uv(t)}rgbString(){return this._valid?EA(this._rgb):void 0}hexString(){return this._valid?gA(this._rgb):void 0}hslString(){return this._valid?MA(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,s=t.rgb;let r;const o=n===r?.5:n,a=2*o-1,l=i.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,i.r=255&c*i.r+r*s.r+.5,i.g=255&c*i.g+r*s.g+.5,i.b=255&c*i.b+r*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=AA(this._rgb,t._rgb,n)),this}clone(){return new vm(this.rgb)}alpha(t){return this._rgb.a=$s(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=hc(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.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 Qc(this._rgb,2,t),this}darken(t){return Qc(this._rgb,2,-t),this}saturate(t){return Qc(this._rgb,1,t),this}desaturate(t){return Qc(this._rgb,1,-t),this}rotate(t){return SA(this._rgb,t),this}};/*!
* Chart.js v4.4.2
* https://www.chartjs.org
* (c) 2024 Chart.js Contributors
* Released under the MIT License
- */function Di(){}const LA=(()=>{let e=0;return()=>e++})();function bt(e){return e===null||typeof e>"u"}function Ut(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function gt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function oe(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function mn(e,t){return oe(e)?e:t}function at(e,t){return typeof e>"u"?t:e}const RA=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,RS=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function $t(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Et(e,t,n,i){let s,r,o;if(Ut(e))if(r=e.length,i)for(s=r-1;s>=0;s--)t.call(n,e[s],s);else for(s=0;se,x:e=>e.x,y:e=>e.y};function $A(e){const t=e.split("."),n=[];let i="";for(const s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function IA(e){const t=$A(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function zs(e,t){return(Yv[t]||(Yv[t]=IA(t)))(e)}function ay(e){return e.charAt(0).toUpperCase()+e.slice(1)}const zl=e=>typeof e<"u",Ws=e=>typeof e=="function",Xv=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function FA(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Kt=Math.PI,Xt=2*Kt,BA=Xt+Kt,Nd=Number.POSITIVE_INFINITY,VA=Kt/180,ue=Kt/2,sr=Kt/4,Kv=Kt*2/3,Ss=Math.log10,vi=Math.sign;function dl(e,t,n){return Math.abs(e-t)s-r).pop(),t}function Wo(e){return!isNaN(parseFloat(e))&&isFinite(e)}function WA(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function jS(e,t,n){let i,s,r;for(i=0,s=e.length;il&&c=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function cy(e,t,n){n=n||(o=>e[o]1;)r=s+i>>1,n(r)?s=r:i=r;return{lo:s,hi:i}}const zi=(e,t,n,i)=>cy(e,n,i?s=>{const r=e[s][t];return re[s][t]cy(e,n,i=>e[i][t]>=n);function XA(e,t,n){let i=0,s=e.length;for(;ii&&e[s-1]>n;)s--;return i>0||s{const i="_onData"+ay(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...r){const o=s.apply(this,r);return e._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...r)}),o}})})}function Qv(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(IS.forEach(r=>{delete e[r]}),delete e._chartjs)}function FS(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const BS=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function VS(e,t){let n=[],i=!1;return function(...s){n=s,i||(i=!0,BS.call(window,()=>{i=!1,e.apply(t,n)}))}}function GA(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const uy=e=>e==="start"?"left":e==="end"?"right":"center",Ne=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,qA=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function zS(e,t,n){const i=t.length;let s=0,r=i;if(e._sorted){const{iScale:o,_parsed:a}=e,l=o.axis,{min:c,max:u,minDefined:d,maxDefined:h}=o.getUserBounds();d&&(s=we(Math.min(zi(a,l,c).lo,n?i:zi(t,l,o.getPixelForValue(c)).lo),0,i-1)),h?r=we(Math.max(zi(a,o.axis,u,!0).hi+1,n?0:zi(t,l,o.getPixelForValue(u),!0).hi+1),s,i)-s:r=i-s}return{start:s,count:r}}function WS(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,s={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=s,!0;const r=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),r}const Qc=e=>e===0||e===1,Zv=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Xt/n)),Jv=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Xt/n)+1,hl={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*ue)+1,easeOutSine:e=>Math.sin(e*ue),easeInOutSine:e=>-.5*(Math.cos(Kt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Qc(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Qc(e)?e:Zv(e,.075,.3),easeOutElastic:e=>Qc(e)?e:Jv(e,.075,.3),easeInOutElastic(e){return Qc(e)?e:e<.5?.5*Zv(e*2,.1125,.45):.5+.5*Jv(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-hl.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?hl.easeInBounce(e*2)*.5:hl.easeOutBounce(e*2-1)*.5+.5};function dy(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function tx(e){return dy(e)?e:new LS(e)}function Rf(e){return dy(e)?e:new LS(e).saturate(.5).darken(.1).hexString()}const QA=["x","y","borderWidth","radius","tension"],ZA=["color","borderColor","backgroundColor"];function JA(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:ZA},numbers:{type:"number",properties:QA}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function tO(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const ex=new Map;function eO(e,t){t=t||{};const n=e+JSON.stringify(t);let i=ex.get(n);return i||(i=new Intl.NumberFormat(e,t),ex.set(n,i)),i}function hc(e,t,n){return eO(t,n).format(e)}const HS={values(e){return Ut(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let s,r=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),r=nO(e,n)}const o=Ss(Math.abs(r)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),hc(e,i,l)},logarithmic(e,t,n){if(e===0)return"0";const i=n[t].significand||e/Math.pow(10,Math.floor(Ss(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?HS.numeric.call(this,e,t,n):""}};function nO(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Mh={formatters:HS};function iO(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Mh.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Fr=Object.create(null),bm=Object.create(null);function fl(e,t){if(!t)return e;const n=t.split(".");for(let i=0,s=n.length;ii.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=(i,s)=>Rf(s.backgroundColor),this.hoverBorderColor=(i,s)=>Rf(s.borderColor),this.hoverColor=(i,s)=>Rf(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Nf(this,t,n)}get(t){return fl(this,t)}describe(t,n){return Nf(bm,t,n)}override(t,n){return Nf(Fr,t,n)}route(t,n,i,s){const r=fl(this,t),o=fl(this,i),a="_"+n;Object.defineProperties(r,{[a]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[s];return gt(l)?Object.assign({},c,l):at(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}};var ne=new sO({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[JA,tO,iO]);function rO(e){return!e||bt(e.size)||bt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function jd(e,t,n,i,s){let r=t[s];return r||(r=t[s]=e.measureText(s).width,n.push(s)),r>i&&(i=r),i}function oO(e,t,n,i){i=i||{};let s=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(s=i.data={},r=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let o=0;const a=n.length;let l,c,u,d,h;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Wi(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&r.strokeColor!=="";let l,c;for(e.save(),e.font=s.string,cO(e,r),l=0;l+e||0;function hy(e,t){const n={},i=gt(t),s=i?Object.keys(t):t,r=gt(e)?i?o=>at(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of s)n[o]=mO(r(o));return n}function YS(e){return hy(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Cr(e){return hy(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Ae(e){const t=YS(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ge(e,t){e=e||{},t=t||ne.font;let n=at(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=at(e.style,t.style);i&&!(""+i).match(fO)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:at(e.family,t.family),lineHeight:pO(at(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:at(e.weight,t.weight),string:""};return s.string=rO(s),s}function Ht(e,t,n,i){let s=!0,r,o,a;for(r=0,o=e.length;rn&&a===0?0:a+l;return{min:o(i,-Math.abs(r)),max:o(s,r)}}function Qs(e,t){return Object.assign(Object.create(e),t)}function fy(e,t=[""],n,i,s=()=>e[0]){const r=n||e;typeof i>"u"&&(i=qS("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:r,_fallback:i,_getTarget:s,override:a=>fy([a,...e],t,r,i)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return KS(a,l,()=>SO(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return sx(a).includes(l)},ownKeys(a){return sx(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function Ho(e,t,n,i){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:XS(e,i),setContext:r=>Ho(e,r,n,i),override:r=>Ho(e.override(r),t,n,i)};return new Proxy(s,{deleteProperty(r,o){return delete r[o],delete e[o],!0},get(r,o,a){return KS(r,o,()=>vO(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(r,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(r,o,a){return e[o]=a,delete r[o],!0}})}function XS(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:i,isScriptable:Ws(n)?n:()=>n,isIndexable:Ws(i)?i:()=>i}}const yO=(e,t)=>e?e+ay(t):t,py=(e,t)=>gt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function KS(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const i=n();return e[t]=i,i}function vO(e,t,n){const{_proxy:i,_context:s,_subProxy:r,_descriptors:o}=e;let a=i[t];return Ws(a)&&o.isScriptable(t)&&(a=xO(t,a,e,n)),Ut(a)&&a.length&&(a=bO(t,a,e,o.isIndexable)),py(t,a)&&(a=Ho(a,s,r&&r[t],o)),a}function xO(e,t,n,i){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(r,o||i);return a.delete(e),py(e,l)&&(l=my(s._scopes,s,e,l)),l}function bO(e,t,n,i){const{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=n;if(typeof r.index<"u"&&i(e))return t[r.index%t.length];if(gt(t[0])){const l=t,c=s._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=my(c,s,e,u);t.push(Ho(d,r,o&&o[e],a))}}return t}function GS(e,t,n){return Ws(e)?e(t,n):e}const _O=(e,t)=>e===!0?t:typeof e=="string"?zs(t,e):void 0;function wO(e,t,n,i,s){for(const r of t){const o=_O(n,r);if(o){e.add(o);const a=GS(o._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(o===!1&&typeof i<"u"&&n!==i)return null}return!1}function my(e,t,n,i){const s=t._rootScopes,r=GS(t._fallback,n,i),o=[...e,...s],a=new Set;a.add(i);let l=ix(a,o,n,r||n,i);return l===null||typeof r<"u"&&r!==n&&(l=ix(a,o,r,l,i),l===null)?!1:fy(Array.from(a),[""],s,r,()=>kO(t,n,i))}function ix(e,t,n,i,s){for(;n;)n=wO(e,t,n,i,s);return n}function kO(e,t,n){const i=e._getTarget();t in i||(i[t]={});const s=i[t];return Ut(s)&>(n)?n:s||{}}function SO(e,t,n,i){let s;for(const r of t)if(s=qS(yO(r,e),n),typeof s<"u")return py(e,s)?my(n,i,e,s):s}function qS(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function sx(e){let t=e._keys;return t||(t=e._keys=MO(e._scopes)),t}function MO(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}function QS(e,t,n,i){const{iScale:s}=e,{key:r="r"}=this._parsing,o=new Array(i);let a,l,c,u;for(a=0,l=i;ate==="x"?"y":"x";function PO(e,t,n,i){const s=e.skip?t:e,r=t,o=n.skip?t:n,a=xm(r,s),l=xm(o,r);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,h=i*u;return{previous:{x:r.x-d*(o.x-s.x),y:r.y-d*(o.y-s.y)},next:{x:r.x+h*(o.x-s.x),y:r.y+h*(o.y-s.y)}}}function TO(e,t,n){const i=e.length;let s,r,o,a,l,c=Uo(e,0);for(let u=0;u!c.skip)),t.cubicInterpolationMode==="monotone")EO(e,s);else{let c=i?e[e.length-1]:e[0];for(r=0,o=e.length;re.ownerDocument.defaultView.getComputedStyle(e,null);function LO(e,t){return Th(e).getPropertyValue(t)}const RO=["top","right","bottom","left"];function Pr(e,t,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const r=RO[s];i[r]=parseFloat(e[t+"-"+r+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const NO=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function jO(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:s,offsetY:r}=i;let o=!1,a,l;if(NO(s,r,e.target))a=s,l=r;else{const c=t.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function fr(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,s=Th(n),r=s.boxSizing==="border-box",o=Pr(s,"padding"),a=Pr(s,"border","width"),{x:l,y:c,box:u}=jO(e,n),d=o.left+(u&&a.left),h=o.top+(u&&a.top);let{width:f,height:p}=t;return r&&(f-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-d)/f*n.width/i),y:Math.round((c-h)/p*n.height/i)}}function $O(e,t,n){let i,s;if(t===void 0||n===void 0){const r=yy(e);if(!r)t=e.clientWidth,n=e.clientHeight;else{const o=r.getBoundingClientRect(),a=Th(r),l=Pr(a,"border","width"),c=Pr(a,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,i=$d(a.maxWidth,r,"clientWidth"),s=$d(a.maxHeight,r,"clientHeight")}}return{width:t,height:n,maxWidth:i||Nd,maxHeight:s||Nd}}const Jc=e=>Math.round(e*10)/10;function IO(e,t,n,i){const s=Th(e),r=Pr(s,"margin"),o=$d(s.maxWidth,e,"clientWidth")||Nd,a=$d(s.maxHeight,e,"clientHeight")||Nd,l=$O(e,t,n);let{width:c,height:u}=l;if(s.boxSizing==="content-box"){const h=Pr(s,"border","width"),f=Pr(s,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-r.width),u=Math.max(0,i?c/i:u-r.height),c=Jc(Math.min(c,o,l.maxWidth)),u=Jc(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Jc(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Jc(Math.floor(u*i))),{width:c,height:u}}function rx(e,t,n){const i=t||1,s=Math.floor(e.height*i),r=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||o.height!==s||o.width!==r?(e.currentDevicePixelRatio=i,o.height=s,o.width=r,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const FO=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};gy()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function ox(e,t){const n=LO(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function pr(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function BO(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function VO(e,t,n,i){const s={x:e.cp2x,y:e.cp2y},r={x:t.cp1x,y:t.cp1y},o=pr(e,s,n),a=pr(s,r,n),l=pr(r,t,n),c=pr(o,a,n),u=pr(a,l,n);return pr(c,u,n)}const zO=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},WO=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Oo(e,t,n){return e?zO(t,n):WO()}function JS(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function tM(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function eM(e){return e==="angle"?{between:Wl,compare:HA,normalize:yn}:{between:Vi,compare:(t,n)=>t-n,normalize:t=>t}}function ax({start:e,end:t,count:n,loop:i,style:s}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:s}}function HO(e,t,n){const{property:i,start:s,end:r}=n,{between:o,normalize:a}=eM(i),l=t.length;let{start:c,end:u,loop:d}=e,h,f;if(d){for(c+=l,u+=l,h=0,f=l;hl(s,x,y)&&a(s,x)!==0,w=()=>a(r,y)===0||l(r,x,y),S=()=>m||_(),C=()=>!m||w();for(let M=u,P=u;M<=d;++M)g=t[M%o],!g.skip&&(y=c(g[i]),y!==x&&(m=l(y,s,r),v===null&&S()&&(v=a(y,s)===0?M:P),v!==null&&C()&&(p.push(ax({start:v,end:M,loop:h,count:o,style:f})),v=null),P=M,x=y));return v!==null&&p.push(ax({start:v,end:d,loop:h,count:o,style:f})),p}function iM(e,t){const n=[],i=e.segments;for(let s=0;ss&&e[r%t].skip;)r--;return r%=t,{start:s,end:r}}function YO(e,t,n,i){const s=e.length,r=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%s];c.skip||c.stop?a.skip||(i=!1,r.push({start:t%s,end:(l-1)%s,loop:i}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&r.push({start:t%s,end:o%s,loop:i}),r}function XO(e,t){const n=e.points,i=e.options.spanGaps,s=n.length;if(!s)return[];const r=!!e._loop,{start:o,end:a}=UO(n,s,r,i);if(i===!0)return lx(e,[{start:o,end:a,loop:r}],n,t);const l=a{let e=0;return()=>e++})();function bt(e){return e===null||typeof e>"u"}function Ut(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function gt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function oe(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function mn(e,t){return oe(e)?e:t}function at(e,t){return typeof e>"u"?t:e}const LA=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,LS=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function $t(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Et(e,t,n,i){let s,r,o;if(Ut(e))if(r=e.length,i)for(s=r-1;s>=0;s--)t.call(n,e[s],s);else for(s=0;se,x:e=>e.x,y:e=>e.y};function $A(e){const t=e.split("."),n=[];let i="";for(const s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function IA(e){const t=$A(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function zs(e,t){return(Yv[t]||(Yv[t]=IA(t)))(e)}function ay(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Wl=e=>typeof e<"u",Ws=e=>typeof e=="function",Xv=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function FA(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Kt=Math.PI,Xt=2*Kt,BA=Xt+Kt,Nd=Number.POSITIVE_INFINITY,VA=Kt/180,ue=Kt/2,sr=Kt/4,Kv=Kt*2/3,Ss=Math.log10,vi=Math.sign;function hl(e,t,n){return Math.abs(e-t)s-r).pop(),t}function Wo(e){return!isNaN(parseFloat(e))&&isFinite(e)}function WA(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function jS(e,t,n){let i,s,r;for(i=0,s=e.length;il&&c=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function cy(e,t,n){n=n||(o=>e[o]1;)r=s+i>>1,n(r)?s=r:i=r;return{lo:s,hi:i}}const zi=(e,t,n,i)=>cy(e,n,i?s=>{const r=e[s][t];return re[s][t]cy(e,n,i=>e[i][t]>=n);function XA(e,t,n){let i=0,s=e.length;for(;ii&&e[s-1]>n;)s--;return i>0||s{const i="_onData"+ay(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...r){const o=s.apply(this,r);return e._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...r)}),o}})})}function Qv(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(IS.forEach(r=>{delete e[r]}),delete e._chartjs)}function FS(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const BS=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function VS(e,t){let n=[],i=!1;return function(...s){n=s,i||(i=!0,BS.call(window,()=>{i=!1,e.apply(t,n)}))}}function GA(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const uy=e=>e==="start"?"left":e==="end"?"right":"center",Ne=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,qA=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function zS(e,t,n){const i=t.length;let s=0,r=i;if(e._sorted){const{iScale:o,_parsed:a}=e,l=o.axis,{min:c,max:u,minDefined:d,maxDefined:h}=o.getUserBounds();d&&(s=we(Math.min(zi(a,l,c).lo,n?i:zi(t,l,o.getPixelForValue(c)).lo),0,i-1)),h?r=we(Math.max(zi(a,o.axis,u,!0).hi+1,n?0:zi(t,l,o.getPixelForValue(u),!0).hi+1),s,i)-s:r=i-s}return{start:s,count:r}}function WS(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,s={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=s,!0;const r=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),r}const Zc=e=>e===0||e===1,Zv=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Xt/n)),Jv=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Xt/n)+1,fl={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*ue)+1,easeOutSine:e=>Math.sin(e*ue),easeInOutSine:e=>-.5*(Math.cos(Kt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Zc(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Zc(e)?e:Zv(e,.075,.3),easeOutElastic:e=>Zc(e)?e:Jv(e,.075,.3),easeInOutElastic(e){return Zc(e)?e:e<.5?.5*Zv(e*2,.1125,.45):.5+.5*Jv(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-fl.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?fl.easeInBounce(e*2)*.5:fl.easeOutBounce(e*2-1)*.5+.5};function dy(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function tx(e){return dy(e)?e:new RS(e)}function Lf(e){return dy(e)?e:new RS(e).saturate(.5).darken(.1).hexString()}const QA=["x","y","borderWidth","radius","tension"],ZA=["color","borderColor","backgroundColor"];function JA(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:ZA},numbers:{type:"number",properties:QA}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function tO(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const ex=new Map;function eO(e,t){t=t||{};const n=e+JSON.stringify(t);let i=ex.get(n);return i||(i=new Intl.NumberFormat(e,t),ex.set(n,i)),i}function fc(e,t,n){return eO(t,n).format(e)}const HS={values(e){return Ut(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let s,r=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),r=nO(e,n)}const o=Ss(Math.abs(r)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),fc(e,i,l)},logarithmic(e,t,n){if(e===0)return"0";const i=n[t].significand||e/Math.pow(10,Math.floor(Ss(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?HS.numeric.call(this,e,t,n):""}};function nO(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Mh={formatters:HS};function iO(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Mh.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Fr=Object.create(null),bm=Object.create(null);function pl(e,t){if(!t)return e;const n=t.split(".");for(let i=0,s=n.length;ii.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=(i,s)=>Lf(s.backgroundColor),this.hoverBorderColor=(i,s)=>Lf(s.borderColor),this.hoverColor=(i,s)=>Lf(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Nf(this,t,n)}get(t){return pl(this,t)}describe(t,n){return Nf(bm,t,n)}override(t,n){return Nf(Fr,t,n)}route(t,n,i,s){const r=pl(this,t),o=pl(this,i),a="_"+n;Object.defineProperties(r,{[a]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[s];return gt(l)?Object.assign({},c,l):at(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}};var ne=new sO({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[JA,tO,iO]);function rO(e){return!e||bt(e.size)||bt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function jd(e,t,n,i,s){let r=t[s];return r||(r=t[s]=e.measureText(s).width,n.push(s)),r>i&&(i=r),i}function oO(e,t,n,i){i=i||{};let s=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(s=i.data={},r=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let o=0;const a=n.length;let l,c,u,d,h;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Wi(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&r.strokeColor!=="";let l,c;for(e.save(),e.font=s.string,cO(e,r),l=0;l+e||0;function hy(e,t){const n={},i=gt(t),s=i?Object.keys(t):t,r=gt(e)?i?o=>at(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of s)n[o]=mO(r(o));return n}function YS(e){return hy(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Cr(e){return hy(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Ae(e){const t=YS(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ge(e,t){e=e||{},t=t||ne.font;let n=at(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=at(e.style,t.style);i&&!(""+i).match(fO)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:at(e.family,t.family),lineHeight:pO(at(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:at(e.weight,t.weight),string:""};return s.string=rO(s),s}function Ht(e,t,n,i){let s=!0,r,o,a;for(r=0,o=e.length;rn&&a===0?0:a+l;return{min:o(i,-Math.abs(r)),max:o(s,r)}}function Qs(e,t){return Object.assign(Object.create(e),t)}function fy(e,t=[""],n,i,s=()=>e[0]){const r=n||e;typeof i>"u"&&(i=qS("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:r,_fallback:i,_getTarget:s,override:a=>fy([a,...e],t,r,i)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return KS(a,l,()=>SO(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return sx(a).includes(l)},ownKeys(a){return sx(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function Ho(e,t,n,i){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:XS(e,i),setContext:r=>Ho(e,r,n,i),override:r=>Ho(e.override(r),t,n,i)};return new Proxy(s,{deleteProperty(r,o){return delete r[o],delete e[o],!0},get(r,o,a){return KS(r,o,()=>vO(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(r,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(r,o,a){return e[o]=a,delete r[o],!0}})}function XS(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:i,isScriptable:Ws(n)?n:()=>n,isIndexable:Ws(i)?i:()=>i}}const yO=(e,t)=>e?e+ay(t):t,py=(e,t)=>gt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function KS(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const i=n();return e[t]=i,i}function vO(e,t,n){const{_proxy:i,_context:s,_subProxy:r,_descriptors:o}=e;let a=i[t];return Ws(a)&&o.isScriptable(t)&&(a=xO(t,a,e,n)),Ut(a)&&a.length&&(a=bO(t,a,e,o.isIndexable)),py(t,a)&&(a=Ho(a,s,r&&r[t],o)),a}function xO(e,t,n,i){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(r,o||i);return a.delete(e),py(e,l)&&(l=my(s._scopes,s,e,l)),l}function bO(e,t,n,i){const{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=n;if(typeof r.index<"u"&&i(e))return t[r.index%t.length];if(gt(t[0])){const l=t,c=s._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=my(c,s,e,u);t.push(Ho(d,r,o&&o[e],a))}}return t}function GS(e,t,n){return Ws(e)?e(t,n):e}const _O=(e,t)=>e===!0?t:typeof e=="string"?zs(t,e):void 0;function wO(e,t,n,i,s){for(const r of t){const o=_O(n,r);if(o){e.add(o);const a=GS(o._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(o===!1&&typeof i<"u"&&n!==i)return null}return!1}function my(e,t,n,i){const s=t._rootScopes,r=GS(t._fallback,n,i),o=[...e,...s],a=new Set;a.add(i);let l=ix(a,o,n,r||n,i);return l===null||typeof r<"u"&&r!==n&&(l=ix(a,o,r,l,i),l===null)?!1:fy(Array.from(a),[""],s,r,()=>kO(t,n,i))}function ix(e,t,n,i,s){for(;n;)n=wO(e,t,n,i,s);return n}function kO(e,t,n){const i=e._getTarget();t in i||(i[t]={});const s=i[t];return Ut(s)&>(n)?n:s||{}}function SO(e,t,n,i){let s;for(const r of t)if(s=qS(yO(r,e),n),typeof s<"u")return py(e,s)?my(n,i,e,s):s}function qS(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function sx(e){let t=e._keys;return t||(t=e._keys=MO(e._scopes)),t}function MO(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}function QS(e,t,n,i){const{iScale:s}=e,{key:r="r"}=this._parsing,o=new Array(i);let a,l,c,u;for(a=0,l=i;ate==="x"?"y":"x";function PO(e,t,n,i){const s=e.skip?t:e,r=t,o=n.skip?t:n,a=xm(r,s),l=xm(o,r);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,h=i*u;return{previous:{x:r.x-d*(o.x-s.x),y:r.y-d*(o.y-s.y)},next:{x:r.x+h*(o.x-s.x),y:r.y+h*(o.y-s.y)}}}function TO(e,t,n){const i=e.length;let s,r,o,a,l,c=Uo(e,0);for(let u=0;u!c.skip)),t.cubicInterpolationMode==="monotone")EO(e,s);else{let c=i?e[e.length-1]:e[0];for(r=0,o=e.length;re.ownerDocument.defaultView.getComputedStyle(e,null);function RO(e,t){return Th(e).getPropertyValue(t)}const LO=["top","right","bottom","left"];function Pr(e,t,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const r=LO[s];i[r]=parseFloat(e[t+"-"+r+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const NO=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function jO(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:s,offsetY:r}=i;let o=!1,a,l;if(NO(s,r,e.target))a=s,l=r;else{const c=t.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function fr(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,s=Th(n),r=s.boxSizing==="border-box",o=Pr(s,"padding"),a=Pr(s,"border","width"),{x:l,y:c,box:u}=jO(e,n),d=o.left+(u&&a.left),h=o.top+(u&&a.top);let{width:f,height:p}=t;return r&&(f-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-d)/f*n.width/i),y:Math.round((c-h)/p*n.height/i)}}function $O(e,t,n){let i,s;if(t===void 0||n===void 0){const r=yy(e);if(!r)t=e.clientWidth,n=e.clientHeight;else{const o=r.getBoundingClientRect(),a=Th(r),l=Pr(a,"border","width"),c=Pr(a,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,i=$d(a.maxWidth,r,"clientWidth"),s=$d(a.maxHeight,r,"clientHeight")}}return{width:t,height:n,maxWidth:i||Nd,maxHeight:s||Nd}}const tu=e=>Math.round(e*10)/10;function IO(e,t,n,i){const s=Th(e),r=Pr(s,"margin"),o=$d(s.maxWidth,e,"clientWidth")||Nd,a=$d(s.maxHeight,e,"clientHeight")||Nd,l=$O(e,t,n);let{width:c,height:u}=l;if(s.boxSizing==="content-box"){const h=Pr(s,"border","width"),f=Pr(s,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-r.width),u=Math.max(0,i?c/i:u-r.height),c=tu(Math.min(c,o,l.maxWidth)),u=tu(Math.min(u,a,l.maxHeight)),c&&!u&&(u=tu(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=tu(Math.floor(u*i))),{width:c,height:u}}function rx(e,t,n){const i=t||1,s=Math.floor(e.height*i),r=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||o.height!==s||o.width!==r?(e.currentDevicePixelRatio=i,o.height=s,o.width=r,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const FO=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};gy()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function ox(e,t){const n=RO(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function pr(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function BO(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function VO(e,t,n,i){const s={x:e.cp2x,y:e.cp2y},r={x:t.cp1x,y:t.cp1y},o=pr(e,s,n),a=pr(s,r,n),l=pr(r,t,n),c=pr(o,a,n),u=pr(a,l,n);return pr(c,u,n)}const zO=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},WO=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Oo(e,t,n){return e?zO(t,n):WO()}function JS(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function tM(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function eM(e){return e==="angle"?{between:Hl,compare:HA,normalize:yn}:{between:Vi,compare:(t,n)=>t-n,normalize:t=>t}}function ax({start:e,end:t,count:n,loop:i,style:s}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:s}}function HO(e,t,n){const{property:i,start:s,end:r}=n,{between:o,normalize:a}=eM(i),l=t.length;let{start:c,end:u,loop:d}=e,h,f;if(d){for(c+=l,u+=l,h=0,f=l;hl(s,x,y)&&a(s,x)!==0,w=()=>a(r,y)===0||l(r,x,y),S=()=>m||_(),C=()=>!m||w();for(let M=u,P=u;M<=d;++M)g=t[M%o],!g.skip&&(y=c(g[i]),y!==x&&(m=l(y,s,r),v===null&&S()&&(v=a(y,s)===0?M:P),v!==null&&C()&&(p.push(ax({start:v,end:M,loop:h,count:o,style:f})),v=null),P=M,x=y));return v!==null&&p.push(ax({start:v,end:d,loop:h,count:o,style:f})),p}function iM(e,t){const n=[],i=e.segments;for(let s=0;ss&&e[r%t].skip;)r--;return r%=t,{start:s,end:r}}function YO(e,t,n,i){const s=e.length,r=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%s];c.skip||c.stop?a.skip||(i=!1,r.push({start:t%s,end:(l-1)%s,loop:i}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&r.push({start:t%s,end:o%s,loop:i}),r}function XO(e,t){const n=e.points,i=e.options.spanGaps,s=n.length;if(!s)return[];const r=!!e._loop,{start:o,end:a}=UO(n,s,r,i);if(i===!0)return lx(e,[{start:o,end:a,loop:r}],n,t);const l=aa({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=BS.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const r=i.items;let o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),n+=r.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};var Ai=new qO;const ux="transparent",QO={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=tx(e||ux),s=i.valid&&tx(t||ux);return s&&s.valid?s.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};let ZO=class{constructor(t,n,i,s){const r=n[i];s=Ht([t.to,s,r,t.from]);const o=Ht([t.from,r,s]);this._active=!0,this._fn=t.fn||QO[t.type||typeof o],this._easing=hl[t.easing]||hl.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=Ht([t.to,n,s,t.from]),this._from=Ht([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,s=this._prop,r=this._from,o=this._loop,a=this._to;let l;if(this._active=r!==a&&(o||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(r,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let s=0;s{const r=t[s];if(!gt(r))return;const o={};for(const a of n)o[a]=r[a];(Ut(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,o)})})}_animateOptions(t,n){const i=n.options,s=t2(t,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&JO(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,n){const i=this._properties,s=[],r=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,n));continue}const u=n[c];let d=r[c];const h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}r[c]=d=new ZO(h,t,c,u),s.push(d)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return Ai.add(this._chart,i),!0}};function JO(e,t){const n=[],i=Object.keys(t);for(let s=0;s0||!n&&r<0)return s.index}return null}function mx(e,t){const{chart:n,_cachedMeta:i}=e,s=n._stacks||(n._stacks={}),{iScale:r,vScale:o,index:a}=i,l=r.axis,c=o.axis,u=s2(r,o,i),d=t.length;let h;for(let f=0;fn[i].axis===t).shift()}function a2(e,t){return Qs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function l2(e,t,n){return Qs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function xa(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const s of t){const r=s._stacks;if(!r||r[i]===void 0||r[i][n]===void 0)return;delete r[i][n],r[i]._visualValues!==void 0&&r[i]._visualValues[n]!==void 0&&delete r[i]._visualValues[n]}}}const $f=e=>e==="reset"||e==="none",gx=(e,t)=>t?e:Object.assign({},e),c2=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:rM(n,!0),values:null};var Na;let Zs=(Na=class{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=fx(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&xa(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(d,h,f,p)=>d==="x"?h:d==="r"?p:f,r=n.xAxisID=at(i.xAxisID,jf(t,"x")),o=n.yAxisID=at(i.yAxisID,jf(t,"y")),a=n.rAxisID=at(i.rAxisID,jf(t,"r")),l=n.indexAxis,c=n.iAxisID=s(l,r,o,a),u=n.vAxisID=s(l,o,r,a);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Qv(this._data,this),t._stacked&&xa(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(gt(n))this._data=i2(n);else if(i!==n){if(i){Qv(i,this);const s=this._cachedMeta;xa(s),s._parsed=[]}n&&Object.isExtensible(n)&&KA(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const r=n._stacked;n._stacked=fx(n.vScale,n),n.stack!==i.stack&&(s=!0,xa(n),n.stack=i.stack),this._resyncElements(t),(s||r!==n._stacked)&&mx(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:o}=i,a=r.axis;let l=t===0&&n===s.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,h;if(this._parsing===!1)i._parsed=s,i._sorted=!0,h=s;else{Ut(s[t])?h=this.parseArrayData(i,s,t,n):gt(s[t])?h=this.parseObjectData(i,s,t,n):h=this.parsePrimitiveData(i,s,t,n);const f=()=>d[a]===null||c&&d[a]m||d=0;--h)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let s,r,o;for(s=0,r=n.length;s=0&&tthis.getContext(i,s,n),m=c.resolveNamedOptions(h,f,p,d);return m.$shared&&(m.$shared=l,r[o]=Object.freeze(gx(m,l))),m}_resolveAnimations(t,n,i){const s=this.chart,r=this._cachedDataOpts,o=`animation-${n}`,a=r[o];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,i,n))}const c=new sM(s,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||$f(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),s=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(n,r)||r!==s;return this.updateSharedOptions(r,n,i),{sharedOptions:r,includeOptions:o}}updateElement(t,n,i,s){$f(s)?Object.assign(t,i):this._resolveAnimations(n,s).update(t,i)}updateSharedOptions(t,n,i){t&&!$f(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,s){t.active=s;const r=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(t,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,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 n=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=i.length,r=n.length,o=Math.min(r,s);o&&this.parse(0,o),r>s?this._insertElements(s,r-s,t):r{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(r),a=t;as-r))}return e._cache.$bar}function d2(e){const t=e.iScale,n=u2(t,e.type);let i=t._length,s,r,o,a;const l=()=>{o===32767||o===-32768||(zl(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(s=0,r=n.length;s0?s[e-1]:null,a=eMath.abs(a)&&(l=a,c=o),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:r,min:o,max:a}}function oM(e,t,n,i){return Ut(e)?p2(e,t,n,i):t[n.axis]=n.parse(e,i),t}function yx(e,t,n,i){const s=e.iScale,r=e.vScale,o=s.getLabels(),a=s===r,l=[];let c,u,d,h;for(c=n,u=n+i;c=n?1:-1)}function g2(e){let t,n,i,s,r;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.basel.controller.options.grouped),r=i.options.stacked,o=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(bt(u)||isNaN(u))return!0};for(const l of s)if(!(n!==void 0&&a(l))&&((r===!1||o.indexOf(l.stack)===-1||r===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){const s=this._getStacks(t,i),r=n!==void 0?s.indexOf(n):-1;return r===-1?s.length-1:r}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,s=[];let r,o;for(r=0,o=n.data.length;r=0;--i)n=Math.max(n,t[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=n,o=this.getParsed(t),a=s.getLabelForValue(o.x),l=r.getLabelForValue(o.y),c=o._custom;return{label:i[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,i,s){const r=s==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,s),u=o.axis,d=a.axis;for(let h=n;hWl(x,a,l,!0)?1:Math.max(_,_*n,w,w*n),p=(x,_,w)=>Wl(x,a,l,!0)?-1:Math.min(_,_*n,w,w*n),m=f(0,c,d),v=f(ue,u,h),y=p(Kt,c,d),g=p(Kt+ue,u,h);i=(m-y)/2,s=(v-g)/2,r=-(m+y)/2,o=-(v+g)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:o}}var no;let vy=(no=class extends Zs{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let r=l=>+i[l];if(gt(i[t])){const{key:l="value"}=this._parsing;r=c=>+zs(i[c],l)}let o,a;for(o=t,a=t+n;o0&&!isNaN(t)?Xt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=hc(n._parsed[t],i.options.locale);return{label:s[t]||"",value:r}}getMaxBorderWidth(t){let n=0;const i=this.chart;let s,r,o,a,l;if(!t){for(s=0,r=i.data.datasets.length;st!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),K(no,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((r,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}}),no);var Ia;let k2=(Ia=class extends Zs{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:s=[],_dataset:r}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=zS(n,s,o);this._drawStart=a,this._drawCount=l,WS(n)&&(a=0,l=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,n,i,s){const r=s==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,s),h=o.axis,f=a.axis,{spanGaps:p,segment:m}=this.options,v=Wo(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||s==="none",g=n+i,x=t.length;let _=n>0&&this.getParsed(n-1);for(let w=0;w=g){C.skip=!0;continue}const M=this.getParsed(w),P=bt(M[f]),T=C[h]=o.getPixelForValue(M[h],w),A=C[f]=r||P?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,M,l):M[f],w);C.skip=isNaN(T)||isNaN(A)||P,C.stop=w>0&&Math.abs(M[h]-_[h])>v,m&&(C.parsed=M,C.raw=c.data[w]),d&&(C.options=u||this.resolveDataElementOptions(w,S.active?"active":s)),y||this.updateElement(S,w,C,s),_=M}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const r=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},K(Ia,"id","line"),K(Ia,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),K(Ia,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}}),Ia);var Fa;let aM=(Fa=class extends Zs{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=hc(n._parsed[t].r,i.options.locale);return{label:s[t]||"",value:r}}parseObjectData(t,n,i,s){return QS.bind(this)(t,n,i,s)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,s)=>{const r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(rn.max&&(n.max=r))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,i=t.options,s=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),a=(r-o)/t.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,i,s){const r=s==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*Kt;let f=h,p;const m=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(t,n,i){return this.chart.getDataVisibility(t)?Jn(this.resolveDataElementOptions(t,n).angle||i):0}},K(Fa,"id","polarArea"),K(Fa,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),K(Fa,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((r,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}}),Fa);var Ou;let S2=(Ou=class extends vy{},K(Ou,"id","pie"),K(Ou,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"}),Ou);var Ba;let M2=(Ba=class extends Zs{getLabelAndValue(t){const n=this._cachedMeta.vScale,i=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(t,n,i,s){return QS.bind(this)(t,n,i,s)}update(t){const n=this._cachedMeta,i=n.dataset,s=n.data||[],r=n.iScale.getLabels();if(i.points=s,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:r.length===s.length,options:o};this.updateElement(i,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,n,i,s){const r=this._cachedMeta.rScale,o=s==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let _=n;_0&&Math.abs(S[f]-x[f])>y,v&&(C.parsed=S,C.raw=c.data[_]),h&&(C.options=d||this.resolveDataElementOptions(_,w.active?"active":s)),g||this.updateElement(w,_,C,s),x=S}this.updateSharedOptions(d,s,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!n.length)return s;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,r,o)/2}},K(Va,"id","scatter"),K(Va,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),K(Va,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}}),Va);var P2=Object.freeze({__proto__:null,BarController:b2,BubbleController:_2,DoughnutController:vy,LineController:k2,PieController:S2,PolarAreaController:aM,RadarController:M2,ScatterController:C2});function or(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class xy{constructor(t){K(this,"options");this.options=t||{}}static override(t){Object.assign(xy.prototype,t)}init(){}formats(){return or()}parse(){return or()}format(){return or()}add(){return or()}diff(){return or()}startOf(){return or()}endOf(){return or()}}var T2={_date:xy};function D2(e,t,n,i){const{controller:s,data:r,_sorted:o}=e,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&o&&r.length){const l=a._reversePixels?YA:zi;if(i){if(s._sharedOptions){const c=r[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(r,t,n-u),h=l(r,t,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(r,t,n)}return{lo:0,hi:r.length-1}}function fc(e,t,n,i,s){const r=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=r.length;a{l[o](t[n],s)&&(r.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,s))}),i&&!a?[]:r}var L2={evaluateInteractionItems:fc,modes:{index(e,t,n,i){const s=fr(t,e),r=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Ff(e,s,r,i,o):Bf(e,s,r,!1,i,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,i){const s=fr(t,e),r=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Ff(e,s,r,i,o):Bf(e,s,r,!1,i,o);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;un.pos===t)}function _x(e,t){return e.filter(n=>lM.indexOf(n.pos)===-1&&n.box.axis===t)}function _a(e,t){return e.sort((n,i)=>{const s=t?i:n,r=t?n:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function R2(e){const t=[];let n,i,s,r,o,a;for(n=0,i=(e||[]).length;nc.box.fullSize),!0),i=_a(ba(t,"left"),!0),s=_a(ba(t,"right")),r=_a(ba(t,"top"),!0),o=_a(ba(t,"bottom")),a=_x(t,"x"),l=_x(t,"y");return{fullSize:n,leftAndTop:i.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:ba(t,"chartArea"),vertical:i.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}function wx(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function cM(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function I2(e,t,n,i){const{pos:s,box:r}=n,o=e.maxPadding;if(!gt(s)){n.size&&(e[s]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?r.height:r.width),n.size=d.size/d.count,e[s]+=n.size}r.getPadding&&cM(o,r.getPadding());const a=Math.max(0,t.outerWidth-wx(o,e,"left","right")),l=Math.max(0,t.outerHeight-wx(o,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function F2(e){const t=e.maxPadding;function n(i){const s=Math.max(t[i]-e[i],0);return e[i]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function B2(e,t){const n=t.maxPadding;function i(s){const r={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{r[o]=Math.max(t[o],n[o])}),r}return i(e?["left","right"]:["top","bottom"])}function Ga(e,t,n,i){const s=[];let r,o,a,l,c,u;for(r=0,o=e.length,c=0;r{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,v)=>v.box.options&&v.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/u,hBoxMaxHeight:o/2}),h=Object.assign({},s);cM(h,Ae(i));const f=Object.assign({maxPadding:h,w:r,h:o,x:s.left,y:s.top},s),p=j2(l.concat(c),d);Ga(a.fullSize,f,d,p),Ga(l,f,d,p),Ga(c,f,d,p)&&Ga(l,f,d,p),F2(f),kx(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,kx(a.rightAndBottom,f,d,p),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Et(a.chartArea,m=>{const v=m.box;Object.assign(v,e.chartArea),v.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};let uM=class{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,s){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(t){return!0}updateConfig(t){}},V2=class extends uM{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}};const Qu="$chartjs",z2={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Sx=e=>e===null||e==="";function W2(e,t){const n=e.style,i=e.getAttribute("height"),s=e.getAttribute("width");if(e[Qu]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Sx(s)){const r=ox(e,"width");r!==void 0&&(e.width=r)}if(Sx(i))if(e.style.height==="")e.height=e.width/(t||2);else{const r=ox(e,"height");r!==void 0&&(e.height=r)}return e}const dM=FO?{passive:!0}:!1;function H2(e,t,n){e&&e.addEventListener(t,n,dM)}function U2(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,dM)}function Y2(e,t){const n=z2[e.type]||e.type,{x:i,y:s}=fr(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Id(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function X2(e,t,n){const i=e.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Id(a.addedNodes,i),o=o&&!Id(a.removedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function K2(e,t,n){const i=e.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Id(a.removedNodes,i),o=o&&!Id(a.addedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Ul=new Map;let Mx=0;function hM(){const e=window.devicePixelRatio;e!==Mx&&(Mx=e,Ul.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function G2(e,t){Ul.size||window.addEventListener("resize",hM),Ul.set(e,t)}function q2(e){Ul.delete(e),Ul.size||window.removeEventListener("resize",hM)}function Q2(e,t,n){const i=e.canvas,s=i&&yy(i);if(!s)return;const r=VS((a,l)=>{const c=s.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||r(c,u)});return o.observe(s),G2(e,r),o}function Vf(e,t,n){n&&n.disconnect(),t==="resize"&&q2(e)}function Z2(e,t,n){const i=e.canvas,s=VS(r=>{e.ctx!==null&&n(Y2(r,e))},e);return H2(i,t,s),s}let J2=class extends uM{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(W2(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[Qu])return!1;const i=n[Qu].initial;["height","width"].forEach(r=>{const o=i[r];bt(o)?n.removeAttribute(r):n.setAttribute(r,o)});const s=i.style||{};return Object.keys(s).forEach(r=>{n.style[r]=s[r]}),n.width=n.width,delete n[Qu],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),o={attach:X2,detach:K2,resize:Q2}[n]||Z2;s[n]=o(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),s=i[n];if(!s)return;({attach:Vf,detach:Vf,resize:Vf}[n]||U2)(t,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,s){return IO(t,n,i,s)}isAttached(t){const n=yy(t);return!!(n&&n.isConnected)}};function tL(e){return!gy()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?V2:J2}var Lu;let os=(Lu=class{constructor(){K(this,"x");K(this,"y");K(this,"active",!1);K(this,"options");K(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return Wo(this.x)&&Wo(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const s={};return t.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}},K(Lu,"defaults",{}),K(Lu,"defaultRoutes"),Lu);function eL(e,t){const n=e.options.ticks,i=nL(e),s=Math.min(n.maxTicksLimit||i,i),r=n.major.enabled?sL(t):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>s)return rL(t,c,r,o/s),c;const u=iL(r,t,s);if(o>0){let d,h;const f=o>1?Math.round((l-a)/(o-1)):null;for(eu(t,c,u,bt(f)?0:a-f,a),d=0,h=o-1;ds)return l}return Math.max(s,1)}function sL(e){const t=[];let n,i;for(n=0,i=e.length;ne==="left"?"right":e==="right"?"left":e,Cx=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Px=(e,t)=>Math.min(t||e,e);function Tx(e,t){const n=[],i=e.length/t,s=e.length;let r=0;for(;ro+a)))return l}function cL(e,t){Et(e,n=>{const i=n.gc,s=i.length/2;let r;if(s>t){for(r=0;ri?i:n,i=s&&n>i?n:i,{min:mn(n,mn(i,n)),max:mn(i,mn(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$t(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,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=gO(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=r||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=we(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:f/(i-1),d+6>a&&(a=f/(i-(t.offset?.5:1)),l=this.maxHeight-wa(t.grid)-n.padding-Dx(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),o=ly(Math.min(Math.asin(we((u.highest.height+6)/a,-1,1)),Math.asin(we(l/c,-1,1))-Math.asin(we(h/c,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){$t(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$t(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=Dx(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=wa(r)+l):(t.height=this.maxHeight,t.width=wa(r)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,p=Jn(this.labelRotation),m=Math.cos(p),v=Math.sin(p);if(a){const y=i.mirror?0:v*d.width+m*h.height;t.height=Math.min(this.maxHeight,t.height+y+f)}else{const y=i.mirror?0:m*d.width+v*h.height;t.width=Math.min(this.maxWidth,t.width+y+f)}this._calculatePadding(c,u,v,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,s){const{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=s*t.width,f=i*n.height):(h=i*t.height,f=s*n.width):r==="start"?f=n.width:r==="end"?h=t.width:r!=="inner"&&(h=t.width/2,f=n.width/2),this.paddingLeft=Math.max((h-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;r==="start"?(u=0,d=t.height):r==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_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(){$t(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n({width:o[P]||0,height:a[P]||0});return{first:M(0),last:M(n-1),widest:M(S),highest:M(C),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return UA(this._alignToPixels?rr(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*s?a/i:l/s:l*s0}_computeGridLineItems(t){const n=this.axis,i=this.chart,s=this.options,{grid:r,position:o,border:a}=s,l=r.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=wa(r),f=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,v=m/2,y=function(R){return rr(i,R,m)};let g,x,_,w,S,C,M,P,T,A,E,z;if(o==="top")g=y(this.bottom),C=this.bottom-h,P=g-v,A=y(t.top)+v,z=t.bottom;else if(o==="bottom")g=y(this.top),A=t.top,z=y(t.bottom)-v,C=g+v,P=this.top+h;else if(o==="left")g=y(this.right),S=this.right-h,M=g-v,T=y(t.left)+v,E=t.right;else if(o==="right")g=y(this.left),T=t.left,E=y(t.right)-v,S=g+v,M=this.left+h;else if(n==="x"){if(o==="center")g=y((t.top+t.bottom)/2+.5);else if(gt(o)){const R=Object.keys(o)[0],B=o[R];g=y(this.chart.scales[R].getPixelForValue(B))}A=t.top,z=t.bottom,C=g+v,P=C+h}else if(n==="y"){if(o==="center")g=y((t.left+t.right)/2);else if(gt(o)){const R=Object.keys(o)[0],B=o[R];g=y(this.chart.scales[R].getPixelForValue(B))}S=g-v,M=S-h,T=t.left,E=t.right}const N=at(s.ticks.maxTicksLimit,d),L=Math.max(1,Math.ceil(d/N));for(x=0;x0&&(U-=Z/2);break}V={left:U,top:O,width:Z+W.width,height:et+W.height,color:L.backdropColor}}v.push({label:_,font:P,textOffset:E,options:{rotation:m,color:B,strokeColor:D,strokeWidth:$,textAlign:F,textBaseline:z,translation:[w,S],backdrop:V}})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Jn(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,o=this._getLabelSizes(),a=t+r,l=o.widest.width;let c,u;return n==="left"?s?(u=this.right+r,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?s?(u=this.left+r,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:s,width:r,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,s,r,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(r=>r.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(r=0,o=s.length;r{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let r,o;for(r=0,o=n.length;r{const i=n.split("."),s=i.pop(),r=[e].concat(i).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");ne.route(r,s,l,a)})}function gL(e){return"id"in e&&"defaults"in e}let yL=class{constructor(){this.controllers=new nu(Zs,"datasets",!0),this.elements=new nu(os,"elements"),this.plugins=new nu(Object,"plugins"),this.scales=new nu(pc,"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,n,i){[...n].forEach(s=>{const r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(t,r,s):Et(s,o=>{const a=i||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,i){const s=ay(t);$t(i["before"+s],[],i),n[t](i),$t(i["after"+s],[],i)}_getRegistryForType(t){for(let n=0;nr.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,i),t,"stop"),this._notify(s(i,n),t,"start")}};function xL(e){const t={},n=[],i=Object.keys(hi.plugins.items);for(let r=0;r1&&Ex(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Ax(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function CL(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return Ax(e,"x",n[0])||Ax(e,"y",n[0])}return{}}function PL(e,t){const n=Fr[e.type]||{scales:{}},i=t.scales||{},s=wm(e.type,t),r=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!gt(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=km(o,a,CL(o,e),ne.scales[a.type]),c=SL(l,s),u=n.scales||{};r[o]=ul(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||wm(a,t),u=(Fr[a]||{}).scales||{};Object.keys(u).forEach(d=>{const h=kL(d,l),f=o[h+"AxisID"]||h;r[f]=r[f]||Object.create(null),ul(r[f],[{axis:h},i[f],u[d]])})}),Object.keys(r).forEach(o=>{const a=r[o];ul(a,[ne.scales[a.type],ne.scale])}),r}function pM(e){const t=e.options||(e.options={});t.plugins=at(t.plugins,{}),t.scales=PL(e,t)}function mM(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function TL(e){return e=e||{},e.data=mM(e.data),pM(e),e}const Ox=new Map,gM=new Set;function iu(e,t){let n=Ox.get(e);return n||(n=t(),Ox.set(e,n),gM.add(n)),n}const ka=(e,t,n)=>{const i=zs(t,n);i!==void 0&&e.add(i)};let DL=class{constructor(t){this._config=TL(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=mM(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(),pM(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return iu(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return iu(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return iu(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return iu(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let s=i.get(t);return(!s||n)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,n,i){const{options:s,type:r}=this,o=this._cachedScopes(t,i),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>ka(l,t,d))),u.forEach(d=>ka(l,s,d)),u.forEach(d=>ka(l,Fr[r]||{},d)),u.forEach(d=>ka(l,ne,d)),u.forEach(d=>ka(l,bm,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),gM.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Fr[n]||{},ne.datasets[n]||{},{type:n},ne,bm]}resolveNamedOptions(t,n,i,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=Lx(this._resolverCache,t,s);let l=o;if(AL(o,n)){r.$shared=!1,i=Ws(i)?i():i;const c=this.createResolver(t,i,a);l=Ho(o,i,c)}for(const c of n)r[c]=l[c];return r}createResolver(t,n,i=[""],s){const{resolver:r}=Lx(this._resolverCache,t,i);return gt(n)?Ho(r,n,void 0,s):r}};function Lx(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const s=n.join();let r=i.get(s);return r||(r={resolver:fy(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}const EL=e=>gt(e)&&Object.getOwnPropertyNames(e).some(t=>Ws(e[t]));function AL(e,t){const{isScriptable:n,isIndexable:i}=XS(e);for(const s of t){const r=n(s),o=i(s),a=(o||r)&&e[s];if(r&&(Ws(a)||EL(a))||o&&Ut(a))return!0}return!1}var OL="4.4.2";const LL=["top","bottom","left","right","chartArea"];function Rx(e,t){return e==="top"||e==="bottom"||LL.indexOf(e)===-1&&t==="x"}function Nx(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function jx(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),$t(n&&n.onComplete,[e],t)}function RL(e){const t=e.chart,n=t.options.animation;$t(n&&n.onProgress,[e],t)}function yM(e){return gy()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Zu={},$x=e=>{const t=yM(e);return Object.values(Zu).filter(n=>n.canvas===t).pop()};function NL(e,t,n){const i=Object.keys(e);for(const s of i){const r=+s;if(r>=t){const o=e[s];delete e[s],(n>0||r>t)&&(e[r+n]=o)}}}function jL(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function su(e,t,n){return e.options.clip?e[n]:t[n]}function $L(e,t){const{xScale:n,yScale:i}=e;return n&&i?{left:su(n,t,"left"),right:su(n,t,"right"),top:su(i,t,"top"),bottom:su(i,t,"bottom")}:t}var fs;let by=(fs=class{static register(...t){hi.add(...t),Ix()}static unregister(...t){hi.remove(...t),Ix()}constructor(t,n){const i=this.config=new DL(n),s=yM(t),r=$x(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||tL(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=LA(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,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 vL,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=GA(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Zu[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ai.listen(this,"complete",jx),Ai.listen(this,"progress",RL),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:s,_aspectRatio:r}=this;return bt(t)?n&&r?r:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return hi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():rx(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return nx(this.canvas,this.ctx),this}stop(){return Ai.stop(this),this}resize(t,n){Ai.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,n,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,rx(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),$t(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Et(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,s=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{});let r=[];n&&(r=r.concat(Object.keys(n).map(o=>{const a=n[o],l=km(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Et(r,o=>{const a=o.options,l=a.id,c=km(l,a),u=at(a.type,o.dtype);(a.position===void 0||Rx(a.position,c)!==Rx(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const h=hi.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,t)}),Et(s,(o,a)=>{o||delete i[a]}),Et(i,o=>{Fe.configure(this,o,o.options),Fe.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((s,r)=>s.index-r.index),i>n){for(let s=n;sn.length&&delete this._stacks,t.forEach((i,s)=>{n.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Nx("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Et(this.scales,t=>{Fe.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Xv(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:r}of n){const o=i==="_removeElements"?-r:r;NL(t,s,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=r=>new Set(t.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),s=i(0);for(let r=1;rr.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Fe.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Et(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,s=!i.disabled,r=$L(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Ch(n,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),t.controller.draw(),s&&Ph(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Wi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,s){const r=L2.modes[n];return typeof r=="function"?r(this,t,i,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let s=i.filter(r=>r&&r._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Qs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const s=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,s);zl(n)?(r.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Ai.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,r,o),t[r]=o},s=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};Et(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Et(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Et(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const s=i?"set":"remove";let r,o,a,l;for(n==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!Ld(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const s=this.options.hover,r=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=r(n,t),a=i?t:r(t,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const r=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:s=[],options:r}=this,o=n,a=this._getActiveElements(t,s,i,o),l=FA(t),c=jL(t,this._lastEvent,i,l);i&&(this._lastEvent=null,$t(r.onHover,[t,a,this],this),l&&$t(r.onClick,[t,a,this],this));const u=!Ld(a,s);return(u||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,s){if(t.type==="mouseout")return[];if(!i)return n;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,s)}},K(fs,"defaults",ne),K(fs,"instances",Zu),K(fs,"overrides",Fr),K(fs,"registry",hi),K(fs,"version",OL),K(fs,"getChart",$x),fs);function Ix(){return Et(by.instances,e=>e._plugins.invalidate())}function IL(e,t,n){const{startAngle:i,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=t;let c=s/a;e.beginPath(),e.arc(r,o,a,i-c,n+c),l>s?(c=s/l,e.arc(r,o,l,n+c,i-c,!0)):e.arc(r,o,s,n+ue,i-ue),e.closePath(),e.clip()}function FL(e){return hy(e,["outerStart","outerEnd","innerStart","innerEnd"])}function BL(e,t,n,i){const s=FL(e.options.borderRadius),r=(n-t)/2,o=Math.min(r,i*t/2),a=l=>{const c=(n-Math.min(r,l))*i/2;return we(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:we(s.innerStart,0,o),innerEnd:we(s.innerEnd,0,o)}}function Zr(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function Fd(e,t,n,i,s,r){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+i+n-c,0),h=u>0?u+i+n+c:0;let f=0;const p=s-l;if(i){const L=u>0?u-i:0,R=d>0?d-i:0,B=(L+R)/2,D=B!==0?p*B/(B+i):p;f=(p-D)/2}const m=Math.max(.001,p*d-n/Kt)/d,v=(p-m)/2,y=l+v+f,g=s-v-f,{outerStart:x,outerEnd:_,innerStart:w,innerEnd:S}=BL(t,h,d,g-y),C=d-x,M=d-_,P=y+x/C,T=g-_/M,A=h+w,E=h+S,z=y+w/A,N=g-S/E;if(e.beginPath(),r){const L=(P+T)/2;if(e.arc(o,a,d,P,L),e.arc(o,a,d,L,T),_>0){const $=Zr(M,T,o,a);e.arc($.x,$.y,_,T,g+ue)}const R=Zr(E,g,o,a);if(e.lineTo(R.x,R.y),S>0){const $=Zr(E,N,o,a);e.arc($.x,$.y,S,g+ue,N+Math.PI)}const B=(g-S/h+(y+w/h))/2;if(e.arc(o,a,h,g-S/h,B,!0),e.arc(o,a,h,B,y+w/h,!0),w>0){const $=Zr(A,z,o,a);e.arc($.x,$.y,w,z+Math.PI,y-ue)}const D=Zr(C,y,o,a);if(e.lineTo(D.x,D.y),x>0){const $=Zr(C,P,o,a);e.arc($.x,$.y,x,y-ue,P)}}else{e.moveTo(o,a);const L=Math.cos(P)*d+o,R=Math.sin(P)*d+a;e.lineTo(L,R);const B=Math.cos(T)*d+o,D=Math.sin(T)*d+a;e.lineTo(B,D)}e.closePath()}function VL(e,t,n,i,s){const{fullCircles:r,startAngle:o,circumference:a}=t;let l=t.endAngle;if(r){Fd(e,t,n,i,l,s);for(let c=0;c=Xt||Wl(o,l,c),v=Vi(a,u+f,d+f);return m&&v}getCenterPoint(n){const{x:i,y:s,startAngle:r,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(r+o)/2,h=(a+l+u+c)/2;return{x:i+Math.cos(d)*h,y:s+Math.sin(d)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:s}=this,r=(i.offset||0)/4,o=(i.spacing||0)/2,a=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>Xt?Math.floor(s/Xt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*r,Math.sin(l)*r);const c=1-Math.sin(Math.min(Kt,s||0)),u=r*c;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,VL(n,this,u,o,a),zL(n,this,u,o,a),n.restore()}},K(io,"id","arc"),K(io,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),K(io,"defaultRoutes",{backgroundColor:"backgroundColor"}),K(io,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"}),io);function xM(e,t,n=t){e.lineCap=at(n.borderCapStyle,t.borderCapStyle),e.setLineDash(at(n.borderDash,t.borderDash)),e.lineDashOffset=at(n.borderDashOffset,t.borderDashOffset),e.lineJoin=at(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=at(n.borderWidth,t.borderWidth),e.strokeStyle=at(n.borderColor,t.borderColor)}function WL(e,t,n){e.lineTo(n.x,n.y)}function HL(e){return e.stepped?aO:e.tension||e.cubicInterpolationMode==="monotone"?lO:WL}function bM(e,t,n={}){const i=e.length,{start:s=0,end:r=i-1}=n,{start:o,end:a}=t,l=Math.max(s,o),c=Math.min(r,a),u=sa&&r>a;return{count:i,start:l,loop:t.loop,ilen:c(o+(c?a-_:_))%r,x=()=>{m!==v&&(e.lineTo(u,v),e.lineTo(u,m),e.lineTo(u,y))};for(l&&(f=s[g(0)],e.moveTo(f.x,f.y)),h=0;h<=a;++h){if(f=s[g(h)],f.skip)continue;const _=f.x,w=f.y,S=_|0;S===p?(wv&&(v=w),u=(d*u+_)/++d):(x(),e.lineTo(_,w),p=S,d=0,m=v=w),y=w}x()}function Sm(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?YL:UL}function XL(e){return e.stepped?BO:e.tension||e.cubicInterpolationMode==="monotone"?VO:pr}function KL(e,t,n,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,n,i)&&s.closePath()),xM(e,t.options),e.stroke(s)}function GL(e,t,n,i){const{segments:s,options:r}=t,o=Sm(t);for(const a of s)xM(e,r,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const qL=typeof Path2D=="function";function QL(e,t,n,i){qL&&!t.options.segment?KL(e,t,n,i):GL(e,t,n,i)}var so;let Dh=(so=class extends os{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,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;OO(this._points,i,t,s,n),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=XO(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,s=t[n],r=this.points,o=iM(this,{property:n,start:s,end:s});if(!o.length)return;const a=[],l=XL(i);let c,u;for(c=0,u=o.length;ct!=="borderDash"&&t!=="fill"}),so);function Fx(e,t,n,i){const s=e.options,{[n]:r}=e.getProps([n],i);return Math.abs(t-r)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function SM(e){return Mm[e%Mm.length]}function MM(e){return Bx[e%Bx.length]}function sR(e,t){return e.borderColor=SM(t),e.backgroundColor=MM(t),++t}function rR(e,t){return e.backgroundColor=e.data.map(()=>SM(t++)),t}function oR(e,t){return e.backgroundColor=e.data.map(()=>MM(t++)),t}function aR(e){let t=0;return(n,i)=>{const s=e.getDatasetMeta(i).controller;s instanceof vy?t=rR(n,t):s instanceof aM?t=oR(n,t):s&&(t=sR(n,t))}}function Vx(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function lR(e){return e&&(e.borderColor||e.backgroundColor)}var cR={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:i},options:s}=e.config,{elements:r}=s;if(!n.forceOverride&&(Vx(i)||lR(s)||r&&Vx(r)))return;const o=aR(e);i.forEach(o)}};function uR(e,t,n,i,s){const r=s.samples||i;if(r>=n)return e.slice(t,t+n);const o=[],a=(n-2)/(r-2);let l=0;const c=t+n-1;let u=t,d,h,f,p,m;for(o[l++]=e[u],d=0;df&&(f=p,h=e[g],m=g);o[l++]=h,u=m}return o[l++]=e[c],o}function dR(e,t,n,i){let s=0,r=0,o,a,l,c,u,d,h,f,p,m;const v=[],y=t+n-1,g=e[t].x,_=e[y].x-g;for(o=t;om&&(m=c,h=o),s=(r*s+a.x)/++r;else{const S=o-1;if(!bt(d)&&!bt(h)){const C=Math.min(d,h),M=Math.max(d,h);C!==f&&C!==S&&v.push({...e[C],x:s}),M!==f&&M!==S&&v.push({...e[M],x:s})}o>0&&S!==f&&v.push(e[S]),v.push(a),u=w,r=0,p=m=c,d=h=f=o}}return v}function CM(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function zx(e){e.data.datasets.forEach(t=>{CM(t)})}function hR(e,t){const n=t.length;let i=0,s;const{iScale:r}=e,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(i=we(zi(t,r.axis,o).lo,0,n-1)),c?s=we(zi(t,r.axis,a).hi+1,i,n)-i:s=n-i,{start:i,count:s}}var fR={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){zx(e);return}const i=e.width;e.data.datasets.forEach((s,r)=>{const{_data:o,indexAxis:a}=s,l=e.getDatasetMeta(r),c=o||s.data;if(Ht([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:h}=hR(l,c);const f=n.threshold||4*i;if(h<=f){CM(s);return}bt(o)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let p;switch(n.algorithm){case"lttb":p=uR(c,d,h,i,n);break;case"min-max":p=dR(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=p})},destroy(e){zx(e)}};function pR(e,t,n){const i=e.segments,s=e.points,r=t.points,o=[];for(const a of i){let{start:l,end:c}=a;c=_y(l,c,s);const u=Cm(n,s[l],s[c],a.loop);if(!t.segments){o.push({source:a,target:u,start:s[l],end:s[c]});continue}const d=iM(t,u);for(const h of d){const f=Cm(n,r[h.start],r[h.end],h.loop),p=nM(a,s,f);for(const m of p)o.push({source:m,target:h,start:{[n]:Wx(u,f,"start",Math.max)},end:{[n]:Wx(u,f,"end",Math.min)}})}}return o}function Cm(e,t,n,i){if(i)return;let s=t[e],r=n[e];return e==="angle"&&(s=yn(s),r=yn(r)),{property:e,start:s,end:r}}function mR(e,t){const{x:n=null,y:i=null}=e||{},s=t.points,r=[];return t.segments.forEach(({start:o,end:a})=>{a=_y(o,a,s);const l=s[o],c=s[a];i!==null?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):n!==null&&(r.push({x:n,y:l.y}),r.push({x:n,y:c.y}))}),r}function _y(e,t,n){for(;t>e;t--){const i=n[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Wx(e,t,n,i){return e&&t?i(e[n],t[n]):e?e[n]:t?t[n]:0}function PM(e,t){let n=[],i=!1;return Ut(e)?(i=!0,n=e):n=mR(e,t),n.length?new Dh({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function Hx(e){return e&&e.fill!==!1}function gR(e,t,n){let s=e[t].fill;const r=[t];let o;if(!n)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!oe(s))return s;if(o=e[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function yR(e,t,n){const i=_R(e);if(gt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return oe(s)&&Math.floor(s)===s?vR(i[0],t,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function vR(e,t,n,i){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=i?!1:n}function xR(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:gt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function bR(e,t,n){let i;return e==="start"?i=n:e==="end"?i=t.options.reverse?t.min:t.max:gt(e)?i=e.value:i=t.getBaseValue(),i}function _R(e){const t=e.options,n=t.fill;let i=at(n&&n.target,n);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function wR(e){const{scale:t,index:n,line:i}=e,s=[],r=i.segments,o=i.points,a=kR(t,n);a.push(PM({x:null,y:t.bottom},i));for(let l=0;l=0;--o){const a=s[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),i&&a.fill&&Hf(e.ctx,a,r))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const r=i[s].$filler;Hx(r)&&Hf(e.ctx,r,e.chartArea)}},beforeDatasetDraw(e,t,n){const i=t.meta.$filler;!Hx(i)||n.drawTime!=="beforeDatasetDraw"||Hf(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Kx=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},RR=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;let Gx=class extends os{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,n,i){this.maxWidth=t,this.maxHeight=n,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 n=$t(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,s=ge(i.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Kx(i,r);let c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,r,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,s){const{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let d=t;r.textAlign="left",r.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((p,m)=>{const v=i+n/2+r.measureText(p.text).width;(m===0||c[c.length-1]+v+2*a>o)&&(d+=u,c[c.length-(m>0?0:1)]=0,f+=u,h++),l[m]={left:0,top:f,row:h,width:v,height:s},c[c.length-1]+=v+a}),d}_fitCols(t,n,i,s){const{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t;let d=a,h=0,f=0,p=0,m=0;return this.legendItems.forEach((v,y)=>{const{itemWidth:g,itemHeight:x}=NR(i,n,r,v,s);y>0&&f+x+2*a>u&&(d+=h+a,c.push({width:h,height:f}),p+=h+a,m++,h=f=0),l[y]={left:p,top:f,col:m,width:g,height:x},h=Math.max(h,g),f+=x+a}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:r}}=this,o=Oo(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=Ne(i,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Ne(i,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+s}else{let a=0,l=Ne(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Ne(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ch(t,this),this._draw(),Ph(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:s}=this,{align:r,labels:o}=t,a=ne.color,l=Oo(t.rtl,this.left,this.width),c=ge(o.font),{padding:u}=o,d=c.size,h=d/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:v}=Kx(o,d),y=function(S,C,M){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const P=at(M.lineWidth,1);if(s.fillStyle=at(M.fillStyle,a),s.lineCap=at(M.lineCap,"butt"),s.lineDashOffset=at(M.lineDashOffset,0),s.lineJoin=at(M.lineJoin,"miter"),s.lineWidth=P,s.strokeStyle=at(M.strokeStyle,a),s.setLineDash(at(M.lineDash,[])),o.usePointStyle){const T={radius:m*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:P},A=l.xPlus(S,p/2),E=C+h;US(s,T,A,E,o.pointStyleWidth&&p)}else{const T=C+Math.max((d-m)/2,0),A=l.leftForLtr(S,p),E=Cr(M.borderRadius);s.beginPath(),Object.values(E).some(z=>z!==0)?Hl(s,{x:A,y:T,w:p,h:m,radius:E}):s.rect(A,T,p,m),s.fill(),P!==0&&s.stroke()}s.restore()},g=function(S,C,M){Br(s,M.text,S,C+v/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},x=this.isHorizontal(),_=this._computeTitleHeight();x?f={x:Ne(r,this.left+u,this.right-i[0]),y:this.top+u+_,line:0}:f={x:this.left+u,y:Ne(r,this.top+_+u,this.bottom-n[0].height),line:0},JS(this.ctx,t.textDirection);const w=v+u;this.legendItems.forEach((S,C)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const M=s.measureText(S.text).width,P=l.textAlign(S.textAlign||(S.textAlign=o.textAlign)),T=p+h+M;let A=f.x,E=f.y;l.setWidth(this.width),x?C>0&&A+T+u>this.right&&(E=f.y+=w,f.line++,A=f.x=Ne(r,this.left+u,this.right-i[f.line])):C>0&&E+w>this.bottom&&(A=f.x=A+n[f.line].width+u,f.line++,E=f.y=Ne(r,this.top+_+u,this.bottom-n[f.line].height));const z=l.x(A);if(y(z,E,S),A=qA(P,A+p+h,x?A+T:this.right,t.rtl),g(l.x(A),E,S),x)f.x+=T+u;else if(typeof S.text!="string"){const N=c.lineHeight;f.y+=DM(S,N)+u}else f.y+=w}),tM(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=ge(n.font),s=Ae(n.padding);if(!n.display)return;const r=Oo(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=i.size/2,c=s.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=Ne(t.align,d,this.right-h);else{const p=this.columnSizes.reduce((m,v)=>Math.max(m,v.height),0);u=c+Ne(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=Ne(a,d,d+h);o.textAlign=r.textAlign(uy(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,Br(o,n.text,f,u,i)}_computeTitleHeight(){const t=this.options.title,n=ge(t.font),i=Ae(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,s,r;if(Vi(t,this.left,this.right)&&Vi(n,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;ir.length>o.length?r:o)),t+n.size/2+i.measureText(s).width}function $R(e,t,n){let i=e;return typeof t.text!="string"&&(i=DM(t,n)),i}function DM(e,t){const n=e.text?e.text.length:0;return t*n}function IR(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var FR={id:"legend",_element:Gx,start(e,t,n){const i=e.legend=new Gx({ctx:e.ctx,options:n,chart:e});Fe.configure(e,i,n),Fe.addBox(e,i)},stop(e){Fe.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;Fe.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:r,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Ae(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};let wy=class extends os{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,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=Ut(i.text)?i.text.length:1;this._padding=Ae(i.padding);const r=s*ge(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:i,bottom:s,right:r,options:o}=this,a=o.align;let l=0,c,u,d;return this.isHorizontal()?(u=Ne(a,i,r),d=n+t,c=r-i):(o.position==="left"?(u=i+t,d=Ne(a,s,n),l=Kt*-.5):(u=r-t,d=Ne(a,n,s),l=Kt*.5),c=s-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=ge(n.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);Br(t,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:uy(n.align),textBaseline:"middle",translation:[o,a]})}};function BR(e,t){const n=new wy({ctx:e.ctx,options:t,chart:e});Fe.configure(e,n,t),Fe.addBox(e,n),e.titleBlock=n}var VR={id:"title",_element:wy,start(e,t,n){BR(e,n)},stop(e){const t=e.titleBlock;Fe.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;Fe.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ru=new WeakMap;var zR={id:"subtitle",start(e,t,n){const i=new wy({ctx:e.ctx,options:n,chart:e});Fe.configure(e,i,n),Fe.addBox(e,i),ru.set(e,i)},stop(e){Fe.removeBox(e,ru.get(e)),ru.delete(e)},beforeUpdate(e,t,n){const i=ru.get(e);Fe.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const qa={average(e){if(!e.length)return!1;let t,n,i=new Set,s=0,r=0;for(t=0,n=e.length;ta+l)/i.size,y:s/r}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,s=Number.POSITIVE_INFINITY,r,o,a;for(r=0,o=e.length;ra({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=BS.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const r=i.items;let o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),n+=r.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};var Ai=new qO;const ux="transparent",QO={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=tx(e||ux),s=i.valid&&tx(t||ux);return s&&s.valid?s.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};let ZO=class{constructor(t,n,i,s){const r=n[i];s=Ht([t.to,s,r,t.from]);const o=Ht([t.from,r,s]);this._active=!0,this._fn=t.fn||QO[t.type||typeof o],this._easing=fl[t.easing]||fl.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=Ht([t.to,n,s,t.from]),this._from=Ht([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,s=this._prop,r=this._from,o=this._loop,a=this._to;let l;if(this._active=r!==a&&(o||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(r,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let s=0;s{const r=t[s];if(!gt(r))return;const o={};for(const a of n)o[a]=r[a];(Ut(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,o)})})}_animateOptions(t,n){const i=n.options,s=t2(t,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&JO(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,n){const i=this._properties,s=[],r=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,n));continue}const u=n[c];let d=r[c];const h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}r[c]=d=new ZO(h,t,c,u),s.push(d)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return Ai.add(this._chart,i),!0}};function JO(e,t){const n=[],i=Object.keys(t);for(let s=0;s0||!n&&r<0)return s.index}return null}function mx(e,t){const{chart:n,_cachedMeta:i}=e,s=n._stacks||(n._stacks={}),{iScale:r,vScale:o,index:a}=i,l=r.axis,c=o.axis,u=s2(r,o,i),d=t.length;let h;for(let f=0;fn[i].axis===t).shift()}function a2(e,t){return Qs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function l2(e,t,n){return Qs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function xa(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const s of t){const r=s._stacks;if(!r||r[i]===void 0||r[i][n]===void 0)return;delete r[i][n],r[i]._visualValues!==void 0&&r[i]._visualValues[n]!==void 0&&delete r[i]._visualValues[n]}}}const $f=e=>e==="reset"||e==="none",gx=(e,t)=>t?e:Object.assign({},e),c2=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:rM(n,!0),values:null};var Na;let Zs=(Na=class{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=fx(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&xa(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(d,h,f,p)=>d==="x"?h:d==="r"?p:f,r=n.xAxisID=at(i.xAxisID,jf(t,"x")),o=n.yAxisID=at(i.yAxisID,jf(t,"y")),a=n.rAxisID=at(i.rAxisID,jf(t,"r")),l=n.indexAxis,c=n.iAxisID=s(l,r,o,a),u=n.vAxisID=s(l,o,r,a);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Qv(this._data,this),t._stacked&&xa(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(gt(n))this._data=i2(n);else if(i!==n){if(i){Qv(i,this);const s=this._cachedMeta;xa(s),s._parsed=[]}n&&Object.isExtensible(n)&&KA(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const r=n._stacked;n._stacked=fx(n.vScale,n),n.stack!==i.stack&&(s=!0,xa(n),n.stack=i.stack),this._resyncElements(t),(s||r!==n._stacked)&&mx(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:o}=i,a=r.axis;let l=t===0&&n===s.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,h;if(this._parsing===!1)i._parsed=s,i._sorted=!0,h=s;else{Ut(s[t])?h=this.parseArrayData(i,s,t,n):gt(s[t])?h=this.parseObjectData(i,s,t,n):h=this.parsePrimitiveData(i,s,t,n);const f=()=>d[a]===null||c&&d[a]m||d=0;--h)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let s,r,o;for(s=0,r=n.length;s=0&&tthis.getContext(i,s,n),m=c.resolveNamedOptions(h,f,p,d);return m.$shared&&(m.$shared=l,r[o]=Object.freeze(gx(m,l))),m}_resolveAnimations(t,n,i){const s=this.chart,r=this._cachedDataOpts,o=`animation-${n}`,a=r[o];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,i,n))}const c=new sM(s,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||$f(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),s=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(n,r)||r!==s;return this.updateSharedOptions(r,n,i),{sharedOptions:r,includeOptions:o}}updateElement(t,n,i,s){$f(s)?Object.assign(t,i):this._resolveAnimations(n,s).update(t,i)}updateSharedOptions(t,n,i){t&&!$f(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,s){t.active=s;const r=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(t,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,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 n=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=i.length,r=n.length,o=Math.min(r,s);o&&this.parse(0,o),r>s?this._insertElements(s,r-s,t):r{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(r),a=t;as-r))}return e._cache.$bar}function d2(e){const t=e.iScale,n=u2(t,e.type);let i=t._length,s,r,o,a;const l=()=>{o===32767||o===-32768||(Wl(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(s=0,r=n.length;s0?s[e-1]:null,a=eMath.abs(a)&&(l=a,c=o),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:r,min:o,max:a}}function oM(e,t,n,i){return Ut(e)?p2(e,t,n,i):t[n.axis]=n.parse(e,i),t}function yx(e,t,n,i){const s=e.iScale,r=e.vScale,o=s.getLabels(),a=s===r,l=[];let c,u,d,h;for(c=n,u=n+i;c=n?1:-1)}function g2(e){let t,n,i,s,r;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.basel.controller.options.grouped),r=i.options.stacked,o=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(bt(u)||isNaN(u))return!0};for(const l of s)if(!(n!==void 0&&a(l))&&((r===!1||o.indexOf(l.stack)===-1||r===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){const s=this._getStacks(t,i),r=n!==void 0?s.indexOf(n):-1;return r===-1?s.length-1:r}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,s=[];let r,o;for(r=0,o=n.data.length;r=0;--i)n=Math.max(n,t[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=n,o=this.getParsed(t),a=s.getLabelForValue(o.x),l=r.getLabelForValue(o.y),c=o._custom;return{label:i[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,i,s){const r=s==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,s),u=o.axis,d=a.axis;for(let h=n;hHl(x,a,l,!0)?1:Math.max(_,_*n,w,w*n),p=(x,_,w)=>Hl(x,a,l,!0)?-1:Math.min(_,_*n,w,w*n),m=f(0,c,d),v=f(ue,u,h),y=p(Kt,c,d),g=p(Kt+ue,u,h);i=(m-y)/2,s=(v-g)/2,r=-(m+y)/2,o=-(v+g)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:o}}var no;let vy=(no=class extends Zs{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let r=l=>+i[l];if(gt(i[t])){const{key:l="value"}=this._parsing;r=c=>+zs(i[c],l)}let o,a;for(o=t,a=t+n;o0&&!isNaN(t)?Xt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=fc(n._parsed[t],i.options.locale);return{label:s[t]||"",value:r}}getMaxBorderWidth(t){let n=0;const i=this.chart;let s,r,o,a,l;if(!t){for(s=0,r=i.data.datasets.length;st!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),K(no,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((r,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}}),no);var Ia;let k2=(Ia=class extends Zs{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:s=[],_dataset:r}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=zS(n,s,o);this._drawStart=a,this._drawCount=l,WS(n)&&(a=0,l=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,n,i,s){const r=s==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,s),h=o.axis,f=a.axis,{spanGaps:p,segment:m}=this.options,v=Wo(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||s==="none",g=n+i,x=t.length;let _=n>0&&this.getParsed(n-1);for(let w=0;w=g){C.skip=!0;continue}const M=this.getParsed(w),P=bt(M[f]),T=C[h]=o.getPixelForValue(M[h],w),A=C[f]=r||P?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,M,l):M[f],w);C.skip=isNaN(T)||isNaN(A)||P,C.stop=w>0&&Math.abs(M[h]-_[h])>v,m&&(C.parsed=M,C.raw=c.data[w]),d&&(C.options=u||this.resolveDataElementOptions(w,S.active?"active":s)),y||this.updateElement(S,w,C,s),_=M}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const r=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},K(Ia,"id","line"),K(Ia,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),K(Ia,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}}),Ia);var Fa;let aM=(Fa=class extends Zs{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=fc(n._parsed[t].r,i.options.locale);return{label:s[t]||"",value:r}}parseObjectData(t,n,i,s){return QS.bind(this)(t,n,i,s)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,s)=>{const r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(rn.max&&(n.max=r))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,i=t.options,s=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),a=(r-o)/t.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,i,s){const r=s==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*Kt;let f=h,p;const m=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(t,n,i){return this.chart.getDataVisibility(t)?Jn(this.resolveDataElementOptions(t,n).angle||i):0}},K(Fa,"id","polarArea"),K(Fa,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),K(Fa,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((r,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}}),Fa);var Ru;let S2=(Ru=class extends vy{},K(Ru,"id","pie"),K(Ru,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"}),Ru);var Ba;let M2=(Ba=class extends Zs{getLabelAndValue(t){const n=this._cachedMeta.vScale,i=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(t,n,i,s){return QS.bind(this)(t,n,i,s)}update(t){const n=this._cachedMeta,i=n.dataset,s=n.data||[],r=n.iScale.getLabels();if(i.points=s,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:r.length===s.length,options:o};this.updateElement(i,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,n,i,s){const r=this._cachedMeta.rScale,o=s==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let _=n;_0&&Math.abs(S[f]-x[f])>y,v&&(C.parsed=S,C.raw=c.data[_]),h&&(C.options=d||this.resolveDataElementOptions(_,w.active?"active":s)),g||this.updateElement(w,_,C,s),x=S}this.updateSharedOptions(d,s,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!n.length)return s;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,r,o)/2}},K(Va,"id","scatter"),K(Va,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),K(Va,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}}),Va);var P2=Object.freeze({__proto__:null,BarController:b2,BubbleController:_2,DoughnutController:vy,LineController:k2,PieController:S2,PolarAreaController:aM,RadarController:M2,ScatterController:C2});function or(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class xy{constructor(t){K(this,"options");this.options=t||{}}static override(t){Object.assign(xy.prototype,t)}init(){}formats(){return or()}parse(){return or()}format(){return or()}add(){return or()}diff(){return or()}startOf(){return or()}endOf(){return or()}}var T2={_date:xy};function D2(e,t,n,i){const{controller:s,data:r,_sorted:o}=e,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&o&&r.length){const l=a._reversePixels?YA:zi;if(i){if(s._sharedOptions){const c=r[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(r,t,n-u),h=l(r,t,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(r,t,n)}return{lo:0,hi:r.length-1}}function pc(e,t,n,i,s){const r=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=r.length;a{l[o](t[n],s)&&(r.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,s))}),i&&!a?[]:r}var R2={evaluateInteractionItems:pc,modes:{index(e,t,n,i){const s=fr(t,e),r=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Ff(e,s,r,i,o):Bf(e,s,r,!1,i,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,i){const s=fr(t,e),r=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Ff(e,s,r,i,o):Bf(e,s,r,!1,i,o);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;un.pos===t)}function _x(e,t){return e.filter(n=>lM.indexOf(n.pos)===-1&&n.box.axis===t)}function _a(e,t){return e.sort((n,i)=>{const s=t?i:n,r=t?n:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function L2(e){const t=[];let n,i,s,r,o,a;for(n=0,i=(e||[]).length;nc.box.fullSize),!0),i=_a(ba(t,"left"),!0),s=_a(ba(t,"right")),r=_a(ba(t,"top"),!0),o=_a(ba(t,"bottom")),a=_x(t,"x"),l=_x(t,"y");return{fullSize:n,leftAndTop:i.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:ba(t,"chartArea"),vertical:i.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}function wx(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function cM(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function I2(e,t,n,i){const{pos:s,box:r}=n,o=e.maxPadding;if(!gt(s)){n.size&&(e[s]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?r.height:r.width),n.size=d.size/d.count,e[s]+=n.size}r.getPadding&&cM(o,r.getPadding());const a=Math.max(0,t.outerWidth-wx(o,e,"left","right")),l=Math.max(0,t.outerHeight-wx(o,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function F2(e){const t=e.maxPadding;function n(i){const s=Math.max(t[i]-e[i],0);return e[i]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function B2(e,t){const n=t.maxPadding;function i(s){const r={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{r[o]=Math.max(t[o],n[o])}),r}return i(e?["left","right"]:["top","bottom"])}function Ga(e,t,n,i){const s=[];let r,o,a,l,c,u;for(r=0,o=e.length,c=0;r{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,v)=>v.box.options&&v.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/u,hBoxMaxHeight:o/2}),h=Object.assign({},s);cM(h,Ae(i));const f=Object.assign({maxPadding:h,w:r,h:o,x:s.left,y:s.top},s),p=j2(l.concat(c),d);Ga(a.fullSize,f,d,p),Ga(l,f,d,p),Ga(c,f,d,p)&&Ga(l,f,d,p),F2(f),kx(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,kx(a.rightAndBottom,f,d,p),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Et(a.chartArea,m=>{const v=m.box;Object.assign(v,e.chartArea),v.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};let uM=class{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,s){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(t){return!0}updateConfig(t){}},V2=class extends uM{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}};const Zu="$chartjs",z2={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Sx=e=>e===null||e==="";function W2(e,t){const n=e.style,i=e.getAttribute("height"),s=e.getAttribute("width");if(e[Zu]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Sx(s)){const r=ox(e,"width");r!==void 0&&(e.width=r)}if(Sx(i))if(e.style.height==="")e.height=e.width/(t||2);else{const r=ox(e,"height");r!==void 0&&(e.height=r)}return e}const dM=FO?{passive:!0}:!1;function H2(e,t,n){e&&e.addEventListener(t,n,dM)}function U2(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,dM)}function Y2(e,t){const n=z2[e.type]||e.type,{x:i,y:s}=fr(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Id(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function X2(e,t,n){const i=e.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Id(a.addedNodes,i),o=o&&!Id(a.removedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function K2(e,t,n){const i=e.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Id(a.removedNodes,i),o=o&&!Id(a.addedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Yl=new Map;let Mx=0;function hM(){const e=window.devicePixelRatio;e!==Mx&&(Mx=e,Yl.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function G2(e,t){Yl.size||window.addEventListener("resize",hM),Yl.set(e,t)}function q2(e){Yl.delete(e),Yl.size||window.removeEventListener("resize",hM)}function Q2(e,t,n){const i=e.canvas,s=i&&yy(i);if(!s)return;const r=VS((a,l)=>{const c=s.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||r(c,u)});return o.observe(s),G2(e,r),o}function Vf(e,t,n){n&&n.disconnect(),t==="resize"&&q2(e)}function Z2(e,t,n){const i=e.canvas,s=VS(r=>{e.ctx!==null&&n(Y2(r,e))},e);return H2(i,t,s),s}let J2=class extends uM{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(W2(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[Zu])return!1;const i=n[Zu].initial;["height","width"].forEach(r=>{const o=i[r];bt(o)?n.removeAttribute(r):n.setAttribute(r,o)});const s=i.style||{};return Object.keys(s).forEach(r=>{n.style[r]=s[r]}),n.width=n.width,delete n[Zu],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),o={attach:X2,detach:K2,resize:Q2}[n]||Z2;s[n]=o(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),s=i[n];if(!s)return;({attach:Vf,detach:Vf,resize:Vf}[n]||U2)(t,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,s){return IO(t,n,i,s)}isAttached(t){const n=yy(t);return!!(n&&n.isConnected)}};function tR(e){return!gy()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?V2:J2}var Lu;let os=(Lu=class{constructor(){K(this,"x");K(this,"y");K(this,"active",!1);K(this,"options");K(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return Wo(this.x)&&Wo(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const s={};return t.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}},K(Lu,"defaults",{}),K(Lu,"defaultRoutes"),Lu);function eR(e,t){const n=e.options.ticks,i=nR(e),s=Math.min(n.maxTicksLimit||i,i),r=n.major.enabled?sR(t):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>s)return rR(t,c,r,o/s),c;const u=iR(r,t,s);if(o>0){let d,h;const f=o>1?Math.round((l-a)/(o-1)):null;for(nu(t,c,u,bt(f)?0:a-f,a),d=0,h=o-1;ds)return l}return Math.max(s,1)}function sR(e){const t=[];let n,i;for(n=0,i=e.length;ne==="left"?"right":e==="right"?"left":e,Cx=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Px=(e,t)=>Math.min(t||e,e);function Tx(e,t){const n=[],i=e.length/t,s=e.length;let r=0;for(;ro+a)))return l}function cR(e,t){Et(e,n=>{const i=n.gc,s=i.length/2;let r;if(s>t){for(r=0;ri?i:n,i=s&&n>i?n:i,{min:mn(n,mn(i,n)),max:mn(i,mn(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$t(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,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=gO(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=r||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=we(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:f/(i-1),d+6>a&&(a=f/(i-(t.offset?.5:1)),l=this.maxHeight-wa(t.grid)-n.padding-Dx(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),o=ly(Math.min(Math.asin(we((u.highest.height+6)/a,-1,1)),Math.asin(we(l/c,-1,1))-Math.asin(we(h/c,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){$t(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$t(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=Dx(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=wa(r)+l):(t.height=this.maxHeight,t.width=wa(r)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,p=Jn(this.labelRotation),m=Math.cos(p),v=Math.sin(p);if(a){const y=i.mirror?0:v*d.width+m*h.height;t.height=Math.min(this.maxHeight,t.height+y+f)}else{const y=i.mirror?0:m*d.width+v*h.height;t.width=Math.min(this.maxWidth,t.width+y+f)}this._calculatePadding(c,u,v,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,s){const{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=s*t.width,f=i*n.height):(h=i*t.height,f=s*n.width):r==="start"?f=n.width:r==="end"?h=t.width:r!=="inner"&&(h=t.width/2,f=n.width/2),this.paddingLeft=Math.max((h-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;r==="start"?(u=0,d=t.height):r==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_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(){$t(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n({width:o[P]||0,height:a[P]||0});return{first:M(0),last:M(n-1),widest:M(S),highest:M(C),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return UA(this._alignToPixels?rr(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*s?a/i:l/s:l*s0}_computeGridLineItems(t){const n=this.axis,i=this.chart,s=this.options,{grid:r,position:o,border:a}=s,l=r.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=wa(r),f=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,v=m/2,y=function(L){return rr(i,L,m)};let g,x,_,w,S,C,M,P,T,A,E,z;if(o==="top")g=y(this.bottom),C=this.bottom-h,P=g-v,A=y(t.top)+v,z=t.bottom;else if(o==="bottom")g=y(this.top),A=t.top,z=y(t.bottom)-v,C=g+v,P=this.top+h;else if(o==="left")g=y(this.right),S=this.right-h,M=g-v,T=y(t.left)+v,E=t.right;else if(o==="right")g=y(this.left),T=t.left,E=y(t.right)-v,S=g+v,M=this.left+h;else if(n==="x"){if(o==="center")g=y((t.top+t.bottom)/2+.5);else if(gt(o)){const L=Object.keys(o)[0],B=o[L];g=y(this.chart.scales[L].getPixelForValue(B))}A=t.top,z=t.bottom,C=g+v,P=C+h}else if(n==="y"){if(o==="center")g=y((t.left+t.right)/2);else if(gt(o)){const L=Object.keys(o)[0],B=o[L];g=y(this.chart.scales[L].getPixelForValue(B))}S=g-v,M=S-h,T=t.left,E=t.right}const N=at(s.ticks.maxTicksLimit,d),R=Math.max(1,Math.ceil(d/N));for(x=0;x0&&(U-=Z/2);break}V={left:U,top:O,width:Z+W.width,height:et+W.height,color:R.backdropColor}}v.push({label:_,font:P,textOffset:E,options:{rotation:m,color:B,strokeColor:D,strokeWidth:$,textAlign:F,textBaseline:z,translation:[w,S],backdrop:V}})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Jn(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,o=this._getLabelSizes(),a=t+r,l=o.widest.width;let c,u;return n==="left"?s?(u=this.right+r,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?s?(u=this.left+r,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:s,width:r,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,s,r,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(r=>r.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(r=0,o=s.length;r{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let r,o;for(r=0,o=n.length;r{const i=n.split("."),s=i.pop(),r=[e].concat(i).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");ne.route(r,s,l,a)})}function gR(e){return"id"in e&&"defaults"in e}let yR=class{constructor(){this.controllers=new iu(Zs,"datasets",!0),this.elements=new iu(os,"elements"),this.plugins=new iu(Object,"plugins"),this.scales=new iu(mc,"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,n,i){[...n].forEach(s=>{const r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(t,r,s):Et(s,o=>{const a=i||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,i){const s=ay(t);$t(i["before"+s],[],i),n[t](i),$t(i["after"+s],[],i)}_getRegistryForType(t){for(let n=0;nr.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,i),t,"stop"),this._notify(s(i,n),t,"start")}};function xR(e){const t={},n=[],i=Object.keys(hi.plugins.items);for(let r=0;r1&&Ex(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Ax(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function CR(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return Ax(e,"x",n[0])||Ax(e,"y",n[0])}return{}}function PR(e,t){const n=Fr[e.type]||{scales:{}},i=t.scales||{},s=wm(e.type,t),r=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!gt(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=km(o,a,CR(o,e),ne.scales[a.type]),c=SR(l,s),u=n.scales||{};r[o]=dl(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||wm(a,t),u=(Fr[a]||{}).scales||{};Object.keys(u).forEach(d=>{const h=kR(d,l),f=o[h+"AxisID"]||h;r[f]=r[f]||Object.create(null),dl(r[f],[{axis:h},i[f],u[d]])})}),Object.keys(r).forEach(o=>{const a=r[o];dl(a,[ne.scales[a.type],ne.scale])}),r}function pM(e){const t=e.options||(e.options={});t.plugins=at(t.plugins,{}),t.scales=PR(e,t)}function mM(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function TR(e){return e=e||{},e.data=mM(e.data),pM(e),e}const Ox=new Map,gM=new Set;function su(e,t){let n=Ox.get(e);return n||(n=t(),Ox.set(e,n),gM.add(n)),n}const ka=(e,t,n)=>{const i=zs(t,n);i!==void 0&&e.add(i)};let DR=class{constructor(t){this._config=TR(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=mM(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(),pM(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return su(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return su(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return su(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return su(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let s=i.get(t);return(!s||n)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,n,i){const{options:s,type:r}=this,o=this._cachedScopes(t,i),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>ka(l,t,d))),u.forEach(d=>ka(l,s,d)),u.forEach(d=>ka(l,Fr[r]||{},d)),u.forEach(d=>ka(l,ne,d)),u.forEach(d=>ka(l,bm,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),gM.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Fr[n]||{},ne.datasets[n]||{},{type:n},ne,bm]}resolveNamedOptions(t,n,i,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=Rx(this._resolverCache,t,s);let l=o;if(AR(o,n)){r.$shared=!1,i=Ws(i)?i():i;const c=this.createResolver(t,i,a);l=Ho(o,i,c)}for(const c of n)r[c]=l[c];return r}createResolver(t,n,i=[""],s){const{resolver:r}=Rx(this._resolverCache,t,i);return gt(n)?Ho(r,n,void 0,s):r}};function Rx(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const s=n.join();let r=i.get(s);return r||(r={resolver:fy(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}const ER=e=>gt(e)&&Object.getOwnPropertyNames(e).some(t=>Ws(e[t]));function AR(e,t){const{isScriptable:n,isIndexable:i}=XS(e);for(const s of t){const r=n(s),o=i(s),a=(o||r)&&e[s];if(r&&(Ws(a)||ER(a))||o&&Ut(a))return!0}return!1}var OR="4.4.2";const RR=["top","bottom","left","right","chartArea"];function Lx(e,t){return e==="top"||e==="bottom"||RR.indexOf(e)===-1&&t==="x"}function Nx(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function jx(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),$t(n&&n.onComplete,[e],t)}function LR(e){const t=e.chart,n=t.options.animation;$t(n&&n.onProgress,[e],t)}function yM(e){return gy()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Ju={},$x=e=>{const t=yM(e);return Object.values(Ju).filter(n=>n.canvas===t).pop()};function NR(e,t,n){const i=Object.keys(e);for(const s of i){const r=+s;if(r>=t){const o=e[s];delete e[s],(n>0||r>t)&&(e[r+n]=o)}}}function jR(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function ru(e,t,n){return e.options.clip?e[n]:t[n]}function $R(e,t){const{xScale:n,yScale:i}=e;return n&&i?{left:ru(n,t,"left"),right:ru(n,t,"right"),top:ru(i,t,"top"),bottom:ru(i,t,"bottom")}:t}var fs;let by=(fs=class{static register(...t){hi.add(...t),Ix()}static unregister(...t){hi.remove(...t),Ix()}constructor(t,n){const i=this.config=new DR(n),s=yM(t),r=$x(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||tR(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=RA(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,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 vR,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=GA(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Ju[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ai.listen(this,"complete",jx),Ai.listen(this,"progress",LR),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:s,_aspectRatio:r}=this;return bt(t)?n&&r?r:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return hi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():rx(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return nx(this.canvas,this.ctx),this}stop(){return Ai.stop(this),this}resize(t,n){Ai.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,n,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,rx(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),$t(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Et(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,s=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{});let r=[];n&&(r=r.concat(Object.keys(n).map(o=>{const a=n[o],l=km(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Et(r,o=>{const a=o.options,l=a.id,c=km(l,a),u=at(a.type,o.dtype);(a.position===void 0||Lx(a.position,c)!==Lx(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const h=hi.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,t)}),Et(s,(o,a)=>{o||delete i[a]}),Et(i,o=>{Fe.configure(this,o,o.options),Fe.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((s,r)=>s.index-r.index),i>n){for(let s=n;sn.length&&delete this._stacks,t.forEach((i,s)=>{n.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Nx("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Et(this.scales,t=>{Fe.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Xv(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:r}of n){const o=i==="_removeElements"?-r:r;NR(t,s,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=r=>new Set(t.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),s=i(0);for(let r=1;rr.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Fe.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Et(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,s=!i.disabled,r=$R(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Ch(n,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),t.controller.draw(),s&&Ph(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Wi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,s){const r=R2.modes[n];return typeof r=="function"?r(this,t,i,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let s=i.filter(r=>r&&r._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Qs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const s=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,s);Wl(n)?(r.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Ai.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,r,o),t[r]=o},s=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};Et(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Et(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Et(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const s=i?"set":"remove";let r,o,a,l;for(n==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!Rd(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const s=this.options.hover,r=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=r(n,t),a=i?t:r(t,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const r=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:s=[],options:r}=this,o=n,a=this._getActiveElements(t,s,i,o),l=FA(t),c=jR(t,this._lastEvent,i,l);i&&(this._lastEvent=null,$t(r.onHover,[t,a,this],this),l&&$t(r.onClick,[t,a,this],this));const u=!Rd(a,s);return(u||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,s){if(t.type==="mouseout")return[];if(!i)return n;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,s)}},K(fs,"defaults",ne),K(fs,"instances",Ju),K(fs,"overrides",Fr),K(fs,"registry",hi),K(fs,"version",OR),K(fs,"getChart",$x),fs);function Ix(){return Et(by.instances,e=>e._plugins.invalidate())}function IR(e,t,n){const{startAngle:i,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=t;let c=s/a;e.beginPath(),e.arc(r,o,a,i-c,n+c),l>s?(c=s/l,e.arc(r,o,l,n+c,i-c,!0)):e.arc(r,o,s,n+ue,i-ue),e.closePath(),e.clip()}function FR(e){return hy(e,["outerStart","outerEnd","innerStart","innerEnd"])}function BR(e,t,n,i){const s=FR(e.options.borderRadius),r=(n-t)/2,o=Math.min(r,i*t/2),a=l=>{const c=(n-Math.min(r,l))*i/2;return we(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:we(s.innerStart,0,o),innerEnd:we(s.innerEnd,0,o)}}function Zr(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function Fd(e,t,n,i,s,r){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+i+n-c,0),h=u>0?u+i+n+c:0;let f=0;const p=s-l;if(i){const R=u>0?u-i:0,L=d>0?d-i:0,B=(R+L)/2,D=B!==0?p*B/(B+i):p;f=(p-D)/2}const m=Math.max(.001,p*d-n/Kt)/d,v=(p-m)/2,y=l+v+f,g=s-v-f,{outerStart:x,outerEnd:_,innerStart:w,innerEnd:S}=BR(t,h,d,g-y),C=d-x,M=d-_,P=y+x/C,T=g-_/M,A=h+w,E=h+S,z=y+w/A,N=g-S/E;if(e.beginPath(),r){const R=(P+T)/2;if(e.arc(o,a,d,P,R),e.arc(o,a,d,R,T),_>0){const $=Zr(M,T,o,a);e.arc($.x,$.y,_,T,g+ue)}const L=Zr(E,g,o,a);if(e.lineTo(L.x,L.y),S>0){const $=Zr(E,N,o,a);e.arc($.x,$.y,S,g+ue,N+Math.PI)}const B=(g-S/h+(y+w/h))/2;if(e.arc(o,a,h,g-S/h,B,!0),e.arc(o,a,h,B,y+w/h,!0),w>0){const $=Zr(A,z,o,a);e.arc($.x,$.y,w,z+Math.PI,y-ue)}const D=Zr(C,y,o,a);if(e.lineTo(D.x,D.y),x>0){const $=Zr(C,P,o,a);e.arc($.x,$.y,x,y-ue,P)}}else{e.moveTo(o,a);const R=Math.cos(P)*d+o,L=Math.sin(P)*d+a;e.lineTo(R,L);const B=Math.cos(T)*d+o,D=Math.sin(T)*d+a;e.lineTo(B,D)}e.closePath()}function VR(e,t,n,i,s){const{fullCircles:r,startAngle:o,circumference:a}=t;let l=t.endAngle;if(r){Fd(e,t,n,i,l,s);for(let c=0;c=Xt||Hl(o,l,c),v=Vi(a,u+f,d+f);return m&&v}getCenterPoint(n){const{x:i,y:s,startAngle:r,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(r+o)/2,h=(a+l+u+c)/2;return{x:i+Math.cos(d)*h,y:s+Math.sin(d)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:s}=this,r=(i.offset||0)/4,o=(i.spacing||0)/2,a=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>Xt?Math.floor(s/Xt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*r,Math.sin(l)*r);const c=1-Math.sin(Math.min(Kt,s||0)),u=r*c;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,VR(n,this,u,o,a),zR(n,this,u,o,a),n.restore()}},K(io,"id","arc"),K(io,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),K(io,"defaultRoutes",{backgroundColor:"backgroundColor"}),K(io,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"}),io);function xM(e,t,n=t){e.lineCap=at(n.borderCapStyle,t.borderCapStyle),e.setLineDash(at(n.borderDash,t.borderDash)),e.lineDashOffset=at(n.borderDashOffset,t.borderDashOffset),e.lineJoin=at(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=at(n.borderWidth,t.borderWidth),e.strokeStyle=at(n.borderColor,t.borderColor)}function WR(e,t,n){e.lineTo(n.x,n.y)}function HR(e){return e.stepped?aO:e.tension||e.cubicInterpolationMode==="monotone"?lO:WR}function bM(e,t,n={}){const i=e.length,{start:s=0,end:r=i-1}=n,{start:o,end:a}=t,l=Math.max(s,o),c=Math.min(r,a),u=sa&&r>a;return{count:i,start:l,loop:t.loop,ilen:c(o+(c?a-_:_))%r,x=()=>{m!==v&&(e.lineTo(u,v),e.lineTo(u,m),e.lineTo(u,y))};for(l&&(f=s[g(0)],e.moveTo(f.x,f.y)),h=0;h<=a;++h){if(f=s[g(h)],f.skip)continue;const _=f.x,w=f.y,S=_|0;S===p?(wv&&(v=w),u=(d*u+_)/++d):(x(),e.lineTo(_,w),p=S,d=0,m=v=w),y=w}x()}function Sm(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?YR:UR}function XR(e){return e.stepped?BO:e.tension||e.cubicInterpolationMode==="monotone"?VO:pr}function KR(e,t,n,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,n,i)&&s.closePath()),xM(e,t.options),e.stroke(s)}function GR(e,t,n,i){const{segments:s,options:r}=t,o=Sm(t);for(const a of s)xM(e,r,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const qR=typeof Path2D=="function";function QR(e,t,n,i){qR&&!t.options.segment?KR(e,t,n,i):GR(e,t,n,i)}var so;let Dh=(so=class extends os{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,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;OO(this._points,i,t,s,n),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=XO(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,s=t[n],r=this.points,o=iM(this,{property:n,start:s,end:s});if(!o.length)return;const a=[],l=XR(i);let c,u;for(c=0,u=o.length;ct!=="borderDash"&&t!=="fill"}),so);function Fx(e,t,n,i){const s=e.options,{[n]:r}=e.getProps([n],i);return Math.abs(t-r)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function SM(e){return Mm[e%Mm.length]}function MM(e){return Bx[e%Bx.length]}function sL(e,t){return e.borderColor=SM(t),e.backgroundColor=MM(t),++t}function rL(e,t){return e.backgroundColor=e.data.map(()=>SM(t++)),t}function oL(e,t){return e.backgroundColor=e.data.map(()=>MM(t++)),t}function aL(e){let t=0;return(n,i)=>{const s=e.getDatasetMeta(i).controller;s instanceof vy?t=rL(n,t):s instanceof aM?t=oL(n,t):s&&(t=sL(n,t))}}function Vx(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function lL(e){return e&&(e.borderColor||e.backgroundColor)}var cL={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:i},options:s}=e.config,{elements:r}=s;if(!n.forceOverride&&(Vx(i)||lL(s)||r&&Vx(r)))return;const o=aL(e);i.forEach(o)}};function uL(e,t,n,i,s){const r=s.samples||i;if(r>=n)return e.slice(t,t+n);const o=[],a=(n-2)/(r-2);let l=0;const c=t+n-1;let u=t,d,h,f,p,m;for(o[l++]=e[u],d=0;df&&(f=p,h=e[g],m=g);o[l++]=h,u=m}return o[l++]=e[c],o}function dL(e,t,n,i){let s=0,r=0,o,a,l,c,u,d,h,f,p,m;const v=[],y=t+n-1,g=e[t].x,_=e[y].x-g;for(o=t;om&&(m=c,h=o),s=(r*s+a.x)/++r;else{const S=o-1;if(!bt(d)&&!bt(h)){const C=Math.min(d,h),M=Math.max(d,h);C!==f&&C!==S&&v.push({...e[C],x:s}),M!==f&&M!==S&&v.push({...e[M],x:s})}o>0&&S!==f&&v.push(e[S]),v.push(a),u=w,r=0,p=m=c,d=h=f=o}}return v}function CM(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function zx(e){e.data.datasets.forEach(t=>{CM(t)})}function hL(e,t){const n=t.length;let i=0,s;const{iScale:r}=e,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(i=we(zi(t,r.axis,o).lo,0,n-1)),c?s=we(zi(t,r.axis,a).hi+1,i,n)-i:s=n-i,{start:i,count:s}}var fL={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){zx(e);return}const i=e.width;e.data.datasets.forEach((s,r)=>{const{_data:o,indexAxis:a}=s,l=e.getDatasetMeta(r),c=o||s.data;if(Ht([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:h}=hL(l,c);const f=n.threshold||4*i;if(h<=f){CM(s);return}bt(o)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let p;switch(n.algorithm){case"lttb":p=uL(c,d,h,i,n);break;case"min-max":p=dL(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=p})},destroy(e){zx(e)}};function pL(e,t,n){const i=e.segments,s=e.points,r=t.points,o=[];for(const a of i){let{start:l,end:c}=a;c=_y(l,c,s);const u=Cm(n,s[l],s[c],a.loop);if(!t.segments){o.push({source:a,target:u,start:s[l],end:s[c]});continue}const d=iM(t,u);for(const h of d){const f=Cm(n,r[h.start],r[h.end],h.loop),p=nM(a,s,f);for(const m of p)o.push({source:m,target:h,start:{[n]:Wx(u,f,"start",Math.max)},end:{[n]:Wx(u,f,"end",Math.min)}})}}return o}function Cm(e,t,n,i){if(i)return;let s=t[e],r=n[e];return e==="angle"&&(s=yn(s),r=yn(r)),{property:e,start:s,end:r}}function mL(e,t){const{x:n=null,y:i=null}=e||{},s=t.points,r=[];return t.segments.forEach(({start:o,end:a})=>{a=_y(o,a,s);const l=s[o],c=s[a];i!==null?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):n!==null&&(r.push({x:n,y:l.y}),r.push({x:n,y:c.y}))}),r}function _y(e,t,n){for(;t>e;t--){const i=n[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Wx(e,t,n,i){return e&&t?i(e[n],t[n]):e?e[n]:t?t[n]:0}function PM(e,t){let n=[],i=!1;return Ut(e)?(i=!0,n=e):n=mL(e,t),n.length?new Dh({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function Hx(e){return e&&e.fill!==!1}function gL(e,t,n){let s=e[t].fill;const r=[t];let o;if(!n)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!oe(s))return s;if(o=e[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function yL(e,t,n){const i=_L(e);if(gt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return oe(s)&&Math.floor(s)===s?vL(i[0],t,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function vL(e,t,n,i){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=i?!1:n}function xL(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:gt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function bL(e,t,n){let i;return e==="start"?i=n:e==="end"?i=t.options.reverse?t.min:t.max:gt(e)?i=e.value:i=t.getBaseValue(),i}function _L(e){const t=e.options,n=t.fill;let i=at(n&&n.target,n);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function wL(e){const{scale:t,index:n,line:i}=e,s=[],r=i.segments,o=i.points,a=kL(t,n);a.push(PM({x:null,y:t.bottom},i));for(let l=0;l=0;--o){const a=s[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),i&&a.fill&&Hf(e.ctx,a,r))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const r=i[s].$filler;Hx(r)&&Hf(e.ctx,r,e.chartArea)}},beforeDatasetDraw(e,t,n){const i=t.meta.$filler;!Hx(i)||n.drawTime!=="beforeDatasetDraw"||Hf(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Kx=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},LL=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;let Gx=class extends os{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,n,i){this.maxWidth=t,this.maxHeight=n,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 n=$t(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,s=ge(i.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Kx(i,r);let c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,r,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,s){const{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let d=t;r.textAlign="left",r.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((p,m)=>{const v=i+n/2+r.measureText(p.text).width;(m===0||c[c.length-1]+v+2*a>o)&&(d+=u,c[c.length-(m>0?0:1)]=0,f+=u,h++),l[m]={left:0,top:f,row:h,width:v,height:s},c[c.length-1]+=v+a}),d}_fitCols(t,n,i,s){const{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t;let d=a,h=0,f=0,p=0,m=0;return this.legendItems.forEach((v,y)=>{const{itemWidth:g,itemHeight:x}=NL(i,n,r,v,s);y>0&&f+x+2*a>u&&(d+=h+a,c.push({width:h,height:f}),p+=h+a,m++,h=f=0),l[y]={left:p,top:f,col:m,width:g,height:x},h=Math.max(h,g),f+=x+a}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:r}}=this,o=Oo(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=Ne(i,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Ne(i,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+s}else{let a=0,l=Ne(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Ne(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ch(t,this),this._draw(),Ph(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:s}=this,{align:r,labels:o}=t,a=ne.color,l=Oo(t.rtl,this.left,this.width),c=ge(o.font),{padding:u}=o,d=c.size,h=d/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:v}=Kx(o,d),y=function(S,C,M){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const P=at(M.lineWidth,1);if(s.fillStyle=at(M.fillStyle,a),s.lineCap=at(M.lineCap,"butt"),s.lineDashOffset=at(M.lineDashOffset,0),s.lineJoin=at(M.lineJoin,"miter"),s.lineWidth=P,s.strokeStyle=at(M.strokeStyle,a),s.setLineDash(at(M.lineDash,[])),o.usePointStyle){const T={radius:m*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:P},A=l.xPlus(S,p/2),E=C+h;US(s,T,A,E,o.pointStyleWidth&&p)}else{const T=C+Math.max((d-m)/2,0),A=l.leftForLtr(S,p),E=Cr(M.borderRadius);s.beginPath(),Object.values(E).some(z=>z!==0)?Ul(s,{x:A,y:T,w:p,h:m,radius:E}):s.rect(A,T,p,m),s.fill(),P!==0&&s.stroke()}s.restore()},g=function(S,C,M){Br(s,M.text,S,C+v/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},x=this.isHorizontal(),_=this._computeTitleHeight();x?f={x:Ne(r,this.left+u,this.right-i[0]),y:this.top+u+_,line:0}:f={x:this.left+u,y:Ne(r,this.top+_+u,this.bottom-n[0].height),line:0},JS(this.ctx,t.textDirection);const w=v+u;this.legendItems.forEach((S,C)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const M=s.measureText(S.text).width,P=l.textAlign(S.textAlign||(S.textAlign=o.textAlign)),T=p+h+M;let A=f.x,E=f.y;l.setWidth(this.width),x?C>0&&A+T+u>this.right&&(E=f.y+=w,f.line++,A=f.x=Ne(r,this.left+u,this.right-i[f.line])):C>0&&E+w>this.bottom&&(A=f.x=A+n[f.line].width+u,f.line++,E=f.y=Ne(r,this.top+_+u,this.bottom-n[f.line].height));const z=l.x(A);if(y(z,E,S),A=qA(P,A+p+h,x?A+T:this.right,t.rtl),g(l.x(A),E,S),x)f.x+=T+u;else if(typeof S.text!="string"){const N=c.lineHeight;f.y+=DM(S,N)+u}else f.y+=w}),tM(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=ge(n.font),s=Ae(n.padding);if(!n.display)return;const r=Oo(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=i.size/2,c=s.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=Ne(t.align,d,this.right-h);else{const p=this.columnSizes.reduce((m,v)=>Math.max(m,v.height),0);u=c+Ne(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=Ne(a,d,d+h);o.textAlign=r.textAlign(uy(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,Br(o,n.text,f,u,i)}_computeTitleHeight(){const t=this.options.title,n=ge(t.font),i=Ae(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,s,r;if(Vi(t,this.left,this.right)&&Vi(n,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;ir.length>o.length?r:o)),t+n.size/2+i.measureText(s).width}function $L(e,t,n){let i=e;return typeof t.text!="string"&&(i=DM(t,n)),i}function DM(e,t){const n=e.text?e.text.length:0;return t*n}function IL(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var FL={id:"legend",_element:Gx,start(e,t,n){const i=e.legend=new Gx({ctx:e.ctx,options:n,chart:e});Fe.configure(e,i,n),Fe.addBox(e,i)},stop(e){Fe.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;Fe.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:r,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Ae(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};let wy=class extends os{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,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=Ut(i.text)?i.text.length:1;this._padding=Ae(i.padding);const r=s*ge(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:i,bottom:s,right:r,options:o}=this,a=o.align;let l=0,c,u,d;return this.isHorizontal()?(u=Ne(a,i,r),d=n+t,c=r-i):(o.position==="left"?(u=i+t,d=Ne(a,s,n),l=Kt*-.5):(u=r-t,d=Ne(a,n,s),l=Kt*.5),c=s-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=ge(n.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);Br(t,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:uy(n.align),textBaseline:"middle",translation:[o,a]})}};function BL(e,t){const n=new wy({ctx:e.ctx,options:t,chart:e});Fe.configure(e,n,t),Fe.addBox(e,n),e.titleBlock=n}var VL={id:"title",_element:wy,start(e,t,n){BL(e,n)},stop(e){const t=e.titleBlock;Fe.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;Fe.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ou=new WeakMap;var zL={id:"subtitle",start(e,t,n){const i=new wy({ctx:e.ctx,options:n,chart:e});Fe.configure(e,i,n),Fe.addBox(e,i),ou.set(e,i)},stop(e){Fe.removeBox(e,ou.get(e)),ou.delete(e)},beforeUpdate(e,t,n){const i=ou.get(e);Fe.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const qa={average(e){if(!e.length)return!1;let t,n,i=new Set,s=0,r=0;for(t=0,n=e.length;ta+l)/i.size,y:s/r}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,s=Number.POSITIVE_INFINITY,r,o,a;for(r=0,o=e.length;r-1?e.split(`
-`):e}function WR(e,t){const{element:n,datasetIndex:i,index:s}=t,r=e.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:e,label:o,parsed:r.getParsed(s),raw:e.data.datasets[i].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function qx(e,t){const n=e.chart.ctx,{body:i,footer:s,title:r}=e,{boxWidth:o,boxHeight:a}=t,l=ge(t.bodyFont),c=ge(t.titleFont),u=ge(t.footerFont),d=r.length,h=s.length,f=i.length,p=Ae(t.padding);let m=p.height,v=0,y=i.reduce((_,w)=>_+w.before.length+w.lines.length+w.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const _=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*_+(y-f)*l.lineHeight+(y-1)*t.bodySpacing}h&&(m+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let g=0;const x=function(_){v=Math.max(v,n.measureText(_).width+g)};return n.save(),n.font=c.string,Et(e.title,x),n.font=l.string,Et(e.beforeBody.concat(e.afterBody),x),g=t.displayColors?o+2+t.boxPadding:0,Et(i,_=>{Et(_.before,x),Et(_.lines,x),Et(_.after,x)}),g=0,n.font=u.string,Et(e.footer,x),n.restore(),v+=p.width,{width:v,height:m}}function HR(e,t){const{y:n,height:i}=t;return ne.height-i/2?"bottom":"center"}function UR(e,t,n,i){const{x:s,width:r}=i,o=n.caretSize+n.caretPadding;if(e==="left"&&s+r+o>t.width||e==="right"&&s-r-o<0)return!0}function YR(e,t,n,i){const{x:s,width:r}=n,{width:o,chartArea:{left:a,right:l}}=e;let c="center";return i==="center"?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),UR(c,e,t,n)&&(c="center"),c}function Qx(e,t,n){const i=n.yAlign||t.yAlign||HR(e,n);return{xAlign:n.xAlign||t.xAlign||YR(e,t,n,i),yAlign:i}}function XR(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function KR(e,t,n){let{y:i,height:s}=e;return t==="top"?i+=n:t==="bottom"?i-=s+n:i-=s/2,i}function Zx(e,t,n,i){const{caretSize:s,caretPadding:r,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,c=s+r,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=Cr(o);let p=XR(t,a);const m=KR(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(u,h)+s:a==="right"&&(p+=Math.max(d,f)+s),{x:we(p,0,i.width-t.width),y:we(m,0,i.height-t.height)}}function ou(e,t,n){const i=Ae(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function Jx(e){return ci([],Oi(e))}function GR(e,t,n){return Qs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function tb(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const EM={beforeTitle:Di,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex"u"?EM[t].call(n,i):s}var kp;let eb=(kp=class extends os{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,r=new sM(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=GR(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,s=qe(i,"beforeTitle",this,t),r=qe(i,"title",this,t),o=qe(i,"afterTitle",this,t);let a=[];return a=ci(a,Oi(s)),a=ci(a,Oi(r)),a=ci(a,Oi(o)),a}getBeforeBody(t,n){return Jx(qe(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,s=[];return Et(t,r=>{const o={before:[],lines:[],after:[]},a=tb(i,r);ci(o.before,Oi(qe(a,"beforeLabel",this,r))),ci(o.lines,qe(a,"label",this,r)),ci(o.after,Oi(qe(a,"afterLabel",this,r))),s.push(o)}),s}getAfterBody(t,n){return Jx(qe(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,s=qe(i,"beforeFooter",this,t),r=qe(i,"footer",this,t),o=qe(i,"afterFooter",this,t);let a=[];return a=ci(a,Oi(s)),a=ci(a,Oi(r)),a=ci(a,Oi(o)),a}_createItems(t){const n=this._active,i=this.chart.data,s=[],r=[],o=[];let a=[],l,c;for(l=0,c=n.length;lt.filter(u,d,h,i))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,i))),Et(a,u=>{const d=tb(t.callbacks,u);s.push(qe(d,"labelColor",this,u)),r.push(qe(d,"labelPointStyle",this,u)),o.push(qe(d,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const i=this.options.setContext(this.getContext()),s=this._active;let r,o=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{const a=qa[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const l=this._size=qx(this,i),c=Object.assign({},a,l),u=Qx(this.chart,i,c),d=Zx(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,s){const r=this.getCaretPosition(t,i,s);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(t,n,i){const{xAlign:s,yAlign:r}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Cr(a),{x:h,y:f}=t,{width:p,height:m}=n;let v,y,g,x,_,w;return r==="center"?(_=f+m/2,s==="left"?(v=h,y=v-o,x=_+o,w=_-o):(v=h+p,y=v+o,x=_-o,w=_+o),g=v):(s==="left"?y=h+Math.max(l,u)+o:s==="right"?y=h+p-Math.max(c,d)-o:y=this.caretX,r==="top"?(x=f,_=x-o,v=y-o,g=y+o):(x=f+m,_=x+o,v=y+o,g=y-o),w=x),{x1:v,x2:y,x3:g,y1:x,y2:_,y3:w}}drawTitle(t,n,i){const s=this.title,r=s.length;let o,a,l;if(r){const c=Oo(i.rtl,this.x,this.width);for(t.x=ou(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",o=ge(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;lg!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Hl(t,{x:m,y:p,w:c,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Hl(t,{x:v,y:p+1,w:c-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(m,p,c,l),t.strokeRect(m,p,c,l),t.fillStyle=o.backgroundColor,t.fillRect(v,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:s}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=ge(i.bodyFont);let h=d.lineHeight,f=0;const p=Oo(i.rtl,this.x,this.width),m=function(M){n.fillText(M,p.x(t.x+f),t.y+h/2),t.y+=h+r},v=p.textAlign(o);let y,g,x,_,w,S,C;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=ou(this,v,i),n.fillStyle=i.bodyColor,Et(this.beforeBody,m),f=a&&v!=="right"?o==="center"?c/2+u:c+2+u:0,_=0,S=s.length;_0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){const o=qa[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=qx(this,t),l=Object.assign({},o,this._size),c=Qx(n,t,l),u=Zx(t,l,c,n);(s._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Ae(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,s,n),JS(t,n.textDirection),r.y+=o.top,this.drawTitle(r,t,n),this.drawBody(r,t,n),this.drawFooter(r,t,n),tM(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,s=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),r=!Ld(i,s),o=this._positionChanged(s,n);(r||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],o=this._getActiveElements(t,r,n,i),a=this._positionChanged(o,t),l=n||!Ld(o,r)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,s){const r=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:i,caretY:s,options:r}=this,o=qa[r.position].call(this,t,n);return o!==!1&&(i!==o.x||s!==o.y)}},K(kp,"positioners",qa),kp);var qR={id:"tooltip",_element:eb,positioners:qa,afterInit(e,t,n){n&&(e.tooltip=new eb({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:EM},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},QR=Object.freeze({__proto__:null,Colors:cR,Decimation:fR,Filler:LR,Legend:FR,SubTitle:zR,Title:VR,Tooltip:qR});const ZR=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function JR(e,t,n,i){const s=e.indexOf(t);if(s===-1)return ZR(e,t,n,i);const r=e.lastIndexOf(t);return s!==r?n:s}const tN=(e,t)=>e===null?null:we(Math.round(e),0,t);function nb(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},K(Ru,"id","category"),K(Ru,"defaults",{ticks:{callback:nb}}),Ru);function nN(e,t){const n=[],{bounds:s,step:r,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=e,f=r||1,p=u-1,{min:m,max:v}=t,y=!bt(o),g=!bt(a),x=!bt(c),_=(v-m)/(d+1);let w=Gv((v-m)/p/f)*f,S,C,M,P;if(w<1e-14&&!y&&!g)return[{value:m},{value:v}];P=Math.ceil(v/w)-Math.floor(m/w),P>p&&(w=Gv(P*w/p/f)*f),bt(l)||(S=Math.pow(10,l),w=Math.ceil(w*S)/S),s==="ticks"?(C=Math.floor(m/w)*w,M=Math.ceil(v/w)*w):(C=m,M=v),y&&g&&r&&WA((a-o)/r,w/1e3)?(P=Math.round(Math.min((a-o)/w,u)),w=(a-o)/P,C=o,M=a):x?(C=y?o:C,M=g?a:M,P=c-1,w=(M-C)/P):(P=(M-C)/w,dl(P,Math.round(P),w/1e3)?P=Math.round(P):P=Math.ceil(P));const T=Math.max(qv(w),qv(C));S=Math.pow(10,bt(l)?T:l),C=Math.round(C*S)/S,M=Math.round(M*S)/S;let A=0;for(y&&(h&&C!==o?(n.push({value:o}),Ca)break;n.push({value:E})}return g&&h&&M!==a?n.length&&dl(n[n.length-1].value,a,ib(a,_,e))?n[n.length-1].value=a:n.push({value:a}):(!g||M===a)&&n.push({value:M}),n}function ib(e,t,{horizontal:n,minRotation:i}){const s=Jn(i),r=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/r,o)}let Bd=class extends pc{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,n){return bt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:r}=this;const o=l=>s=n?s:l,a=l=>r=i?r:l;if(t){const l=vi(s),c=vi(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(s===r){let l=r===0?1:Math.abs(r*.05);a(r+l),t||o(s-l)}this.min=s,this.max=r}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,o=nN(s,r);return t.bounds==="ticks"&&jS(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-n)/Math.max(t.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return hc(t,this.chart.options.locale,this.options.ticks.format)}};var Nu;let iN=(Nu=class extends Bd{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=oe(t)?t:0,this.max=oe(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Jn(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}},K(Nu,"id","linear"),K(Nu,"defaults",{ticks:{callback:Mh.formatters.numeric}}),Nu);const Yl=e=>Math.floor(Ss(e)),ar=(e,t)=>Math.pow(10,Yl(e)+t);function sb(e){return e/Math.pow(10,Yl(e))===1}function rb(e,t,n){const i=Math.pow(10,n),s=Math.floor(e/i);return Math.ceil(t/i)-s}function sN(e,t){const n=t-e;let i=Yl(n);for(;rb(e,t,i)>10;)i++;for(;rb(e,t,i)<10;)i--;return Math.min(i,Yl(e))}function rN(e,{min:t,max:n}){t=mn(e.min,t);const i=[],s=Yl(t);let r=sN(t,n),o=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),l=s>r?Math.pow(10,s):0,c=Math.round((t-l)*o)/o,u=Math.floor((t-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,r)),h=mn(e.min,Math.round((l+u+d*Math.pow(10,r))*o)/o);for(;h=10?d=d<15?15:20:d++,d>=20&&(r++,d=2,o=r>=0?1:o),h=Math.round((l+u+d*Math.pow(10,r))*o)/o;const f=mn(e.max,h);return i.push({value:f,major:sb(f),significand:d}),i}var ju;let oN=(ju=class extends pc{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=Bd.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return oe(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=oe(t)?Math.max(0,t):null,this.max=oe(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!oe(this._userMin)&&(this.min=t===ar(this.min,0)?ar(this.min,-1):ar(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const r=a=>i=t?i:a,o=a=>s=n?s:a;i===s&&(i<=0?(r(1),o(10)):(r(ar(i,-1)),o(ar(s,1)))),i<=0&&r(ar(s,-1)),s<=0&&o(ar(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=rN(n,this);return t.bounds==="ticks"&&jS(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":hc(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ss(t),this._valueRange=Ss(this.max)-Ss(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ss(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}},K(ju,"id","logarithmic"),K(ju,"defaults",{ticks:{callback:Mh.formatters.logarithmic,major:{enabled:!0}}}),ju);function Pm(e){const t=e.ticks;if(t.display&&e.display){const n=Ae(t.backdropPadding);return at(t.font&&t.font.size,ne.font.size)+n.height}return 0}function aN(e,t,n){return n=Ut(n)?n:[n],{w:oO(e,t.string,n),h:n.length*t.lineHeight}}function ob(e,t,n,i,s){return e===i||e===s?{start:t-n/2,end:t+n/2}:es?{start:t-n,end:t}:{start:t,end:t+n}}function lN(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),i=[],s=[],r=e._pointLabels.length,o=e.options.pointLabels,a=o.centerPointLabels?Kt/r:0;for(let l=0;lt.r&&(a=(i.end-t.r)/r,e.r=Math.max(e.r,t.r+a)),s.startt.b&&(l=(s.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function uN(e,t,n){const i=e.drawingArea,{extra:s,additionalAngle:r,padding:o,size:a}=n,l=e.getPointPosition(t,i+s+o,r),c=Math.round(ly(yn(l.angle+ue))),u=mN(l.y,a.h,c),d=fN(c),h=pN(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+a.w,bottom:u+a.h}}function dN(e,t){if(!t)return!0;const{left:n,top:i,right:s,bottom:r}=e;return!(Wi({x:n,y:i},t)||Wi({x:n,y:r},t)||Wi({x:s,y:i},t)||Wi({x:s,y:r},t))}function hN(e,t,n){const i=[],s=e._pointLabels.length,r=e.options,{centerPointLabels:o,display:a}=r.pointLabels,l={extra:Pm(r)/2,additionalAngle:o?Kt/s:0};let c;for(let u=0;u270||n<90)&&(e-=t),e}function gN(e,t,n){const{left:i,top:s,right:r,bottom:o}=n,{backdropColor:a}=t;if(!bt(a)){const l=Cr(t.borderRadius),c=Ae(t.backdropPadding);e.fillStyle=a;const u=i-c.left,d=s-c.top,h=r-i+c.width,f=o-s+c.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),Hl(e,{x:u,y:d,w:h,h:f,radius:l}),e.fill()):e.fillRect(u,d,h,f)}}function yN(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let s=t-1;s>=0;s--){const r=e._pointLabelItems[s];if(!r.visible)continue;const o=i.setContext(e.getPointLabelContext(s));gN(n,o,r);const a=ge(o.font),{x:l,y:c,textAlign:u}=r;Br(n,e._pointLabels[s],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function AM(e,t,n,i){const{ctx:s}=e;if(n)s.arc(e.xCenter,e.yCenter,t,0,Xt);else{let r=e.getPointPosition(0,t);s.moveTo(r.x,r.y);for(let o=1;o{const s=$t(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?lN(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,s){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,s))}getIndexAngle(t){const n=Xt/(this._pointLabels.length||1),i=this.options.startAngle||0;return yn(t*n+Jn(i))}getDistanceFromCenterForValue(t){if(bt(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(bt(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=s.setContext(h),p=r.setContext(h);vN(this,f,l,o,p)}}),i.display){for(t.save(),a=o-1;a>=0;a--){const u=i.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=ge(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=Ae(c.backdropPadding);t.fillRect(-o/2-d.left,-r-u.size/2-d.top,o+d.width,u.size+d.height)}Br(t,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}},K(ro,"id","radialLinear"),K(ro,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Mh.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),K(ro,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),K(ro,"descriptors",{angleLines:{_fallback:"grid"}}),ro);const Eh={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}},tn=Object.keys(Eh);function ab(e,t){return e-t}function lb(e,t){if(bt(t))return null;const n=e._adapter,{parser:i,round:s,isoWeekday:r}=e._parseOpts;let o=t;return typeof i=="function"&&(o=i(o)),oe(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Wo(r)||r===!0)?n.startOf(o,"isoWeek",r):n.startOf(o,s)),+o)}function cb(e,t,n,i){const s=tn.length;for(let r=tn.indexOf(e);r=tn.indexOf(n);r--){const o=tn[r];if(Eh[o].common&&e._adapter.diff(s,i,o)>=t-1)return o}return tn[n?tn.indexOf(n):0]}function wN(e){for(let t=tn.indexOf(e)+1,n=tn.length;t=t?n[i]:n[s];e[r]=!0}}function kN(e,t,n,i){const s=e._adapter,r=+s.startOf(t[0].value,i),o=t[t.length-1].value;let a,l;for(a=r;a<=o;a=+s.add(a,1,i))l=n[a],l>=0&&(t[l].major=!0);return t}function db(e,t,n){const i=[],s={},r=t.length;let o,a;for(o=0;o+t.value))}initOffsets(t=[]){let n=0,i=0,s,r;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?i=r:i=(r-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=we(n,0,o),i=we(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,s=this.options,r=s.time,o=r.unit||cb(r.minUnit,n,i,this._getLabelCapacity(n)),a=at(s.ticks.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=Wo(l)||l===!0,u={};let d=n,h,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":o),t.diff(i,n,o)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+o);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h+m)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,r=this._unit,o=n||s[r];return this._adapter.format(t,o)}_tickFormatFunction(t,n,i,s){const r=this.options,o=r.ticks.callback;if(o)return $t(o,[t,n,i],this);const a=r.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],h=i[n],f=c&&d&&h&&h.major;return this._adapter.format(t,s||(f?d:u))}generateTickLabels(t){let n,i,s;for(n=0,i=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n=e[i].pos&&t<=e[s].pos&&({lo:i,hi:s}=zi(e,"pos",t)),{pos:r,time:a}=e[i],{pos:o,time:l}=e[s]):(t>=e[i].time&&t<=e[s].time&&({lo:i,hi:s}=zi(e,"time",t)),{time:r,pos:a}=e[i],{time:o,pos:l}=e[s]);const c=o-r;return c?a+(l-a)*(t-r)/c:a}var Iu;let SN=(Iu=class extends Tm{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=au(n,this.min),this._tableRange=au(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,s=[],r=[];let o,a,l,c,u;for(o=0,a=t.length;o=n&&c<=i&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,a=s.length;os-r)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(au(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return au(this._table,i*this._tableRange+this._minPos,!0)}},K(Iu,"id","timeseries"),K(Iu,"defaults",Tm.defaults),Iu);var MN=Object.freeze({__proto__:null,CategoryScale:eN,LinearScale:iN,LogarithmicScale:oN,RadialLinearScale:bN,TimeScale:Tm,TimeSeriesScale:SN});const CN=[P2,iR,QR,MN];by.register(...CN);function OM(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t"u")return!1;var t=si(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function FN(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},s=t.attributes[n]||{},r=t.elements[n];!Fn(r)||!ki(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function BN(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var s=t.elements[i],r=t.attributes[i]||{},o=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),a=o.reduce(function(l,c){return l[c]="",l},{});!Fn(s)||!ki(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const VN={name:"applyStyles",enabled:!0,phase:"write",fn:FN,effect:BN,requires:["computeStyles"]};function xi(e){return e.split("-")[0]}var Tr=Math.max,Vd=Math.min,Ko=Math.round;function Go(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),i=1,s=1;if(Fn(e)&&t){var r=e.offsetHeight,o=e.offsetWidth;o>0&&(i=Ko(n.width)/o||1),r>0&&(s=Ko(n.height)/r||1)}return{width:n.width/i,height:n.height/s,top:n.top/s,right:n.right/i,bottom:n.bottom/s,left:n.left/i,x:n.left/i,y:n.top/s}}function My(e){var t=Go(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function NM(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Sy(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ns(e){return si(e).getComputedStyle(e)}function zN(e){return["table","td","th"].indexOf(ki(e))>=0}function Js(e){return((Xo(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ah(e){return ki(e)==="html"?e:e.assignedSlot||e.parentNode||(Sy(e)?e.host:null)||Js(e)}function mb(e){return!Fn(e)||ns(e).position==="fixed"?null:e.offsetParent}function WN(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Fn(e)){var i=ns(e);if(i.position==="fixed")return null}var s=Ah(e);for(Sy(s)&&(s=s.host);Fn(s)&&["html","body"].indexOf(ki(s))<0;){var r=ns(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function gc(e){for(var t=si(e),n=mb(e);n&&zN(n)&&ns(n).position==="static";)n=mb(n);return n&&(ki(n)==="html"||ki(n)==="body"&&ns(n).position==="static")?t:n||WN(e)||t}function Cy(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function pl(e,t,n){return Tr(e,Vd(t,n))}function HN(e,t,n){var i=pl(e,t,n);return i>n?n:i}function jM(){return{top:0,right:0,bottom:0,left:0}}function $M(e){return Object.assign({},jM(),e)}function IM(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var UN=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,$M(typeof t!="number"?t:IM(t,mc))};function YN(e){var t,n=e.state,i=e.name,s=e.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=xi(n.placement),l=Cy(a),c=[cn,Wn].indexOf(a)>=0,u=c?"height":"width";if(!(!r||!o)){var d=UN(s.padding,n),h=My(r),f=l==="y"?ln:cn,p=l==="y"?zn:Wn,m=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],v=o[l]-n.rects.reference[l],y=gc(r),g=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,x=m/2-v/2,_=d[f],w=g-h[u]-d[p],S=g/2-h[u]/2+x,C=pl(_,S,w),M=l;n.modifiersData[i]=(t={},t[M]=C,t.centerOffset=C-S,t)}}function XN(e){var t=e.state,n=e.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||NM(t.elements.popper,s)&&(t.elements.arrow=s))}const KN={name:"arrow",enabled:!0,phase:"main",fn:YN,effect:XN,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function qo(e){return e.split("-")[1]}var GN={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qN(e){var t=e.x,n=e.y,i=window,s=i.devicePixelRatio||1;return{x:Ko(t*s)/s||0,y:Ko(n*s)/s||0}}function gb(e){var t,n=e.popper,i=e.popperRect,s=e.placement,r=e.variation,o=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=o.x,f=h===void 0?0:h,p=o.y,m=p===void 0?0:p,v=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=v.x,m=v.y;var y=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),x=cn,_=ln,w=window;if(c){var S=gc(n),C="clientHeight",M="clientWidth";if(S===si(n)&&(S=Js(n),ns(S).position!=="static"&&a==="absolute"&&(C="scrollHeight",M="scrollWidth")),S=S,s===ln||(s===cn||s===Wn)&&r===Xl){_=zn;var P=d&&S===w&&w.visualViewport?w.visualViewport.height:S[C];m-=P-i.height,m*=l?1:-1}if(s===cn||(s===ln||s===zn)&&r===Xl){x=Wn;var T=d&&S===w&&w.visualViewport?w.visualViewport.width:S[M];f-=T-i.width,f*=l?1:-1}}var A=Object.assign({position:a},c&&GN),E=u===!0?qN({x:f,y:m}):{x:f,y:m};if(f=E.x,m=E.y,l){var z;return Object.assign({},A,(z={},z[_]=g?"0":"",z[x]=y?"0":"",z.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",z))}return Object.assign({},A,(t={},t[_]=g?m+"px":"",t[x]=y?f+"px":"",t.transform="",t))}function QN(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=i===void 0?!0:i,r=n.adaptive,o=r===void 0?!0:r,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:xi(t.placement),variation:qo(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,gb(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,gb(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const ZN={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:QN,data:{}};var lu={passive:!0};function JN(e){var t=e.state,n=e.instance,i=e.options,s=i.scroll,r=s===void 0?!0:s,o=i.resize,a=o===void 0?!0:o,l=si(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&c.forEach(function(u){u.addEventListener("scroll",n.update,lu)}),a&&l.addEventListener("resize",n.update,lu),function(){r&&c.forEach(function(u){u.removeEventListener("scroll",n.update,lu)}),a&&l.removeEventListener("resize",n.update,lu)}}const tj={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:JN,data:{}};var ej={left:"right",right:"left",bottom:"top",top:"bottom"};function Ju(e){return e.replace(/left|right|bottom|top/g,function(t){return ej[t]})}var nj={start:"end",end:"start"};function yb(e){return e.replace(/start|end/g,function(t){return nj[t]})}function Py(e){var t=si(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Ty(e){return Go(Js(e)).left+Py(e).scrollLeft}function ij(e){var t=si(e),n=Js(e),i=t.visualViewport,s=n.clientWidth,r=n.clientHeight,o=0,a=0;return i&&(s=i.width,r=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=i.offsetLeft,a=i.offsetTop)),{width:s,height:r,x:o+Ty(e),y:a}}function sj(e){var t,n=Js(e),i=Py(e),s=(t=e.ownerDocument)==null?void 0:t.body,r=Tr(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Tr(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+Ty(e),l=-i.scrollTop;return ns(s||n).direction==="rtl"&&(a+=Tr(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function Dy(e){var t=ns(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function FM(e){return["html","body","#document"].indexOf(ki(e))>=0?e.ownerDocument.body:Fn(e)&&Dy(e)?e:FM(Ah(e))}function ml(e,t){var n;t===void 0&&(t=[]);var i=FM(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),r=si(i),o=s?[r].concat(r.visualViewport||[],Dy(i)?i:[]):i,a=t.concat(o);return s?a:a.concat(ml(Ah(o)))}function Dm(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function rj(e){var t=Go(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function vb(e,t){return t===LM?Dm(ij(e)):Xo(t)?rj(t):Dm(sj(Js(e)))}function oj(e){var t=ml(Ah(e)),n=["absolute","fixed"].indexOf(ns(e).position)>=0,i=n&&Fn(e)?gc(e):e;return Xo(i)?t.filter(function(s){return Xo(s)&&NM(s,i)&&ki(s)!=="body"}):[]}function aj(e,t,n){var i=t==="clippingParents"?oj(e):[].concat(t),s=[].concat(i,[n]),r=s[0],o=s.reduce(function(a,l){var c=vb(e,l);return a.top=Tr(c.top,a.top),a.right=Vd(c.right,a.right),a.bottom=Vd(c.bottom,a.bottom),a.left=Tr(c.left,a.left),a},vb(e,r));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function BM(e){var t=e.reference,n=e.element,i=e.placement,s=i?xi(i):null,r=i?qo(i):null,o=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(s){case ln:l={x:o,y:t.y-n.height};break;case zn:l={x:o,y:t.y+t.height};break;case Wn:l={x:t.x+t.width,y:a};break;case cn:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=s?Cy(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(r){case Yo:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Xl:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Kl(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=i===void 0?e.placement:i,r=n.boundary,o=r===void 0?PN:r,a=n.rootBoundary,l=a===void 0?LM:a,c=n.elementContext,u=c===void 0?Sa:c,d=n.altBoundary,h=d===void 0?!1:d,f=n.padding,p=f===void 0?0:f,m=$M(typeof p!="number"?p:IM(p,mc)),v=u===Sa?TN:Sa,y=e.rects.popper,g=e.elements[h?v:u],x=aj(Xo(g)?g:g.contextElement||Js(e.elements.popper),o,l),_=Go(e.elements.reference),w=BM({reference:_,element:y,strategy:"absolute",placement:s}),S=Dm(Object.assign({},y,w)),C=u===Sa?S:_,M={top:x.top-C.top+m.top,bottom:C.bottom-x.bottom+m.bottom,left:x.left-C.left+m.left,right:C.right-x.right+m.right},P=e.modifiersData.offset;if(u===Sa&&P){var T=P[s];Object.keys(M).forEach(function(A){var E=[Wn,zn].indexOf(A)>=0?1:-1,z=[ln,zn].indexOf(A)>=0?"y":"x";M[A]+=T[z]*E})}return M}function lj(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?RM:l,u=qo(i),d=u?a?pb:pb.filter(function(p){return qo(p)===u}):mc,h=d.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,m){return p[m]=Kl(e,{placement:m,boundary:s,rootBoundary:r,padding:o})[xi(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function cj(e){if(xi(e)===ky)return[];var t=Ju(e);return[yb(e),t,yb(t)]}function uj(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,m=n.allowedAutoPlacements,v=t.options.placement,y=xi(v),g=y===v,x=l||(g||!p?[Ju(v)]:cj(v)),_=[v].concat(x).reduce(function(Z,O){return Z.concat(xi(O)===ky?lj(t,{placement:O,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):O)},[]),w=t.rects.reference,S=t.rects.popper,C=new Map,M=!0,P=_[0],T=0;T<_.length;T++){var A=_[T],E=xi(A),z=qo(A)===Yo,N=[ln,zn].indexOf(E)>=0,L=N?"width":"height",R=Kl(t,{placement:A,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),B=N?z?Wn:cn:z?zn:ln;w[L]>S[L]&&(B=Ju(B));var D=Ju(B),$=[];if(r&&$.push(R[E]<=0),a&&$.push(R[B]<=0,R[D]<=0),$.every(function(Z){return Z})){P=A,M=!1;break}C.set(A,$)}if(M)for(var F=p?3:1,V=function(O){var U=_.find(function(lt){var ct=C.get(lt);if(ct)return ct.slice(0,O).every(function(kt){return kt})});if(U)return P=U,"break"},W=F;W>0;W--){var et=V(W);if(et==="break")break}t.placement!==P&&(t.modifiersData[i]._skip=!0,t.placement=P,t.reset=!0)}}const VM={name:"flip",enabled:!0,phase:"main",fn:uj,requiresIfExists:["offset"],data:{_skip:!1}};function xb(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function bb(e){return[ln,Wn,zn,cn].some(function(t){return e[t]>=0})}function dj(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,r=t.modifiersData.preventOverflow,o=Kl(t,{elementContext:"reference"}),a=Kl(t,{altBoundary:!0}),l=xb(o,i),c=xb(a,s,r),u=bb(l),d=bb(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const hj={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dj};function fj(e,t,n){var i=xi(e),s=[cn,ln].indexOf(i)>=0?-1:1,r=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[cn,Wn].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function pj(e){var t=e.state,n=e.options,i=e.name,s=n.offset,r=s===void 0?[0,0]:s,o=RM.reduce(function(u,d){return u[d]=fj(d,t.rects,r),u},{}),a=o[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=o}const mj={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pj};function gj(e){var t=e.state,n=e.name;t.modifiersData[n]=BM({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const yj={name:"popperOffsets",enabled:!0,phase:"read",fn:gj,data:{}};function vj(e){return e==="x"?"y":"x"}function xj(e){var t=e.state,n=e.options,i=e.name,s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,m=p===void 0?0:p,v=Kl(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=xi(t.placement),g=qo(t.placement),x=!g,_=Cy(y),w=vj(_),S=t.modifiersData.popperOffsets,C=t.rects.reference,M=t.rects.popper,P=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,T=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(S){if(r){var z,N=_==="y"?ln:cn,L=_==="y"?zn:Wn,R=_==="y"?"height":"width",B=S[_],D=B+v[N],$=B-v[L],F=f?-M[R]/2:0,V=g===Yo?C[R]:M[R],W=g===Yo?-M[R]:-C[R],et=t.elements.arrow,Z=f&&et?My(et):{width:0,height:0},O=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:jM(),U=O[N],lt=O[L],ct=pl(0,C[R],Z[R]),kt=x?C[R]/2-F-ct-U-T.mainAxis:V-ct-U-T.mainAxis,it=x?-C[R]/2+F+ct+lt+T.mainAxis:W+ct+lt+T.mainAxis,Lt=t.elements.arrow&&gc(t.elements.arrow),Ct=Lt?_==="y"?Lt.clientTop||0:Lt.clientLeft||0:0,Qt=(z=A==null?void 0:A[_])!=null?z:0,ft=B+kt-Qt-Ct,wt=B+it-Qt,dt=pl(f?Vd(D,ft):D,B,f?Tr($,wt):$);S[_]=dt,E[_]=dt-B}if(a){var jt,pt=_==="x"?ln:cn,xt=_==="x"?zn:Wn,J=S[w],mt=w==="y"?"height":"width",q=J+v[pt],ye=J-v[xt],Dt=[ln,cn].indexOf(y)!==-1,he=(jt=A==null?void 0:A[w])!=null?jt:0,Un=Dt?q:J-C[mt]-M[mt]-he+T.altAxis,Yn=Dt?J+C[mt]+M[mt]-he-T.altAxis:ye,Mn=f&&Dt?HN(Un,J,Yn):pl(f?Un:q,J,f?Yn:ye);S[w]=Mn,E[w]=Mn-J}t.modifiersData[i]=E}}const bj={name:"preventOverflow",enabled:!0,phase:"main",fn:xj,requiresIfExists:["offset"]};function _j(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function wj(e){return e===si(e)||!Fn(e)?Py(e):_j(e)}function kj(e){var t=e.getBoundingClientRect(),n=Ko(t.width)/e.offsetWidth||1,i=Ko(t.height)/e.offsetHeight||1;return n!==1||i!==1}function Sj(e,t,n){n===void 0&&(n=!1);var i=Fn(t),s=Fn(t)&&kj(t),r=Js(t),o=Go(e,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((ki(t)!=="body"||Dy(r))&&(a=wj(t)),Fn(t)?(l=Go(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=Ty(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function Mj(e){var t=new Map,n=new Set,i=[];e.forEach(function(r){t.set(r.name,r)});function s(r){n.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&s(l)}}),i.push(r)}return e.forEach(function(r){n.has(r.name)||s(r)}),i}function Cj(e){var t=Mj(e);return IN.reduce(function(n,i){return n.concat(t.filter(function(s){return s.phase===i}))},[])}function Pj(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Tj(e){var t=e.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var _b={placement:"bottom",modifiers:[],strategy:"absolute"};function wb(){for(var e=arguments.length,t=new Array(e),n=0;ne,isStatic:!1,reducedMotion:"never"}),Lh=k.createContext({}),Rh=k.createContext(null),Nh=typeof document<"u",Ey=Nh?k.useLayoutEffect:k.useEffect,WM=k.createContext({strict:!1}),Ay=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Fj="framerAppearId",HM="data-"+Ay(Fj);function Bj(e,t,n,i){const{visualElement:s}=k.useContext(Lh),r=k.useContext(WM),o=k.useContext(Rh),a=k.useContext(zM).reducedMotion,l=k.useRef();i=i||r.renderer,!l.current&&i&&(l.current=i(e,{visualState:t,parent:s,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;k.useInsertionEffect(()=>{c&&c.update(n,o)});const u=k.useRef(!!(n[HM]&&!window.HandoffComplete));return Ey(()=>{c&&(c.render(),u.current&&c.animationState&&c.animationState.animateChanges())}),k.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function _o(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Vj(e,t,n){return k.useCallback(i=>{i&&e.mount&&e.mount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):_o(n)&&(n.current=i))},[t])}function Gl(e){return typeof e=="string"||Array.isArray(e)}function jh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Oy=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ly=["initial",...Oy];function $h(e){return jh(e.animate)||Ly.some(t=>Gl(e[t]))}function UM(e){return!!($h(e)||e.variants)}function zj(e,t){if($h(e)){const{initial:n,animate:i}=e;return{initial:n===!1||Gl(n)?n:void 0,animate:Gl(i)?i:void 0}}return e.inherit!==!1?t:{}}function Wj(e){const{initial:t,animate:n}=zj(e,k.useContext(Lh));return k.useMemo(()=>({initial:t,animate:n}),[kb(t),kb(n)])}function kb(e){return Array.isArray(e)?e.join(" "):e}const Sb={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ql={};for(const e in Sb)ql[e]={isEnabled:t=>Sb[e].some(n=>!!t[n])};function Hj(e){for(const t in e)ql[t]={...ql[t],...e[t]}}const Ry=k.createContext({}),YM=k.createContext({}),Uj=Symbol.for("motionComponentSymbol");function Yj({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:i,Component:s}){e&&Hj(e);function r(a,l){let c;const u={...k.useContext(zM),...a,layoutId:Xj(a)},{isStatic:d}=u,h=Wj(a),f=i(a,d);if(!d&&Nh){h.visualElement=Bj(s,f,u,t);const p=k.useContext(YM),m=k.useContext(WM).strict;h.visualElement&&(c=h.visualElement.loadFeatures(u,m,e,p))}return k.createElement(Lh.Provider,{value:h},c&&h.visualElement?k.createElement(c,{visualElement:h.visualElement,...u}):null,n(s,a,Vj(f,h.visualElement,l),f,d,h.visualElement))}const o=k.forwardRef(r);return o[Uj]=s,o}function Xj({layoutId:e}){const t=k.useContext(Ry).id;return t&&e!==void 0?t+"-"+e:e}function Kj(e){function t(i,s={}){return Yj(e(i,s))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(i,s)=>(n.has(s)||n.set(s,t(s)),n.get(s))})}const Gj=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ny(e){return typeof e!="string"||e.includes("-")?!1:!!(Gj.indexOf(e)>-1||/[A-Z]/.test(e))}const zd={};function qj(e){Object.assign(zd,e)}const yc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ur=new Set(yc);function XM(e,{layout:t,layoutId:n}){return Ur.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!zd[e]||e==="opacity")}const un=e=>!!(e&&e.getVelocity),Qj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zj=yc.length;function Jj(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},i,s){let r="";for(let o=0;ot=>typeof t=="string"&&t.startsWith(e),GM=KM("--"),Em=KM("var(--"),t$=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,e$=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Hs=(e,t,n)=>Math.min(Math.max(n,e),t),Yr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},gl={...Yr,transform:e=>Hs(0,1,e)},cu={...Yr,default:1},yl=e=>Math.round(e*1e5)/1e5,Ih=/(-)?([\d]*\.?[\d])+/g,qM=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,n$=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function vc(e){return typeof e=="string"}const xc=e=>({test:t=>vc(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ps=xc("deg"),bi=xc("%"),st=xc("px"),i$=xc("vh"),s$=xc("vw"),Mb={...bi,parse:e=>bi.parse(e)/100,transform:e=>bi.transform(e*100)},Cb={...Yr,transform:Math.round},QM={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,size:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,rotate:ps,rotateX:ps,rotateY:ps,rotateZ:ps,scale:cu,scaleX:cu,scaleY:cu,scaleZ:cu,skew:ps,skewX:ps,skewY:ps,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:gl,originX:Mb,originY:Mb,originZ:st,zIndex:Cb,fillOpacity:gl,strokeOpacity:gl,numOctaves:Cb};function jy(e,t,n,i){const{style:s,vars:r,transform:o,transformOrigin:a}=e;let l=!1,c=!1,u=!0;for(const d in t){const h=t[d];if(GM(d)){r[d]=h;continue}const f=QM[d],p=e$(h,f);if(Ur.has(d)){if(l=!0,o[d]=p,!u)continue;h!==(f.default||0)&&(u=!1)}else d.startsWith("origin")?(c=!0,a[d]=p):s[d]=p}if(t.transform||(l||i?s.transform=Jj(e.transform,n,u,i):s.transform&&(s.transform="none")),c){const{originX:d="50%",originY:h="50%",originZ:f=0}=a;s.transformOrigin=`${d} ${h} ${f}`}}const $y=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ZM(e,t,n){for(const i in t)!un(t[i])&&!XM(i,n)&&(e[i]=t[i])}function r$({transformTemplate:e},t,n){return k.useMemo(()=>{const i=$y();return jy(i,t,{enableHardwareAcceleration:!n},e),Object.assign({},i.vars,i.style)},[t])}function o$(e,t,n){const i=e.style||{},s={};return ZM(s,i,e),Object.assign(s,r$(e,t,n)),e.transformValues?e.transformValues(s):s}function a$(e,t,n){const i={},s=o$(e,t,n);return e.drag&&e.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=s,i}const l$=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Wd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||l$.has(e)}let JM=e=>!Wd(e);function c$(e){e&&(JM=t=>t.startsWith("on")?!Wd(t):e(t))}try{c$(require("@emotion/is-prop-valid").default)}catch{}function u$(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(JM(s)||n===!0&&Wd(s)||!t&&!Wd(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}function Pb(e,t,n){return typeof e=="string"?e:st.transform(t+n*e)}function d$(e,t,n){const i=Pb(t,e.x,e.width),s=Pb(n,e.y,e.height);return`${i} ${s}`}const h$={offset:"stroke-dashoffset",array:"stroke-dasharray"},f$={offset:"strokeDashoffset",array:"strokeDasharray"};function p$(e,t,n=1,i=0,s=!0){e.pathLength=1;const r=s?h$:f$;e[r.offset]=st.transform(-i);const o=st.transform(t),a=st.transform(n);e[r.array]=`${o} ${a}`}function Iy(e,{attrX:t,attrY:n,attrScale:i,originX:s,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,d,h){if(jy(e,c,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(s!==void 0||r!==void 0||p.transform)&&(p.transformOrigin=d$(m,s!==void 0?s:.5,r!==void 0?r:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),o!==void 0&&p$(f,o,a,l,!1)}const tC=()=>({...$y(),attrs:{}}),Fy=e=>typeof e=="string"&&e.toLowerCase()==="svg";function m$(e,t,n,i){const s=k.useMemo(()=>{const r=tC();return Iy(r,t,{enableHardwareAcceleration:!1},Fy(i),e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};ZM(r,e.style,e),s.style={...r,...s.style}}return s}function g$(e=!1){return(n,i,s,{latestValues:r},o)=>{const l=(Ny(n)?m$:a$)(i,r,o,n),u={...u$(i,typeof n=="string",e),...l,ref:s},{children:d}=i,h=k.useMemo(()=>un(d)?d.get():d,[d]);return k.createElement(n,{...u,children:h})}}function eC(e,{style:t,vars:n},i,s){Object.assign(e.style,t,s&&s.getProjectionStyles(i));for(const r in n)e.style.setProperty(r,n[r])}const nC=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function iC(e,t,n,i){eC(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(nC.has(s)?s:Ay(s),t.attrs[s])}function By(e,t){const{style:n}=e,i={};for(const s in n)(un(n[s])||t.style&&un(t.style[s])||XM(s,e))&&(i[s]=n[s]);return i}function sC(e,t){const n=By(e,t);for(const i in e)if(un(e[i])||un(t[i])){const s=yc.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[s]=e[i]}return n}function Vy(e,t,n,i={},s={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,i,s)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,i,s)),t}function rC(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const Hd=e=>Array.isArray(e),y$=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),v$=e=>Hd(e)?e[e.length-1]||0:e;function ed(e){const t=un(e)?e.get():e;return y$(t)?t.toValue():t}function x$({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},i,s,r){const o={latestValues:b$(i,s,r,e),renderState:t()};return n&&(o.mount=a=>n(i,a,o)),o}const oC=e=>(t,n)=>{const i=k.useContext(Lh),s=k.useContext(Rh),r=()=>x$(e,t,i,s);return n?r():rC(r)};function b$(e,t,n,i){const s={},r=i(e,{});for(const h in r)s[h]=ed(r[h]);let{initial:o,animate:a}=e;const l=$h(e),c=UM(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;return d&&typeof d!="boolean"&&!jh(d)&&(Array.isArray(d)?d:[d]).forEach(f=>{const p=Vy(e,f);if(!p)return;const{transitionEnd:m,transition:v,...y}=p;for(const g in y){let x=y[g];if(Array.isArray(x)){const _=u?x.length-1:0;x=x[_]}x!==null&&(s[g]=x)}for(const g in m)s[g]=m[g]}),s}const ce=e=>e;class Tb{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function _$(e){let t=new Tb,n=new Tb,i=0,s=!1,r=!1;const o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const d=u&&s,h=d?t:n;return c&&o.add(l),h.add(l)&&d&&s&&(i=t.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(s){r=!0;return}if(s=!0,[t,n]=[n,t],n.clear(),i=t.order.length,i)for(let c=0;c(d[h]=_$(()=>n=!0),d),{}),o=d=>r[d].process(s),a=()=>{const d=performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(d-s.timestamp,w$),1),s.timestamp=d,s.isProcessing=!0,uu.forEach(o),s.isProcessing=!1,n&&t&&(i=!1,e(a))},l=()=>{n=!0,i=!0,s.isProcessing||e(a)};return{schedule:uu.reduce((d,h)=>{const f=r[h];return d[h]=(p,m=!1,v=!1)=>(n||l(),f.schedule(p,m,v)),d},{}),cancel:d=>uu.forEach(h=>r[h].cancel(d)),state:s,steps:r}}const{schedule:zt,cancel:is,state:je,steps:Uf}=k$(typeof requestAnimationFrame<"u"?requestAnimationFrame:ce,!0),S$={useVisualState:oC({scrapeMotionValuesFromProps:sC,createRenderState:tC,onMount:(e,t,{renderState:n,latestValues:i})=>{zt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),zt.render(()=>{Iy(n,i,{enableHardwareAcceleration:!1},Fy(t.tagName),e.transformTemplate),iC(t,n)})}})},M$={useVisualState:oC({scrapeMotionValuesFromProps:By,createRenderState:$y})};function C$(e,{forwardMotionProps:t=!1},n,i){return{...Ny(e)?S$:M$,preloadedFeatures:n,useRender:g$(t),createVisualElement:i,Component:e}}function Hi(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const aC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Fh(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const P$=e=>t=>aC(t)&&e(t,Fh(t));function qi(e,t,n,i){return Hi(e,t,P$(n),i)}const T$=(e,t)=>n=>t(e(n)),Is=(...e)=>e.reduce(T$);function lC(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Db=lC("dragHorizontal"),Eb=lC("dragVertical");function cC(e){let t=!1;if(e==="y")t=Eb();else if(e==="x")t=Db();else{const n=Db(),i=Eb();n&&i?t=()=>{n(),i()}:(n&&n(),i&&i())}return t}function uC(){const e=cC(!0);return e?(e(),!1):!0}class tr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ab(e,t){const n="pointer"+(t?"enter":"leave"),i="onHover"+(t?"Start":"End"),s=(r,o)=>{if(r.pointerType==="touch"||uC())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[i]&&zt.update(()=>a[i](r,o))};return qi(e.current,n,s,{passive:!e.getProps()[i]})}class D$ extends tr{mount(){this.unmount=Is(Ab(this.node,!0),Ab(this.node,!1))}unmount(){}}class E$ extends tr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Is(Hi(this.node.current,"focus",()=>this.onFocus()),Hi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const dC=(e,t)=>t?e===t?!0:dC(e,t.parentElement):!1;function Yf(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Fh(n))}class A$ extends tr{constructor(){super(...arguments),this.removeStartListeners=ce,this.removeEndListeners=ce,this.removeAccessibleListeners=ce,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const i=this.node.getProps(),r=qi(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps();zt.update(()=>{!d&&!dC(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(i.onTap||i.onPointerUp)}),o=qi(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Is(r,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Yf("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&zt.update(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=Hi(this.node.current,"keyup",o),Yf("down",(a,l)=>{this.startPress(a,l)})},n=Hi(this.node.current,"keydown",t),i=()=>{this.isPressing&&Yf("cancel",(r,o)=>this.cancelPress(r,o))},s=Hi(this.node.current,"blur",i);this.removeAccessibleListeners=Is(n,s)}}startPress(t,n){this.isPressing=!0;const{onTapStart:i,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&zt.update(()=>i(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!uC()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&zt.update(()=>i(t,n))}mount(){const t=this.node.getProps(),n=qi(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),i=Hi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Is(n,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Am=new WeakMap,Xf=new WeakMap,O$=e=>{const t=Am.get(e.target);t&&t(e)},L$=e=>{e.forEach(O$)};function R$({root:e,...t}){const n=e||document;Xf.has(n)||Xf.set(n,{});const i=Xf.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(L$,{root:e,...t})),i[s]}function N$(e,t,n){const i=R$(t);return Am.set(e,n),i.observe(e),()=>{Am.delete(e),i.unobserve(e)}}const j$={some:0,all:1};class $$ extends tr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:j$[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return N$(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(I$(t,n))&&this.startObserver()}unmount(){}}function I$({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const F$={inView:{Feature:$$},tap:{Feature:A$},focus:{Feature:E$},hover:{Feature:D$}};function hC(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i