@access-ci/ui 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,7 +37,7 @@
37
37
  `+v[O].replace(" at new "," at ");return s.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",s.displayName)),K}while(1<=O&&0<=H);break}}}finally{ye=!1,Error.prepareStackTrace=f}return(s=s?s.displayName||s.name:"")?J(s):""}function Ee(s){switch(s.tag){case 5:return J(s.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return s=me(s.type,!1),s;case 11:return s=me(s.type.render,!1),s;case 1:return s=me(s.type,!0),s;default:return""}}function De(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case U:return"Fragment";case j:return"Portal";case Y:return"Profiler";case V:return"StrictMode";case se:return"Suspense";case fe:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case X:return(s.displayName||"Context")+".Consumer";case W:return(s._context.displayName||"Context")+".Provider";case q:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case Ae:return l=s.displayName||null,l!==null?l:De(s.type)||"Memo";case le:l=s._payload,s=s._init;try{return De(s(l))}catch{}}return null}function je(s){var l=s.type;switch(s.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=l.render,s=s.displayName||s.name||"",l.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return De(l);case 8:return l===V?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function ze(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Fe(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function $e(s){var l=Fe(s)?"checked":"value",f=Object.getOwnPropertyDescriptor(s.constructor.prototype,l),g=""+s[l];if(!s.hasOwnProperty(l)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var v=f.get,S=f.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return v.call(this)},set:function(O){g=""+O,S.call(this,O)}}),Object.defineProperty(s,l,{enumerable:f.enumerable}),{getValue:function(){return g},setValue:function(O){g=""+O},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function bt(s){s._valueTracker||(s._valueTracker=$e(s))}function tn(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var f=l.getValue(),g="";return s&&(g=Fe(s)?s.checked?"true":"false":s.value),s=g,s!==f?(l.setValue(s),!0):!1}function ct(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Ot(s,l){var f=l.checked;return ce({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??s._wrapperState.initialChecked})}function Sn(s,l){var f=l.defaultValue==null?"":l.defaultValue,g=l.checked!=null?l.checked:l.defaultChecked;f=ze(l.value!=null?l.value:f),s._wrapperState={initialChecked:g,initialValue:f,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function nn(s,l){l=l.checked,l!=null&&D(s,"checked",l,!1)}function _n(s,l){nn(s,l);var f=ze(l.value),g=l.type;if(f!=null)g==="number"?(f===0&&s.value===""||s.value!=f)&&(s.value=""+f):s.value!==""+f&&(s.value=""+f);else if(g==="submit"||g==="reset"){s.removeAttribute("value");return}l.hasOwnProperty("value")?rn(s,l.type,f):l.hasOwnProperty("defaultValue")&&rn(s,l.type,ze(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(s.defaultChecked=!!l.defaultChecked)}function An(s,l,f){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var g=l.type;if(!(g!=="submit"&&g!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+s._wrapperState.initialValue,f||l===s.value||(s.value=l),s.defaultValue=l}f=s.name,f!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,f!==""&&(s.name=f)}function rn(s,l,f){(l!=="number"||ct(s.ownerDocument)!==s)&&(f==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+f&&(s.defaultValue=""+f))}var It=Array.isArray;function Ut(s,l,f,g){if(s=s.options,l){l={};for(var v=0;v<f.length;v++)l["$"+f[v]]=!0;for(f=0;f<s.length;f++)v=l.hasOwnProperty("$"+s[f].value),s[f].selected!==v&&(s[f].selected=v),v&&g&&(s[f].defaultSelected=!0)}else{for(f=""+ze(f),l=null,v=0;v<s.length;v++){if(s[v].value===f){s[v].selected=!0,g&&(s[v].defaultSelected=!0);return}l!==null||s[v].disabled||(l=s[v])}l!==null&&(l.selected=!0)}}function jt(s,l){if(l.dangerouslySetInnerHTML!=null)throw Error(n(91));return ce({},l,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function vt(s,l){var f=l.value;if(f==null){if(f=l.children,l=l.defaultValue,f!=null){if(l!=null)throw Error(n(92));if(It(f)){if(1<f.length)throw Error(n(93));f=f[0]}l=f}l==null&&(l=""),f=l}s._wrapperState={initialValue:ze(f)}}function On(s,l){var f=ze(l.value),g=ze(l.defaultValue);f!=null&&(f=""+f,f!==s.value&&(s.value=f),l.defaultValue==null&&s.defaultValue!==f&&(s.defaultValue=f)),g!=null&&(s.defaultValue=""+g)}function qn(s){var l=s.textContent;l===s._wrapperState.initialValue&&l!==""&&l!==null&&(s.value=l)}function Gn(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Rn(s,l){return s==null||s==="http://www.w3.org/1999/xhtml"?Gn(l):s==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var ln,de=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,f,g,v){MSApp.execUnsafeLocalFunction(function(){return s(l,f,g,v)})}:s}(function(s,l){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=l;else{for(ln=ln||document.createElement("div"),ln.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=ln.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;l.firstChild;)s.appendChild(l.firstChild)}});function Ie(s,l){if(l){var f=s.firstChild;if(f&&f===s.lastChild&&f.nodeType===3){f.nodeValue=l;return}}s.textContent=l}var Qe={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},lt=["Webkit","ms","Moz","O"];Object.keys(Qe).forEach(function(s){lt.forEach(function(l){l=l+s.charAt(0).toUpperCase()+s.substring(1),Qe[l]=Qe[s]})});function ot(s,l,f){return l==null||typeof l=="boolean"||l===""?"":f||typeof l!="number"||l===0||Qe.hasOwnProperty(s)&&Qe[s]?(""+l).trim():l+"px"}function ae(s,l){s=s.style;for(var f in l)if(l.hasOwnProperty(f)){var g=f.indexOf("--")===0,v=ot(f,l[f],g);f==="float"&&(f="cssFloat"),g?s.setProperty(f,v):s[f]=v}}var Be=ce({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 Oe(s,l){if(l){if(Be[s]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(n(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(n(61))}if(l.style!=null&&typeof l.style!="object")throw Error(n(62))}}function tt(s,l){if(s.indexOf("-")===-1)return typeof l.is=="string";switch(s){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 et=null;function Je(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var yt=null,gt=null,at=null;function cn(s){if(s=nc(s)){if(typeof yt!="function")throw Error(n(280));var l=s.stateNode;l&&(l=rd(l),yt(s.stateNode,s.type,l))}}function Ar(s){gt?at?at.push(s):at=[s]:gt=s}function Ln(){if(gt){var s=gt,l=at;if(at=gt=null,cn(s),l)for(s=0;s<l.length;s++)cn(l[s])}}function Xt(s,l){return s(l)}function Yr(){}var gn=!1;function Mr(s,l,f){if(gn)return s(l,f);gn=!0;try{return Xt(s,l,f)}finally{gn=!1,(gt!==null||at!==null)&&(Yr(),Ln())}}function Kr(s,l){var f=s.stateNode;if(f===null)return null;var g=rd(f);if(g===null)return null;f=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(s=s.type,g=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!g;break e;default:s=!1}if(s)return null;if(f&&typeof f!="function")throw Error(n(231,l,typeof f));return f}var Zi=!1;if(c)try{var Si={};Object.defineProperty(Si,"passive",{get:function(){Zi=!0}}),window.addEventListener("test",Si,Si),window.removeEventListener("test",Si,Si)}catch{Zi=!1}function Aa(s,l,f,g,v,S,O,H,K){var oe=Array.prototype.slice.call(arguments,3);try{l.apply(f,oe)}catch(ve){this.onError(ve)}}var Ei=!1,Io=null,Mo=!1,Ci=null,ga={onError:function(s){Ei=!0,Io=s}};function _o(s,l,f,g,v,S,O,H,K){Ei=!1,Io=null,Aa.apply(ga,arguments)}function gs(s,l,f,g,v,S,O,H,K){if(_o.apply(this,arguments),Ei){if(Ei){var oe=Io;Ei=!1,Io=null}else throw Error(n(198));Mo||(Mo=!0,Ci=oe)}}function qr(s){var l=s,f=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(f=l.return),s=l.return;while(s)}return l.tag===3?f:null}function Pi(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function ma(s){if(qr(s)!==s)throw Error(n(188))}function ms(s){var l=s.alternate;if(!l){if(l=qr(s),l===null)throw Error(n(188));return l!==s?null:s}for(var f=s,g=l;;){var v=f.return;if(v===null)break;var S=v.alternate;if(S===null){if(g=v.return,g!==null){f=g;continue}break}if(v.child===S.child){for(S=v.child;S;){if(S===f)return ma(v),s;if(S===g)return ma(v),l;S=S.sibling}throw Error(n(188))}if(f.return!==g.return)f=v,g=S;else{for(var O=!1,H=v.child;H;){if(H===f){O=!0,f=v,g=S;break}if(H===g){O=!0,g=v,f=S;break}H=H.sibling}if(!O){for(H=S.child;H;){if(H===f){O=!0,f=S,g=v;break}if(H===g){O=!0,g=S,f=v;break}H=H.sibling}if(!O)throw Error(n(189))}}if(f.alternate!==g)throw Error(n(190))}if(f.tag!==3)throw Error(n(188));return f.stateNode.current===f?s:l}function $i(s){return s=ms(s),s!==null?Di(s):null}function Di(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var l=Di(s);if(l!==null)return l;s=s.sibling}return null}var eo=e.unstable_scheduleCallback,vs=e.unstable_cancelCallback,va=e.unstable_shouldYield,ya=e.unstable_requestPaint,Et=e.unstable_now,mn=e.unstable_getCurrentPriorityLevel,Oo=e.unstable_ImmediatePriority,Ro=e.unstable_UserBlockingPriority,Bi=e.unstable_NormalPriority,xa=e.unstable_LowPriority,Gr=e.unstable_IdlePriority,gr=null,Fn=null;function to(s){if(Fn&&typeof Fn.onCommitFiberRoot=="function")try{Fn.onCommitFiberRoot(gr,s,void 0,(s.current.flags&128)===128)}catch{}}var on=Math.clz32?Math.clz32:bs,ys=Math.log,xs=Math.LN2;function bs(s){return s>>>=0,s===0?32:31-(ys(s)/xs|0)|0}var Xr=64,no=4194304;function Ti(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Ii(s,l){var f=s.pendingLanes;if(f===0)return 0;var g=0,v=s.suspendedLanes,S=s.pingedLanes,O=f&268435455;if(O!==0){var H=O&~v;H!==0?g=Ti(H):(S&=O,S!==0&&(g=Ti(S)))}else O=f&~v,O!==0?g=Ti(O):S!==0&&(g=Ti(S));if(g===0)return 0;if(l!==0&&l!==g&&(l&v)===0&&(v=g&-g,S=l&-l,v>=S||v===16&&(S&4194240)!==0))return l;if((g&4)!==0&&(g|=f&16),l=s.entangledLanes,l!==0)for(s=s.entanglements,l&=g;0<l;)f=31-on(l),v=1<<f,g|=s[f],l&=~v;return g}function b(s,l){switch(s){case 1:case 2:case 4:return l+250;case 8:case 16:case 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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function T(s,l){for(var f=s.suspendedLanes,g=s.pingedLanes,v=s.expirationTimes,S=s.pendingLanes;0<S;){var O=31-on(S),H=1<<O,K=v[O];K===-1?((H&f)===0||(H&g)!==0)&&(v[O]=b(H,l)):K<=l&&(s.expiredLanes|=H),S&=~H}}function F(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function Q(){var s=Xr;return Xr<<=1,(Xr&4194240)===0&&(Xr=64),s}function ne(s){for(var l=[],f=0;31>f;f++)l.push(s);return l}function Z(s,l,f){s.pendingLanes|=l,l!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,l=31-on(l),s[l]=f}function he(s,l){var f=s.pendingLanes&~l;s.pendingLanes=l,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=l,s.mutableReadLanes&=l,s.entangledLanes&=l,l=s.entanglements;var g=s.eventTimes;for(s=s.expirationTimes;0<f;){var v=31-on(f),S=1<<v;l[v]=0,g[v]=-1,s[v]=-1,f&=~S}}function Se(s,l){var f=s.entangledLanes|=l;for(s=s.entanglements;f;){var g=31-on(f),v=1<<g;v&l|s[g]&l&&(s[g]|=l),f&=~v}}var Pe=0;function Ye(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var Ze,wt,Xn,Jn,En,Jr=!1,Zn=[],$n=null,Cn=null,mr=null,er=new Map,Mi=new Map,_i=[],Ep="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Hu(s,l){switch(s){case"focusin":case"focusout":$n=null;break;case"dragenter":case"dragleave":Cn=null;break;case"mouseover":case"mouseout":mr=null;break;case"pointerover":case"pointerout":er.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mi.delete(l.pointerId)}}function ws(s,l,f,g,v,S){return s===null||s.nativeEvent!==S?(s={blockedOn:l,domEventName:f,eventSystemFlags:g,nativeEvent:S,targetContainers:[v]},l!==null&&(l=nc(l),l!==null&&wt(l)),s):(s.eventSystemFlags|=g,l=s.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),s)}function Cp(s,l,f,g,v){switch(l){case"focusin":return $n=ws($n,s,l,f,g,v),!0;case"dragenter":return Cn=ws(Cn,s,l,f,g,v),!0;case"mouseover":return mr=ws(mr,s,l,f,g,v),!0;case"pointerover":var S=v.pointerId;return er.set(S,ws(er.get(S)||null,s,l,f,g,v)),!0;case"gotpointercapture":return S=v.pointerId,Mi.set(S,ws(Mi.get(S)||null,s,l,f,g,v)),!0}return!1}function _r(s){var l=Ts(s.target);if(l!==null){var f=qr(l);if(f!==null){if(l=f.tag,l===13){if(l=Pi(f),l!==null){s.blockedOn=l,En(s.priority,function(){Xn(f)});return}}else if(l===3&&f.stateNode.current.memoizedState.isDehydrated){s.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Lo(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var f=Ss(s.domEventName,s.eventSystemFlags,l[0],s.nativeEvent);if(f===null){f=s.nativeEvent;var g=new f.constructor(f.type,f);et=g,f.target.dispatchEvent(g),et=null}else return l=nc(f),l!==null&&wt(l),s.blockedOn=f,!1;l.shift()}return!0}function ks(s,l,f){Lo(s)&&f.delete(l)}function kt(){Jr=!1,$n!==null&&Lo($n)&&($n=null),Cn!==null&&Lo(Cn)&&(Cn=null),mr!==null&&Lo(mr)&&(mr=null),er.forEach(ks),Mi.forEach(ks)}function Zr(s,l){s.blockedOn===l&&(s.blockedOn=null,Jr||(Jr=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,kt)))}function Oi(s){function l(v){return Zr(v,s)}if(0<Zn.length){Zr(Zn[0],s);for(var f=1;f<Zn.length;f++){var g=Zn[f];g.blockedOn===s&&(g.blockedOn=null)}}for($n!==null&&Zr($n,s),Cn!==null&&Zr(Cn,s),mr!==null&&Zr(mr,s),er.forEach(l),Mi.forEach(l),f=0;f<_i.length;f++)g=_i[f],g.blockedOn===s&&(g.blockedOn=null);for(;0<_i.length&&(f=_i[0],f.blockedOn===null);)_r(f),f.blockedOn===null&&_i.shift()}var Or=P.ReactCurrentBatchConfig,vr=!0;function ba(s,l,f,g){var v=Pe,S=Or.transition;Or.transition=null;try{Pe=1,wa(s,l,f,g)}finally{Pe=v,Or.transition=S}}function ro(s,l,f,g){var v=Pe,S=Or.transition;Or.transition=null;try{Pe=4,wa(s,l,f,g)}finally{Pe=v,Or.transition=S}}function wa(s,l,f,g){if(vr){var v=Ss(s,l,f,g);if(v===null)Fp(s,l,g,Fo,f),Hu(s,g);else if(Cp(v,s,l,f,g))g.stopPropagation();else if(Hu(s,g),l&4&&-1<Ep.indexOf(s)){for(;v!==null;){var S=nc(v);if(S!==null&&Ze(S),S=Ss(s,l,f,g),S===null&&Fp(s,l,g,Fo,f),S===v)break;v=S}v!==null&&g.stopPropagation()}else Fp(s,l,g,null,f)}}var Fo=null;function Ss(s,l,f,g){if(Fo=null,s=Je(g),s=Ts(s),s!==null)if(l=qr(s),l===null)s=null;else if(f=l.tag,f===13){if(s=Pi(l),s!==null)return s;s=null}else if(f===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null);return Fo=s,null}function zl(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(mn()){case Oo:return 1;case Ro:return 4;case Bi:case xa:return 16;case Gr:return 536870912;default:return 16}default:return 16}}var $r=null,ka=null,Sa=null;function Uu(){if(Sa)return Sa;var s,l=ka,f=l.length,g,v="value"in $r?$r.value:$r.textContent,S=v.length;for(s=0;s<f&&l[s]===v[s];s++);var O=f-s;for(g=1;g<=O&&l[f-g]===v[S-g];g++);return Sa=v.slice(s,1<g?1-g:void 0)}function io(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function Es(){return!0}function Cs(){return!1}function vn(s){function l(f,g,v,S,O){this._reactName=f,this._targetInst=v,this.type=g,this.nativeEvent=S,this.target=O,this.currentTarget=null;for(var H in s)s.hasOwnProperty(H)&&(f=s[H],this[H]=f?f(S):S[H]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?Es:Cs,this.isPropagationStopped=Cs,this}return ce(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=Es)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=Es)},persist:function(){},isPersistent:Es}),l}var No={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=vn(No),Ps=ce({},No,{view:0,detail:0}),Ql=vn(Ps),jo,so,Ri,Ds=ce({},Ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ba,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Ri&&(Ri&&s.type==="mousemove"?(jo=s.screenX-Ri.screenX,so=s.screenY-Ri.screenY):so=jo=0,Ri=s),jo)},movementY:function(s){return"movementY"in s?s.movementY:so}}),Hl=vn(Ds),Vu=ce({},Ds,{dataTransfer:0}),Ul=vn(Vu),Nn=ce({},Ps,{relatedTarget:0}),Ea=vn(Nn),Vl=ce({},No,{animationName:0,elapsedTime:0,pseudoElement:0}),Pp=vn(Vl),Wu=ce({},No,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Ca=vn(Wu),Yu=ce({},No,{data:0}),Wl=vn(Yu),Pa={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Da={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ku={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qu(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=Ku[s])?!!l[s]:!1}function Ba(){return qu}var Yl=ce({},Ps,{key:function(s){if(s.key){var l=Pa[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=io(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Da[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ba,charCode:function(s){return s.type==="keypress"?io(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?io(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Gu=vn(Yl),w=ce({},Ds,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),B=vn(w),R=ce({},Ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ba}),z=vn(R),ie=ce({},No,{propertyName:0,elapsedTime:0,pseudoElement:0}),te=vn(ie),pe=ce({},Ds,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),be=vn(pe),Ve=[9,13,27,32],nt=c&&"CompositionEvent"in window,Ge=null;c&&"documentMode"in document&&(Ge=document.documentMode);var Ct=c&&"TextEvent"in window&&!Ge,Pn=c&&(!nt||Ge&&8<Ge&&11>=Ge),tr=" ",nr=!1;function Bs(s,l){switch(s){case"keyup":return Ve.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kl(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Li=!1;function l5(s,l){switch(s){case"compositionend":return Kl(l);case"keypress":return l.which!==32?null:(nr=!0,tr);case"textInput":return s=l.data,s===tr&&nr?null:s;default:return null}}function c5(s,l){if(Li)return s==="compositionend"||!nt&&Bs(s,l)?(s=Uu(),Sa=ka=$r=null,Li=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Pn&&l.locale!=="ko"?null:l.data;default:return null}}var u5={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function gb(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!u5[s.type]:l==="textarea"}function mb(s,l,f,g){Ar(g),l=ed(l,"onChange"),0<l.length&&(f=new oo("onChange","change",null,f,g),s.push({event:f,listeners:l}))}var ql=null,Gl=null;function d5(s){Rb(s,0)}function Xu(s){var l=Oa(s);if(tn(l))return s}function f5(s,l){if(s==="change")return l}var vb=!1;if(c){var Dp;if(c){var Bp="oninput"in document;if(!Bp){var yb=document.createElement("div");yb.setAttribute("oninput","return;"),Bp=typeof yb.oninput=="function"}Dp=Bp}else Dp=!1;vb=Dp&&(!document.documentMode||9<document.documentMode)}function xb(){ql&&(ql.detachEvent("onpropertychange",bb),Gl=ql=null)}function bb(s){if(s.propertyName==="value"&&Xu(Gl)){var l=[];mb(l,Gl,s,Je(s)),Mr(d5,l)}}function h5(s,l,f){s==="focusin"?(xb(),ql=l,Gl=f,ql.attachEvent("onpropertychange",bb)):s==="focusout"&&xb()}function p5(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Xu(Gl)}function A5(s,l){if(s==="click")return Xu(l)}function g5(s,l){if(s==="input"||s==="change")return Xu(l)}function m5(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var ei=typeof Object.is=="function"?Object.is:m5;function Xl(s,l){if(ei(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var f=Object.keys(s),g=Object.keys(l);if(f.length!==g.length)return!1;for(g=0;g<f.length;g++){var v=f[g];if(!u.call(l,v)||!ei(s[v],l[v]))return!1}return!0}function wb(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function kb(s,l){var f=wb(s);s=0;for(var g;f;){if(f.nodeType===3){if(g=s+f.textContent.length,s<=l&&g>=l)return{node:f,offset:l-s};s=g}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=wb(f)}}function Sb(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?Sb(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function Eb(){for(var s=window,l=ct();l instanceof s.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)s=l.contentWindow;else break;l=ct(s.document)}return l}function Tp(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}function v5(s){var l=Eb(),f=s.focusedElem,g=s.selectionRange;if(l!==f&&f&&f.ownerDocument&&Sb(f.ownerDocument.documentElement,f)){if(g!==null&&Tp(f)){if(l=g.start,s=g.end,s===void 0&&(s=l),"selectionStart"in f)f.selectionStart=l,f.selectionEnd=Math.min(s,f.value.length);else if(s=(l=f.ownerDocument||document)&&l.defaultView||window,s.getSelection){s=s.getSelection();var v=f.textContent.length,S=Math.min(g.start,v);g=g.end===void 0?S:Math.min(g.end,v),!s.extend&&S>g&&(v=g,g=S,S=v),v=kb(f,S);var O=kb(f,g);v&&O&&(s.rangeCount!==1||s.anchorNode!==v.node||s.anchorOffset!==v.offset||s.focusNode!==O.node||s.focusOffset!==O.offset)&&(l=l.createRange(),l.setStart(v.node,v.offset),s.removeAllRanges(),S>g?(s.addRange(l),s.extend(O.node,O.offset)):(l.setEnd(O.node,O.offset),s.addRange(l)))}}for(l=[],s=f;s=s.parentNode;)s.nodeType===1&&l.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<l.length;f++)s=l[f],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var y5=c&&"documentMode"in document&&11>=document.documentMode,Ta=null,Ip=null,Jl=null,Mp=!1;function Cb(s,l,f){var g=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Mp||Ta==null||Ta!==ct(g)||(g=Ta,"selectionStart"in g&&Tp(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Jl&&Xl(Jl,g)||(Jl=g,g=ed(Ip,"onSelect"),0<g.length&&(l=new oo("onSelect","select",null,l,f),s.push({event:l,listeners:g}),l.target=Ta)))}function Ju(s,l){var f={};return f[s.toLowerCase()]=l.toLowerCase(),f["Webkit"+s]="webkit"+l,f["Moz"+s]="moz"+l,f}var Ia={animationend:Ju("Animation","AnimationEnd"),animationiteration:Ju("Animation","AnimationIteration"),animationstart:Ju("Animation","AnimationStart"),transitionend:Ju("Transition","TransitionEnd")},_p={},Pb={};c&&(Pb=document.createElement("div").style,"AnimationEvent"in window||(delete Ia.animationend.animation,delete Ia.animationiteration.animation,delete Ia.animationstart.animation),"TransitionEvent"in window||delete Ia.transitionend.transition);function Zu(s){if(_p[s])return _p[s];if(!Ia[s])return s;var l=Ia[s],f;for(f in l)if(l.hasOwnProperty(f)&&f in Pb)return _p[s]=l[f];return s}var Db=Zu("animationend"),Bb=Zu("animationiteration"),Tb=Zu("animationstart"),Ib=Zu("transitionend"),Mb=new Map,_b="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function zo(s,l){Mb.set(s,l),o(l,[s])}for(var Op=0;Op<_b.length;Op++){var Rp=_b[Op],x5=Rp.toLowerCase(),b5=Rp[0].toUpperCase()+Rp.slice(1);zo(x5,"on"+b5)}zo(Db,"onAnimationEnd"),zo(Bb,"onAnimationIteration"),zo(Tb,"onAnimationStart"),zo("dblclick","onDoubleClick"),zo("focusin","onFocus"),zo("focusout","onBlur"),zo(Ib,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),w5=new Set("cancel close invalid load scroll toggle".split(" ").concat(Zl));function Ob(s,l,f){var g=s.type||"unknown-event";s.currentTarget=f,gs(g,l,void 0,s),s.currentTarget=null}function Rb(s,l){l=(l&4)!==0;for(var f=0;f<s.length;f++){var g=s[f],v=g.event;g=g.listeners;e:{var S=void 0;if(l)for(var O=g.length-1;0<=O;O--){var H=g[O],K=H.instance,oe=H.currentTarget;if(H=H.listener,K!==S&&v.isPropagationStopped())break e;Ob(v,H,oe),S=K}else for(O=0;O<g.length;O++){if(H=g[O],K=H.instance,oe=H.currentTarget,H=H.listener,K!==S&&v.isPropagationStopped())break e;Ob(v,H,oe),S=K}}}if(Mo)throw s=Ci,Mo=!1,Ci=null,s}function Mt(s,l){var f=l[Up];f===void 0&&(f=l[Up]=new Set);var g=s+"__bubble";f.has(g)||(Lb(l,s,2,!1),f.add(g))}function Lp(s,l,f){var g=0;l&&(g|=4),Lb(f,s,g,l)}var $u="_reactListening"+Math.random().toString(36).slice(2);function $l(s){if(!s[$u]){s[$u]=!0,r.forEach(function(f){f!=="selectionchange"&&(w5.has(f)||Lp(f,!1,s),Lp(f,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[$u]||(l[$u]=!0,Lp("selectionchange",!1,l))}}function Lb(s,l,f,g){switch(zl(l)){case 1:var v=ba;break;case 4:v=ro;break;default:v=wa}f=v.bind(null,l,f,s),v=void 0,!Zi||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),g?v!==void 0?s.addEventListener(l,f,{capture:!0,passive:v}):s.addEventListener(l,f,!0):v!==void 0?s.addEventListener(l,f,{passive:v}):s.addEventListener(l,f,!1)}function Fp(s,l,f,g,v){var S=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var O=g.tag;if(O===3||O===4){var H=g.stateNode.containerInfo;if(H===v||H.nodeType===8&&H.parentNode===v)break;if(O===4)for(O=g.return;O!==null;){var K=O.tag;if((K===3||K===4)&&(K=O.stateNode.containerInfo,K===v||K.nodeType===8&&K.parentNode===v))return;O=O.return}for(;H!==null;){if(O=Ts(H),O===null)return;if(K=O.tag,K===5||K===6){g=S=O;continue e}H=H.parentNode}}g=g.return}Mr(function(){var oe=S,ve=Je(f),xe=[];e:{var ge=Mb.get(s);if(ge!==void 0){var Te=oo,_e=s;switch(s){case"keypress":if(io(f)===0)break e;case"keydown":case"keyup":Te=Gu;break;case"focusin":_e="focus",Te=Ea;break;case"focusout":_e="blur",Te=Ea;break;case"beforeblur":case"afterblur":Te=Ea;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=Hl;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=Ul;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=z;break;case Db:case Bb:case Tb:Te=Pp;break;case Ib:Te=te;break;case"scroll":Te=Ql;break;case"wheel":Te=be;break;case"copy":case"cut":case"paste":Te=Ca;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=B}var Le=(l&4)!==0,Wt=!Le&&s==="scroll",ee=Le?ge!==null?ge+"Capture":null:ge;Le=[];for(var G=oe,re;G!==null;){re=G;var ke=re.stateNode;if(re.tag===5&&ke!==null&&(re=ke,ee!==null&&(ke=Kr(G,ee),ke!=null&&Le.push(ec(G,ke,re)))),Wt)break;G=G.return}0<Le.length&&(ge=new Te(ge,_e,null,f,ve),xe.push({event:ge,listeners:Le}))}}if((l&7)===0){e:{if(ge=s==="mouseover"||s==="pointerover",Te=s==="mouseout"||s==="pointerout",ge&&f!==et&&(_e=f.relatedTarget||f.fromElement)&&(Ts(_e)||_e[ao]))break e;if((Te||ge)&&(ge=ve.window===ve?ve:(ge=ve.ownerDocument)?ge.defaultView||ge.parentWindow:window,Te?(_e=f.relatedTarget||f.toElement,Te=oe,_e=_e?Ts(_e):null,_e!==null&&(Wt=qr(_e),_e!==Wt||_e.tag!==5&&_e.tag!==6)&&(_e=null)):(Te=null,_e=oe),Te!==_e)){if(Le=Hl,ke="onMouseLeave",ee="onMouseEnter",G="mouse",(s==="pointerout"||s==="pointerover")&&(Le=B,ke="onPointerLeave",ee="onPointerEnter",G="pointer"),Wt=Te==null?ge:Oa(Te),re=_e==null?ge:Oa(_e),ge=new Le(ke,G+"leave",Te,f,ve),ge.target=Wt,ge.relatedTarget=re,ke=null,Ts(ve)===oe&&(Le=new Le(ee,G+"enter",_e,f,ve),Le.target=re,Le.relatedTarget=Wt,ke=Le),Wt=ke,Te&&_e)t:{for(Le=Te,ee=_e,G=0,re=Le;re;re=Ma(re))G++;for(re=0,ke=ee;ke;ke=Ma(ke))re++;for(;0<G-re;)Le=Ma(Le),G--;for(;0<re-G;)ee=Ma(ee),re--;for(;G--;){if(Le===ee||ee!==null&&Le===ee.alternate)break t;Le=Ma(Le),ee=Ma(ee)}Le=null}else Le=null;Te!==null&&Fb(xe,ge,Te,Le,!1),_e!==null&&Wt!==null&&Fb(xe,Wt,_e,Le,!0)}}e:{if(ge=oe?Oa(oe):window,Te=ge.nodeName&&ge.nodeName.toLowerCase(),Te==="select"||Te==="input"&&ge.type==="file")var Ne=f5;else if(gb(ge))if(vb)Ne=g5;else{Ne=p5;var He=h5}else(Te=ge.nodeName)&&Te.toLowerCase()==="input"&&(ge.type==="checkbox"||ge.type==="radio")&&(Ne=A5);if(Ne&&(Ne=Ne(s,oe))){mb(xe,Ne,f,ve);break e}He&&He(s,ge,oe),s==="focusout"&&(He=ge._wrapperState)&&He.controlled&&ge.type==="number"&&rn(ge,"number",ge.value)}switch(He=oe?Oa(oe):window,s){case"focusin":(gb(He)||He.contentEditable==="true")&&(Ta=He,Ip=oe,Jl=null);break;case"focusout":Jl=Ip=Ta=null;break;case"mousedown":Mp=!0;break;case"contextmenu":case"mouseup":case"dragend":Mp=!1,Cb(xe,f,ve);break;case"selectionchange":if(y5)break;case"keydown":case"keyup":Cb(xe,f,ve)}var Ue;if(nt)e:{switch(s){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else Li?Bs(s,f)&&(Xe="onCompositionEnd"):s==="keydown"&&f.keyCode===229&&(Xe="onCompositionStart");Xe&&(Pn&&f.locale!=="ko"&&(Li||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&Li&&(Ue=Uu()):($r=ve,ka="value"in $r?$r.value:$r.textContent,Li=!0)),He=ed(oe,Xe),0<He.length&&(Xe=new Wl(Xe,s,null,f,ve),xe.push({event:Xe,listeners:He}),Ue?Xe.data=Ue:(Ue=Kl(f),Ue!==null&&(Xe.data=Ue)))),(Ue=Ct?l5(s,f):c5(s,f))&&(oe=ed(oe,"onBeforeInput"),0<oe.length&&(ve=new Wl("onBeforeInput","beforeinput",null,f,ve),xe.push({event:ve,listeners:oe}),ve.data=Ue))}Rb(xe,l)})}function ec(s,l,f){return{instance:s,listener:l,currentTarget:f}}function ed(s,l){for(var f=l+"Capture",g=[];s!==null;){var v=s,S=v.stateNode;v.tag===5&&S!==null&&(v=S,S=Kr(s,f),S!=null&&g.unshift(ec(s,S,v)),S=Kr(s,l),S!=null&&g.push(ec(s,S,v))),s=s.return}return g}function Ma(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function Fb(s,l,f,g,v){for(var S=l._reactName,O=[];f!==null&&f!==g;){var H=f,K=H.alternate,oe=H.stateNode;if(K!==null&&K===g)break;H.tag===5&&oe!==null&&(H=oe,v?(K=Kr(f,S),K!=null&&O.unshift(ec(f,K,H))):v||(K=Kr(f,S),K!=null&&O.push(ec(f,K,H)))),f=f.return}O.length!==0&&s.push({event:l,listeners:O})}var k5=/\r\n?/g,S5=/\u0000|\uFFFD/g;function Nb(s){return(typeof s=="string"?s:""+s).replace(k5,`
38
38
  `).replace(S5,"")}function td(s,l,f){if(l=Nb(l),Nb(s)!==l&&f)throw Error(n(425))}function nd(){}var Np=null,jp=null;function zp(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Qp=typeof setTimeout=="function"?setTimeout:void 0,E5=typeof clearTimeout=="function"?clearTimeout:void 0,jb=typeof Promise=="function"?Promise:void 0,C5=typeof queueMicrotask=="function"?queueMicrotask:typeof jb<"u"?function(s){return jb.resolve(null).then(s).catch(P5)}:Qp;function P5(s){setTimeout(function(){throw s})}function Hp(s,l){var f=l,g=0;do{var v=f.nextSibling;if(s.removeChild(f),v&&v.nodeType===8)if(f=v.data,f==="/$"){if(g===0){s.removeChild(v),Oi(l);return}g--}else f!=="$"&&f!=="$?"&&f!=="$!"||g++;f=v}while(f);Oi(l)}function Qo(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return s}function zb(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var f=s.data;if(f==="$"||f==="$!"||f==="$?"){if(l===0)return s;l--}else f==="/$"&&l++}s=s.previousSibling}return null}var _a=Math.random().toString(36).slice(2),Fi="__reactFiber$"+_a,tc="__reactProps$"+_a,ao="__reactContainer$"+_a,Up="__reactEvents$"+_a,D5="__reactListeners$"+_a,B5="__reactHandles$"+_a;function Ts(s){var l=s[Fi];if(l)return l;for(var f=s.parentNode;f;){if(l=f[ao]||f[Fi]){if(f=l.alternate,l.child!==null||f!==null&&f.child!==null)for(s=zb(s);s!==null;){if(f=s[Fi])return f;s=zb(s)}return l}s=f,f=s.parentNode}return null}function nc(s){return s=s[Fi]||s[ao],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Oa(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function rd(s){return s[tc]||null}var Vp=[],Ra=-1;function Ho(s){return{current:s}}function _t(s){0>Ra||(s.current=Vp[Ra],Vp[Ra]=null,Ra--)}function Bt(s,l){Ra++,Vp[Ra]=s.current,s.current=l}var Uo={},Dn=Ho(Uo),rr=Ho(!1),Is=Uo;function La(s,l){var f=s.type.contextTypes;if(!f)return Uo;var g=s.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===l)return g.__reactInternalMemoizedMaskedChildContext;var v={},S;for(S in f)v[S]=l[S];return g&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=l,s.__reactInternalMemoizedMaskedChildContext=v),v}function ir(s){return s=s.childContextTypes,s!=null}function id(){_t(rr),_t(Dn)}function Qb(s,l,f){if(Dn.current!==Uo)throw Error(n(168));Bt(Dn,l),Bt(rr,f)}function Hb(s,l,f){var g=s.stateNode;if(l=l.childContextTypes,typeof g.getChildContext!="function")return f;g=g.getChildContext();for(var v in g)if(!(v in l))throw Error(n(108,je(s)||"Unknown",v));return ce({},f,g)}function od(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Uo,Is=Dn.current,Bt(Dn,s),Bt(rr,rr.current),!0}function Ub(s,l,f){var g=s.stateNode;if(!g)throw Error(n(169));f?(s=Hb(s,l,Is),g.__reactInternalMemoizedMergedChildContext=s,_t(rr),_t(Dn),Bt(Dn,s)):_t(rr),Bt(rr,f)}var lo=null,sd=!1,Wp=!1;function Vb(s){lo===null?lo=[s]:lo.push(s)}function T5(s){sd=!0,Vb(s)}function Vo(){if(!Wp&&lo!==null){Wp=!0;var s=0,l=Pe;try{var f=lo;for(Pe=1;s<f.length;s++){var g=f[s];do g=g(!0);while(g!==null)}lo=null,sd=!1}catch(v){throw lo!==null&&(lo=lo.slice(s+1)),eo(Oo,Vo),v}finally{Pe=l,Wp=!1}}return null}var Fa=[],Na=0,ad=null,ld=0,Rr=[],Lr=0,Ms=null,co=1,uo="";function _s(s,l){Fa[Na++]=ld,Fa[Na++]=ad,ad=s,ld=l}function Wb(s,l,f){Rr[Lr++]=co,Rr[Lr++]=uo,Rr[Lr++]=Ms,Ms=s;var g=co;s=uo;var v=32-on(g)-1;g&=~(1<<v),f+=1;var S=32-on(l)+v;if(30<S){var O=v-v%5;S=(g&(1<<O)-1).toString(32),g>>=O,v-=O,co=1<<32-on(l)+v|f<<v|g,uo=S+s}else co=1<<S|f<<v|g,uo=s}function Yp(s){s.return!==null&&(_s(s,1),Wb(s,1,0))}function Kp(s){for(;s===ad;)ad=Fa[--Na],Fa[Na]=null,ld=Fa[--Na],Fa[Na]=null;for(;s===Ms;)Ms=Rr[--Lr],Rr[Lr]=null,uo=Rr[--Lr],Rr[Lr]=null,co=Rr[--Lr],Rr[Lr]=null}var yr=null,xr=null,Rt=!1,ti=null;function Yb(s,l){var f=zr(5,null,null,0);f.elementType="DELETED",f.stateNode=l,f.return=s,l=s.deletions,l===null?(s.deletions=[f],s.flags|=16):l.push(f)}function Kb(s,l){switch(s.tag){case 5:var f=s.type;return l=l.nodeType!==1||f.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(s.stateNode=l,yr=s,xr=Qo(l.firstChild),!0):!1;case 6:return l=s.pendingProps===""||l.nodeType!==3?null:l,l!==null?(s.stateNode=l,yr=s,xr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(f=Ms!==null?{id:co,overflow:uo}:null,s.memoizedState={dehydrated:l,treeContext:f,retryLane:1073741824},f=zr(18,null,null,0),f.stateNode=l,f.return=s,s.child=f,yr=s,xr=null,!0):!1;default:return!1}}function qp(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Gp(s){if(Rt){var l=xr;if(l){var f=l;if(!Kb(s,l)){if(qp(s))throw Error(n(418));l=Qo(f.nextSibling);var g=yr;l&&Kb(s,l)?Yb(g,f):(s.flags=s.flags&-4097|2,Rt=!1,yr=s)}}else{if(qp(s))throw Error(n(418));s.flags=s.flags&-4097|2,Rt=!1,yr=s}}}function qb(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;yr=s}function cd(s){if(s!==yr)return!1;if(!Rt)return qb(s),Rt=!0,!1;var l;if((l=s.tag!==3)&&!(l=s.tag!==5)&&(l=s.type,l=l!=="head"&&l!=="body"&&!zp(s.type,s.memoizedProps)),l&&(l=xr)){if(qp(s))throw Gb(),Error(n(418));for(;l;)Yb(s,l),l=Qo(l.nextSibling)}if(qb(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,l=0;s;){if(s.nodeType===8){var f=s.data;if(f==="/$"){if(l===0){xr=Qo(s.nextSibling);break e}l--}else f!=="$"&&f!=="$!"&&f!=="$?"||l++}s=s.nextSibling}xr=null}}else xr=yr?Qo(s.stateNode.nextSibling):null;return!0}function Gb(){for(var s=xr;s;)s=Qo(s.nextSibling)}function ja(){xr=yr=null,Rt=!1}function Xp(s){ti===null?ti=[s]:ti.push(s)}var I5=P.ReactCurrentBatchConfig;function rc(s,l,f){if(s=f.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(f._owner){if(f=f._owner,f){if(f.tag!==1)throw Error(n(309));var g=f.stateNode}if(!g)throw Error(n(147,s));var v=g,S=""+s;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===S?l.ref:(l=function(O){var H=v.refs;O===null?delete H[S]:H[S]=O},l._stringRef=S,l)}if(typeof s!="string")throw Error(n(284));if(!f._owner)throw Error(n(290,s))}return s}function ud(s,l){throw s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s))}function Xb(s){var l=s._init;return l(s._payload)}function Jb(s){function l(ee,G){if(s){var re=ee.deletions;re===null?(ee.deletions=[G],ee.flags|=16):re.push(G)}}function f(ee,G){if(!s)return null;for(;G!==null;)l(ee,G),G=G.sibling;return null}function g(ee,G){for(ee=new Map;G!==null;)G.key!==null?ee.set(G.key,G):ee.set(G.index,G),G=G.sibling;return ee}function v(ee,G){return ee=Zo(ee,G),ee.index=0,ee.sibling=null,ee}function S(ee,G,re){return ee.index=re,s?(re=ee.alternate,re!==null?(re=re.index,re<G?(ee.flags|=2,G):re):(ee.flags|=2,G)):(ee.flags|=1048576,G)}function O(ee){return s&&ee.alternate===null&&(ee.flags|=2),ee}function H(ee,G,re,ke){return G===null||G.tag!==6?(G=QA(re,ee.mode,ke),G.return=ee,G):(G=v(G,re),G.return=ee,G)}function K(ee,G,re,ke){var Ne=re.type;return Ne===U?ve(ee,G,re.props.children,ke,re.key):G!==null&&(G.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===le&&Xb(Ne)===G.type)?(ke=v(G,re.props),ke.ref=rc(ee,G,re),ke.return=ee,ke):(ke=Od(re.type,re.key,re.props,null,ee.mode,ke),ke.ref=rc(ee,G,re),ke.return=ee,ke)}function oe(ee,G,re,ke){return G===null||G.tag!==4||G.stateNode.containerInfo!==re.containerInfo||G.stateNode.implementation!==re.implementation?(G=HA(re,ee.mode,ke),G.return=ee,G):(G=v(G,re.children||[]),G.return=ee,G)}function ve(ee,G,re,ke,Ne){return G===null||G.tag!==7?(G=Qs(re,ee.mode,ke,Ne),G.return=ee,G):(G=v(G,re),G.return=ee,G)}function xe(ee,G,re){if(typeof G=="string"&&G!==""||typeof G=="number")return G=QA(""+G,ee.mode,re),G.return=ee,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case N:return re=Od(G.type,G.key,G.props,null,ee.mode,re),re.ref=rc(ee,null,G),re.return=ee,re;case j:return G=HA(G,ee.mode,re),G.return=ee,G;case le:var ke=G._init;return xe(ee,ke(G._payload),re)}if(It(G)||L(G))return G=Qs(G,ee.mode,re,null),G.return=ee,G;ud(ee,G)}return null}function ge(ee,G,re,ke){var Ne=G!==null?G.key:null;if(typeof re=="string"&&re!==""||typeof re=="number")return Ne!==null?null:H(ee,G,""+re,ke);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case N:return re.key===Ne?K(ee,G,re,ke):null;case j:return re.key===Ne?oe(ee,G,re,ke):null;case le:return Ne=re._init,ge(ee,G,Ne(re._payload),ke)}if(It(re)||L(re))return Ne!==null?null:ve(ee,G,re,ke,null);ud(ee,re)}return null}function Te(ee,G,re,ke,Ne){if(typeof ke=="string"&&ke!==""||typeof ke=="number")return ee=ee.get(re)||null,H(G,ee,""+ke,Ne);if(typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case N:return ee=ee.get(ke.key===null?re:ke.key)||null,K(G,ee,ke,Ne);case j:return ee=ee.get(ke.key===null?re:ke.key)||null,oe(G,ee,ke,Ne);case le:var He=ke._init;return Te(ee,G,re,He(ke._payload),Ne)}if(It(ke)||L(ke))return ee=ee.get(re)||null,ve(G,ee,ke,Ne,null);ud(G,ke)}return null}function _e(ee,G,re,ke){for(var Ne=null,He=null,Ue=G,Xe=G=0,fn=null;Ue!==null&&Xe<re.length;Xe++){Ue.index>Xe?(fn=Ue,Ue=null):fn=Ue.sibling;var pt=ge(ee,Ue,re[Xe],ke);if(pt===null){Ue===null&&(Ue=fn);break}s&&Ue&&pt.alternate===null&&l(ee,Ue),G=S(pt,G,Xe),He===null?Ne=pt:He.sibling=pt,He=pt,Ue=fn}if(Xe===re.length)return f(ee,Ue),Rt&&_s(ee,Xe),Ne;if(Ue===null){for(;Xe<re.length;Xe++)Ue=xe(ee,re[Xe],ke),Ue!==null&&(G=S(Ue,G,Xe),He===null?Ne=Ue:He.sibling=Ue,He=Ue);return Rt&&_s(ee,Xe),Ne}for(Ue=g(ee,Ue);Xe<re.length;Xe++)fn=Te(Ue,ee,Xe,re[Xe],ke),fn!==null&&(s&&fn.alternate!==null&&Ue.delete(fn.key===null?Xe:fn.key),G=S(fn,G,Xe),He===null?Ne=fn:He.sibling=fn,He=fn);return s&&Ue.forEach(function($o){return l(ee,$o)}),Rt&&_s(ee,Xe),Ne}function Le(ee,G,re,ke){var Ne=L(re);if(typeof Ne!="function")throw Error(n(150));if(re=Ne.call(re),re==null)throw Error(n(151));for(var He=Ne=null,Ue=G,Xe=G=0,fn=null,pt=re.next();Ue!==null&&!pt.done;Xe++,pt=re.next()){Ue.index>Xe?(fn=Ue,Ue=null):fn=Ue.sibling;var $o=ge(ee,Ue,pt.value,ke);if($o===null){Ue===null&&(Ue=fn);break}s&&Ue&&$o.alternate===null&&l(ee,Ue),G=S($o,G,Xe),He===null?Ne=$o:He.sibling=$o,He=$o,Ue=fn}if(pt.done)return f(ee,Ue),Rt&&_s(ee,Xe),Ne;if(Ue===null){for(;!pt.done;Xe++,pt=re.next())pt=xe(ee,pt.value,ke),pt!==null&&(G=S(pt,G,Xe),He===null?Ne=pt:He.sibling=pt,He=pt);return Rt&&_s(ee,Xe),Ne}for(Ue=g(ee,Ue);!pt.done;Xe++,pt=re.next())pt=Te(Ue,ee,Xe,pt.value,ke),pt!==null&&(s&&pt.alternate!==null&&Ue.delete(pt.key===null?Xe:pt.key),G=S(pt,G,Xe),He===null?Ne=pt:He.sibling=pt,He=pt);return s&&Ue.forEach(function(uM){return l(ee,uM)}),Rt&&_s(ee,Xe),Ne}function Wt(ee,G,re,ke){if(typeof re=="object"&&re!==null&&re.type===U&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case N:e:{for(var Ne=re.key,He=G;He!==null;){if(He.key===Ne){if(Ne=re.type,Ne===U){if(He.tag===7){f(ee,He.sibling),G=v(He,re.props.children),G.return=ee,ee=G;break e}}else if(He.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===le&&Xb(Ne)===He.type){f(ee,He.sibling),G=v(He,re.props),G.ref=rc(ee,He,re),G.return=ee,ee=G;break e}f(ee,He);break}else l(ee,He);He=He.sibling}re.type===U?(G=Qs(re.props.children,ee.mode,ke,re.key),G.return=ee,ee=G):(ke=Od(re.type,re.key,re.props,null,ee.mode,ke),ke.ref=rc(ee,G,re),ke.return=ee,ee=ke)}return O(ee);case j:e:{for(He=re.key;G!==null;){if(G.key===He)if(G.tag===4&&G.stateNode.containerInfo===re.containerInfo&&G.stateNode.implementation===re.implementation){f(ee,G.sibling),G=v(G,re.children||[]),G.return=ee,ee=G;break e}else{f(ee,G);break}else l(ee,G);G=G.sibling}G=HA(re,ee.mode,ke),G.return=ee,ee=G}return O(ee);case le:return He=re._init,Wt(ee,G,He(re._payload),ke)}if(It(re))return _e(ee,G,re,ke);if(L(re))return Le(ee,G,re,ke);ud(ee,re)}return typeof re=="string"&&re!==""||typeof re=="number"?(re=""+re,G!==null&&G.tag===6?(f(ee,G.sibling),G=v(G,re),G.return=ee,ee=G):(f(ee,G),G=QA(re,ee.mode,ke),G.return=ee,ee=G),O(ee)):f(ee,G)}return Wt}var za=Jb(!0),Zb=Jb(!1),dd=Ho(null),fd=null,Qa=null,Jp=null;function Zp(){Jp=Qa=fd=null}function $p(s){var l=dd.current;_t(dd),s._currentValue=l}function eA(s,l,f){for(;s!==null;){var g=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),s===f)break;s=s.return}}function Ha(s,l){fd=s,Jp=Qa=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&l)!==0&&(or=!0),s.firstContext=null)}function Fr(s){var l=s._currentValue;if(Jp!==s)if(s={context:s,memoizedValue:l,next:null},Qa===null){if(fd===null)throw Error(n(308));Qa=s,fd.dependencies={lanes:0,firstContext:s}}else Qa=Qa.next=s;return l}var Os=null;function tA(s){Os===null?Os=[s]:Os.push(s)}function $b(s,l,f,g){var v=l.interleaved;return v===null?(f.next=f,tA(l)):(f.next=v.next,v.next=f),l.interleaved=f,fo(s,g)}function fo(s,l){s.lanes|=l;var f=s.alternate;for(f!==null&&(f.lanes|=l),f=s,s=s.return;s!==null;)s.childLanes|=l,f=s.alternate,f!==null&&(f.childLanes|=l),f=s,s=s.return;return f.tag===3?f.stateNode:null}var Wo=!1;function nA(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ew(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function ho(s,l){return{eventTime:s,lane:l,tag:0,payload:null,callback:null,next:null}}function Yo(s,l,f){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(ft&2)!==0){var v=g.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),g.pending=l,fo(s,f)}return v=g.interleaved,v===null?(l.next=l,tA(g)):(l.next=v.next,v.next=l),g.interleaved=l,fo(s,f)}function hd(s,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194240)!==0)){var g=l.lanes;g&=s.pendingLanes,f|=g,l.lanes=f,Se(s,f)}}function tw(s,l){var f=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,f===g)){var v=null,S=null;if(f=f.firstBaseUpdate,f!==null){do{var O={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};S===null?v=S=O:S=S.next=O,f=f.next}while(f!==null);S===null?v=S=l:S=S.next=l}else v=S=l;f={baseState:g.baseState,firstBaseUpdate:v,lastBaseUpdate:S,shared:g.shared,effects:g.effects},s.updateQueue=f;return}s=f.lastBaseUpdate,s===null?f.firstBaseUpdate=l:s.next=l,f.lastBaseUpdate=l}function pd(s,l,f,g){var v=s.updateQueue;Wo=!1;var S=v.firstBaseUpdate,O=v.lastBaseUpdate,H=v.shared.pending;if(H!==null){v.shared.pending=null;var K=H,oe=K.next;K.next=null,O===null?S=oe:O.next=oe,O=K;var ve=s.alternate;ve!==null&&(ve=ve.updateQueue,H=ve.lastBaseUpdate,H!==O&&(H===null?ve.firstBaseUpdate=oe:H.next=oe,ve.lastBaseUpdate=K))}if(S!==null){var xe=v.baseState;O=0,ve=oe=K=null,H=S;do{var ge=H.lane,Te=H.eventTime;if((g&ge)===ge){ve!==null&&(ve=ve.next={eventTime:Te,lane:0,tag:H.tag,payload:H.payload,callback:H.callback,next:null});e:{var _e=s,Le=H;switch(ge=l,Te=f,Le.tag){case 1:if(_e=Le.payload,typeof _e=="function"){xe=_e.call(Te,xe,ge);break e}xe=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Le.payload,ge=typeof _e=="function"?_e.call(Te,xe,ge):_e,ge==null)break e;xe=ce({},xe,ge);break e;case 2:Wo=!0}}H.callback!==null&&H.lane!==0&&(s.flags|=64,ge=v.effects,ge===null?v.effects=[H]:ge.push(H))}else Te={eventTime:Te,lane:ge,tag:H.tag,payload:H.payload,callback:H.callback,next:null},ve===null?(oe=ve=Te,K=xe):ve=ve.next=Te,O|=ge;if(H=H.next,H===null){if(H=v.shared.pending,H===null)break;ge=H,H=ge.next,ge.next=null,v.lastBaseUpdate=ge,v.shared.pending=null}}while(!0);if(ve===null&&(K=xe),v.baseState=K,v.firstBaseUpdate=oe,v.lastBaseUpdate=ve,l=v.shared.interleaved,l!==null){v=l;do O|=v.lane,v=v.next;while(v!==l)}else S===null&&(v.shared.lanes=0);Fs|=O,s.lanes=O,s.memoizedState=xe}}function nw(s,l,f){if(s=l.effects,l.effects=null,s!==null)for(l=0;l<s.length;l++){var g=s[l],v=g.callback;if(v!==null){if(g.callback=null,g=f,typeof v!="function")throw Error(n(191,v));v.call(g)}}}var ic={},Ni=Ho(ic),oc=Ho(ic),sc=Ho(ic);function Rs(s){if(s===ic)throw Error(n(174));return s}function rA(s,l){switch(Bt(sc,l),Bt(oc,s),Bt(Ni,ic),s=l.nodeType,s){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:Rn(null,"");break;default:s=s===8?l.parentNode:l,l=s.namespaceURI||null,s=s.tagName,l=Rn(l,s)}_t(Ni),Bt(Ni,l)}function Ua(){_t(Ni),_t(oc),_t(sc)}function rw(s){Rs(sc.current);var l=Rs(Ni.current),f=Rn(l,s.type);l!==f&&(Bt(oc,s),Bt(Ni,f))}function iA(s){oc.current===s&&(_t(Ni),_t(oc))}var zt=Ho(0);function Ad(s){for(var l=s;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var oA=[];function sA(){for(var s=0;s<oA.length;s++)oA[s]._workInProgressVersionPrimary=null;oA.length=0}var gd=P.ReactCurrentDispatcher,aA=P.ReactCurrentBatchConfig,Ls=0,Qt=null,sn=null,un=null,md=!1,ac=!1,lc=0,M5=0;function Bn(){throw Error(n(321))}function lA(s,l){if(l===null)return!1;for(var f=0;f<l.length&&f<s.length;f++)if(!ei(s[f],l[f]))return!1;return!0}function cA(s,l,f,g,v,S){if(Ls=S,Qt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,gd.current=s===null||s.memoizedState===null?L5:F5,s=f(g,v),ac){S=0;do{if(ac=!1,lc=0,25<=S)throw Error(n(301));S+=1,un=sn=null,l.updateQueue=null,gd.current=N5,s=f(g,v)}while(ac)}if(gd.current=xd,l=sn!==null&&sn.next!==null,Ls=0,un=sn=Qt=null,md=!1,l)throw Error(n(300));return s}function uA(){var s=lc!==0;return lc=0,s}function ji(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?Qt.memoizedState=un=s:un=un.next=s,un}function Nr(){if(sn===null){var s=Qt.alternate;s=s!==null?s.memoizedState:null}else s=sn.next;var l=un===null?Qt.memoizedState:un.next;if(l!==null)un=l,sn=s;else{if(s===null)throw Error(n(310));sn=s,s={memoizedState:sn.memoizedState,baseState:sn.baseState,baseQueue:sn.baseQueue,queue:sn.queue,next:null},un===null?Qt.memoizedState=un=s:un=un.next=s}return un}function cc(s,l){return typeof l=="function"?l(s):l}function dA(s){var l=Nr(),f=l.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=s;var g=sn,v=g.baseQueue,S=f.pending;if(S!==null){if(v!==null){var O=v.next;v.next=S.next,S.next=O}g.baseQueue=v=S,f.pending=null}if(v!==null){S=v.next,g=g.baseState;var H=O=null,K=null,oe=S;do{var ve=oe.lane;if((Ls&ve)===ve)K!==null&&(K=K.next={lane:0,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),g=oe.hasEagerState?oe.eagerState:s(g,oe.action);else{var xe={lane:ve,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null};K===null?(H=K=xe,O=g):K=K.next=xe,Qt.lanes|=ve,Fs|=ve}oe=oe.next}while(oe!==null&&oe!==S);K===null?O=g:K.next=H,ei(g,l.memoizedState)||(or=!0),l.memoizedState=g,l.baseState=O,l.baseQueue=K,f.lastRenderedState=g}if(s=f.interleaved,s!==null){v=s;do S=v.lane,Qt.lanes|=S,Fs|=S,v=v.next;while(v!==s)}else v===null&&(f.lanes=0);return[l.memoizedState,f.dispatch]}function fA(s){var l=Nr(),f=l.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=s;var g=f.dispatch,v=f.pending,S=l.memoizedState;if(v!==null){f.pending=null;var O=v=v.next;do S=s(S,O.action),O=O.next;while(O!==v);ei(S,l.memoizedState)||(or=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),f.lastRenderedState=S}return[S,g]}function iw(){}function ow(s,l){var f=Qt,g=Nr(),v=l(),S=!ei(g.memoizedState,v);if(S&&(g.memoizedState=v,or=!0),g=g.queue,hA(lw.bind(null,f,g,s),[s]),g.getSnapshot!==l||S||un!==null&&un.memoizedState.tag&1){if(f.flags|=2048,uc(9,aw.bind(null,f,g,v,l),void 0,null),dn===null)throw Error(n(349));(Ls&30)!==0||sw(f,l,v)}return v}function sw(s,l,f){s.flags|=16384,s={getSnapshot:l,value:f},l=Qt.updateQueue,l===null?(l={lastEffect:null,stores:null},Qt.updateQueue=l,l.stores=[s]):(f=l.stores,f===null?l.stores=[s]:f.push(s))}function aw(s,l,f,g){l.value=f,l.getSnapshot=g,cw(l)&&uw(s)}function lw(s,l,f){return f(function(){cw(l)&&uw(s)})}function cw(s){var l=s.getSnapshot;s=s.value;try{var f=l();return!ei(s,f)}catch{return!0}}function uw(s){var l=fo(s,1);l!==null&&oi(l,s,1,-1)}function dw(s){var l=ji();return typeof s=="function"&&(s=s()),l.memoizedState=l.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:cc,lastRenderedState:s},l.queue=s,s=s.dispatch=R5.bind(null,Qt,s),[l.memoizedState,s]}function uc(s,l,f,g){return s={tag:s,create:l,destroy:f,deps:g,next:null},l=Qt.updateQueue,l===null?(l={lastEffect:null,stores:null},Qt.updateQueue=l,l.lastEffect=s.next=s):(f=l.lastEffect,f===null?l.lastEffect=s.next=s:(g=f.next,f.next=s,s.next=g,l.lastEffect=s)),s}function fw(){return Nr().memoizedState}function vd(s,l,f,g){var v=ji();Qt.flags|=s,v.memoizedState=uc(1|l,f,void 0,g===void 0?null:g)}function yd(s,l,f,g){var v=Nr();g=g===void 0?null:g;var S=void 0;if(sn!==null){var O=sn.memoizedState;if(S=O.destroy,g!==null&&lA(g,O.deps)){v.memoizedState=uc(l,f,S,g);return}}Qt.flags|=s,v.memoizedState=uc(1|l,f,S,g)}function hw(s,l){return vd(8390656,8,s,l)}function hA(s,l){return yd(2048,8,s,l)}function pw(s,l){return yd(4,2,s,l)}function Aw(s,l){return yd(4,4,s,l)}function gw(s,l){if(typeof l=="function")return s=s(),l(s),function(){l(null)};if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function mw(s,l,f){return f=f!=null?f.concat([s]):null,yd(4,4,gw.bind(null,l,s),f)}function pA(){}function vw(s,l){var f=Nr();l=l===void 0?null:l;var g=f.memoizedState;return g!==null&&l!==null&&lA(l,g[1])?g[0]:(f.memoizedState=[s,l],s)}function yw(s,l){var f=Nr();l=l===void 0?null:l;var g=f.memoizedState;return g!==null&&l!==null&&lA(l,g[1])?g[0]:(s=s(),f.memoizedState=[s,l],s)}function xw(s,l,f){return(Ls&21)===0?(s.baseState&&(s.baseState=!1,or=!0),s.memoizedState=f):(ei(f,l)||(f=Q(),Qt.lanes|=f,Fs|=f,s.baseState=!0),l)}function _5(s,l){var f=Pe;Pe=f!==0&&4>f?f:4,s(!0);var g=aA.transition;aA.transition={};try{s(!1),l()}finally{Pe=f,aA.transition=g}}function bw(){return Nr().memoizedState}function O5(s,l,f){var g=Xo(s);if(f={lane:g,action:f,hasEagerState:!1,eagerState:null,next:null},ww(s))kw(l,f);else if(f=$b(s,l,f,g),f!==null){var v=zn();oi(f,s,g,v),Sw(f,l,g)}}function R5(s,l,f){var g=Xo(s),v={lane:g,action:f,hasEagerState:!1,eagerState:null,next:null};if(ww(s))kw(l,v);else{var S=s.alternate;if(s.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var O=l.lastRenderedState,H=S(O,f);if(v.hasEagerState=!0,v.eagerState=H,ei(H,O)){var K=l.interleaved;K===null?(v.next=v,tA(l)):(v.next=K.next,K.next=v),l.interleaved=v;return}}catch{}finally{}f=$b(s,l,v,g),f!==null&&(v=zn(),oi(f,s,g,v),Sw(f,l,g))}}function ww(s){var l=s.alternate;return s===Qt||l!==null&&l===Qt}function kw(s,l){ac=md=!0;var f=s.pending;f===null?l.next=l:(l.next=f.next,f.next=l),s.pending=l}function Sw(s,l,f){if((f&4194240)!==0){var g=l.lanes;g&=s.pendingLanes,f|=g,l.lanes=f,Se(s,f)}}var xd={readContext:Fr,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useInsertionEffect:Bn,useLayoutEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useMutableSource:Bn,useSyncExternalStore:Bn,useId:Bn,unstable_isNewReconciler:!1},L5={readContext:Fr,useCallback:function(s,l){return ji().memoizedState=[s,l===void 0?null:l],s},useContext:Fr,useEffect:hw,useImperativeHandle:function(s,l,f){return f=f!=null?f.concat([s]):null,vd(4194308,4,gw.bind(null,l,s),f)},useLayoutEffect:function(s,l){return vd(4194308,4,s,l)},useInsertionEffect:function(s,l){return vd(4,2,s,l)},useMemo:function(s,l){var f=ji();return l=l===void 0?null:l,s=s(),f.memoizedState=[s,l],s},useReducer:function(s,l,f){var g=ji();return l=f!==void 0?f(l):l,g.memoizedState=g.baseState=l,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:l},g.queue=s,s=s.dispatch=O5.bind(null,Qt,s),[g.memoizedState,s]},useRef:function(s){var l=ji();return s={current:s},l.memoizedState=s},useState:dw,useDebugValue:pA,useDeferredValue:function(s){return ji().memoizedState=s},useTransition:function(){var s=dw(!1),l=s[0];return s=_5.bind(null,s[1]),ji().memoizedState=s,[l,s]},useMutableSource:function(){},useSyncExternalStore:function(s,l,f){var g=Qt,v=ji();if(Rt){if(f===void 0)throw Error(n(407));f=f()}else{if(f=l(),dn===null)throw Error(n(349));(Ls&30)!==0||sw(g,l,f)}v.memoizedState=f;var S={value:f,getSnapshot:l};return v.queue=S,hw(lw.bind(null,g,S,s),[s]),g.flags|=2048,uc(9,aw.bind(null,g,S,f,l),void 0,null),f},useId:function(){var s=ji(),l=dn.identifierPrefix;if(Rt){var f=uo,g=co;f=(g&~(1<<32-on(g)-1)).toString(32)+f,l=":"+l+"R"+f,f=lc++,0<f&&(l+="H"+f.toString(32)),l+=":"}else f=M5++,l=":"+l+"r"+f.toString(32)+":";return s.memoizedState=l},unstable_isNewReconciler:!1},F5={readContext:Fr,useCallback:vw,useContext:Fr,useEffect:hA,useImperativeHandle:mw,useInsertionEffect:pw,useLayoutEffect:Aw,useMemo:yw,useReducer:dA,useRef:fw,useState:function(){return dA(cc)},useDebugValue:pA,useDeferredValue:function(s){var l=Nr();return xw(l,sn.memoizedState,s)},useTransition:function(){var s=dA(cc)[0],l=Nr().memoizedState;return[s,l]},useMutableSource:iw,useSyncExternalStore:ow,useId:bw,unstable_isNewReconciler:!1},N5={readContext:Fr,useCallback:vw,useContext:Fr,useEffect:hA,useImperativeHandle:mw,useInsertionEffect:pw,useLayoutEffect:Aw,useMemo:yw,useReducer:fA,useRef:fw,useState:function(){return fA(cc)},useDebugValue:pA,useDeferredValue:function(s){var l=Nr();return sn===null?l.memoizedState=s:xw(l,sn.memoizedState,s)},useTransition:function(){var s=fA(cc)[0],l=Nr().memoizedState;return[s,l]},useMutableSource:iw,useSyncExternalStore:ow,useId:bw,unstable_isNewReconciler:!1};function ni(s,l){if(s&&s.defaultProps){l=ce({},l),s=s.defaultProps;for(var f in s)l[f]===void 0&&(l[f]=s[f]);return l}return l}function AA(s,l,f,g){l=s.memoizedState,f=f(g,l),f=f==null?l:ce({},l,f),s.memoizedState=f,s.lanes===0&&(s.updateQueue.baseState=f)}var bd={isMounted:function(s){return(s=s._reactInternals)?qr(s)===s:!1},enqueueSetState:function(s,l,f){s=s._reactInternals;var g=zn(),v=Xo(s),S=ho(g,v);S.payload=l,f!=null&&(S.callback=f),l=Yo(s,S,v),l!==null&&(oi(l,s,v,g),hd(l,s,v))},enqueueReplaceState:function(s,l,f){s=s._reactInternals;var g=zn(),v=Xo(s),S=ho(g,v);S.tag=1,S.payload=l,f!=null&&(S.callback=f),l=Yo(s,S,v),l!==null&&(oi(l,s,v,g),hd(l,s,v))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var f=zn(),g=Xo(s),v=ho(f,g);v.tag=2,l!=null&&(v.callback=l),l=Yo(s,v,g),l!==null&&(oi(l,s,g,f),hd(l,s,g))}};function Ew(s,l,f,g,v,S,O){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(g,S,O):l.prototype&&l.prototype.isPureReactComponent?!Xl(f,g)||!Xl(v,S):!0}function Cw(s,l,f){var g=!1,v=Uo,S=l.contextType;return typeof S=="object"&&S!==null?S=Fr(S):(v=ir(l)?Is:Dn.current,g=l.contextTypes,S=(g=g!=null)?La(s,v):Uo),l=new l(f,S),s.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=bd,s.stateNode=l,l._reactInternals=s,g&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=v,s.__reactInternalMemoizedMaskedChildContext=S),l}function Pw(s,l,f,g){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,g),l.state!==s&&bd.enqueueReplaceState(l,l.state,null)}function gA(s,l,f,g){var v=s.stateNode;v.props=f,v.state=s.memoizedState,v.refs={},nA(s);var S=l.contextType;typeof S=="object"&&S!==null?v.context=Fr(S):(S=ir(l)?Is:Dn.current,v.context=La(s,S)),v.state=s.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(AA(s,l,S,f),v.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(l=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),l!==v.state&&bd.enqueueReplaceState(v,v.state,null),pd(s,f,v,g),v.state=s.memoizedState),typeof v.componentDidMount=="function"&&(s.flags|=4194308)}function Va(s,l){try{var f="",g=l;do f+=Ee(g),g=g.return;while(g);var v=f}catch(S){v=`
39
39
  Error generating stack: `+S.message+`
40
- `+S.stack}return{value:s,source:l,stack:v,digest:null}}function mA(s,l,f){return{value:s,source:null,stack:f??null,digest:l??null}}function vA(s,l){try{console.error(l.value)}catch(f){setTimeout(function(){throw f})}}var j5=typeof WeakMap=="function"?WeakMap:Map;function Dw(s,l,f){f=ho(-1,f),f.tag=3,f.payload={element:null};var g=l.value;return f.callback=function(){Dd||(Dd=!0,_A=g),vA(s,l)},f}function Bw(s,l,f){f=ho(-1,f),f.tag=3;var g=s.type.getDerivedStateFromError;if(typeof g=="function"){var v=l.value;f.payload=function(){return g(v)},f.callback=function(){vA(s,l)}}var S=s.stateNode;return S!==null&&typeof S.componentDidCatch=="function"&&(f.callback=function(){vA(s,l),typeof g!="function"&&(qo===null?qo=new Set([this]):qo.add(this));var O=l.stack;this.componentDidCatch(l.value,{componentStack:O!==null?O:""})}),f}function Tw(s,l,f){var g=s.pingCache;if(g===null){g=s.pingCache=new j5;var v=new Set;g.set(l,v)}else v=g.get(l),v===void 0&&(v=new Set,g.set(l,v));v.has(f)||(v.add(f),s=$5.bind(null,s,l,f),l.then(s,s))}function Iw(s){do{var l;if((l=s.tag===13)&&(l=s.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return s;s=s.return}while(s!==null);return null}function Mw(s,l,f,g,v){return(s.mode&1)===0?(s===l?s.flags|=65536:(s.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(l=ho(-1,1),l.tag=2,Yo(f,l,1))),f.lanes|=1),s):(s.flags|=65536,s.lanes=v,s)}var z5=P.ReactCurrentOwner,or=!1;function jn(s,l,f,g){l.child=s===null?Zb(l,null,f,g):za(l,s.child,f,g)}function _w(s,l,f,g,v){f=f.render;var S=l.ref;return Ha(l,v),g=cA(s,l,f,g,S,v),f=uA(),s!==null&&!or?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~v,po(s,l,v)):(Rt&&f&&Yp(l),l.flags|=1,jn(s,l,g,v),l.child)}function Ow(s,l,f,g,v){if(s===null){var S=f.type;return typeof S=="function"&&!zA(S)&&S.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(l.tag=15,l.type=S,Rw(s,l,S,g,v)):(s=Od(f.type,null,g,l,l.mode,v),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,(s.lanes&v)===0){var O=S.memoizedProps;if(f=f.compare,f=f!==null?f:Xl,f(O,g)&&s.ref===l.ref)return po(s,l,v)}return l.flags|=1,s=Zo(S,g),s.ref=l.ref,s.return=l,l.child=s}function Rw(s,l,f,g,v){if(s!==null){var S=s.memoizedProps;if(Xl(S,g)&&s.ref===l.ref)if(or=!1,l.pendingProps=g=S,(s.lanes&v)!==0)(s.flags&131072)!==0&&(or=!0);else return l.lanes=s.lanes,po(s,l,v)}return yA(s,l,f,g,v)}function Lw(s,l,f){var g=l.pendingProps,v=g.children,S=s!==null?s.memoizedState:null;if(g.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bt(Ya,br),br|=f;else{if((f&1073741824)===0)return s=S!==null?S.baseLanes|f:f,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:s,cachePool:null,transitions:null},l.updateQueue=null,Bt(Ya,br),br|=s,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=S!==null?S.baseLanes:f,Bt(Ya,br),br|=g}else S!==null?(g=S.baseLanes|f,l.memoizedState=null):g=f,Bt(Ya,br),br|=g;return jn(s,l,v,f),l.child}function Fw(s,l){var f=l.ref;(s===null&&f!==null||s!==null&&s.ref!==f)&&(l.flags|=512,l.flags|=2097152)}function yA(s,l,f,g,v){var S=ir(f)?Is:Dn.current;return S=La(l,S),Ha(l,v),f=cA(s,l,f,g,S,v),g=uA(),s!==null&&!or?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~v,po(s,l,v)):(Rt&&g&&Yp(l),l.flags|=1,jn(s,l,f,v),l.child)}function Nw(s,l,f,g,v){if(ir(f)){var S=!0;od(l)}else S=!1;if(Ha(l,v),l.stateNode===null)kd(s,l),Cw(l,f,g),gA(l,f,g,v),g=!0;else if(s===null){var O=l.stateNode,H=l.memoizedProps;O.props=H;var K=O.context,oe=f.contextType;typeof oe=="object"&&oe!==null?oe=Fr(oe):(oe=ir(f)?Is:Dn.current,oe=La(l,oe));var ve=f.getDerivedStateFromProps,xe=typeof ve=="function"||typeof O.getSnapshotBeforeUpdate=="function";xe||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(H!==g||K!==oe)&&Pw(l,O,g,oe),Wo=!1;var ge=l.memoizedState;O.state=ge,pd(l,g,O,v),K=l.memoizedState,H!==g||ge!==K||rr.current||Wo?(typeof ve=="function"&&(AA(l,f,ve,g),K=l.memoizedState),(H=Wo||Ew(l,f,H,g,ge,K,oe))?(xe||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"&&(l.flags|=4194308)):(typeof O.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=K),O.props=g,O.state=K,O.context=oe,g=H):(typeof O.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{O=l.stateNode,ew(s,l),H=l.memoizedProps,oe=l.type===l.elementType?H:ni(l.type,H),O.props=oe,xe=l.pendingProps,ge=O.context,K=f.contextType,typeof K=="object"&&K!==null?K=Fr(K):(K=ir(f)?Is:Dn.current,K=La(l,K));var Te=f.getDerivedStateFromProps;(ve=typeof Te=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(H!==xe||ge!==K)&&Pw(l,O,g,K),Wo=!1,ge=l.memoizedState,O.state=ge,pd(l,g,O,v);var _e=l.memoizedState;H!==xe||ge!==_e||rr.current||Wo?(typeof Te=="function"&&(AA(l,f,Te,g),_e=l.memoizedState),(oe=Wo||Ew(l,f,oe,g,ge,_e,K)||!1)?(ve||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(g,_e,K),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(g,_e,K)),typeof O.componentDidUpdate=="function"&&(l.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof O.componentDidUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=_e),O.props=g,O.state=_e,O.context=K,g=oe):(typeof O.componentDidUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=1024),g=!1)}return xA(s,l,f,g,S,v)}function xA(s,l,f,g,v,S){Fw(s,l);var O=(l.flags&128)!==0;if(!g&&!O)return v&&Ub(l,f,!1),po(s,l,S);g=l.stateNode,z5.current=l;var H=O&&typeof f.getDerivedStateFromError!="function"?null:g.render();return l.flags|=1,s!==null&&O?(l.child=za(l,s.child,null,S),l.child=za(l,null,H,S)):jn(s,l,H,S),l.memoizedState=g.state,v&&Ub(l,f,!0),l.child}function jw(s){var l=s.stateNode;l.pendingContext?Qb(s,l.pendingContext,l.pendingContext!==l.context):l.context&&Qb(s,l.context,!1),rA(s,l.containerInfo)}function zw(s,l,f,g,v){return ja(),Xp(v),l.flags|=256,jn(s,l,f,g),l.child}var bA={dehydrated:null,treeContext:null,retryLane:0};function wA(s){return{baseLanes:s,cachePool:null,transitions:null}}function Qw(s,l,f){var g=l.pendingProps,v=zt.current,S=!1,O=(l.flags&128)!==0,H;if((H=O)||(H=s!==null&&s.memoizedState===null?!1:(v&2)!==0),H?(S=!0,l.flags&=-129):(s===null||s.memoizedState!==null)&&(v|=1),Bt(zt,v&1),s===null)return Gp(l),s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((l.mode&1)===0?l.lanes=1:s.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(O=g.children,s=g.fallback,S?(g=l.mode,S=l.child,O={mode:"hidden",children:O},(g&1)===0&&S!==null?(S.childLanes=0,S.pendingProps=O):S=Rd(O,g,0,null),s=Qs(s,g,f,null),S.return=l,s.return=l,S.sibling=s,l.child=S,l.child.memoizedState=wA(f),l.memoizedState=bA,s):kA(l,O));if(v=s.memoizedState,v!==null&&(H=v.dehydrated,H!==null))return Q5(s,l,O,g,H,v,f);if(S){S=g.fallback,O=l.mode,v=s.child,H=v.sibling;var K={mode:"hidden",children:g.children};return(O&1)===0&&l.child!==v?(g=l.child,g.childLanes=0,g.pendingProps=K,l.deletions=null):(g=Zo(v,K),g.subtreeFlags=v.subtreeFlags&14680064),H!==null?S=Zo(H,S):(S=Qs(S,O,f,null),S.flags|=2),S.return=l,g.return=l,g.sibling=S,l.child=g,g=S,S=l.child,O=s.child.memoizedState,O=O===null?wA(f):{baseLanes:O.baseLanes|f,cachePool:null,transitions:O.transitions},S.memoizedState=O,S.childLanes=s.childLanes&~f,l.memoizedState=bA,g}return S=s.child,s=S.sibling,g=Zo(S,{mode:"visible",children:g.children}),(l.mode&1)===0&&(g.lanes=f),g.return=l,g.sibling=null,s!==null&&(f=l.deletions,f===null?(l.deletions=[s],l.flags|=16):f.push(s)),l.child=g,l.memoizedState=null,g}function kA(s,l){return l=Rd({mode:"visible",children:l},s.mode,0,null),l.return=s,s.child=l}function wd(s,l,f,g){return g!==null&&Xp(g),za(l,s.child,null,f),s=kA(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function Q5(s,l,f,g,v,S,O){if(f)return l.flags&256?(l.flags&=-257,g=mA(Error(n(422))),wd(s,l,O,g)):l.memoizedState!==null?(l.child=s.child,l.flags|=128,null):(S=g.fallback,v=l.mode,g=Rd({mode:"visible",children:g.children},v,0,null),S=Qs(S,v,O,null),S.flags|=2,g.return=l,S.return=l,g.sibling=S,l.child=g,(l.mode&1)!==0&&za(l,s.child,null,O),l.child.memoizedState=wA(O),l.memoizedState=bA,S);if((l.mode&1)===0)return wd(s,l,O,null);if(v.data==="$!"){if(g=v.nextSibling&&v.nextSibling.dataset,g)var H=g.dgst;return g=H,S=Error(n(419)),g=mA(S,g,void 0),wd(s,l,O,g)}if(H=(O&s.childLanes)!==0,or||H){if(g=dn,g!==null){switch(O&-O){case 4:v=2;break;case 16:v=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:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(g.suspendedLanes|O))!==0?0:v,v!==0&&v!==S.retryLane&&(S.retryLane=v,fo(s,v),oi(g,s,v,-1))}return jA(),g=mA(Error(n(421))),wd(s,l,O,g)}return v.data==="$?"?(l.flags|=128,l.child=s.child,l=eM.bind(null,s),v._reactRetry=l,null):(s=S.treeContext,xr=Qo(v.nextSibling),yr=l,Rt=!0,ti=null,s!==null&&(Rr[Lr++]=co,Rr[Lr++]=uo,Rr[Lr++]=Ms,co=s.id,uo=s.overflow,Ms=l),l=kA(l,g.children),l.flags|=4096,l)}function Hw(s,l,f){s.lanes|=l;var g=s.alternate;g!==null&&(g.lanes|=l),eA(s.return,l,f)}function SA(s,l,f,g,v){var S=s.memoizedState;S===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:f,tailMode:v}:(S.isBackwards=l,S.rendering=null,S.renderingStartTime=0,S.last=g,S.tail=f,S.tailMode=v)}function Uw(s,l,f){var g=l.pendingProps,v=g.revealOrder,S=g.tail;if(jn(s,l,g.children,f),g=zt.current,(g&2)!==0)g=g&1|2,l.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Hw(s,f,l);else if(s.tag===19)Hw(s,f,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}g&=1}if(Bt(zt,g),(l.mode&1)===0)l.memoizedState=null;else switch(v){case"forwards":for(f=l.child,v=null;f!==null;)s=f.alternate,s!==null&&Ad(s)===null&&(v=f),f=f.sibling;f=v,f===null?(v=l.child,l.child=null):(v=f.sibling,f.sibling=null),SA(l,!1,v,f,S);break;case"backwards":for(f=null,v=l.child,l.child=null;v!==null;){if(s=v.alternate,s!==null&&Ad(s)===null){l.child=v;break}s=v.sibling,v.sibling=f,f=v,v=s}SA(l,!0,f,null,S);break;case"together":SA(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function kd(s,l){(l.mode&1)===0&&s!==null&&(s.alternate=null,l.alternate=null,l.flags|=2)}function po(s,l,f){if(s!==null&&(l.dependencies=s.dependencies),Fs|=l.lanes,(f&l.childLanes)===0)return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,f=Zo(s,s.pendingProps),l.child=f,f.return=l;s.sibling!==null;)s=s.sibling,f=f.sibling=Zo(s,s.pendingProps),f.return=l;f.sibling=null}return l.child}function H5(s,l,f){switch(l.tag){case 3:jw(l),ja();break;case 5:rw(l);break;case 1:ir(l.type)&&od(l);break;case 4:rA(l,l.stateNode.containerInfo);break;case 10:var g=l.type._context,v=l.memoizedProps.value;Bt(dd,g._currentValue),g._currentValue=v;break;case 13:if(g=l.memoizedState,g!==null)return g.dehydrated!==null?(Bt(zt,zt.current&1),l.flags|=128,null):(f&l.child.childLanes)!==0?Qw(s,l,f):(Bt(zt,zt.current&1),s=po(s,l,f),s!==null?s.sibling:null);Bt(zt,zt.current&1);break;case 19:if(g=(f&l.childLanes)!==0,(s.flags&128)!==0){if(g)return Uw(s,l,f);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),Bt(zt,zt.current),g)break;return null;case 22:case 23:return l.lanes=0,Lw(s,l,f)}return po(s,l,f)}var Vw,EA,Ww,Yw;Vw=function(s,l){for(var f=l.child;f!==null;){if(f.tag===5||f.tag===6)s.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},EA=function(){},Ww=function(s,l,f,g){var v=s.memoizedProps;if(v!==g){s=l.stateNode,Rs(Ni.current);var S=null;switch(f){case"input":v=Ot(s,v),g=Ot(s,g),S=[];break;case"select":v=ce({},v,{value:void 0}),g=ce({},g,{value:void 0}),S=[];break;case"textarea":v=jt(s,v),g=jt(s,g),S=[];break;default:typeof v.onClick!="function"&&typeof g.onClick=="function"&&(s.onclick=nd)}Oe(f,g);var O;f=null;for(oe in v)if(!g.hasOwnProperty(oe)&&v.hasOwnProperty(oe)&&v[oe]!=null)if(oe==="style"){var H=v[oe];for(O in H)H.hasOwnProperty(O)&&(f||(f={}),f[O]="")}else oe!=="dangerouslySetInnerHTML"&&oe!=="children"&&oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&oe!=="autoFocus"&&(i.hasOwnProperty(oe)?S||(S=[]):(S=S||[]).push(oe,null));for(oe in g){var K=g[oe];if(H=v?.[oe],g.hasOwnProperty(oe)&&K!==H&&(K!=null||H!=null))if(oe==="style")if(H){for(O in H)!H.hasOwnProperty(O)||K&&K.hasOwnProperty(O)||(f||(f={}),f[O]="");for(O in K)K.hasOwnProperty(O)&&H[O]!==K[O]&&(f||(f={}),f[O]=K[O])}else f||(S||(S=[]),S.push(oe,f)),f=K;else oe==="dangerouslySetInnerHTML"?(K=K?K.__html:void 0,H=H?H.__html:void 0,K!=null&&H!==K&&(S=S||[]).push(oe,K)):oe==="children"?typeof K!="string"&&typeof K!="number"||(S=S||[]).push(oe,""+K):oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&(i.hasOwnProperty(oe)?(K!=null&&oe==="onScroll"&&Mt("scroll",s),S||H===K||(S=[])):(S=S||[]).push(oe,K))}f&&(S=S||[]).push("style",f);var oe=S;(l.updateQueue=oe)&&(l.flags|=4)}},Yw=function(s,l,f,g){f!==g&&(l.flags|=4)};function dc(s,l){if(!Rt)switch(s.tailMode){case"hidden":l=s.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s.tail=null:f.sibling=null;break;case"collapsed":f=s.tail;for(var g=null;f!==null;)f.alternate!==null&&(g=f),f=f.sibling;g===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:g.sibling=null}}function Tn(s){var l=s.alternate!==null&&s.alternate.child===s.child,f=0,g=0;if(l)for(var v=s.child;v!==null;)f|=v.lanes|v.childLanes,g|=v.subtreeFlags&14680064,g|=v.flags&14680064,v.return=s,v=v.sibling;else for(v=s.child;v!==null;)f|=v.lanes|v.childLanes,g|=v.subtreeFlags,g|=v.flags,v.return=s,v=v.sibling;return s.subtreeFlags|=g,s.childLanes=f,l}function U5(s,l,f){var g=l.pendingProps;switch(Kp(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tn(l),null;case 1:return ir(l.type)&&id(),Tn(l),null;case 3:return g=l.stateNode,Ua(),_t(rr),_t(Dn),sA(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(s===null||s.child===null)&&(cd(l)?l.flags|=4:s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ti!==null&&(LA(ti),ti=null))),EA(s,l),Tn(l),null;case 5:iA(l);var v=Rs(sc.current);if(f=l.type,s!==null&&l.stateNode!=null)Ww(s,l,f,g,v),s.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!g){if(l.stateNode===null)throw Error(n(166));return Tn(l),null}if(s=Rs(Ni.current),cd(l)){g=l.stateNode,f=l.type;var S=l.memoizedProps;switch(g[Fi]=l,g[tc]=S,s=(l.mode&1)!==0,f){case"dialog":Mt("cancel",g),Mt("close",g);break;case"iframe":case"object":case"embed":Mt("load",g);break;case"video":case"audio":for(v=0;v<Zl.length;v++)Mt(Zl[v],g);break;case"source":Mt("error",g);break;case"img":case"image":case"link":Mt("error",g),Mt("load",g);break;case"details":Mt("toggle",g);break;case"input":Sn(g,S),Mt("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!S.multiple},Mt("invalid",g);break;case"textarea":vt(g,S),Mt("invalid",g)}Oe(f,S),v=null;for(var O in S)if(S.hasOwnProperty(O)){var H=S[O];O==="children"?typeof H=="string"?g.textContent!==H&&(S.suppressHydrationWarning!==!0&&td(g.textContent,H,s),v=["children",H]):typeof H=="number"&&g.textContent!==""+H&&(S.suppressHydrationWarning!==!0&&td(g.textContent,H,s),v=["children",""+H]):i.hasOwnProperty(O)&&H!=null&&O==="onScroll"&&Mt("scroll",g)}switch(f){case"input":bt(g),An(g,S,!0);break;case"textarea":bt(g),qn(g);break;case"select":case"option":break;default:typeof S.onClick=="function"&&(g.onclick=nd)}g=v,l.updateQueue=g,g!==null&&(l.flags|=4)}else{O=v.nodeType===9?v:v.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Gn(f)),s==="http://www.w3.org/1999/xhtml"?f==="script"?(s=O.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof g.is=="string"?s=O.createElement(f,{is:g.is}):(s=O.createElement(f),f==="select"&&(O=s,g.multiple?O.multiple=!0:g.size&&(O.size=g.size))):s=O.createElementNS(s,f),s[Fi]=l,s[tc]=g,Vw(s,l,!1,!1),l.stateNode=s;e:{switch(O=tt(f,g),f){case"dialog":Mt("cancel",s),Mt("close",s),v=g;break;case"iframe":case"object":case"embed":Mt("load",s),v=g;break;case"video":case"audio":for(v=0;v<Zl.length;v++)Mt(Zl[v],s);v=g;break;case"source":Mt("error",s),v=g;break;case"img":case"image":case"link":Mt("error",s),Mt("load",s),v=g;break;case"details":Mt("toggle",s),v=g;break;case"input":Sn(s,g),v=Ot(s,g),Mt("invalid",s);break;case"option":v=g;break;case"select":s._wrapperState={wasMultiple:!!g.multiple},v=ce({},g,{value:void 0}),Mt("invalid",s);break;case"textarea":vt(s,g),v=jt(s,g),Mt("invalid",s);break;default:v=g}Oe(f,v),H=v;for(S in H)if(H.hasOwnProperty(S)){var K=H[S];S==="style"?ae(s,K):S==="dangerouslySetInnerHTML"?(K=K?K.__html:void 0,K!=null&&de(s,K)):S==="children"?typeof K=="string"?(f!=="textarea"||K!=="")&&Ie(s,K):typeof K=="number"&&Ie(s,""+K):S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&S!=="autoFocus"&&(i.hasOwnProperty(S)?K!=null&&S==="onScroll"&&Mt("scroll",s):K!=null&&D(s,S,K,O))}switch(f){case"input":bt(s),An(s,g,!1);break;case"textarea":bt(s),qn(s);break;case"option":g.value!=null&&s.setAttribute("value",""+ze(g.value));break;case"select":s.multiple=!!g.multiple,S=g.value,S!=null?Ut(s,!!g.multiple,S,!1):g.defaultValue!=null&&Ut(s,!!g.multiple,g.defaultValue,!0);break;default:typeof v.onClick=="function"&&(s.onclick=nd)}switch(f){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return Tn(l),null;case 6:if(s&&l.stateNode!=null)Yw(s,l,s.memoizedProps,g);else{if(typeof g!="string"&&l.stateNode===null)throw Error(n(166));if(f=Rs(sc.current),Rs(Ni.current),cd(l)){if(g=l.stateNode,f=l.memoizedProps,g[Fi]=l,(S=g.nodeValue!==f)&&(s=yr,s!==null))switch(s.tag){case 3:td(g.nodeValue,f,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&td(g.nodeValue,f,(s.mode&1)!==0)}S&&(l.flags|=4)}else g=(f.nodeType===9?f:f.ownerDocument).createTextNode(g),g[Fi]=l,l.stateNode=g}return Tn(l),null;case 13:if(_t(zt),g=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Rt&&xr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)Gb(),ja(),l.flags|=98560,S=!1;else if(S=cd(l),g!==null&&g.dehydrated!==null){if(s===null){if(!S)throw Error(n(318));if(S=l.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(n(317));S[Fi]=l}else ja(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Tn(l),S=!1}else ti!==null&&(LA(ti),ti=null),S=!0;if(!S)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=f,l):(g=g!==null,g!==(s!==null&&s.memoizedState!==null)&&g&&(l.child.flags|=8192,(l.mode&1)!==0&&(s===null||(zt.current&1)!==0?an===0&&(an=3):jA())),l.updateQueue!==null&&(l.flags|=4),Tn(l),null);case 4:return Ua(),EA(s,l),s===null&&$l(l.stateNode.containerInfo),Tn(l),null;case 10:return $p(l.type._context),Tn(l),null;case 17:return ir(l.type)&&id(),Tn(l),null;case 19:if(_t(zt),S=l.memoizedState,S===null)return Tn(l),null;if(g=(l.flags&128)!==0,O=S.rendering,O===null)if(g)dc(S,!1);else{if(an!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(O=Ad(s),O!==null){for(l.flags|=128,dc(S,!1),g=O.updateQueue,g!==null&&(l.updateQueue=g,l.flags|=4),l.subtreeFlags=0,g=f,f=l.child;f!==null;)S=f,s=g,S.flags&=14680066,O=S.alternate,O===null?(S.childLanes=0,S.lanes=s,S.child=null,S.subtreeFlags=0,S.memoizedProps=null,S.memoizedState=null,S.updateQueue=null,S.dependencies=null,S.stateNode=null):(S.childLanes=O.childLanes,S.lanes=O.lanes,S.child=O.child,S.subtreeFlags=0,S.deletions=null,S.memoizedProps=O.memoizedProps,S.memoizedState=O.memoizedState,S.updateQueue=O.updateQueue,S.type=O.type,s=O.dependencies,S.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),f=f.sibling;return Bt(zt,zt.current&1|2),l.child}s=s.sibling}S.tail!==null&&Et()>Ka&&(l.flags|=128,g=!0,dc(S,!1),l.lanes=4194304)}else{if(!g)if(s=Ad(O),s!==null){if(l.flags|=128,g=!0,f=s.updateQueue,f!==null&&(l.updateQueue=f,l.flags|=4),dc(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Rt)return Tn(l),null}else 2*Et()-S.renderingStartTime>Ka&&f!==1073741824&&(l.flags|=128,g=!0,dc(S,!1),l.lanes=4194304);S.isBackwards?(O.sibling=l.child,l.child=O):(f=S.last,f!==null?f.sibling=O:l.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=Et(),l.sibling=null,f=zt.current,Bt(zt,g?f&1|2:f&1),l):(Tn(l),null);case 22:case 23:return NA(),g=l.memoizedState!==null,s!==null&&s.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(br&1073741824)!==0&&(Tn(l),l.subtreeFlags&6&&(l.flags|=8192)):Tn(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function V5(s,l){switch(Kp(l),l.tag){case 1:return ir(l.type)&&id(),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return Ua(),_t(rr),_t(Dn),sA(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 5:return iA(l),null;case 13:if(_t(zt),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));ja()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return _t(zt),null;case 4:return Ua(),null;case 10:return $p(l.type._context),null;case 22:case 23:return NA(),null;case 24:return null;default:return null}}var Sd=!1,In=!1,W5=typeof WeakSet=="function"?WeakSet:Set,Me=null;function Wa(s,l){var f=s.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(g){Vt(s,l,g)}else f.current=null}function CA(s,l,f){try{f()}catch(g){Vt(s,l,g)}}var Kw=!1;function Y5(s,l){if(Np=vr,s=Eb(),Tp(s)){if("selectionStart"in s)var f={start:s.selectionStart,end:s.selectionEnd};else e:{f=(f=s.ownerDocument)&&f.defaultView||window;var g=f.getSelection&&f.getSelection();if(g&&g.rangeCount!==0){f=g.anchorNode;var v=g.anchorOffset,S=g.focusNode;g=g.focusOffset;try{f.nodeType,S.nodeType}catch{f=null;break e}var O=0,H=-1,K=-1,oe=0,ve=0,xe=s,ge=null;t:for(;;){for(var Te;xe!==f||v!==0&&xe.nodeType!==3||(H=O+v),xe!==S||g!==0&&xe.nodeType!==3||(K=O+g),xe.nodeType===3&&(O+=xe.nodeValue.length),(Te=xe.firstChild)!==null;)ge=xe,xe=Te;for(;;){if(xe===s)break t;if(ge===f&&++oe===v&&(H=O),ge===S&&++ve===g&&(K=O),(Te=xe.nextSibling)!==null)break;xe=ge,ge=xe.parentNode}xe=Te}f=H===-1||K===-1?null:{start:H,end:K}}else f=null}f=f||{start:0,end:0}}else f=null;for(jp={focusedElem:s,selectionRange:f},vr=!1,Me=l;Me!==null;)if(l=Me,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Me=s;else for(;Me!==null;){l=Me;try{var _e=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(_e!==null){var Le=_e.memoizedProps,Wt=_e.memoizedState,ee=l.stateNode,G=ee.getSnapshotBeforeUpdate(l.elementType===l.type?Le:ni(l.type,Le),Wt);ee.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var re=l.stateNode.containerInfo;re.nodeType===1?re.textContent="":re.nodeType===9&&re.documentElement&&re.removeChild(re.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ke){Vt(l,l.return,ke)}if(s=l.sibling,s!==null){s.return=l.return,Me=s;break}Me=l.return}return _e=Kw,Kw=!1,_e}function fc(s,l,f){var g=l.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var v=g=g.next;do{if((v.tag&s)===s){var S=v.destroy;v.destroy=void 0,S!==void 0&&CA(l,f,S)}v=v.next}while(v!==g)}}function Ed(s,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var f=l=l.next;do{if((f.tag&s)===s){var g=f.create;f.destroy=g()}f=f.next}while(f!==l)}}function PA(s){var l=s.ref;if(l!==null){var f=s.stateNode;switch(s.tag){case 5:s=f;break;default:s=f}typeof l=="function"?l(s):l.current=s}}function qw(s){var l=s.alternate;l!==null&&(s.alternate=null,qw(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&(delete l[Fi],delete l[tc],delete l[Up],delete l[D5],delete l[B5])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Gw(s){return s.tag===5||s.tag===3||s.tag===4}function Xw(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Gw(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function DA(s,l,f){var g=s.tag;if(g===5||g===6)s=s.stateNode,l?f.nodeType===8?f.parentNode.insertBefore(s,l):f.insertBefore(s,l):(f.nodeType===8?(l=f.parentNode,l.insertBefore(s,f)):(l=f,l.appendChild(s)),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=nd));else if(g!==4&&(s=s.child,s!==null))for(DA(s,l,f),s=s.sibling;s!==null;)DA(s,l,f),s=s.sibling}function BA(s,l,f){var g=s.tag;if(g===5||g===6)s=s.stateNode,l?f.insertBefore(s,l):f.appendChild(s);else if(g!==4&&(s=s.child,s!==null))for(BA(s,l,f),s=s.sibling;s!==null;)BA(s,l,f),s=s.sibling}var yn=null,ri=!1;function Ko(s,l,f){for(f=f.child;f!==null;)Jw(s,l,f),f=f.sibling}function Jw(s,l,f){if(Fn&&typeof Fn.onCommitFiberUnmount=="function")try{Fn.onCommitFiberUnmount(gr,f)}catch{}switch(f.tag){case 5:In||Wa(f,l);case 6:var g=yn,v=ri;yn=null,Ko(s,l,f),yn=g,ri=v,yn!==null&&(ri?(s=yn,f=f.stateNode,s.nodeType===8?s.parentNode.removeChild(f):s.removeChild(f)):yn.removeChild(f.stateNode));break;case 18:yn!==null&&(ri?(s=yn,f=f.stateNode,s.nodeType===8?Hp(s.parentNode,f):s.nodeType===1&&Hp(s,f),Oi(s)):Hp(yn,f.stateNode));break;case 4:g=yn,v=ri,yn=f.stateNode.containerInfo,ri=!0,Ko(s,l,f),yn=g,ri=v;break;case 0:case 11:case 14:case 15:if(!In&&(g=f.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){v=g=g.next;do{var S=v,O=S.destroy;S=S.tag,O!==void 0&&((S&2)!==0||(S&4)!==0)&&CA(f,l,O),v=v.next}while(v!==g)}Ko(s,l,f);break;case 1:if(!In&&(Wa(f,l),g=f.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=f.memoizedProps,g.state=f.memoizedState,g.componentWillUnmount()}catch(H){Vt(f,l,H)}Ko(s,l,f);break;case 21:Ko(s,l,f);break;case 22:f.mode&1?(In=(g=In)||f.memoizedState!==null,Ko(s,l,f),In=g):Ko(s,l,f);break;default:Ko(s,l,f)}}function Zw(s){var l=s.updateQueue;if(l!==null){s.updateQueue=null;var f=s.stateNode;f===null&&(f=s.stateNode=new W5),l.forEach(function(g){var v=tM.bind(null,s,g);f.has(g)||(f.add(g),g.then(v,v))})}}function ii(s,l){var f=l.deletions;if(f!==null)for(var g=0;g<f.length;g++){var v=f[g];try{var S=s,O=l,H=O;e:for(;H!==null;){switch(H.tag){case 5:yn=H.stateNode,ri=!1;break e;case 3:yn=H.stateNode.containerInfo,ri=!0;break e;case 4:yn=H.stateNode.containerInfo,ri=!0;break e}H=H.return}if(yn===null)throw Error(n(160));Jw(S,O,v),yn=null,ri=!1;var K=v.alternate;K!==null&&(K.return=null),v.return=null}catch(oe){Vt(v,l,oe)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)$w(l,s),l=l.sibling}function $w(s,l){var f=s.alternate,g=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(ii(l,s),zi(s),g&4){try{fc(3,s,s.return),Ed(3,s)}catch(Le){Vt(s,s.return,Le)}try{fc(5,s,s.return)}catch(Le){Vt(s,s.return,Le)}}break;case 1:ii(l,s),zi(s),g&512&&f!==null&&Wa(f,f.return);break;case 5:if(ii(l,s),zi(s),g&512&&f!==null&&Wa(f,f.return),s.flags&32){var v=s.stateNode;try{Ie(v,"")}catch(Le){Vt(s,s.return,Le)}}if(g&4&&(v=s.stateNode,v!=null)){var S=s.memoizedProps,O=f!==null?f.memoizedProps:S,H=s.type,K=s.updateQueue;if(s.updateQueue=null,K!==null)try{H==="input"&&S.type==="radio"&&S.name!=null&&nn(v,S),tt(H,O);var oe=tt(H,S);for(O=0;O<K.length;O+=2){var ve=K[O],xe=K[O+1];ve==="style"?ae(v,xe):ve==="dangerouslySetInnerHTML"?de(v,xe):ve==="children"?Ie(v,xe):D(v,ve,xe,oe)}switch(H){case"input":_n(v,S);break;case"textarea":On(v,S);break;case"select":var ge=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!S.multiple;var Te=S.value;Te!=null?Ut(v,!!S.multiple,Te,!1):ge!==!!S.multiple&&(S.defaultValue!=null?Ut(v,!!S.multiple,S.defaultValue,!0):Ut(v,!!S.multiple,S.multiple?[]:"",!1))}v[tc]=S}catch(Le){Vt(s,s.return,Le)}}break;case 6:if(ii(l,s),zi(s),g&4){if(s.stateNode===null)throw Error(n(162));v=s.stateNode,S=s.memoizedProps;try{v.nodeValue=S}catch(Le){Vt(s,s.return,Le)}}break;case 3:if(ii(l,s),zi(s),g&4&&f!==null&&f.memoizedState.isDehydrated)try{Oi(l.containerInfo)}catch(Le){Vt(s,s.return,Le)}break;case 4:ii(l,s),zi(s);break;case 13:ii(l,s),zi(s),v=s.child,v.flags&8192&&(S=v.memoizedState!==null,v.stateNode.isHidden=S,!S||v.alternate!==null&&v.alternate.memoizedState!==null||(MA=Et())),g&4&&Zw(s);break;case 22:if(ve=f!==null&&f.memoizedState!==null,s.mode&1?(In=(oe=In)||ve,ii(l,s),In=oe):ii(l,s),zi(s),g&8192){if(oe=s.memoizedState!==null,(s.stateNode.isHidden=oe)&&!ve&&(s.mode&1)!==0)for(Me=s,ve=s.child;ve!==null;){for(xe=Me=ve;Me!==null;){switch(ge=Me,Te=ge.child,ge.tag){case 0:case 11:case 14:case 15:fc(4,ge,ge.return);break;case 1:Wa(ge,ge.return);var _e=ge.stateNode;if(typeof _e.componentWillUnmount=="function"){g=ge,f=ge.return;try{l=g,_e.props=l.memoizedProps,_e.state=l.memoizedState,_e.componentWillUnmount()}catch(Le){Vt(g,f,Le)}}break;case 5:Wa(ge,ge.return);break;case 22:if(ge.memoizedState!==null){n1(xe);continue}}Te!==null?(Te.return=ge,Me=Te):n1(xe)}ve=ve.sibling}e:for(ve=null,xe=s;;){if(xe.tag===5){if(ve===null){ve=xe;try{v=xe.stateNode,oe?(S=v.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none"):(H=xe.stateNode,K=xe.memoizedProps.style,O=K!=null&&K.hasOwnProperty("display")?K.display:null,H.style.display=ot("display",O))}catch(Le){Vt(s,s.return,Le)}}}else if(xe.tag===6){if(ve===null)try{xe.stateNode.nodeValue=oe?"":xe.memoizedProps}catch(Le){Vt(s,s.return,Le)}}else if((xe.tag!==22&&xe.tag!==23||xe.memoizedState===null||xe===s)&&xe.child!==null){xe.child.return=xe,xe=xe.child;continue}if(xe===s)break e;for(;xe.sibling===null;){if(xe.return===null||xe.return===s)break e;ve===xe&&(ve=null),xe=xe.return}ve===xe&&(ve=null),xe.sibling.return=xe.return,xe=xe.sibling}}break;case 19:ii(l,s),zi(s),g&4&&Zw(s);break;case 21:break;default:ii(l,s),zi(s)}}function zi(s){var l=s.flags;if(l&2){try{e:{for(var f=s.return;f!==null;){if(Gw(f)){var g=f;break e}f=f.return}throw Error(n(160))}switch(g.tag){case 5:var v=g.stateNode;g.flags&32&&(Ie(v,""),g.flags&=-33);var S=Xw(s);BA(s,S,v);break;case 3:case 4:var O=g.stateNode.containerInfo,H=Xw(s);DA(s,H,O);break;default:throw Error(n(161))}}catch(K){Vt(s,s.return,K)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function K5(s,l,f){Me=s,e1(s)}function e1(s,l,f){for(var g=(s.mode&1)!==0;Me!==null;){var v=Me,S=v.child;if(v.tag===22&&g){var O=v.memoizedState!==null||Sd;if(!O){var H=v.alternate,K=H!==null&&H.memoizedState!==null||In;H=Sd;var oe=In;if(Sd=O,(In=K)&&!oe)for(Me=v;Me!==null;)O=Me,K=O.child,O.tag===22&&O.memoizedState!==null?r1(v):K!==null?(K.return=O,Me=K):r1(v);for(;S!==null;)Me=S,e1(S),S=S.sibling;Me=v,Sd=H,In=oe}t1(s)}else(v.subtreeFlags&8772)!==0&&S!==null?(S.return=v,Me=S):t1(s)}}function t1(s){for(;Me!==null;){var l=Me;if((l.flags&8772)!==0){var f=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:In||Ed(5,l);break;case 1:var g=l.stateNode;if(l.flags&4&&!In)if(f===null)g.componentDidMount();else{var v=l.elementType===l.type?f.memoizedProps:ni(l.type,f.memoizedProps);g.componentDidUpdate(v,f.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var S=l.updateQueue;S!==null&&nw(l,S,g);break;case 3:var O=l.updateQueue;if(O!==null){if(f=null,l.child!==null)switch(l.child.tag){case 5:f=l.child.stateNode;break;case 1:f=l.child.stateNode}nw(l,O,f)}break;case 5:var H=l.stateNode;if(f===null&&l.flags&4){f=H;var K=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":K.autoFocus&&f.focus();break;case"img":K.src&&(f.src=K.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var oe=l.alternate;if(oe!==null){var ve=oe.memoizedState;if(ve!==null){var xe=ve.dehydrated;xe!==null&&Oi(xe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}In||l.flags&512&&PA(l)}catch(ge){Vt(l,l.return,ge)}}if(l===s){Me=null;break}if(f=l.sibling,f!==null){f.return=l.return,Me=f;break}Me=l.return}}function n1(s){for(;Me!==null;){var l=Me;if(l===s){Me=null;break}var f=l.sibling;if(f!==null){f.return=l.return,Me=f;break}Me=l.return}}function r1(s){for(;Me!==null;){var l=Me;try{switch(l.tag){case 0:case 11:case 15:var f=l.return;try{Ed(4,l)}catch(K){Vt(l,f,K)}break;case 1:var g=l.stateNode;if(typeof g.componentDidMount=="function"){var v=l.return;try{g.componentDidMount()}catch(K){Vt(l,v,K)}}var S=l.return;try{PA(l)}catch(K){Vt(l,S,K)}break;case 5:var O=l.return;try{PA(l)}catch(K){Vt(l,O,K)}}}catch(K){Vt(l,l.return,K)}if(l===s){Me=null;break}var H=l.sibling;if(H!==null){H.return=l.return,Me=H;break}Me=l.return}}var q5=Math.ceil,Cd=P.ReactCurrentDispatcher,TA=P.ReactCurrentOwner,jr=P.ReactCurrentBatchConfig,ft=0,dn=null,Jt=null,xn=0,br=0,Ya=Ho(0),an=0,hc=null,Fs=0,Pd=0,IA=0,pc=null,sr=null,MA=0,Ka=1/0,Ao=null,Dd=!1,_A=null,qo=null,Bd=!1,Go=null,Td=0,Ac=0,OA=null,Id=-1,Md=0;function zn(){return(ft&6)!==0?Et():Id!==-1?Id:Id=Et()}function Xo(s){return(s.mode&1)===0?1:(ft&2)!==0&&xn!==0?xn&-xn:I5.transition!==null?(Md===0&&(Md=Q()),Md):(s=Pe,s!==0||(s=window.event,s=s===void 0?16:zl(s.type)),s)}function oi(s,l,f,g){if(50<Ac)throw Ac=0,OA=null,Error(n(185));Z(s,f,g),((ft&2)===0||s!==dn)&&(s===dn&&((ft&2)===0&&(Pd|=f),an===4&&Jo(s,xn)),ar(s,g),f===1&&ft===0&&(l.mode&1)===0&&(Ka=Et()+500,sd&&Vo()))}function ar(s,l){var f=s.callbackNode;T(s,l);var g=Ii(s,s===dn?xn:0);if(g===0)f!==null&&vs(f),s.callbackNode=null,s.callbackPriority=0;else if(l=g&-g,s.callbackPriority!==l){if(f!=null&&vs(f),l===1)s.tag===0?T5(o1.bind(null,s)):Vb(o1.bind(null,s)),C5(function(){(ft&6)===0&&Vo()}),f=null;else{switch(Ye(g)){case 1:f=Oo;break;case 4:f=Ro;break;case 16:f=Bi;break;case 536870912:f=Gr;break;default:f=Bi}f=h1(f,i1.bind(null,s))}s.callbackPriority=l,s.callbackNode=f}}function i1(s,l){if(Id=-1,Md=0,(ft&6)!==0)throw Error(n(327));var f=s.callbackNode;if(qa()&&s.callbackNode!==f)return null;var g=Ii(s,s===dn?xn:0);if(g===0)return null;if((g&30)!==0||(g&s.expiredLanes)!==0||l)l=_d(s,g);else{l=g;var v=ft;ft|=2;var S=a1();(dn!==s||xn!==l)&&(Ao=null,Ka=Et()+500,js(s,l));do try{J5();break}catch(H){s1(s,H)}while(!0);Zp(),Cd.current=S,ft=v,Jt!==null?l=0:(dn=null,xn=0,l=an)}if(l!==0){if(l===2&&(v=F(s),v!==0&&(g=v,l=RA(s,v))),l===1)throw f=hc,js(s,0),Jo(s,g),ar(s,Et()),f;if(l===6)Jo(s,g);else{if(v=s.current.alternate,(g&30)===0&&!G5(v)&&(l=_d(s,g),l===2&&(S=F(s),S!==0&&(g=S,l=RA(s,S))),l===1))throw f=hc,js(s,0),Jo(s,g),ar(s,Et()),f;switch(s.finishedWork=v,s.finishedLanes=g,l){case 0:case 1:throw Error(n(345));case 2:zs(s,sr,Ao);break;case 3:if(Jo(s,g),(g&130023424)===g&&(l=MA+500-Et(),10<l)){if(Ii(s,0)!==0)break;if(v=s.suspendedLanes,(v&g)!==g){zn(),s.pingedLanes|=s.suspendedLanes&v;break}s.timeoutHandle=Qp(zs.bind(null,s,sr,Ao),l);break}zs(s,sr,Ao);break;case 4:if(Jo(s,g),(g&4194240)===g)break;for(l=s.eventTimes,v=-1;0<g;){var O=31-on(g);S=1<<O,O=l[O],O>v&&(v=O),g&=~S}if(g=v,g=Et()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*q5(g/1960))-g,10<g){s.timeoutHandle=Qp(zs.bind(null,s,sr,Ao),g);break}zs(s,sr,Ao);break;case 5:zs(s,sr,Ao);break;default:throw Error(n(329))}}}return ar(s,Et()),s.callbackNode===f?i1.bind(null,s):null}function RA(s,l){var f=pc;return s.current.memoizedState.isDehydrated&&(js(s,l).flags|=256),s=_d(s,l),s!==2&&(l=sr,sr=f,l!==null&&LA(l)),s}function LA(s){sr===null?sr=s:sr.push.apply(sr,s)}function G5(s){for(var l=s;;){if(l.flags&16384){var f=l.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var g=0;g<f.length;g++){var v=f[g],S=v.getSnapshot;v=v.value;try{if(!ei(S(),v))return!1}catch{return!1}}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Jo(s,l){for(l&=~IA,l&=~Pd,s.suspendedLanes|=l,s.pingedLanes&=~l,s=s.expirationTimes;0<l;){var f=31-on(l),g=1<<f;s[f]=-1,l&=~g}}function o1(s){if((ft&6)!==0)throw Error(n(327));qa();var l=Ii(s,0);if((l&1)===0)return ar(s,Et()),null;var f=_d(s,l);if(s.tag!==0&&f===2){var g=F(s);g!==0&&(l=g,f=RA(s,g))}if(f===1)throw f=hc,js(s,0),Jo(s,l),ar(s,Et()),f;if(f===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=l,zs(s,sr,Ao),ar(s,Et()),null}function FA(s,l){var f=ft;ft|=1;try{return s(l)}finally{ft=f,ft===0&&(Ka=Et()+500,sd&&Vo())}}function Ns(s){Go!==null&&Go.tag===0&&(ft&6)===0&&qa();var l=ft;ft|=1;var f=jr.transition,g=Pe;try{if(jr.transition=null,Pe=1,s)return s()}finally{Pe=g,jr.transition=f,ft=l,(ft&6)===0&&Vo()}}function NA(){br=Ya.current,_t(Ya)}function js(s,l){s.finishedWork=null,s.finishedLanes=0;var f=s.timeoutHandle;if(f!==-1&&(s.timeoutHandle=-1,E5(f)),Jt!==null)for(f=Jt.return;f!==null;){var g=f;switch(Kp(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&id();break;case 3:Ua(),_t(rr),_t(Dn),sA();break;case 5:iA(g);break;case 4:Ua();break;case 13:_t(zt);break;case 19:_t(zt);break;case 10:$p(g.type._context);break;case 22:case 23:NA()}f=f.return}if(dn=s,Jt=s=Zo(s.current,null),xn=br=l,an=0,hc=null,IA=Pd=Fs=0,sr=pc=null,Os!==null){for(l=0;l<Os.length;l++)if(f=Os[l],g=f.interleaved,g!==null){f.interleaved=null;var v=g.next,S=f.pending;if(S!==null){var O=S.next;S.next=v,g.next=O}f.pending=g}Os=null}return s}function s1(s,l){do{var f=Jt;try{if(Zp(),gd.current=xd,md){for(var g=Qt.memoizedState;g!==null;){var v=g.queue;v!==null&&(v.pending=null),g=g.next}md=!1}if(Ls=0,un=sn=Qt=null,ac=!1,lc=0,TA.current=null,f===null||f.return===null){an=1,hc=l,Jt=null;break}e:{var S=s,O=f.return,H=f,K=l;if(l=xn,H.flags|=32768,K!==null&&typeof K=="object"&&typeof K.then=="function"){var oe=K,ve=H,xe=ve.tag;if((ve.mode&1)===0&&(xe===0||xe===11||xe===15)){var ge=ve.alternate;ge?(ve.updateQueue=ge.updateQueue,ve.memoizedState=ge.memoizedState,ve.lanes=ge.lanes):(ve.updateQueue=null,ve.memoizedState=null)}var Te=Iw(O);if(Te!==null){Te.flags&=-257,Mw(Te,O,H,S,l),Te.mode&1&&Tw(S,oe,l),l=Te,K=oe;var _e=l.updateQueue;if(_e===null){var Le=new Set;Le.add(K),l.updateQueue=Le}else _e.add(K);break e}else{if((l&1)===0){Tw(S,oe,l),jA();break e}K=Error(n(426))}}else if(Rt&&H.mode&1){var Wt=Iw(O);if(Wt!==null){(Wt.flags&65536)===0&&(Wt.flags|=256),Mw(Wt,O,H,S,l),Xp(Va(K,H));break e}}S=K=Va(K,H),an!==4&&(an=2),pc===null?pc=[S]:pc.push(S),S=O;do{switch(S.tag){case 3:S.flags|=65536,l&=-l,S.lanes|=l;var ee=Dw(S,K,l);tw(S,ee);break e;case 1:H=K;var G=S.type,re=S.stateNode;if((S.flags&128)===0&&(typeof G.getDerivedStateFromError=="function"||re!==null&&typeof re.componentDidCatch=="function"&&(qo===null||!qo.has(re)))){S.flags|=65536,l&=-l,S.lanes|=l;var ke=Bw(S,H,l);tw(S,ke);break e}}S=S.return}while(S!==null)}c1(f)}catch(Ne){l=Ne,Jt===f&&f!==null&&(Jt=f=f.return);continue}break}while(!0)}function a1(){var s=Cd.current;return Cd.current=xd,s===null?xd:s}function jA(){(an===0||an===3||an===2)&&(an=4),dn===null||(Fs&268435455)===0&&(Pd&268435455)===0||Jo(dn,xn)}function _d(s,l){var f=ft;ft|=2;var g=a1();(dn!==s||xn!==l)&&(Ao=null,js(s,l));do try{X5();break}catch(v){s1(s,v)}while(!0);if(Zp(),ft=f,Cd.current=g,Jt!==null)throw Error(n(261));return dn=null,xn=0,an}function X5(){for(;Jt!==null;)l1(Jt)}function J5(){for(;Jt!==null&&!va();)l1(Jt)}function l1(s){var l=f1(s.alternate,s,br);s.memoizedProps=s.pendingProps,l===null?c1(s):Jt=l,TA.current=null}function c1(s){var l=s;do{var f=l.alternate;if(s=l.return,(l.flags&32768)===0){if(f=U5(f,l,br),f!==null){Jt=f;return}}else{if(f=V5(f,l),f!==null){f.flags&=32767,Jt=f;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{an=6,Jt=null;return}}if(l=l.sibling,l!==null){Jt=l;return}Jt=l=s}while(l!==null);an===0&&(an=5)}function zs(s,l,f){var g=Pe,v=jr.transition;try{jr.transition=null,Pe=1,Z5(s,l,f,g)}finally{jr.transition=v,Pe=g}return null}function Z5(s,l,f,g){do qa();while(Go!==null);if((ft&6)!==0)throw Error(n(327));f=s.finishedWork;var v=s.finishedLanes;if(f===null)return null;if(s.finishedWork=null,s.finishedLanes=0,f===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var S=f.lanes|f.childLanes;if(he(s,S),s===dn&&(Jt=dn=null,xn=0),(f.subtreeFlags&2064)===0&&(f.flags&2064)===0||Bd||(Bd=!0,h1(Bi,function(){return qa(),null})),S=(f.flags&15990)!==0,(f.subtreeFlags&15990)!==0||S){S=jr.transition,jr.transition=null;var O=Pe;Pe=1;var H=ft;ft|=4,TA.current=null,Y5(s,f),$w(f,s),v5(jp),vr=!!Np,jp=Np=null,s.current=f,K5(f),ya(),ft=H,Pe=O,jr.transition=S}else s.current=f;if(Bd&&(Bd=!1,Go=s,Td=v),S=s.pendingLanes,S===0&&(qo=null),to(f.stateNode),ar(s,Et()),l!==null)for(g=s.onRecoverableError,f=0;f<l.length;f++)v=l[f],g(v.value,{componentStack:v.stack,digest:v.digest});if(Dd)throw Dd=!1,s=_A,_A=null,s;return(Td&1)!==0&&s.tag!==0&&qa(),S=s.pendingLanes,(S&1)!==0?s===OA?Ac++:(Ac=0,OA=s):Ac=0,Vo(),null}function qa(){if(Go!==null){var s=Ye(Td),l=jr.transition,f=Pe;try{if(jr.transition=null,Pe=16>s?16:s,Go===null)var g=!1;else{if(s=Go,Go=null,Td=0,(ft&6)!==0)throw Error(n(331));var v=ft;for(ft|=4,Me=s.current;Me!==null;){var S=Me,O=S.child;if((Me.flags&16)!==0){var H=S.deletions;if(H!==null){for(var K=0;K<H.length;K++){var oe=H[K];for(Me=oe;Me!==null;){var ve=Me;switch(ve.tag){case 0:case 11:case 15:fc(8,ve,S)}var xe=ve.child;if(xe!==null)xe.return=ve,Me=xe;else for(;Me!==null;){ve=Me;var ge=ve.sibling,Te=ve.return;if(qw(ve),ve===oe){Me=null;break}if(ge!==null){ge.return=Te,Me=ge;break}Me=Te}}}var _e=S.alternate;if(_e!==null){var Le=_e.child;if(Le!==null){_e.child=null;do{var Wt=Le.sibling;Le.sibling=null,Le=Wt}while(Le!==null)}}Me=S}}if((S.subtreeFlags&2064)!==0&&O!==null)O.return=S,Me=O;else e:for(;Me!==null;){if(S=Me,(S.flags&2048)!==0)switch(S.tag){case 0:case 11:case 15:fc(9,S,S.return)}var ee=S.sibling;if(ee!==null){ee.return=S.return,Me=ee;break e}Me=S.return}}var G=s.current;for(Me=G;Me!==null;){O=Me;var re=O.child;if((O.subtreeFlags&2064)!==0&&re!==null)re.return=O,Me=re;else e:for(O=G;Me!==null;){if(H=Me,(H.flags&2048)!==0)try{switch(H.tag){case 0:case 11:case 15:Ed(9,H)}}catch(Ne){Vt(H,H.return,Ne)}if(H===O){Me=null;break e}var ke=H.sibling;if(ke!==null){ke.return=H.return,Me=ke;break e}Me=H.return}}if(ft=v,Vo(),Fn&&typeof Fn.onPostCommitFiberRoot=="function")try{Fn.onPostCommitFiberRoot(gr,s)}catch{}g=!0}return g}finally{Pe=f,jr.transition=l}}return!1}function u1(s,l,f){l=Va(f,l),l=Dw(s,l,1),s=Yo(s,l,1),l=zn(),s!==null&&(Z(s,1,l),ar(s,l))}function Vt(s,l,f){if(s.tag===3)u1(s,s,f);else for(;l!==null;){if(l.tag===3){u1(l,s,f);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(qo===null||!qo.has(g))){s=Va(f,s),s=Bw(l,s,1),l=Yo(l,s,1),s=zn(),l!==null&&(Z(l,1,s),ar(l,s));break}}l=l.return}}function $5(s,l,f){var g=s.pingCache;g!==null&&g.delete(l),l=zn(),s.pingedLanes|=s.suspendedLanes&f,dn===s&&(xn&f)===f&&(an===4||an===3&&(xn&130023424)===xn&&500>Et()-MA?js(s,0):IA|=f),ar(s,l)}function d1(s,l){l===0&&((s.mode&1)===0?l=1:(l=no,no<<=1,(no&130023424)===0&&(no=4194304)));var f=zn();s=fo(s,l),s!==null&&(Z(s,l,f),ar(s,f))}function eM(s){var l=s.memoizedState,f=0;l!==null&&(f=l.retryLane),d1(s,f)}function tM(s,l){var f=0;switch(s.tag){case 13:var g=s.stateNode,v=s.memoizedState;v!==null&&(f=v.retryLane);break;case 19:g=s.stateNode;break;default:throw Error(n(314))}g!==null&&g.delete(l),d1(s,f)}var f1;f1=function(s,l,f){if(s!==null)if(s.memoizedProps!==l.pendingProps||rr.current)or=!0;else{if((s.lanes&f)===0&&(l.flags&128)===0)return or=!1,H5(s,l,f);or=(s.flags&131072)!==0}else or=!1,Rt&&(l.flags&1048576)!==0&&Wb(l,ld,l.index);switch(l.lanes=0,l.tag){case 2:var g=l.type;kd(s,l),s=l.pendingProps;var v=La(l,Dn.current);Ha(l,f),v=cA(null,l,g,s,v,f);var S=uA();return l.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,ir(g)?(S=!0,od(l)):S=!1,l.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,nA(l),v.updater=bd,l.stateNode=v,v._reactInternals=l,gA(l,g,s,f),l=xA(null,l,g,!0,S,f)):(l.tag=0,Rt&&S&&Yp(l),jn(null,l,v,f),l=l.child),l;case 16:g=l.elementType;e:{switch(kd(s,l),s=l.pendingProps,v=g._init,g=v(g._payload),l.type=g,v=l.tag=rM(g),s=ni(g,s),v){case 0:l=yA(null,l,g,s,f);break e;case 1:l=Nw(null,l,g,s,f);break e;case 11:l=_w(null,l,g,s,f);break e;case 14:l=Ow(null,l,g,ni(g.type,s),f);break e}throw Error(n(306,g,""))}return l;case 0:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:ni(g,v),yA(s,l,g,v,f);case 1:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:ni(g,v),Nw(s,l,g,v,f);case 3:e:{if(jw(l),s===null)throw Error(n(387));g=l.pendingProps,S=l.memoizedState,v=S.element,ew(s,l),pd(l,g,null,f);var O=l.memoizedState;if(g=O.element,S.isDehydrated)if(S={element:g,isDehydrated:!1,cache:O.cache,pendingSuspenseBoundaries:O.pendingSuspenseBoundaries,transitions:O.transitions},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){v=Va(Error(n(423)),l),l=zw(s,l,g,f,v);break e}else if(g!==v){v=Va(Error(n(424)),l),l=zw(s,l,g,f,v);break e}else for(xr=Qo(l.stateNode.containerInfo.firstChild),yr=l,Rt=!0,ti=null,f=Zb(l,null,g,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(ja(),g===v){l=po(s,l,f);break e}jn(s,l,g,f)}l=l.child}return l;case 5:return rw(l),s===null&&Gp(l),g=l.type,v=l.pendingProps,S=s!==null?s.memoizedProps:null,O=v.children,zp(g,v)?O=null:S!==null&&zp(g,S)&&(l.flags|=32),Fw(s,l),jn(s,l,O,f),l.child;case 6:return s===null&&Gp(l),null;case 13:return Qw(s,l,f);case 4:return rA(l,l.stateNode.containerInfo),g=l.pendingProps,s===null?l.child=za(l,null,g,f):jn(s,l,g,f),l.child;case 11:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:ni(g,v),_w(s,l,g,v,f);case 7:return jn(s,l,l.pendingProps,f),l.child;case 8:return jn(s,l,l.pendingProps.children,f),l.child;case 12:return jn(s,l,l.pendingProps.children,f),l.child;case 10:e:{if(g=l.type._context,v=l.pendingProps,S=l.memoizedProps,O=v.value,Bt(dd,g._currentValue),g._currentValue=O,S!==null)if(ei(S.value,O)){if(S.children===v.children&&!rr.current){l=po(s,l,f);break e}}else for(S=l.child,S!==null&&(S.return=l);S!==null;){var H=S.dependencies;if(H!==null){O=S.child;for(var K=H.firstContext;K!==null;){if(K.context===g){if(S.tag===1){K=ho(-1,f&-f),K.tag=2;var oe=S.updateQueue;if(oe!==null){oe=oe.shared;var ve=oe.pending;ve===null?K.next=K:(K.next=ve.next,ve.next=K),oe.pending=K}}S.lanes|=f,K=S.alternate,K!==null&&(K.lanes|=f),eA(S.return,f,l),H.lanes|=f;break}K=K.next}}else if(S.tag===10)O=S.type===l.type?null:S.child;else if(S.tag===18){if(O=S.return,O===null)throw Error(n(341));O.lanes|=f,H=O.alternate,H!==null&&(H.lanes|=f),eA(O,f,l),O=S.sibling}else O=S.child;if(O!==null)O.return=S;else for(O=S;O!==null;){if(O===l){O=null;break}if(S=O.sibling,S!==null){S.return=O.return,O=S;break}O=O.return}S=O}jn(s,l,v.children,f),l=l.child}return l;case 9:return v=l.type,g=l.pendingProps.children,Ha(l,f),v=Fr(v),g=g(v),l.flags|=1,jn(s,l,g,f),l.child;case 14:return g=l.type,v=ni(g,l.pendingProps),v=ni(g.type,v),Ow(s,l,g,v,f);case 15:return Rw(s,l,l.type,l.pendingProps,f);case 17:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:ni(g,v),kd(s,l),l.tag=1,ir(g)?(s=!0,od(l)):s=!1,Ha(l,f),Cw(l,g,v),gA(l,g,v,f),xA(null,l,g,!0,s,f);case 19:return Uw(s,l,f);case 22:return Lw(s,l,f)}throw Error(n(156,l.tag))};function h1(s,l){return eo(s,l)}function nM(s,l,f,g){this.tag=s,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(s,l,f,g){return new nM(s,l,f,g)}function zA(s){return s=s.prototype,!(!s||!s.isReactComponent)}function rM(s){if(typeof s=="function")return zA(s)?1:0;if(s!=null){if(s=s.$$typeof,s===q)return 11;if(s===Ae)return 14}return 2}function Zo(s,l){var f=s.alternate;return f===null?(f=zr(s.tag,l,s.key,s.mode),f.elementType=s.elementType,f.type=s.type,f.stateNode=s.stateNode,f.alternate=s,s.alternate=f):(f.pendingProps=l,f.type=s.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=s.flags&14680064,f.childLanes=s.childLanes,f.lanes=s.lanes,f.child=s.child,f.memoizedProps=s.memoizedProps,f.memoizedState=s.memoizedState,f.updateQueue=s.updateQueue,l=s.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=s.sibling,f.index=s.index,f.ref=s.ref,f}function Od(s,l,f,g,v,S){var O=2;if(g=s,typeof s=="function")zA(s)&&(O=1);else if(typeof s=="string")O=5;else e:switch(s){case U:return Qs(f.children,v,S,l);case V:O=8,v|=8;break;case Y:return s=zr(12,f,l,v|2),s.elementType=Y,s.lanes=S,s;case se:return s=zr(13,f,l,v),s.elementType=se,s.lanes=S,s;case fe:return s=zr(19,f,l,v),s.elementType=fe,s.lanes=S,s;case ue:return Rd(f,v,S,l);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case W:O=10;break e;case X:O=9;break e;case q:O=11;break e;case Ae:O=14;break e;case le:O=16,g=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return l=zr(O,f,l,v),l.elementType=s,l.type=g,l.lanes=S,l}function Qs(s,l,f,g){return s=zr(7,s,g,l),s.lanes=f,s}function Rd(s,l,f,g){return s=zr(22,s,g,l),s.elementType=ue,s.lanes=f,s.stateNode={isHidden:!1},s}function QA(s,l,f){return s=zr(6,s,null,l),s.lanes=f,s}function HA(s,l,f){return l=zr(4,s.children!==null?s.children:[],s.key,l),l.lanes=f,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}function iM(s,l,f,g,v){this.tag=l,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ne(0),this.expirationTimes=ne(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ne(0),this.identifierPrefix=g,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function UA(s,l,f,g,v,S,O,H,K){return s=new iM(s,l,f,H,K),l===1?(l=1,S===!0&&(l|=8)):l=0,S=zr(3,null,null,l),s.current=S,S.stateNode=s,S.memoizedState={element:g,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},nA(S),s}function oM(s,l,f){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:g==null?null:""+g,children:s,containerInfo:l,implementation:f}}function p1(s){if(!s)return Uo;s=s._reactInternals;e:{if(qr(s)!==s||s.tag!==1)throw Error(n(170));var l=s;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(ir(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(n(171))}if(s.tag===1){var f=s.type;if(ir(f))return Hb(s,f,l)}return l}function A1(s,l,f,g,v,S,O,H,K){return s=UA(f,g,!0,s,v,S,O,H,K),s.context=p1(null),f=s.current,g=zn(),v=Xo(f),S=ho(g,v),S.callback=l??null,Yo(f,S,v),s.current.lanes=v,Z(s,v,g),ar(s,g),s}function Ld(s,l,f,g){var v=l.current,S=zn(),O=Xo(v);return f=p1(f),l.context===null?l.context=f:l.pendingContext=f,l=ho(S,O),l.payload={element:s},g=g===void 0?null:g,g!==null&&(l.callback=g),s=Yo(v,l,O),s!==null&&(oi(s,v,O,S),hd(s,v,O)),O}function Fd(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function g1(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var f=s.retryLane;s.retryLane=f!==0&&f<l?f:l}}function VA(s,l){g1(s,l),(s=s.alternate)&&g1(s,l)}function sM(){return null}var m1=typeof reportError=="function"?reportError:function(s){console.error(s)};function WA(s){this._internalRoot=s}Nd.prototype.render=WA.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));Ld(s,l,null,null)},Nd.prototype.unmount=WA.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;Ns(function(){Ld(null,s,null,null)}),l[ao]=null}};function Nd(s){this._internalRoot=s}Nd.prototype.unstable_scheduleHydration=function(s){if(s){var l=Jn();s={blockedOn:null,target:s,priority:l};for(var f=0;f<_i.length&&l!==0&&l<_i[f].priority;f++);_i.splice(f,0,s),f===0&&_r(s)}};function YA(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function jd(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function v1(){}function aM(s,l,f,g,v){if(v){if(typeof g=="function"){var S=g;g=function(){var oe=Fd(O);S.call(oe)}}var O=A1(l,g,s,0,null,!1,!1,"",v1);return s._reactRootContainer=O,s[ao]=O.current,$l(s.nodeType===8?s.parentNode:s),Ns(),O}for(;v=s.lastChild;)s.removeChild(v);if(typeof g=="function"){var H=g;g=function(){var oe=Fd(K);H.call(oe)}}var K=UA(s,0,!1,null,null,!1,!1,"",v1);return s._reactRootContainer=K,s[ao]=K.current,$l(s.nodeType===8?s.parentNode:s),Ns(function(){Ld(l,K,f,g)}),K}function zd(s,l,f,g,v){var S=f._reactRootContainer;if(S){var O=S;if(typeof v=="function"){var H=v;v=function(){var K=Fd(O);H.call(K)}}Ld(l,O,s,v)}else O=aM(f,l,s,v,g);return Fd(O)}Ze=function(s){switch(s.tag){case 3:var l=s.stateNode;if(l.current.memoizedState.isDehydrated){var f=Ti(l.pendingLanes);f!==0&&(Se(l,f|1),ar(l,Et()),(ft&6)===0&&(Ka=Et()+500,Vo()))}break;case 13:Ns(function(){var g=fo(s,1);if(g!==null){var v=zn();oi(g,s,1,v)}}),VA(s,1)}},wt=function(s){if(s.tag===13){var l=fo(s,134217728);if(l!==null){var f=zn();oi(l,s,134217728,f)}VA(s,134217728)}},Xn=function(s){if(s.tag===13){var l=Xo(s),f=fo(s,l);if(f!==null){var g=zn();oi(f,s,l,g)}VA(s,l)}},Jn=function(){return Pe},En=function(s,l){var f=Pe;try{return Pe=s,l()}finally{Pe=f}},yt=function(s,l,f){switch(l){case"input":if(_n(s,f),l=f.name,f.type==="radio"&&l!=null){for(f=s;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<f.length;l++){var g=f[l];if(g!==s&&g.form===s.form){var v=rd(g);if(!v)throw Error(n(90));tn(g),_n(g,v)}}}break;case"textarea":On(s,f);break;case"select":l=f.value,l!=null&&Ut(s,!!f.multiple,l,!1)}},Xt=FA,Yr=Ns;var lM={usingClientEntryPoint:!1,Events:[nc,Oa,rd,Ar,Ln,FA]},gc={findFiberByHostInstance:Ts,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},cM={bundleType:gc.bundleType,version:gc.version,rendererPackageName:gc.rendererPackageName,rendererConfig:gc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=$i(s),s===null?null:s.stateNode},findFiberByHostInstance:gc.findFiberByHostInstance||sM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qd.isDisabled&&Qd.supportsFiber)try{gr=Qd.inject(cM),Fn=Qd}catch{}}return Qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lM,Qn.createPortal=function(s,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!YA(l))throw Error(n(200));return oM(s,l,null,f)},Qn.createRoot=function(s,l){if(!YA(s))throw Error(n(299));var f=!1,g="",v=m1;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onRecoverableError!==void 0&&(v=l.onRecoverableError)),l=UA(s,1,!1,null,null,f,!1,g,v),s[ao]=l.current,$l(s.nodeType===8?s.parentNode:s),new WA(l)},Qn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=$i(l),s=s===null?null:s.stateNode,s},Qn.flushSync=function(s){return Ns(s)},Qn.hydrate=function(s,l,f){if(!jd(l))throw Error(n(200));return zd(null,s,l,!0,f)},Qn.hydrateRoot=function(s,l,f){if(!YA(s))throw Error(n(405));var g=f!=null&&f.hydratedSources||null,v=!1,S="",O=m1;if(f!=null&&(f.unstable_strictMode===!0&&(v=!0),f.identifierPrefix!==void 0&&(S=f.identifierPrefix),f.onRecoverableError!==void 0&&(O=f.onRecoverableError)),l=A1(l,null,s,1,f??null,v,!1,S,O),s[ao]=l.current,$l(s),g)for(s=0;s<g.length;s++)f=g[s],v=f._getVersion,v=v(f._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[f,v]:l.mutableSourceEagerHydrationData.push(f,v);return new Nd(l)},Qn.render=function(s,l,f){if(!jd(l))throw Error(n(200));return zd(null,s,l,!1,f)},Qn.unmountComponentAtNode=function(s){if(!jd(s))throw Error(n(40));return s._reactRootContainer?(Ns(function(){zd(null,null,s,!1,function(){s._reactRootContainer=null,s[ao]=null})}),!0):!1},Qn.unstable_batchedUpdates=FA,Qn.unstable_renderSubtreeIntoContainer=function(s,l,f,g){if(!jd(f))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return zd(s,l,f,!1,g)},Qn.version="18.3.1-next-f1338f8080-20240426",Qn}var ag;function O1(){if(ag)return Yd.exports;ag=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Yd.exports=_1(),Yd.exports}var lg;function R1(){if(lg)return vc;lg=1;var t=O1();return vc.createRoot=t.createRoot,vc.hydrateRoot=t.hydrateRoot,vc}var L1=R1();const Gd=(t=900)=>document.body.clientWidth>=t?"desktop":"mobile",cg=(t=900)=>{const[e,n]=_.useState(Gd(t));return _.useEffect(()=>{window.addEventListener("resize",()=>n(Gd(t)))},[]),e},Qi=(t,e,n=[])=>{L1.createRoot(e.attachShadow({mode:"open"})).render(E.jsxs(_.StrictMode,{children:[t,n.map(i=>E.jsx("style",{children:i},i))]}))},ug=()=>window.pageYOffset!==void 0?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,dg={},yc={},F1=(t,{cache:e=!0,corsProxy:n=!1}={cache:!0,corsProxy:!1})=>{if(e&&t in dg)return dg[t];if(t in yc)return yc[t];const r=fetch(n?`https://corsproxy.io/?${encodeURIComponent(t)}`:t).then(i=>{if(delete yc[t],i.status<200||i.status>299)return{error:{status:i.status}};try{return i.json()}catch(o){return{error:{message:o}}}});return yc[t]=r,r},Mn=(t,{cache:e=!0,corsProxy:n=!1,defaultValue:r=null}={cache:!0,corsProxy:!1,defaultValue:null})=>{const[i,o]=_.useState(r);let a=!1;return Array.isArray(t)||(t=t?[t]:[],a=!0),_.useEffect(()=>{t.length&&(async()=>{const c=await Promise.all(t.map(d=>F1(d,{cache:e,corsProxy:n}))),u=a?c[0]:c;o(u)})()},[t.join(" ")]),i},fg=()=>{const t=Mn("https://operations-api.access-ci.org/wh2/cider/v1/access-active-groups/type/resource-catalog.access-ci.org/");return Xd([t],({results:e})=>{const{active_groups:n,feature_categories:r,features:i,organizations:o,resources:a}=e,c=[{tagCategoryId:-1,name:"Resource Provider",tags:[]}],u=[-1];for(let k of r)[100,102,103].includes(k.feature_category_id)&&(c.push({tagCategoryId:k.feature_category_id,name:k.feature_category_name,tags:[]}),u.push(k.feature_category_id));c.sort((k,x)=>k.name.localeCompare(x.name));const d=i.filter(k=>u.includes(k.feature_category_id)).map(k=>({tagId:k.feature_id,name:k.feature_name,tagCategoryId:k.feature_category_id})),h={};for(let k of o)d.push({tagId:k.organization_id*-1,name:k.organization_name,tagCategoryId:-1,iconUri:k.organization_favicon_url||null}),h[k.organization_id]=k;d.sort((k,x)=>k.name.localeCompare(x.name));const p=d.map(k=>k.tagId),A=[{resourceCategoryId:1,name:"Compute & Storage Resources",resourceGroups:[],resourceGroupIds:[]},{resourceCategoryId:2,name:"Program & Other Resources",resourceGroups:[],resourceGroupIds:[]}],m=n.filter(k=>k.rollup_info_resourceids).map(k=>({infoGroupId:k.info_groupid,name:k.group_descriptive_name,description:k.group_description,infoResourceIds:k.rollup_info_resourceids,imageUri:k.group_logo_url?`https://cider.access-ci.org/public/groups/${k.group_logo_url.match(/[0-9]+/)[0]}/logo`:null,tagIds:[...k.rollup_organization_ids.map(x=>x*-1).filter(x=>p.includes(x)),...k.rollup_feature_ids.filter(x=>p.includes(x))],resourceCategoryId:k.rollup_feature_ids.includes(137)?2:1,accessAllocated:k.rollup_feature_ids.includes(139),organizations:k.rollup_organization_ids.map(x=>h[x]).filter(x=>x),resources:a.filter(x=>k.rollup_info_resourceids.includes(x.info_resourceid))})),y=m.find(k=>k.infoGroupId==="cloudbank.access-ci.org");if(y)for(const k of["Amazon Web Services","Google Cloud","IBM Cloud","Microsoft Azure"])m.push({...y,infoGroupId:`${k.toLowerCase().replaceAll(" ","-")}${y.infoGroupId}`,parentInfoGroupId:y.infoGroupId,name:k});return m.sort((k,x)=>k.name.localeCompare(x.name)),j1({resourceCategories:A,resourceGroups:m,tags:d,tagCategories:c})})},Za=(t,e=null)=>{const n=fg();return n&&n.resourceGroups.find(r=>r.infoGroupId==t)||e},N1=(t,e=[])=>{const n=Mn(`https://operations-api.access-ci.org/wh2/cider/v1/access-active/info_groupid/${t}/?format=json`);return n&&!n.error?n.results:e},Xd=(t,e,n=null)=>_.useMemo(()=>{if(!t.length)return n;for(let r of t)if(!r||r.error)return n;return e.apply(null,t)},t),j1=({resourceCategories:t,resourceGroups:e,tags:n,tagCategories:r})=>{const i={};for(let c of r)c.tags=[],i[c.tagCategoryId]=c;const o={};for(let c of n)c.tagCategory=i[c.tagCategoryId],c.tagCategory.tags.push(c),c.resources=[],o[c.tagId]=c;const a={};for(let c of t)c.resourceGroups=[],a[c.resourceCategoryId]=c;for(let c of e)c.resourceCategory=a[c.resourceCategoryId],c.resourceCategory.resourceGroups.push(c),c.tags=c.tagIds.map(u=>o[u]);return{resourceCategories:t,resourceGroups:e,tags:n,tagCategories:r}},z1=({resourceGroups:t,tags:e,tagCategories:n},r)=>{const i=new Set,o=new Set,a=new Set,c=new Set(r);for(let h of e)c.has(h.tagId)&&a.add(h.tagCategoryId);const u=n.filter(({tagCategoryId:h})=>a.has(h)),d=new Set(e.filter(h=>!a.has(h.tagCategoryId)).map(h=>h.tagId));for(let h of t){let p=!0;for(let A of u){let m=!1;for(let y of A.tags)if(c.has(y.tagId)&&h.tags.includes(y)){m=!0;break}if(!m){p=!1;break}}if(p){o.add(h.infoGroupId),i.add(h.resourceCategoryId);for(let A of h.tagIds)d.delete(A)}}return{disabledTagIds:d,resourceCategoryIds:i,infoGroupIds:o,tagCategoryIds:a,tagIds:c}},hg=t=>{let e=t.match(/href="([^"]+)"/);return e?e[1]:null},Jd=t=>t.replace(/(<[^>]+>)/g,"").replace(/&nbsp;/g," "),Zd=t=>{const e=[];for(let n of t.split(/(\<\/p\>)|[\n\r]+/g)){if(!n)continue;const r=Array.from(n.matchAll(/<a([^>]+)>([^<]+)<\/a>/g)),i=n.split(/<a[^<]+<\/a>/g),o=[];for(;i.length>0;){o.push(Jd(i.shift()));let a=r.shift();if(a){let c=hg(a[1]);c&&o.push(E.jsx("a",{href:c,children:a[2]}))}}e.push(E.jsx("p",{children:o},n))}return e},Q1=({showAfterScroll:t=300})=>{const[e,n]=_.useState(!1);return _.useEffect(()=>{window.addEventListener("scroll",()=>n(ug()>=t))},[]),E.jsx("button",{className:`scroll-to-top ${e?"visible":""}`,title:"Return to Top",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:"Return to Top"})},H1=(t={})=>E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"container",children:[E.jsxs("div",{className:"upper",children:[E.jsxs("div",{className:"about",children:[E.jsxs("p",{className:"awards",children:["ACCESS is an advanced computing and data resource program supported by the U.S. National Science Foundation (NSF) under the Office of Advanced Cyberinfrastructure awards"," ",E.jsx(Ja,{number:2138259}),", ",E.jsx(Ja,{number:2138286}),","," ",E.jsx(Ja,{number:2138307}),", ",E.jsx(Ja,{number:2137603})," and"," ",E.jsx(Ja,{number:2138296}),"."]}),E.jsx("p",{className:"disclaimer",children:"Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of NSF."}),E.jsx("a",{className:"contact",href:"https://access-ci.org/contact/",children:"Contact ACCESS"}),E.jsx(mc,{className:"social",items:C1})]}),E.jsxs("div",{className:"personas",children:[E.jsx("p",{children:"For:"}),E.jsx(mc,{items:$A})]})]}),E.jsxs("div",{className:"lower",children:[E.jsx(rg,{siteName:"ACCESS",siteUrl:"https://access-ci.org",placement:"footer"}),E.jsx(mc,{className:"links",items:P1})]})]}),E.jsx(Q1,{...t})]}),U1=(t={})=>E.jsx("div",{className:"container",children:E.jsx(rg,{...t})}),pg=({autoOpenMode:t,classes:e="",href:n="",html:r="",items:i,mode:o,name:a,onClick:c,open:u,parentId:d="root",setOpen:h})=>{const p=_.useId(),A=u[d]==p,m=A||t==o,y=()=>h({...u,[d]:A?null:p});if(r)return E.jsx("div",{dangerouslySetInnerHTML:{__html:r}});if(n||c)return E.jsx("a",{href:n||"#",onClick:c,className:`item ${e||""}`,children:a});if(i)return E.jsxs(E.Fragment,{children:[a&&E.jsx("button",{"aria-expanded":m,"aria-controls":p,className:`item ${m?"expanded":"collapsed"}`,onClick:y,children:a}),E.jsx("ul",{className:e,id:p,hidden:!m,"aria-hidden":!m,children:i.map(({autoOpenMode:k,classes:x,href:C,html:M,items:D,name:P,onClick:N})=>E.jsx("li",{className:x||"",children:E.jsx(pg,{autoOpenMode:k,href:C,html:M,items:D,mode:o,name:P,onClick:N,open:u,parentId:p,setOpen:h})},P||M))})]})},Ag=({classes:t,items:e,name:n,target:r})=>{const i=cg(1280),[o,a]=_.useState({});_.useEffect(()=>{document.body.addEventListener("click",u=>{u.target!=r&&Gd()=="desktop"&&a({})}),r.addEventListener("keydown",({key:u})=>{u=="Escape"&&a({})})},[]);const c=t?.includes("universal")?"ACCESS universal navigation":t?.includes("site")?`${n}`:n;return E.jsx("nav",{className:`menu ${t||""}`,"aria-label":c,children:E.jsx(pg,{autoOpenMode:"desktop",items:e,mode:i,name:n,open:o,setOpen:a})})},V1=({items:t,siteName:e=""})=>{const n=cg(768),r=t.map(({name:i,href:o,items:a})=>{if(n=="mobile")for(;!o;)o=a[0].href,a=a[0];return o?E.jsx("div",{className:"column",children:E.jsx("h3",{children:E.jsx("a",{href:o,children:i})})},i):E.jsxs("div",{className:"column",children:[E.jsx("h3",{children:i}),E.jsx(mc,{items:a})]},i)});return E.jsxs("nav",{className:"footer",children:[E.jsxs("h2",{children:["ACCESS ",e]}),E.jsx("div",{className:"columns",children:r})]})};/**
40
+ `+S.stack}return{value:s,source:l,stack:v,digest:null}}function mA(s,l,f){return{value:s,source:null,stack:f??null,digest:l??null}}function vA(s,l){try{console.error(l.value)}catch(f){setTimeout(function(){throw f})}}var j5=typeof WeakMap=="function"?WeakMap:Map;function Dw(s,l,f){f=ho(-1,f),f.tag=3,f.payload={element:null};var g=l.value;return f.callback=function(){Dd||(Dd=!0,_A=g),vA(s,l)},f}function Bw(s,l,f){f=ho(-1,f),f.tag=3;var g=s.type.getDerivedStateFromError;if(typeof g=="function"){var v=l.value;f.payload=function(){return g(v)},f.callback=function(){vA(s,l)}}var S=s.stateNode;return S!==null&&typeof S.componentDidCatch=="function"&&(f.callback=function(){vA(s,l),typeof g!="function"&&(qo===null?qo=new Set([this]):qo.add(this));var O=l.stack;this.componentDidCatch(l.value,{componentStack:O!==null?O:""})}),f}function Tw(s,l,f){var g=s.pingCache;if(g===null){g=s.pingCache=new j5;var v=new Set;g.set(l,v)}else v=g.get(l),v===void 0&&(v=new Set,g.set(l,v));v.has(f)||(v.add(f),s=$5.bind(null,s,l,f),l.then(s,s))}function Iw(s){do{var l;if((l=s.tag===13)&&(l=s.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return s;s=s.return}while(s!==null);return null}function Mw(s,l,f,g,v){return(s.mode&1)===0?(s===l?s.flags|=65536:(s.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(l=ho(-1,1),l.tag=2,Yo(f,l,1))),f.lanes|=1),s):(s.flags|=65536,s.lanes=v,s)}var z5=P.ReactCurrentOwner,or=!1;function jn(s,l,f,g){l.child=s===null?Zb(l,null,f,g):za(l,s.child,f,g)}function _w(s,l,f,g,v){f=f.render;var S=l.ref;return Ha(l,v),g=cA(s,l,f,g,S,v),f=uA(),s!==null&&!or?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~v,po(s,l,v)):(Rt&&f&&Yp(l),l.flags|=1,jn(s,l,g,v),l.child)}function Ow(s,l,f,g,v){if(s===null){var S=f.type;return typeof S=="function"&&!zA(S)&&S.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(l.tag=15,l.type=S,Rw(s,l,S,g,v)):(s=Od(f.type,null,g,l,l.mode,v),s.ref=l.ref,s.return=l,l.child=s)}if(S=s.child,(s.lanes&v)===0){var O=S.memoizedProps;if(f=f.compare,f=f!==null?f:Xl,f(O,g)&&s.ref===l.ref)return po(s,l,v)}return l.flags|=1,s=Zo(S,g),s.ref=l.ref,s.return=l,l.child=s}function Rw(s,l,f,g,v){if(s!==null){var S=s.memoizedProps;if(Xl(S,g)&&s.ref===l.ref)if(or=!1,l.pendingProps=g=S,(s.lanes&v)!==0)(s.flags&131072)!==0&&(or=!0);else return l.lanes=s.lanes,po(s,l,v)}return yA(s,l,f,g,v)}function Lw(s,l,f){var g=l.pendingProps,v=g.children,S=s!==null?s.memoizedState:null;if(g.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bt(Ya,br),br|=f;else{if((f&1073741824)===0)return s=S!==null?S.baseLanes|f:f,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:s,cachePool:null,transitions:null},l.updateQueue=null,Bt(Ya,br),br|=s,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=S!==null?S.baseLanes:f,Bt(Ya,br),br|=g}else S!==null?(g=S.baseLanes|f,l.memoizedState=null):g=f,Bt(Ya,br),br|=g;return jn(s,l,v,f),l.child}function Fw(s,l){var f=l.ref;(s===null&&f!==null||s!==null&&s.ref!==f)&&(l.flags|=512,l.flags|=2097152)}function yA(s,l,f,g,v){var S=ir(f)?Is:Dn.current;return S=La(l,S),Ha(l,v),f=cA(s,l,f,g,S,v),g=uA(),s!==null&&!or?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~v,po(s,l,v)):(Rt&&g&&Yp(l),l.flags|=1,jn(s,l,f,v),l.child)}function Nw(s,l,f,g,v){if(ir(f)){var S=!0;od(l)}else S=!1;if(Ha(l,v),l.stateNode===null)kd(s,l),Cw(l,f,g),gA(l,f,g,v),g=!0;else if(s===null){var O=l.stateNode,H=l.memoizedProps;O.props=H;var K=O.context,oe=f.contextType;typeof oe=="object"&&oe!==null?oe=Fr(oe):(oe=ir(f)?Is:Dn.current,oe=La(l,oe));var ve=f.getDerivedStateFromProps,xe=typeof ve=="function"||typeof O.getSnapshotBeforeUpdate=="function";xe||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(H!==g||K!==oe)&&Pw(l,O,g,oe),Wo=!1;var ge=l.memoizedState;O.state=ge,pd(l,g,O,v),K=l.memoizedState,H!==g||ge!==K||rr.current||Wo?(typeof ve=="function"&&(AA(l,f,ve,g),K=l.memoizedState),(H=Wo||Ew(l,f,H,g,ge,K,oe))?(xe||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"&&(l.flags|=4194308)):(typeof O.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=K),O.props=g,O.state=K,O.context=oe,g=H):(typeof O.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{O=l.stateNode,ew(s,l),H=l.memoizedProps,oe=l.type===l.elementType?H:ni(l.type,H),O.props=oe,xe=l.pendingProps,ge=O.context,K=f.contextType,typeof K=="object"&&K!==null?K=Fr(K):(K=ir(f)?Is:Dn.current,K=La(l,K));var Te=f.getDerivedStateFromProps;(ve=typeof Te=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(H!==xe||ge!==K)&&Pw(l,O,g,K),Wo=!1,ge=l.memoizedState,O.state=ge,pd(l,g,O,v);var _e=l.memoizedState;H!==xe||ge!==_e||rr.current||Wo?(typeof Te=="function"&&(AA(l,f,Te,g),_e=l.memoizedState),(oe=Wo||Ew(l,f,oe,g,ge,_e,K)||!1)?(ve||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(g,_e,K),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(g,_e,K)),typeof O.componentDidUpdate=="function"&&(l.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof O.componentDidUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=_e),O.props=g,O.state=_e,O.context=K,g=oe):(typeof O.componentDidUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||H===s.memoizedProps&&ge===s.memoizedState||(l.flags|=1024),g=!1)}return xA(s,l,f,g,S,v)}function xA(s,l,f,g,v,S){Fw(s,l);var O=(l.flags&128)!==0;if(!g&&!O)return v&&Ub(l,f,!1),po(s,l,S);g=l.stateNode,z5.current=l;var H=O&&typeof f.getDerivedStateFromError!="function"?null:g.render();return l.flags|=1,s!==null&&O?(l.child=za(l,s.child,null,S),l.child=za(l,null,H,S)):jn(s,l,H,S),l.memoizedState=g.state,v&&Ub(l,f,!0),l.child}function jw(s){var l=s.stateNode;l.pendingContext?Qb(s,l.pendingContext,l.pendingContext!==l.context):l.context&&Qb(s,l.context,!1),rA(s,l.containerInfo)}function zw(s,l,f,g,v){return ja(),Xp(v),l.flags|=256,jn(s,l,f,g),l.child}var bA={dehydrated:null,treeContext:null,retryLane:0};function wA(s){return{baseLanes:s,cachePool:null,transitions:null}}function Qw(s,l,f){var g=l.pendingProps,v=zt.current,S=!1,O=(l.flags&128)!==0,H;if((H=O)||(H=s!==null&&s.memoizedState===null?!1:(v&2)!==0),H?(S=!0,l.flags&=-129):(s===null||s.memoizedState!==null)&&(v|=1),Bt(zt,v&1),s===null)return Gp(l),s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((l.mode&1)===0?l.lanes=1:s.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(O=g.children,s=g.fallback,S?(g=l.mode,S=l.child,O={mode:"hidden",children:O},(g&1)===0&&S!==null?(S.childLanes=0,S.pendingProps=O):S=Rd(O,g,0,null),s=Qs(s,g,f,null),S.return=l,s.return=l,S.sibling=s,l.child=S,l.child.memoizedState=wA(f),l.memoizedState=bA,s):kA(l,O));if(v=s.memoizedState,v!==null&&(H=v.dehydrated,H!==null))return Q5(s,l,O,g,H,v,f);if(S){S=g.fallback,O=l.mode,v=s.child,H=v.sibling;var K={mode:"hidden",children:g.children};return(O&1)===0&&l.child!==v?(g=l.child,g.childLanes=0,g.pendingProps=K,l.deletions=null):(g=Zo(v,K),g.subtreeFlags=v.subtreeFlags&14680064),H!==null?S=Zo(H,S):(S=Qs(S,O,f,null),S.flags|=2),S.return=l,g.return=l,g.sibling=S,l.child=g,g=S,S=l.child,O=s.child.memoizedState,O=O===null?wA(f):{baseLanes:O.baseLanes|f,cachePool:null,transitions:O.transitions},S.memoizedState=O,S.childLanes=s.childLanes&~f,l.memoizedState=bA,g}return S=s.child,s=S.sibling,g=Zo(S,{mode:"visible",children:g.children}),(l.mode&1)===0&&(g.lanes=f),g.return=l,g.sibling=null,s!==null&&(f=l.deletions,f===null?(l.deletions=[s],l.flags|=16):f.push(s)),l.child=g,l.memoizedState=null,g}function kA(s,l){return l=Rd({mode:"visible",children:l},s.mode,0,null),l.return=s,s.child=l}function wd(s,l,f,g){return g!==null&&Xp(g),za(l,s.child,null,f),s=kA(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function Q5(s,l,f,g,v,S,O){if(f)return l.flags&256?(l.flags&=-257,g=mA(Error(n(422))),wd(s,l,O,g)):l.memoizedState!==null?(l.child=s.child,l.flags|=128,null):(S=g.fallback,v=l.mode,g=Rd({mode:"visible",children:g.children},v,0,null),S=Qs(S,v,O,null),S.flags|=2,g.return=l,S.return=l,g.sibling=S,l.child=g,(l.mode&1)!==0&&za(l,s.child,null,O),l.child.memoizedState=wA(O),l.memoizedState=bA,S);if((l.mode&1)===0)return wd(s,l,O,null);if(v.data==="$!"){if(g=v.nextSibling&&v.nextSibling.dataset,g)var H=g.dgst;return g=H,S=Error(n(419)),g=mA(S,g,void 0),wd(s,l,O,g)}if(H=(O&s.childLanes)!==0,or||H){if(g=dn,g!==null){switch(O&-O){case 4:v=2;break;case 16:v=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:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(g.suspendedLanes|O))!==0?0:v,v!==0&&v!==S.retryLane&&(S.retryLane=v,fo(s,v),oi(g,s,v,-1))}return jA(),g=mA(Error(n(421))),wd(s,l,O,g)}return v.data==="$?"?(l.flags|=128,l.child=s.child,l=eM.bind(null,s),v._reactRetry=l,null):(s=S.treeContext,xr=Qo(v.nextSibling),yr=l,Rt=!0,ti=null,s!==null&&(Rr[Lr++]=co,Rr[Lr++]=uo,Rr[Lr++]=Ms,co=s.id,uo=s.overflow,Ms=l),l=kA(l,g.children),l.flags|=4096,l)}function Hw(s,l,f){s.lanes|=l;var g=s.alternate;g!==null&&(g.lanes|=l),eA(s.return,l,f)}function SA(s,l,f,g,v){var S=s.memoizedState;S===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:f,tailMode:v}:(S.isBackwards=l,S.rendering=null,S.renderingStartTime=0,S.last=g,S.tail=f,S.tailMode=v)}function Uw(s,l,f){var g=l.pendingProps,v=g.revealOrder,S=g.tail;if(jn(s,l,g.children,f),g=zt.current,(g&2)!==0)g=g&1|2,l.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Hw(s,f,l);else if(s.tag===19)Hw(s,f,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}g&=1}if(Bt(zt,g),(l.mode&1)===0)l.memoizedState=null;else switch(v){case"forwards":for(f=l.child,v=null;f!==null;)s=f.alternate,s!==null&&Ad(s)===null&&(v=f),f=f.sibling;f=v,f===null?(v=l.child,l.child=null):(v=f.sibling,f.sibling=null),SA(l,!1,v,f,S);break;case"backwards":for(f=null,v=l.child,l.child=null;v!==null;){if(s=v.alternate,s!==null&&Ad(s)===null){l.child=v;break}s=v.sibling,v.sibling=f,f=v,v=s}SA(l,!0,f,null,S);break;case"together":SA(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function kd(s,l){(l.mode&1)===0&&s!==null&&(s.alternate=null,l.alternate=null,l.flags|=2)}function po(s,l,f){if(s!==null&&(l.dependencies=s.dependencies),Fs|=l.lanes,(f&l.childLanes)===0)return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,f=Zo(s,s.pendingProps),l.child=f,f.return=l;s.sibling!==null;)s=s.sibling,f=f.sibling=Zo(s,s.pendingProps),f.return=l;f.sibling=null}return l.child}function H5(s,l,f){switch(l.tag){case 3:jw(l),ja();break;case 5:rw(l);break;case 1:ir(l.type)&&od(l);break;case 4:rA(l,l.stateNode.containerInfo);break;case 10:var g=l.type._context,v=l.memoizedProps.value;Bt(dd,g._currentValue),g._currentValue=v;break;case 13:if(g=l.memoizedState,g!==null)return g.dehydrated!==null?(Bt(zt,zt.current&1),l.flags|=128,null):(f&l.child.childLanes)!==0?Qw(s,l,f):(Bt(zt,zt.current&1),s=po(s,l,f),s!==null?s.sibling:null);Bt(zt,zt.current&1);break;case 19:if(g=(f&l.childLanes)!==0,(s.flags&128)!==0){if(g)return Uw(s,l,f);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),Bt(zt,zt.current),g)break;return null;case 22:case 23:return l.lanes=0,Lw(s,l,f)}return po(s,l,f)}var Vw,EA,Ww,Yw;Vw=function(s,l){for(var f=l.child;f!==null;){if(f.tag===5||f.tag===6)s.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},EA=function(){},Ww=function(s,l,f,g){var v=s.memoizedProps;if(v!==g){s=l.stateNode,Rs(Ni.current);var S=null;switch(f){case"input":v=Ot(s,v),g=Ot(s,g),S=[];break;case"select":v=ce({},v,{value:void 0}),g=ce({},g,{value:void 0}),S=[];break;case"textarea":v=jt(s,v),g=jt(s,g),S=[];break;default:typeof v.onClick!="function"&&typeof g.onClick=="function"&&(s.onclick=nd)}Oe(f,g);var O;f=null;for(oe in v)if(!g.hasOwnProperty(oe)&&v.hasOwnProperty(oe)&&v[oe]!=null)if(oe==="style"){var H=v[oe];for(O in H)H.hasOwnProperty(O)&&(f||(f={}),f[O]="")}else oe!=="dangerouslySetInnerHTML"&&oe!=="children"&&oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&oe!=="autoFocus"&&(i.hasOwnProperty(oe)?S||(S=[]):(S=S||[]).push(oe,null));for(oe in g){var K=g[oe];if(H=v?.[oe],g.hasOwnProperty(oe)&&K!==H&&(K!=null||H!=null))if(oe==="style")if(H){for(O in H)!H.hasOwnProperty(O)||K&&K.hasOwnProperty(O)||(f||(f={}),f[O]="");for(O in K)K.hasOwnProperty(O)&&H[O]!==K[O]&&(f||(f={}),f[O]=K[O])}else f||(S||(S=[]),S.push(oe,f)),f=K;else oe==="dangerouslySetInnerHTML"?(K=K?K.__html:void 0,H=H?H.__html:void 0,K!=null&&H!==K&&(S=S||[]).push(oe,K)):oe==="children"?typeof K!="string"&&typeof K!="number"||(S=S||[]).push(oe,""+K):oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&(i.hasOwnProperty(oe)?(K!=null&&oe==="onScroll"&&Mt("scroll",s),S||H===K||(S=[])):(S=S||[]).push(oe,K))}f&&(S=S||[]).push("style",f);var oe=S;(l.updateQueue=oe)&&(l.flags|=4)}},Yw=function(s,l,f,g){f!==g&&(l.flags|=4)};function dc(s,l){if(!Rt)switch(s.tailMode){case"hidden":l=s.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s.tail=null:f.sibling=null;break;case"collapsed":f=s.tail;for(var g=null;f!==null;)f.alternate!==null&&(g=f),f=f.sibling;g===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:g.sibling=null}}function Tn(s){var l=s.alternate!==null&&s.alternate.child===s.child,f=0,g=0;if(l)for(var v=s.child;v!==null;)f|=v.lanes|v.childLanes,g|=v.subtreeFlags&14680064,g|=v.flags&14680064,v.return=s,v=v.sibling;else for(v=s.child;v!==null;)f|=v.lanes|v.childLanes,g|=v.subtreeFlags,g|=v.flags,v.return=s,v=v.sibling;return s.subtreeFlags|=g,s.childLanes=f,l}function U5(s,l,f){var g=l.pendingProps;switch(Kp(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tn(l),null;case 1:return ir(l.type)&&id(),Tn(l),null;case 3:return g=l.stateNode,Ua(),_t(rr),_t(Dn),sA(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(s===null||s.child===null)&&(cd(l)?l.flags|=4:s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ti!==null&&(LA(ti),ti=null))),EA(s,l),Tn(l),null;case 5:iA(l);var v=Rs(sc.current);if(f=l.type,s!==null&&l.stateNode!=null)Ww(s,l,f,g,v),s.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!g){if(l.stateNode===null)throw Error(n(166));return Tn(l),null}if(s=Rs(Ni.current),cd(l)){g=l.stateNode,f=l.type;var S=l.memoizedProps;switch(g[Fi]=l,g[tc]=S,s=(l.mode&1)!==0,f){case"dialog":Mt("cancel",g),Mt("close",g);break;case"iframe":case"object":case"embed":Mt("load",g);break;case"video":case"audio":for(v=0;v<Zl.length;v++)Mt(Zl[v],g);break;case"source":Mt("error",g);break;case"img":case"image":case"link":Mt("error",g),Mt("load",g);break;case"details":Mt("toggle",g);break;case"input":Sn(g,S),Mt("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!S.multiple},Mt("invalid",g);break;case"textarea":vt(g,S),Mt("invalid",g)}Oe(f,S),v=null;for(var O in S)if(S.hasOwnProperty(O)){var H=S[O];O==="children"?typeof H=="string"?g.textContent!==H&&(S.suppressHydrationWarning!==!0&&td(g.textContent,H,s),v=["children",H]):typeof H=="number"&&g.textContent!==""+H&&(S.suppressHydrationWarning!==!0&&td(g.textContent,H,s),v=["children",""+H]):i.hasOwnProperty(O)&&H!=null&&O==="onScroll"&&Mt("scroll",g)}switch(f){case"input":bt(g),An(g,S,!0);break;case"textarea":bt(g),qn(g);break;case"select":case"option":break;default:typeof S.onClick=="function"&&(g.onclick=nd)}g=v,l.updateQueue=g,g!==null&&(l.flags|=4)}else{O=v.nodeType===9?v:v.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Gn(f)),s==="http://www.w3.org/1999/xhtml"?f==="script"?(s=O.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof g.is=="string"?s=O.createElement(f,{is:g.is}):(s=O.createElement(f),f==="select"&&(O=s,g.multiple?O.multiple=!0:g.size&&(O.size=g.size))):s=O.createElementNS(s,f),s[Fi]=l,s[tc]=g,Vw(s,l,!1,!1),l.stateNode=s;e:{switch(O=tt(f,g),f){case"dialog":Mt("cancel",s),Mt("close",s),v=g;break;case"iframe":case"object":case"embed":Mt("load",s),v=g;break;case"video":case"audio":for(v=0;v<Zl.length;v++)Mt(Zl[v],s);v=g;break;case"source":Mt("error",s),v=g;break;case"img":case"image":case"link":Mt("error",s),Mt("load",s),v=g;break;case"details":Mt("toggle",s),v=g;break;case"input":Sn(s,g),v=Ot(s,g),Mt("invalid",s);break;case"option":v=g;break;case"select":s._wrapperState={wasMultiple:!!g.multiple},v=ce({},g,{value:void 0}),Mt("invalid",s);break;case"textarea":vt(s,g),v=jt(s,g),Mt("invalid",s);break;default:v=g}Oe(f,v),H=v;for(S in H)if(H.hasOwnProperty(S)){var K=H[S];S==="style"?ae(s,K):S==="dangerouslySetInnerHTML"?(K=K?K.__html:void 0,K!=null&&de(s,K)):S==="children"?typeof K=="string"?(f!=="textarea"||K!=="")&&Ie(s,K):typeof K=="number"&&Ie(s,""+K):S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&S!=="autoFocus"&&(i.hasOwnProperty(S)?K!=null&&S==="onScroll"&&Mt("scroll",s):K!=null&&D(s,S,K,O))}switch(f){case"input":bt(s),An(s,g,!1);break;case"textarea":bt(s),qn(s);break;case"option":g.value!=null&&s.setAttribute("value",""+ze(g.value));break;case"select":s.multiple=!!g.multiple,S=g.value,S!=null?Ut(s,!!g.multiple,S,!1):g.defaultValue!=null&&Ut(s,!!g.multiple,g.defaultValue,!0);break;default:typeof v.onClick=="function"&&(s.onclick=nd)}switch(f){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return Tn(l),null;case 6:if(s&&l.stateNode!=null)Yw(s,l,s.memoizedProps,g);else{if(typeof g!="string"&&l.stateNode===null)throw Error(n(166));if(f=Rs(sc.current),Rs(Ni.current),cd(l)){if(g=l.stateNode,f=l.memoizedProps,g[Fi]=l,(S=g.nodeValue!==f)&&(s=yr,s!==null))switch(s.tag){case 3:td(g.nodeValue,f,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&td(g.nodeValue,f,(s.mode&1)!==0)}S&&(l.flags|=4)}else g=(f.nodeType===9?f:f.ownerDocument).createTextNode(g),g[Fi]=l,l.stateNode=g}return Tn(l),null;case 13:if(_t(zt),g=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Rt&&xr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)Gb(),ja(),l.flags|=98560,S=!1;else if(S=cd(l),g!==null&&g.dehydrated!==null){if(s===null){if(!S)throw Error(n(318));if(S=l.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(n(317));S[Fi]=l}else ja(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Tn(l),S=!1}else ti!==null&&(LA(ti),ti=null),S=!0;if(!S)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=f,l):(g=g!==null,g!==(s!==null&&s.memoizedState!==null)&&g&&(l.child.flags|=8192,(l.mode&1)!==0&&(s===null||(zt.current&1)!==0?an===0&&(an=3):jA())),l.updateQueue!==null&&(l.flags|=4),Tn(l),null);case 4:return Ua(),EA(s,l),s===null&&$l(l.stateNode.containerInfo),Tn(l),null;case 10:return $p(l.type._context),Tn(l),null;case 17:return ir(l.type)&&id(),Tn(l),null;case 19:if(_t(zt),S=l.memoizedState,S===null)return Tn(l),null;if(g=(l.flags&128)!==0,O=S.rendering,O===null)if(g)dc(S,!1);else{if(an!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(O=Ad(s),O!==null){for(l.flags|=128,dc(S,!1),g=O.updateQueue,g!==null&&(l.updateQueue=g,l.flags|=4),l.subtreeFlags=0,g=f,f=l.child;f!==null;)S=f,s=g,S.flags&=14680066,O=S.alternate,O===null?(S.childLanes=0,S.lanes=s,S.child=null,S.subtreeFlags=0,S.memoizedProps=null,S.memoizedState=null,S.updateQueue=null,S.dependencies=null,S.stateNode=null):(S.childLanes=O.childLanes,S.lanes=O.lanes,S.child=O.child,S.subtreeFlags=0,S.deletions=null,S.memoizedProps=O.memoizedProps,S.memoizedState=O.memoizedState,S.updateQueue=O.updateQueue,S.type=O.type,s=O.dependencies,S.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),f=f.sibling;return Bt(zt,zt.current&1|2),l.child}s=s.sibling}S.tail!==null&&Et()>Ka&&(l.flags|=128,g=!0,dc(S,!1),l.lanes=4194304)}else{if(!g)if(s=Ad(O),s!==null){if(l.flags|=128,g=!0,f=s.updateQueue,f!==null&&(l.updateQueue=f,l.flags|=4),dc(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Rt)return Tn(l),null}else 2*Et()-S.renderingStartTime>Ka&&f!==1073741824&&(l.flags|=128,g=!0,dc(S,!1),l.lanes=4194304);S.isBackwards?(O.sibling=l.child,l.child=O):(f=S.last,f!==null?f.sibling=O:l.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=Et(),l.sibling=null,f=zt.current,Bt(zt,g?f&1|2:f&1),l):(Tn(l),null);case 22:case 23:return NA(),g=l.memoizedState!==null,s!==null&&s.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(br&1073741824)!==0&&(Tn(l),l.subtreeFlags&6&&(l.flags|=8192)):Tn(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function V5(s,l){switch(Kp(l),l.tag){case 1:return ir(l.type)&&id(),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return Ua(),_t(rr),_t(Dn),sA(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 5:return iA(l),null;case 13:if(_t(zt),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));ja()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return _t(zt),null;case 4:return Ua(),null;case 10:return $p(l.type._context),null;case 22:case 23:return NA(),null;case 24:return null;default:return null}}var Sd=!1,In=!1,W5=typeof WeakSet=="function"?WeakSet:Set,Me=null;function Wa(s,l){var f=s.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(g){Vt(s,l,g)}else f.current=null}function CA(s,l,f){try{f()}catch(g){Vt(s,l,g)}}var Kw=!1;function Y5(s,l){if(Np=vr,s=Eb(),Tp(s)){if("selectionStart"in s)var f={start:s.selectionStart,end:s.selectionEnd};else e:{f=(f=s.ownerDocument)&&f.defaultView||window;var g=f.getSelection&&f.getSelection();if(g&&g.rangeCount!==0){f=g.anchorNode;var v=g.anchorOffset,S=g.focusNode;g=g.focusOffset;try{f.nodeType,S.nodeType}catch{f=null;break e}var O=0,H=-1,K=-1,oe=0,ve=0,xe=s,ge=null;t:for(;;){for(var Te;xe!==f||v!==0&&xe.nodeType!==3||(H=O+v),xe!==S||g!==0&&xe.nodeType!==3||(K=O+g),xe.nodeType===3&&(O+=xe.nodeValue.length),(Te=xe.firstChild)!==null;)ge=xe,xe=Te;for(;;){if(xe===s)break t;if(ge===f&&++oe===v&&(H=O),ge===S&&++ve===g&&(K=O),(Te=xe.nextSibling)!==null)break;xe=ge,ge=xe.parentNode}xe=Te}f=H===-1||K===-1?null:{start:H,end:K}}else f=null}f=f||{start:0,end:0}}else f=null;for(jp={focusedElem:s,selectionRange:f},vr=!1,Me=l;Me!==null;)if(l=Me,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Me=s;else for(;Me!==null;){l=Me;try{var _e=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(_e!==null){var Le=_e.memoizedProps,Wt=_e.memoizedState,ee=l.stateNode,G=ee.getSnapshotBeforeUpdate(l.elementType===l.type?Le:ni(l.type,Le),Wt);ee.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var re=l.stateNode.containerInfo;re.nodeType===1?re.textContent="":re.nodeType===9&&re.documentElement&&re.removeChild(re.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ke){Vt(l,l.return,ke)}if(s=l.sibling,s!==null){s.return=l.return,Me=s;break}Me=l.return}return _e=Kw,Kw=!1,_e}function fc(s,l,f){var g=l.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var v=g=g.next;do{if((v.tag&s)===s){var S=v.destroy;v.destroy=void 0,S!==void 0&&CA(l,f,S)}v=v.next}while(v!==g)}}function Ed(s,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var f=l=l.next;do{if((f.tag&s)===s){var g=f.create;f.destroy=g()}f=f.next}while(f!==l)}}function PA(s){var l=s.ref;if(l!==null){var f=s.stateNode;switch(s.tag){case 5:s=f;break;default:s=f}typeof l=="function"?l(s):l.current=s}}function qw(s){var l=s.alternate;l!==null&&(s.alternate=null,qw(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&(delete l[Fi],delete l[tc],delete l[Up],delete l[D5],delete l[B5])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Gw(s){return s.tag===5||s.tag===3||s.tag===4}function Xw(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Gw(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function DA(s,l,f){var g=s.tag;if(g===5||g===6)s=s.stateNode,l?f.nodeType===8?f.parentNode.insertBefore(s,l):f.insertBefore(s,l):(f.nodeType===8?(l=f.parentNode,l.insertBefore(s,f)):(l=f,l.appendChild(s)),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=nd));else if(g!==4&&(s=s.child,s!==null))for(DA(s,l,f),s=s.sibling;s!==null;)DA(s,l,f),s=s.sibling}function BA(s,l,f){var g=s.tag;if(g===5||g===6)s=s.stateNode,l?f.insertBefore(s,l):f.appendChild(s);else if(g!==4&&(s=s.child,s!==null))for(BA(s,l,f),s=s.sibling;s!==null;)BA(s,l,f),s=s.sibling}var yn=null,ri=!1;function Ko(s,l,f){for(f=f.child;f!==null;)Jw(s,l,f),f=f.sibling}function Jw(s,l,f){if(Fn&&typeof Fn.onCommitFiberUnmount=="function")try{Fn.onCommitFiberUnmount(gr,f)}catch{}switch(f.tag){case 5:In||Wa(f,l);case 6:var g=yn,v=ri;yn=null,Ko(s,l,f),yn=g,ri=v,yn!==null&&(ri?(s=yn,f=f.stateNode,s.nodeType===8?s.parentNode.removeChild(f):s.removeChild(f)):yn.removeChild(f.stateNode));break;case 18:yn!==null&&(ri?(s=yn,f=f.stateNode,s.nodeType===8?Hp(s.parentNode,f):s.nodeType===1&&Hp(s,f),Oi(s)):Hp(yn,f.stateNode));break;case 4:g=yn,v=ri,yn=f.stateNode.containerInfo,ri=!0,Ko(s,l,f),yn=g,ri=v;break;case 0:case 11:case 14:case 15:if(!In&&(g=f.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){v=g=g.next;do{var S=v,O=S.destroy;S=S.tag,O!==void 0&&((S&2)!==0||(S&4)!==0)&&CA(f,l,O),v=v.next}while(v!==g)}Ko(s,l,f);break;case 1:if(!In&&(Wa(f,l),g=f.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=f.memoizedProps,g.state=f.memoizedState,g.componentWillUnmount()}catch(H){Vt(f,l,H)}Ko(s,l,f);break;case 21:Ko(s,l,f);break;case 22:f.mode&1?(In=(g=In)||f.memoizedState!==null,Ko(s,l,f),In=g):Ko(s,l,f);break;default:Ko(s,l,f)}}function Zw(s){var l=s.updateQueue;if(l!==null){s.updateQueue=null;var f=s.stateNode;f===null&&(f=s.stateNode=new W5),l.forEach(function(g){var v=tM.bind(null,s,g);f.has(g)||(f.add(g),g.then(v,v))})}}function ii(s,l){var f=l.deletions;if(f!==null)for(var g=0;g<f.length;g++){var v=f[g];try{var S=s,O=l,H=O;e:for(;H!==null;){switch(H.tag){case 5:yn=H.stateNode,ri=!1;break e;case 3:yn=H.stateNode.containerInfo,ri=!0;break e;case 4:yn=H.stateNode.containerInfo,ri=!0;break e}H=H.return}if(yn===null)throw Error(n(160));Jw(S,O,v),yn=null,ri=!1;var K=v.alternate;K!==null&&(K.return=null),v.return=null}catch(oe){Vt(v,l,oe)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)$w(l,s),l=l.sibling}function $w(s,l){var f=s.alternate,g=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(ii(l,s),zi(s),g&4){try{fc(3,s,s.return),Ed(3,s)}catch(Le){Vt(s,s.return,Le)}try{fc(5,s,s.return)}catch(Le){Vt(s,s.return,Le)}}break;case 1:ii(l,s),zi(s),g&512&&f!==null&&Wa(f,f.return);break;case 5:if(ii(l,s),zi(s),g&512&&f!==null&&Wa(f,f.return),s.flags&32){var v=s.stateNode;try{Ie(v,"")}catch(Le){Vt(s,s.return,Le)}}if(g&4&&(v=s.stateNode,v!=null)){var S=s.memoizedProps,O=f!==null?f.memoizedProps:S,H=s.type,K=s.updateQueue;if(s.updateQueue=null,K!==null)try{H==="input"&&S.type==="radio"&&S.name!=null&&nn(v,S),tt(H,O);var oe=tt(H,S);for(O=0;O<K.length;O+=2){var ve=K[O],xe=K[O+1];ve==="style"?ae(v,xe):ve==="dangerouslySetInnerHTML"?de(v,xe):ve==="children"?Ie(v,xe):D(v,ve,xe,oe)}switch(H){case"input":_n(v,S);break;case"textarea":On(v,S);break;case"select":var ge=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!S.multiple;var Te=S.value;Te!=null?Ut(v,!!S.multiple,Te,!1):ge!==!!S.multiple&&(S.defaultValue!=null?Ut(v,!!S.multiple,S.defaultValue,!0):Ut(v,!!S.multiple,S.multiple?[]:"",!1))}v[tc]=S}catch(Le){Vt(s,s.return,Le)}}break;case 6:if(ii(l,s),zi(s),g&4){if(s.stateNode===null)throw Error(n(162));v=s.stateNode,S=s.memoizedProps;try{v.nodeValue=S}catch(Le){Vt(s,s.return,Le)}}break;case 3:if(ii(l,s),zi(s),g&4&&f!==null&&f.memoizedState.isDehydrated)try{Oi(l.containerInfo)}catch(Le){Vt(s,s.return,Le)}break;case 4:ii(l,s),zi(s);break;case 13:ii(l,s),zi(s),v=s.child,v.flags&8192&&(S=v.memoizedState!==null,v.stateNode.isHidden=S,!S||v.alternate!==null&&v.alternate.memoizedState!==null||(MA=Et())),g&4&&Zw(s);break;case 22:if(ve=f!==null&&f.memoizedState!==null,s.mode&1?(In=(oe=In)||ve,ii(l,s),In=oe):ii(l,s),zi(s),g&8192){if(oe=s.memoizedState!==null,(s.stateNode.isHidden=oe)&&!ve&&(s.mode&1)!==0)for(Me=s,ve=s.child;ve!==null;){for(xe=Me=ve;Me!==null;){switch(ge=Me,Te=ge.child,ge.tag){case 0:case 11:case 14:case 15:fc(4,ge,ge.return);break;case 1:Wa(ge,ge.return);var _e=ge.stateNode;if(typeof _e.componentWillUnmount=="function"){g=ge,f=ge.return;try{l=g,_e.props=l.memoizedProps,_e.state=l.memoizedState,_e.componentWillUnmount()}catch(Le){Vt(g,f,Le)}}break;case 5:Wa(ge,ge.return);break;case 22:if(ge.memoizedState!==null){n1(xe);continue}}Te!==null?(Te.return=ge,Me=Te):n1(xe)}ve=ve.sibling}e:for(ve=null,xe=s;;){if(xe.tag===5){if(ve===null){ve=xe;try{v=xe.stateNode,oe?(S=v.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none"):(H=xe.stateNode,K=xe.memoizedProps.style,O=K!=null&&K.hasOwnProperty("display")?K.display:null,H.style.display=ot("display",O))}catch(Le){Vt(s,s.return,Le)}}}else if(xe.tag===6){if(ve===null)try{xe.stateNode.nodeValue=oe?"":xe.memoizedProps}catch(Le){Vt(s,s.return,Le)}}else if((xe.tag!==22&&xe.tag!==23||xe.memoizedState===null||xe===s)&&xe.child!==null){xe.child.return=xe,xe=xe.child;continue}if(xe===s)break e;for(;xe.sibling===null;){if(xe.return===null||xe.return===s)break e;ve===xe&&(ve=null),xe=xe.return}ve===xe&&(ve=null),xe.sibling.return=xe.return,xe=xe.sibling}}break;case 19:ii(l,s),zi(s),g&4&&Zw(s);break;case 21:break;default:ii(l,s),zi(s)}}function zi(s){var l=s.flags;if(l&2){try{e:{for(var f=s.return;f!==null;){if(Gw(f)){var g=f;break e}f=f.return}throw Error(n(160))}switch(g.tag){case 5:var v=g.stateNode;g.flags&32&&(Ie(v,""),g.flags&=-33);var S=Xw(s);BA(s,S,v);break;case 3:case 4:var O=g.stateNode.containerInfo,H=Xw(s);DA(s,H,O);break;default:throw Error(n(161))}}catch(K){Vt(s,s.return,K)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function K5(s,l,f){Me=s,e1(s)}function e1(s,l,f){for(var g=(s.mode&1)!==0;Me!==null;){var v=Me,S=v.child;if(v.tag===22&&g){var O=v.memoizedState!==null||Sd;if(!O){var H=v.alternate,K=H!==null&&H.memoizedState!==null||In;H=Sd;var oe=In;if(Sd=O,(In=K)&&!oe)for(Me=v;Me!==null;)O=Me,K=O.child,O.tag===22&&O.memoizedState!==null?r1(v):K!==null?(K.return=O,Me=K):r1(v);for(;S!==null;)Me=S,e1(S),S=S.sibling;Me=v,Sd=H,In=oe}t1(s)}else(v.subtreeFlags&8772)!==0&&S!==null?(S.return=v,Me=S):t1(s)}}function t1(s){for(;Me!==null;){var l=Me;if((l.flags&8772)!==0){var f=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:In||Ed(5,l);break;case 1:var g=l.stateNode;if(l.flags&4&&!In)if(f===null)g.componentDidMount();else{var v=l.elementType===l.type?f.memoizedProps:ni(l.type,f.memoizedProps);g.componentDidUpdate(v,f.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var S=l.updateQueue;S!==null&&nw(l,S,g);break;case 3:var O=l.updateQueue;if(O!==null){if(f=null,l.child!==null)switch(l.child.tag){case 5:f=l.child.stateNode;break;case 1:f=l.child.stateNode}nw(l,O,f)}break;case 5:var H=l.stateNode;if(f===null&&l.flags&4){f=H;var K=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":K.autoFocus&&f.focus();break;case"img":K.src&&(f.src=K.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var oe=l.alternate;if(oe!==null){var ve=oe.memoizedState;if(ve!==null){var xe=ve.dehydrated;xe!==null&&Oi(xe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}In||l.flags&512&&PA(l)}catch(ge){Vt(l,l.return,ge)}}if(l===s){Me=null;break}if(f=l.sibling,f!==null){f.return=l.return,Me=f;break}Me=l.return}}function n1(s){for(;Me!==null;){var l=Me;if(l===s){Me=null;break}var f=l.sibling;if(f!==null){f.return=l.return,Me=f;break}Me=l.return}}function r1(s){for(;Me!==null;){var l=Me;try{switch(l.tag){case 0:case 11:case 15:var f=l.return;try{Ed(4,l)}catch(K){Vt(l,f,K)}break;case 1:var g=l.stateNode;if(typeof g.componentDidMount=="function"){var v=l.return;try{g.componentDidMount()}catch(K){Vt(l,v,K)}}var S=l.return;try{PA(l)}catch(K){Vt(l,S,K)}break;case 5:var O=l.return;try{PA(l)}catch(K){Vt(l,O,K)}}}catch(K){Vt(l,l.return,K)}if(l===s){Me=null;break}var H=l.sibling;if(H!==null){H.return=l.return,Me=H;break}Me=l.return}}var q5=Math.ceil,Cd=P.ReactCurrentDispatcher,TA=P.ReactCurrentOwner,jr=P.ReactCurrentBatchConfig,ft=0,dn=null,Jt=null,xn=0,br=0,Ya=Ho(0),an=0,hc=null,Fs=0,Pd=0,IA=0,pc=null,sr=null,MA=0,Ka=1/0,Ao=null,Dd=!1,_A=null,qo=null,Bd=!1,Go=null,Td=0,Ac=0,OA=null,Id=-1,Md=0;function zn(){return(ft&6)!==0?Et():Id!==-1?Id:Id=Et()}function Xo(s){return(s.mode&1)===0?1:(ft&2)!==0&&xn!==0?xn&-xn:I5.transition!==null?(Md===0&&(Md=Q()),Md):(s=Pe,s!==0||(s=window.event,s=s===void 0?16:zl(s.type)),s)}function oi(s,l,f,g){if(50<Ac)throw Ac=0,OA=null,Error(n(185));Z(s,f,g),((ft&2)===0||s!==dn)&&(s===dn&&((ft&2)===0&&(Pd|=f),an===4&&Jo(s,xn)),ar(s,g),f===1&&ft===0&&(l.mode&1)===0&&(Ka=Et()+500,sd&&Vo()))}function ar(s,l){var f=s.callbackNode;T(s,l);var g=Ii(s,s===dn?xn:0);if(g===0)f!==null&&vs(f),s.callbackNode=null,s.callbackPriority=0;else if(l=g&-g,s.callbackPriority!==l){if(f!=null&&vs(f),l===1)s.tag===0?T5(o1.bind(null,s)):Vb(o1.bind(null,s)),C5(function(){(ft&6)===0&&Vo()}),f=null;else{switch(Ye(g)){case 1:f=Oo;break;case 4:f=Ro;break;case 16:f=Bi;break;case 536870912:f=Gr;break;default:f=Bi}f=h1(f,i1.bind(null,s))}s.callbackPriority=l,s.callbackNode=f}}function i1(s,l){if(Id=-1,Md=0,(ft&6)!==0)throw Error(n(327));var f=s.callbackNode;if(qa()&&s.callbackNode!==f)return null;var g=Ii(s,s===dn?xn:0);if(g===0)return null;if((g&30)!==0||(g&s.expiredLanes)!==0||l)l=_d(s,g);else{l=g;var v=ft;ft|=2;var S=a1();(dn!==s||xn!==l)&&(Ao=null,Ka=Et()+500,js(s,l));do try{J5();break}catch(H){s1(s,H)}while(!0);Zp(),Cd.current=S,ft=v,Jt!==null?l=0:(dn=null,xn=0,l=an)}if(l!==0){if(l===2&&(v=F(s),v!==0&&(g=v,l=RA(s,v))),l===1)throw f=hc,js(s,0),Jo(s,g),ar(s,Et()),f;if(l===6)Jo(s,g);else{if(v=s.current.alternate,(g&30)===0&&!G5(v)&&(l=_d(s,g),l===2&&(S=F(s),S!==0&&(g=S,l=RA(s,S))),l===1))throw f=hc,js(s,0),Jo(s,g),ar(s,Et()),f;switch(s.finishedWork=v,s.finishedLanes=g,l){case 0:case 1:throw Error(n(345));case 2:zs(s,sr,Ao);break;case 3:if(Jo(s,g),(g&130023424)===g&&(l=MA+500-Et(),10<l)){if(Ii(s,0)!==0)break;if(v=s.suspendedLanes,(v&g)!==g){zn(),s.pingedLanes|=s.suspendedLanes&v;break}s.timeoutHandle=Qp(zs.bind(null,s,sr,Ao),l);break}zs(s,sr,Ao);break;case 4:if(Jo(s,g),(g&4194240)===g)break;for(l=s.eventTimes,v=-1;0<g;){var O=31-on(g);S=1<<O,O=l[O],O>v&&(v=O),g&=~S}if(g=v,g=Et()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*q5(g/1960))-g,10<g){s.timeoutHandle=Qp(zs.bind(null,s,sr,Ao),g);break}zs(s,sr,Ao);break;case 5:zs(s,sr,Ao);break;default:throw Error(n(329))}}}return ar(s,Et()),s.callbackNode===f?i1.bind(null,s):null}function RA(s,l){var f=pc;return s.current.memoizedState.isDehydrated&&(js(s,l).flags|=256),s=_d(s,l),s!==2&&(l=sr,sr=f,l!==null&&LA(l)),s}function LA(s){sr===null?sr=s:sr.push.apply(sr,s)}function G5(s){for(var l=s;;){if(l.flags&16384){var f=l.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var g=0;g<f.length;g++){var v=f[g],S=v.getSnapshot;v=v.value;try{if(!ei(S(),v))return!1}catch{return!1}}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Jo(s,l){for(l&=~IA,l&=~Pd,s.suspendedLanes|=l,s.pingedLanes&=~l,s=s.expirationTimes;0<l;){var f=31-on(l),g=1<<f;s[f]=-1,l&=~g}}function o1(s){if((ft&6)!==0)throw Error(n(327));qa();var l=Ii(s,0);if((l&1)===0)return ar(s,Et()),null;var f=_d(s,l);if(s.tag!==0&&f===2){var g=F(s);g!==0&&(l=g,f=RA(s,g))}if(f===1)throw f=hc,js(s,0),Jo(s,l),ar(s,Et()),f;if(f===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=l,zs(s,sr,Ao),ar(s,Et()),null}function FA(s,l){var f=ft;ft|=1;try{return s(l)}finally{ft=f,ft===0&&(Ka=Et()+500,sd&&Vo())}}function Ns(s){Go!==null&&Go.tag===0&&(ft&6)===0&&qa();var l=ft;ft|=1;var f=jr.transition,g=Pe;try{if(jr.transition=null,Pe=1,s)return s()}finally{Pe=g,jr.transition=f,ft=l,(ft&6)===0&&Vo()}}function NA(){br=Ya.current,_t(Ya)}function js(s,l){s.finishedWork=null,s.finishedLanes=0;var f=s.timeoutHandle;if(f!==-1&&(s.timeoutHandle=-1,E5(f)),Jt!==null)for(f=Jt.return;f!==null;){var g=f;switch(Kp(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&id();break;case 3:Ua(),_t(rr),_t(Dn),sA();break;case 5:iA(g);break;case 4:Ua();break;case 13:_t(zt);break;case 19:_t(zt);break;case 10:$p(g.type._context);break;case 22:case 23:NA()}f=f.return}if(dn=s,Jt=s=Zo(s.current,null),xn=br=l,an=0,hc=null,IA=Pd=Fs=0,sr=pc=null,Os!==null){for(l=0;l<Os.length;l++)if(f=Os[l],g=f.interleaved,g!==null){f.interleaved=null;var v=g.next,S=f.pending;if(S!==null){var O=S.next;S.next=v,g.next=O}f.pending=g}Os=null}return s}function s1(s,l){do{var f=Jt;try{if(Zp(),gd.current=xd,md){for(var g=Qt.memoizedState;g!==null;){var v=g.queue;v!==null&&(v.pending=null),g=g.next}md=!1}if(Ls=0,un=sn=Qt=null,ac=!1,lc=0,TA.current=null,f===null||f.return===null){an=1,hc=l,Jt=null;break}e:{var S=s,O=f.return,H=f,K=l;if(l=xn,H.flags|=32768,K!==null&&typeof K=="object"&&typeof K.then=="function"){var oe=K,ve=H,xe=ve.tag;if((ve.mode&1)===0&&(xe===0||xe===11||xe===15)){var ge=ve.alternate;ge?(ve.updateQueue=ge.updateQueue,ve.memoizedState=ge.memoizedState,ve.lanes=ge.lanes):(ve.updateQueue=null,ve.memoizedState=null)}var Te=Iw(O);if(Te!==null){Te.flags&=-257,Mw(Te,O,H,S,l),Te.mode&1&&Tw(S,oe,l),l=Te,K=oe;var _e=l.updateQueue;if(_e===null){var Le=new Set;Le.add(K),l.updateQueue=Le}else _e.add(K);break e}else{if((l&1)===0){Tw(S,oe,l),jA();break e}K=Error(n(426))}}else if(Rt&&H.mode&1){var Wt=Iw(O);if(Wt!==null){(Wt.flags&65536)===0&&(Wt.flags|=256),Mw(Wt,O,H,S,l),Xp(Va(K,H));break e}}S=K=Va(K,H),an!==4&&(an=2),pc===null?pc=[S]:pc.push(S),S=O;do{switch(S.tag){case 3:S.flags|=65536,l&=-l,S.lanes|=l;var ee=Dw(S,K,l);tw(S,ee);break e;case 1:H=K;var G=S.type,re=S.stateNode;if((S.flags&128)===0&&(typeof G.getDerivedStateFromError=="function"||re!==null&&typeof re.componentDidCatch=="function"&&(qo===null||!qo.has(re)))){S.flags|=65536,l&=-l,S.lanes|=l;var ke=Bw(S,H,l);tw(S,ke);break e}}S=S.return}while(S!==null)}c1(f)}catch(Ne){l=Ne,Jt===f&&f!==null&&(Jt=f=f.return);continue}break}while(!0)}function a1(){var s=Cd.current;return Cd.current=xd,s===null?xd:s}function jA(){(an===0||an===3||an===2)&&(an=4),dn===null||(Fs&268435455)===0&&(Pd&268435455)===0||Jo(dn,xn)}function _d(s,l){var f=ft;ft|=2;var g=a1();(dn!==s||xn!==l)&&(Ao=null,js(s,l));do try{X5();break}catch(v){s1(s,v)}while(!0);if(Zp(),ft=f,Cd.current=g,Jt!==null)throw Error(n(261));return dn=null,xn=0,an}function X5(){for(;Jt!==null;)l1(Jt)}function J5(){for(;Jt!==null&&!va();)l1(Jt)}function l1(s){var l=f1(s.alternate,s,br);s.memoizedProps=s.pendingProps,l===null?c1(s):Jt=l,TA.current=null}function c1(s){var l=s;do{var f=l.alternate;if(s=l.return,(l.flags&32768)===0){if(f=U5(f,l,br),f!==null){Jt=f;return}}else{if(f=V5(f,l),f!==null){f.flags&=32767,Jt=f;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{an=6,Jt=null;return}}if(l=l.sibling,l!==null){Jt=l;return}Jt=l=s}while(l!==null);an===0&&(an=5)}function zs(s,l,f){var g=Pe,v=jr.transition;try{jr.transition=null,Pe=1,Z5(s,l,f,g)}finally{jr.transition=v,Pe=g}return null}function Z5(s,l,f,g){do qa();while(Go!==null);if((ft&6)!==0)throw Error(n(327));f=s.finishedWork;var v=s.finishedLanes;if(f===null)return null;if(s.finishedWork=null,s.finishedLanes=0,f===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var S=f.lanes|f.childLanes;if(he(s,S),s===dn&&(Jt=dn=null,xn=0),(f.subtreeFlags&2064)===0&&(f.flags&2064)===0||Bd||(Bd=!0,h1(Bi,function(){return qa(),null})),S=(f.flags&15990)!==0,(f.subtreeFlags&15990)!==0||S){S=jr.transition,jr.transition=null;var O=Pe;Pe=1;var H=ft;ft|=4,TA.current=null,Y5(s,f),$w(f,s),v5(jp),vr=!!Np,jp=Np=null,s.current=f,K5(f),ya(),ft=H,Pe=O,jr.transition=S}else s.current=f;if(Bd&&(Bd=!1,Go=s,Td=v),S=s.pendingLanes,S===0&&(qo=null),to(f.stateNode),ar(s,Et()),l!==null)for(g=s.onRecoverableError,f=0;f<l.length;f++)v=l[f],g(v.value,{componentStack:v.stack,digest:v.digest});if(Dd)throw Dd=!1,s=_A,_A=null,s;return(Td&1)!==0&&s.tag!==0&&qa(),S=s.pendingLanes,(S&1)!==0?s===OA?Ac++:(Ac=0,OA=s):Ac=0,Vo(),null}function qa(){if(Go!==null){var s=Ye(Td),l=jr.transition,f=Pe;try{if(jr.transition=null,Pe=16>s?16:s,Go===null)var g=!1;else{if(s=Go,Go=null,Td=0,(ft&6)!==0)throw Error(n(331));var v=ft;for(ft|=4,Me=s.current;Me!==null;){var S=Me,O=S.child;if((Me.flags&16)!==0){var H=S.deletions;if(H!==null){for(var K=0;K<H.length;K++){var oe=H[K];for(Me=oe;Me!==null;){var ve=Me;switch(ve.tag){case 0:case 11:case 15:fc(8,ve,S)}var xe=ve.child;if(xe!==null)xe.return=ve,Me=xe;else for(;Me!==null;){ve=Me;var ge=ve.sibling,Te=ve.return;if(qw(ve),ve===oe){Me=null;break}if(ge!==null){ge.return=Te,Me=ge;break}Me=Te}}}var _e=S.alternate;if(_e!==null){var Le=_e.child;if(Le!==null){_e.child=null;do{var Wt=Le.sibling;Le.sibling=null,Le=Wt}while(Le!==null)}}Me=S}}if((S.subtreeFlags&2064)!==0&&O!==null)O.return=S,Me=O;else e:for(;Me!==null;){if(S=Me,(S.flags&2048)!==0)switch(S.tag){case 0:case 11:case 15:fc(9,S,S.return)}var ee=S.sibling;if(ee!==null){ee.return=S.return,Me=ee;break e}Me=S.return}}var G=s.current;for(Me=G;Me!==null;){O=Me;var re=O.child;if((O.subtreeFlags&2064)!==0&&re!==null)re.return=O,Me=re;else e:for(O=G;Me!==null;){if(H=Me,(H.flags&2048)!==0)try{switch(H.tag){case 0:case 11:case 15:Ed(9,H)}}catch(Ne){Vt(H,H.return,Ne)}if(H===O){Me=null;break e}var ke=H.sibling;if(ke!==null){ke.return=H.return,Me=ke;break e}Me=H.return}}if(ft=v,Vo(),Fn&&typeof Fn.onPostCommitFiberRoot=="function")try{Fn.onPostCommitFiberRoot(gr,s)}catch{}g=!0}return g}finally{Pe=f,jr.transition=l}}return!1}function u1(s,l,f){l=Va(f,l),l=Dw(s,l,1),s=Yo(s,l,1),l=zn(),s!==null&&(Z(s,1,l),ar(s,l))}function Vt(s,l,f){if(s.tag===3)u1(s,s,f);else for(;l!==null;){if(l.tag===3){u1(l,s,f);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(qo===null||!qo.has(g))){s=Va(f,s),s=Bw(l,s,1),l=Yo(l,s,1),s=zn(),l!==null&&(Z(l,1,s),ar(l,s));break}}l=l.return}}function $5(s,l,f){var g=s.pingCache;g!==null&&g.delete(l),l=zn(),s.pingedLanes|=s.suspendedLanes&f,dn===s&&(xn&f)===f&&(an===4||an===3&&(xn&130023424)===xn&&500>Et()-MA?js(s,0):IA|=f),ar(s,l)}function d1(s,l){l===0&&((s.mode&1)===0?l=1:(l=no,no<<=1,(no&130023424)===0&&(no=4194304)));var f=zn();s=fo(s,l),s!==null&&(Z(s,l,f),ar(s,f))}function eM(s){var l=s.memoizedState,f=0;l!==null&&(f=l.retryLane),d1(s,f)}function tM(s,l){var f=0;switch(s.tag){case 13:var g=s.stateNode,v=s.memoizedState;v!==null&&(f=v.retryLane);break;case 19:g=s.stateNode;break;default:throw Error(n(314))}g!==null&&g.delete(l),d1(s,f)}var f1;f1=function(s,l,f){if(s!==null)if(s.memoizedProps!==l.pendingProps||rr.current)or=!0;else{if((s.lanes&f)===0&&(l.flags&128)===0)return or=!1,H5(s,l,f);or=(s.flags&131072)!==0}else or=!1,Rt&&(l.flags&1048576)!==0&&Wb(l,ld,l.index);switch(l.lanes=0,l.tag){case 2:var g=l.type;kd(s,l),s=l.pendingProps;var v=La(l,Dn.current);Ha(l,f),v=cA(null,l,g,s,v,f);var S=uA();return l.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,ir(g)?(S=!0,od(l)):S=!1,l.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,nA(l),v.updater=bd,l.stateNode=v,v._reactInternals=l,gA(l,g,s,f),l=xA(null,l,g,!0,S,f)):(l.tag=0,Rt&&S&&Yp(l),jn(null,l,v,f),l=l.child),l;case 16:g=l.elementType;e:{switch(kd(s,l),s=l.pendingProps,v=g._init,g=v(g._payload),l.type=g,v=l.tag=rM(g),s=ni(g,s),v){case 0:l=yA(null,l,g,s,f);break e;case 1:l=Nw(null,l,g,s,f);break e;case 11:l=_w(null,l,g,s,f);break e;case 14:l=Ow(null,l,g,ni(g.type,s),f);break e}throw Error(n(306,g,""))}return l;case 0:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:ni(g,v),yA(s,l,g,v,f);case 1:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:ni(g,v),Nw(s,l,g,v,f);case 3:e:{if(jw(l),s===null)throw Error(n(387));g=l.pendingProps,S=l.memoizedState,v=S.element,ew(s,l),pd(l,g,null,f);var O=l.memoizedState;if(g=O.element,S.isDehydrated)if(S={element:g,isDehydrated:!1,cache:O.cache,pendingSuspenseBoundaries:O.pendingSuspenseBoundaries,transitions:O.transitions},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){v=Va(Error(n(423)),l),l=zw(s,l,g,f,v);break e}else if(g!==v){v=Va(Error(n(424)),l),l=zw(s,l,g,f,v);break e}else for(xr=Qo(l.stateNode.containerInfo.firstChild),yr=l,Rt=!0,ti=null,f=Zb(l,null,g,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(ja(),g===v){l=po(s,l,f);break e}jn(s,l,g,f)}l=l.child}return l;case 5:return rw(l),s===null&&Gp(l),g=l.type,v=l.pendingProps,S=s!==null?s.memoizedProps:null,O=v.children,zp(g,v)?O=null:S!==null&&zp(g,S)&&(l.flags|=32),Fw(s,l),jn(s,l,O,f),l.child;case 6:return s===null&&Gp(l),null;case 13:return Qw(s,l,f);case 4:return rA(l,l.stateNode.containerInfo),g=l.pendingProps,s===null?l.child=za(l,null,g,f):jn(s,l,g,f),l.child;case 11:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:ni(g,v),_w(s,l,g,v,f);case 7:return jn(s,l,l.pendingProps,f),l.child;case 8:return jn(s,l,l.pendingProps.children,f),l.child;case 12:return jn(s,l,l.pendingProps.children,f),l.child;case 10:e:{if(g=l.type._context,v=l.pendingProps,S=l.memoizedProps,O=v.value,Bt(dd,g._currentValue),g._currentValue=O,S!==null)if(ei(S.value,O)){if(S.children===v.children&&!rr.current){l=po(s,l,f);break e}}else for(S=l.child,S!==null&&(S.return=l);S!==null;){var H=S.dependencies;if(H!==null){O=S.child;for(var K=H.firstContext;K!==null;){if(K.context===g){if(S.tag===1){K=ho(-1,f&-f),K.tag=2;var oe=S.updateQueue;if(oe!==null){oe=oe.shared;var ve=oe.pending;ve===null?K.next=K:(K.next=ve.next,ve.next=K),oe.pending=K}}S.lanes|=f,K=S.alternate,K!==null&&(K.lanes|=f),eA(S.return,f,l),H.lanes|=f;break}K=K.next}}else if(S.tag===10)O=S.type===l.type?null:S.child;else if(S.tag===18){if(O=S.return,O===null)throw Error(n(341));O.lanes|=f,H=O.alternate,H!==null&&(H.lanes|=f),eA(O,f,l),O=S.sibling}else O=S.child;if(O!==null)O.return=S;else for(O=S;O!==null;){if(O===l){O=null;break}if(S=O.sibling,S!==null){S.return=O.return,O=S;break}O=O.return}S=O}jn(s,l,v.children,f),l=l.child}return l;case 9:return v=l.type,g=l.pendingProps.children,Ha(l,f),v=Fr(v),g=g(v),l.flags|=1,jn(s,l,g,f),l.child;case 14:return g=l.type,v=ni(g,l.pendingProps),v=ni(g.type,v),Ow(s,l,g,v,f);case 15:return Rw(s,l,l.type,l.pendingProps,f);case 17:return g=l.type,v=l.pendingProps,v=l.elementType===g?v:ni(g,v),kd(s,l),l.tag=1,ir(g)?(s=!0,od(l)):s=!1,Ha(l,f),Cw(l,g,v),gA(l,g,v,f),xA(null,l,g,!0,s,f);case 19:return Uw(s,l,f);case 22:return Lw(s,l,f)}throw Error(n(156,l.tag))};function h1(s,l){return eo(s,l)}function nM(s,l,f,g){this.tag=s,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(s,l,f,g){return new nM(s,l,f,g)}function zA(s){return s=s.prototype,!(!s||!s.isReactComponent)}function rM(s){if(typeof s=="function")return zA(s)?1:0;if(s!=null){if(s=s.$$typeof,s===q)return 11;if(s===Ae)return 14}return 2}function Zo(s,l){var f=s.alternate;return f===null?(f=zr(s.tag,l,s.key,s.mode),f.elementType=s.elementType,f.type=s.type,f.stateNode=s.stateNode,f.alternate=s,s.alternate=f):(f.pendingProps=l,f.type=s.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=s.flags&14680064,f.childLanes=s.childLanes,f.lanes=s.lanes,f.child=s.child,f.memoizedProps=s.memoizedProps,f.memoizedState=s.memoizedState,f.updateQueue=s.updateQueue,l=s.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=s.sibling,f.index=s.index,f.ref=s.ref,f}function Od(s,l,f,g,v,S){var O=2;if(g=s,typeof s=="function")zA(s)&&(O=1);else if(typeof s=="string")O=5;else e:switch(s){case U:return Qs(f.children,v,S,l);case V:O=8,v|=8;break;case Y:return s=zr(12,f,l,v|2),s.elementType=Y,s.lanes=S,s;case se:return s=zr(13,f,l,v),s.elementType=se,s.lanes=S,s;case fe:return s=zr(19,f,l,v),s.elementType=fe,s.lanes=S,s;case ue:return Rd(f,v,S,l);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case W:O=10;break e;case X:O=9;break e;case q:O=11;break e;case Ae:O=14;break e;case le:O=16,g=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return l=zr(O,f,l,v),l.elementType=s,l.type=g,l.lanes=S,l}function Qs(s,l,f,g){return s=zr(7,s,g,l),s.lanes=f,s}function Rd(s,l,f,g){return s=zr(22,s,g,l),s.elementType=ue,s.lanes=f,s.stateNode={isHidden:!1},s}function QA(s,l,f){return s=zr(6,s,null,l),s.lanes=f,s}function HA(s,l,f){return l=zr(4,s.children!==null?s.children:[],s.key,l),l.lanes=f,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}function iM(s,l,f,g,v){this.tag=l,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ne(0),this.expirationTimes=ne(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ne(0),this.identifierPrefix=g,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function UA(s,l,f,g,v,S,O,H,K){return s=new iM(s,l,f,H,K),l===1?(l=1,S===!0&&(l|=8)):l=0,S=zr(3,null,null,l),s.current=S,S.stateNode=s,S.memoizedState={element:g,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},nA(S),s}function oM(s,l,f){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:g==null?null:""+g,children:s,containerInfo:l,implementation:f}}function p1(s){if(!s)return Uo;s=s._reactInternals;e:{if(qr(s)!==s||s.tag!==1)throw Error(n(170));var l=s;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(ir(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(n(171))}if(s.tag===1){var f=s.type;if(ir(f))return Hb(s,f,l)}return l}function A1(s,l,f,g,v,S,O,H,K){return s=UA(f,g,!0,s,v,S,O,H,K),s.context=p1(null),f=s.current,g=zn(),v=Xo(f),S=ho(g,v),S.callback=l??null,Yo(f,S,v),s.current.lanes=v,Z(s,v,g),ar(s,g),s}function Ld(s,l,f,g){var v=l.current,S=zn(),O=Xo(v);return f=p1(f),l.context===null?l.context=f:l.pendingContext=f,l=ho(S,O),l.payload={element:s},g=g===void 0?null:g,g!==null&&(l.callback=g),s=Yo(v,l,O),s!==null&&(oi(s,v,O,S),hd(s,v,O)),O}function Fd(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function g1(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var f=s.retryLane;s.retryLane=f!==0&&f<l?f:l}}function VA(s,l){g1(s,l),(s=s.alternate)&&g1(s,l)}function sM(){return null}var m1=typeof reportError=="function"?reportError:function(s){console.error(s)};function WA(s){this._internalRoot=s}Nd.prototype.render=WA.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));Ld(s,l,null,null)},Nd.prototype.unmount=WA.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;Ns(function(){Ld(null,s,null,null)}),l[ao]=null}};function Nd(s){this._internalRoot=s}Nd.prototype.unstable_scheduleHydration=function(s){if(s){var l=Jn();s={blockedOn:null,target:s,priority:l};for(var f=0;f<_i.length&&l!==0&&l<_i[f].priority;f++);_i.splice(f,0,s),f===0&&_r(s)}};function YA(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function jd(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function v1(){}function aM(s,l,f,g,v){if(v){if(typeof g=="function"){var S=g;g=function(){var oe=Fd(O);S.call(oe)}}var O=A1(l,g,s,0,null,!1,!1,"",v1);return s._reactRootContainer=O,s[ao]=O.current,$l(s.nodeType===8?s.parentNode:s),Ns(),O}for(;v=s.lastChild;)s.removeChild(v);if(typeof g=="function"){var H=g;g=function(){var oe=Fd(K);H.call(oe)}}var K=UA(s,0,!1,null,null,!1,!1,"",v1);return s._reactRootContainer=K,s[ao]=K.current,$l(s.nodeType===8?s.parentNode:s),Ns(function(){Ld(l,K,f,g)}),K}function zd(s,l,f,g,v){var S=f._reactRootContainer;if(S){var O=S;if(typeof v=="function"){var H=v;v=function(){var K=Fd(O);H.call(K)}}Ld(l,O,s,v)}else O=aM(f,l,s,v,g);return Fd(O)}Ze=function(s){switch(s.tag){case 3:var l=s.stateNode;if(l.current.memoizedState.isDehydrated){var f=Ti(l.pendingLanes);f!==0&&(Se(l,f|1),ar(l,Et()),(ft&6)===0&&(Ka=Et()+500,Vo()))}break;case 13:Ns(function(){var g=fo(s,1);if(g!==null){var v=zn();oi(g,s,1,v)}}),VA(s,1)}},wt=function(s){if(s.tag===13){var l=fo(s,134217728);if(l!==null){var f=zn();oi(l,s,134217728,f)}VA(s,134217728)}},Xn=function(s){if(s.tag===13){var l=Xo(s),f=fo(s,l);if(f!==null){var g=zn();oi(f,s,l,g)}VA(s,l)}},Jn=function(){return Pe},En=function(s,l){var f=Pe;try{return Pe=s,l()}finally{Pe=f}},yt=function(s,l,f){switch(l){case"input":if(_n(s,f),l=f.name,f.type==="radio"&&l!=null){for(f=s;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<f.length;l++){var g=f[l];if(g!==s&&g.form===s.form){var v=rd(g);if(!v)throw Error(n(90));tn(g),_n(g,v)}}}break;case"textarea":On(s,f);break;case"select":l=f.value,l!=null&&Ut(s,!!f.multiple,l,!1)}},Xt=FA,Yr=Ns;var lM={usingClientEntryPoint:!1,Events:[nc,Oa,rd,Ar,Ln,FA]},gc={findFiberByHostInstance:Ts,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},cM={bundleType:gc.bundleType,version:gc.version,rendererPackageName:gc.rendererPackageName,rendererConfig:gc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=$i(s),s===null?null:s.stateNode},findFiberByHostInstance:gc.findFiberByHostInstance||sM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qd.isDisabled&&Qd.supportsFiber)try{gr=Qd.inject(cM),Fn=Qd}catch{}}return Qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lM,Qn.createPortal=function(s,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!YA(l))throw Error(n(200));return oM(s,l,null,f)},Qn.createRoot=function(s,l){if(!YA(s))throw Error(n(299));var f=!1,g="",v=m1;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onRecoverableError!==void 0&&(v=l.onRecoverableError)),l=UA(s,1,!1,null,null,f,!1,g,v),s[ao]=l.current,$l(s.nodeType===8?s.parentNode:s),new WA(l)},Qn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=$i(l),s=s===null?null:s.stateNode,s},Qn.flushSync=function(s){return Ns(s)},Qn.hydrate=function(s,l,f){if(!jd(l))throw Error(n(200));return zd(null,s,l,!0,f)},Qn.hydrateRoot=function(s,l,f){if(!YA(s))throw Error(n(405));var g=f!=null&&f.hydratedSources||null,v=!1,S="",O=m1;if(f!=null&&(f.unstable_strictMode===!0&&(v=!0),f.identifierPrefix!==void 0&&(S=f.identifierPrefix),f.onRecoverableError!==void 0&&(O=f.onRecoverableError)),l=A1(l,null,s,1,f??null,v,!1,S,O),s[ao]=l.current,$l(s),g)for(s=0;s<g.length;s++)f=g[s],v=f._getVersion,v=v(f._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[f,v]:l.mutableSourceEagerHydrationData.push(f,v);return new Nd(l)},Qn.render=function(s,l,f){if(!jd(l))throw Error(n(200));return zd(null,s,l,!1,f)},Qn.unmountComponentAtNode=function(s){if(!jd(s))throw Error(n(40));return s._reactRootContainer?(Ns(function(){zd(null,null,s,!1,function(){s._reactRootContainer=null,s[ao]=null})}),!0):!1},Qn.unstable_batchedUpdates=FA,Qn.unstable_renderSubtreeIntoContainer=function(s,l,f,g){if(!jd(f))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return zd(s,l,f,!1,g)},Qn.version="18.3.1-next-f1338f8080-20240426",Qn}var ag;function O1(){if(ag)return Yd.exports;ag=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Yd.exports=_1(),Yd.exports}var lg;function R1(){if(lg)return vc;lg=1;var t=O1();return vc.createRoot=t.createRoot,vc.hydrateRoot=t.hydrateRoot,vc}var L1=R1();const Gd=(t=900)=>document.body.clientWidth>=t?"desktop":"mobile",cg=(t=900)=>{const[e,n]=_.useState(Gd(t));return _.useEffect(()=>{window.addEventListener("resize",()=>n(Gd(t)))},[]),e},Qi=(t,e,n=[])=>{L1.createRoot(e.attachShadow({mode:"open"})).render(E.jsxs(_.StrictMode,{children:[t,n.map(i=>E.jsx("style",{children:i},i))]}))},ug=()=>window.pageYOffset!==void 0?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,dg={},yc={},F1=(t,{body:e=null,cache:n=!0,corsProxy:r=!1,headers:i=void 0,method:o="GET"}={body:null,cache:!0,corsProxy:!1,headers:void 0,method:"GET"})=>{const a=`${t}|${e}`;if(n&&a in dg)return dg[a];if(a in yc)return yc[a];const c=fetch(r?`https://corsproxy.io/?${encodeURIComponent(t)}`:t,{body:e,headers:i,method:o}).then(u=>{if(delete yc[t],u.status<200||u.status>299)return{error:{status:u.status}};try{return u.json()}catch(d){return{error:{message:d}}}});return yc[a]=c,c},Mn=(t,{body:e=null,cache:n=!0,corsProxy:r=!1,defaultValue:i=null,headers:o=void 0,method:a="GET"}={body:null,cache:!0,corsProxy:!1,defaultValue:null,headers:void 0,method:"GET"})=>{const[c,u]=_.useState(i);let d=!1;return Array.isArray(t)||(t=t?[t]:[],d=!0),_.useEffect(()=>{t.length&&(async()=>{const h=await Promise.all(t.map(A=>F1(A,{body:e,cache:n,corsProxy:r,headers:o,method:a}))),p=d?h[0]:h;u(p)})()},[t.join(" ")]),c},fg=()=>{const t=Mn("https://operations-api.access-ci.org/wh2/cider/v1/access-active-groups/type/resource-catalog.access-ci.org/");return Xd([t],({results:e})=>{const{active_groups:n,feature_categories:r,features:i,organizations:o,resources:a}=e,c=[{tagCategoryId:-1,name:"Resource Provider",tags:[]}],u=[-1];for(let k of r)[100,102,103].includes(k.feature_category_id)&&(c.push({tagCategoryId:k.feature_category_id,name:k.feature_category_name,tags:[]}),u.push(k.feature_category_id));c.sort((k,x)=>k.name.localeCompare(x.name));const d=i.filter(k=>u.includes(k.feature_category_id)).map(k=>({tagId:k.feature_id,name:k.feature_name,tagCategoryId:k.feature_category_id})),h={};for(let k of o)d.push({tagId:k.organization_id*-1,name:k.organization_name,tagCategoryId:-1,iconUri:k.organization_favicon_url||null}),h[k.organization_id]=k;d.sort((k,x)=>k.name.localeCompare(x.name));const p=d.map(k=>k.tagId),A=[{resourceCategoryId:1,name:"Compute & Storage Resources",resourceGroups:[],resourceGroupIds:[]},{resourceCategoryId:2,name:"Program & Other Resources",resourceGroups:[],resourceGroupIds:[]}],m=n.filter(k=>k.rollup_info_resourceids).map(k=>({infoGroupId:k.info_groupid,name:k.group_descriptive_name,description:k.group_description,infoResourceIds:k.rollup_info_resourceids,imageUri:k.group_logo_url?`https://cider.access-ci.org/public/groups/${k.group_logo_url.match(/[0-9]+/)[0]}/logo`:null,tagIds:[...k.rollup_organization_ids.map(x=>x*-1).filter(x=>p.includes(x)),...k.rollup_feature_ids.filter(x=>p.includes(x))],resourceCategoryId:k.rollup_feature_ids.includes(137)?2:1,accessAllocated:k.rollup_feature_ids.includes(139),organizations:k.rollup_organization_ids.map(x=>h[x]).filter(x=>x),resources:a.filter(x=>k.rollup_info_resourceids.includes(x.info_resourceid))})),y=m.find(k=>k.infoGroupId==="cloudbank.access-ci.org");if(y)for(const k of["Amazon Web Services","Google Cloud","IBM Cloud","Microsoft Azure"])m.push({...y,infoGroupId:`${k.toLowerCase().replaceAll(" ","-")}${y.infoGroupId}`,parentInfoGroupId:y.infoGroupId,name:k});return m.sort((k,x)=>k.name.localeCompare(x.name)),j1({resourceCategories:A,resourceGroups:m,tags:d,tagCategories:c})})},Za=(t,e=null)=>{const n=fg();return n&&n.resourceGroups.find(r=>r.infoGroupId==t)||e},N1=(t,e=[])=>{const n=Mn(`https://operations-api.access-ci.org/wh2/cider/v1/access-active/info_groupid/${t}/?format=json`);return n&&!n.error?n.results:e},Xd=(t,e,n=null)=>_.useMemo(()=>{if(!t.length)return n;for(let r of t)if(!r||r.error)return n;return e.apply(null,t)},t),j1=({resourceCategories:t,resourceGroups:e,tags:n,tagCategories:r})=>{const i={};for(let c of r)c.tags=[],i[c.tagCategoryId]=c;const o={};for(let c of n)c.tagCategory=i[c.tagCategoryId],c.tagCategory.tags.push(c),c.resources=[],o[c.tagId]=c;const a={};for(let c of t)c.resourceGroups=[],a[c.resourceCategoryId]=c;for(let c of e)c.resourceCategory=a[c.resourceCategoryId],c.resourceCategory.resourceGroups.push(c),c.tags=c.tagIds.map(u=>o[u]);return{resourceCategories:t,resourceGroups:e,tags:n,tagCategories:r}},z1=({resourceGroups:t,tags:e,tagCategories:n},r)=>{const i=new Set,o=new Set,a=new Set,c=new Set(r);for(let h of e)c.has(h.tagId)&&a.add(h.tagCategoryId);const u=n.filter(({tagCategoryId:h})=>a.has(h)),d=new Set(e.filter(h=>!a.has(h.tagCategoryId)).map(h=>h.tagId));for(let h of t){let p=!0;for(let A of u){let m=!1;for(let y of A.tags)if(c.has(y.tagId)&&h.tags.includes(y)){m=!0;break}if(!m){p=!1;break}}if(p){o.add(h.infoGroupId),i.add(h.resourceCategoryId);for(let A of h.tagIds)d.delete(A)}}return{disabledTagIds:d,resourceCategoryIds:i,infoGroupIds:o,tagCategoryIds:a,tagIds:c}},hg=t=>{let e=t.match(/href="([^"]+)"/);return e?e[1]:null},Jd=t=>t.replace(/(<[^>]+>)/g,"").replace(/&nbsp;/g," "),Zd=t=>{const e=[];for(let n of t.split(/(\<\/p\>)|[\n\r]+/g)){if(!n)continue;const r=Array.from(n.matchAll(/<a([^>]+)>([^<]+)<\/a>/g)),i=n.split(/<a[^<]+<\/a>/g),o=[];for(;i.length>0;){o.push(Jd(i.shift()));let a=r.shift();if(a){let c=hg(a[1]);c&&o.push(E.jsx("a",{href:c,children:a[2]}))}}e.push(E.jsx("p",{children:o},n))}return e},Q1=({showAfterScroll:t=300})=>{const[e,n]=_.useState(!1);return _.useEffect(()=>{window.addEventListener("scroll",()=>n(ug()>=t))},[]),E.jsx("button",{className:`scroll-to-top ${e?"visible":""}`,title:"Return to Top",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:"Return to Top"})},H1=(t={})=>E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"container",children:[E.jsxs("div",{className:"upper",children:[E.jsxs("div",{className:"about",children:[E.jsxs("p",{className:"awards",children:["ACCESS is an advanced computing and data resource program supported by the U.S. National Science Foundation (NSF) under the Office of Advanced Cyberinfrastructure awards"," ",E.jsx(Ja,{number:2138259}),", ",E.jsx(Ja,{number:2138286}),","," ",E.jsx(Ja,{number:2138307}),", ",E.jsx(Ja,{number:2137603})," and"," ",E.jsx(Ja,{number:2138296}),"."]}),E.jsx("p",{className:"disclaimer",children:"Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of NSF."}),E.jsx("a",{className:"contact",href:"https://access-ci.org/contact/",children:"Contact ACCESS"}),E.jsx(mc,{className:"social",items:C1})]}),E.jsxs("div",{className:"personas",children:[E.jsx("p",{children:"For:"}),E.jsx(mc,{items:$A})]})]}),E.jsxs("div",{className:"lower",children:[E.jsx(rg,{siteName:"ACCESS",siteUrl:"https://access-ci.org",placement:"footer"}),E.jsx(mc,{className:"links",items:P1})]})]}),E.jsx(Q1,{...t})]}),U1=(t={})=>E.jsx("div",{className:"container",children:E.jsx(rg,{...t})}),pg=({autoOpenMode:t,classes:e="",href:n="",html:r="",items:i,mode:o,name:a,onClick:c,open:u,parentId:d="root",setOpen:h})=>{const p=_.useId(),A=u[d]==p,m=A||t==o,y=()=>h({...u,[d]:A?null:p});if(r)return E.jsx("div",{dangerouslySetInnerHTML:{__html:r}});if(n||c)return E.jsx("a",{href:n||"#",onClick:c,className:`item ${e||""}`,children:a});if(i)return E.jsxs(E.Fragment,{children:[a&&E.jsx("button",{"aria-expanded":m,"aria-controls":p,className:`item ${m?"expanded":"collapsed"}`,onClick:y,children:a}),E.jsx("ul",{className:e,id:p,hidden:!m,"aria-hidden":!m,children:i.map(({autoOpenMode:k,classes:x,href:C,html:M,items:D,name:P,onClick:N})=>E.jsx("li",{className:x||"",children:E.jsx(pg,{autoOpenMode:k,href:C,html:M,items:D,mode:o,name:P,onClick:N,open:u,parentId:p,setOpen:h})},P||M))})]})},Ag=({classes:t,items:e,name:n,target:r})=>{const i=cg(1280),[o,a]=_.useState({});_.useEffect(()=>{document.body.addEventListener("click",u=>{u.target!=r&&Gd()=="desktop"&&a({})}),r.addEventListener("keydown",({key:u})=>{u=="Escape"&&a({})})},[]);const c=t?.includes("universal")?"ACCESS universal navigation":t?.includes("site")?`${n}`:n;return E.jsx("nav",{className:`menu ${t||""}`,"aria-label":c,children:E.jsx(pg,{autoOpenMode:"desktop",items:e,mode:i,name:n,open:o,setOpen:a})})},V1=({items:t,siteName:e=""})=>{const n=cg(768),r=t.map(({name:i,href:o,items:a})=>{if(n=="mobile")for(;!o;)o=a[0].href,a=a[0];return o?E.jsx("div",{className:"column",children:E.jsx("h3",{children:E.jsx("a",{href:o,children:i})})},i):E.jsxs("div",{className:"column",children:[E.jsx("h3",{children:i}),E.jsx(mc,{items:a})]},i)});return E.jsxs("nav",{className:"footer",children:[E.jsxs("h2",{children:["ACCESS ",e]}),E.jsx("div",{className:"columns",children:r})]})};/**
41
41
  * react-router v7.7.1
42
42
  *
43
43
  * Copyright (c) Remix Software Inc.
@@ -210,5 +210,4 @@ Our cybersecurity team will review your report and respond accordingly. Thank yo
210
210
  * Released under the MIT License
211
211
  */class UT{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,i){const o=n.listeners[i],a=n.duration;o.forEach(c=>c({chart:e,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=my.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,c=!1,u;for(;a>=0;--a)u=o[a],u._active?(u._total>r.duration&&(r.duration=u._total),u.tick(e),c=!0):(o[a]=o[o.length-1],o.pop());c&&(i.draw(),this._notify(i,r,e,"progress")),o.length||(r.running=!1,this._notify(i,r,e,"complete"),r.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Gi=new UT;const Hy="transparent",VT={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=wy(t||Hy),i=r.valid&&wy(e||Hy);return i&&i.valid?i.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class WT{constructor(e,n,r,i){const o=n[r];i=bu([e.to,i,o,e.from]);const a=bu([e.from,o,i]);this._active=!0,this._fn=e.fn||VT[e.type||typeof a],this._easing=Bl[e.easing]||Bl.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=bu([e.to,n,i,e.from]),this._from=bu([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,c=this._to;let u;if(this._active=o!==c&&(a||n<r),!this._active){this._target[i]=c,this._notify(!0);return}if(n<0){this._target[i]=o;return}u=n/r%2,u=a&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[i]=this._fn(o,c,u)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class Uy{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!dt(e))return;const n=Object.keys(Nt.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const o=e[i];if(!dt(o))return;const a={};for(const c of n)a[c]=o[c];($t(o.properties)&&o.properties||[i]).forEach(c=>{(c===i||!r.has(c))&&r.set(c,a)})})}_animateOptions(e,n){const r=n.options,i=KT(e,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&YT(e.options.$animations,r).then(()=>{e.options=r},()=>{}),o}_createAnimations(e,n){const r=this._properties,i=[],o=e.$animations||(e.$animations={}),a=Object.keys(n),c=Date.now();let u;for(u=a.length-1;u>=0;--u){const d=a[u];if(d.charAt(0)==="$")continue;if(d==="options"){i.push(...this._animateOptions(e,n));continue}const h=n[d];let p=o[d];const A=r.get(d);if(p)if(A&&p.active()){p.update(A,h,c);continue}else p.cancel();if(!A||!A.duration){e[d]=h;continue}o[d]=p=new WT(A,e,d,h),i.push(p)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Gi.add(this._chart,r),!0}}function YT(t,e){const n=[],r=Object.keys(e);for(let i=0;i<r.length;i++){const o=t[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function KT(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Vy(t,e){const n=t&&t.options||{},r=n.reverse,i=n.min===void 0?e:0,o=n.max===void 0?e:0;return{start:r?o:i,end:r?i:o}}function qT(t,e,n){if(n===!1)return!1;const r=Vy(t,n),i=Vy(e,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function GT(t){let e,n,r,i;return dt(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i,disabled:t===!1}}function Wy(t,e){const n=[],r=t._getSortedDatasetMetas(e);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function Yy(t,e,n,r={}){const i=t.keys,o=r.mode==="single";let a,c,u,d;if(e===null)return;let h=!1;for(a=0,c=i.length;a<c;++a){if(u=+i[a],u===n){if(h=!0,r.all)continue;break}d=t.values[u],Br(d)&&(o||e===0||Do(e)===Do(d))&&(e+=d)}return!h&&!r.all?0:e}function XT(t,e){const{iScale:n,vScale:r}=e,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"x":"y",a=Object.keys(t),c=new Array(a.length);let u,d,h;for(u=0,d=a.length;u<d;++u)h=a[u],c[u]={[i]:h,[o]:t[h]};return c}function tp(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function JT(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function ZT(t){const{min:e,max:n,minDefined:r,maxDefined:i}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function $T(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function Ky(t,e,n,r){for(const i of e.getMatchingVisibleMetas(r).reverse()){const o=t[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function qy(t,e){const{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:c}=r,u=o.axis,d=a.axis,h=JT(o,a,r),p=e.length;let A;for(let m=0;m<p;++m){const y=e[m],{[u]:k,[d]:x}=y,C=y._stacks||(y._stacks={});A=C[d]=$T(i,h,k),A[c]=x,A._top=Ky(A,a,!0,r.type),A._bottom=Ky(A,a,!1,r.type);const M=A._visualValues||(A._visualValues={});M[c]=x}}function np(t,e){const n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function eI(t,e){return ca(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function tI(t,e,n){return ca(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Ml(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const i of e){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const rp=t=>t==="reset"||t==="none",Gy=(t,e)=>e?t:Object.assign({},t),nI=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Wy(n,!0),values:null};class Cu{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=tp(e.vScale,e),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(e){this.index!==e&&Ml(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(p,A,m,y)=>p==="x"?A:p==="r"?y:m,o=n.xAxisID=ht(r.xAxisID,np(e,"x")),a=n.yAxisID=ht(r.yAxisID,np(e,"y")),c=n.rAxisID=ht(r.rAxisID,np(e,"r")),u=n.indexAxis,d=n.iAxisID=i(u,o,a,c),h=n.vAxisID=i(u,a,o,c);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Ay(this._data,this),e._stacked&&Ml(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(dt(n)){const i=this._cachedMeta;this._data=XT(n,i)}else if(r!==n){if(r){Ay(r,this);const i=this._cachedMeta;Ml(i),i._parsed=[]}n&&Object.isExtensible(n)&&tT(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=tp(n.vScale,n),n.stack!==r.stack&&(i=!0,Ml(n),n.stack=r.stack),this._resyncElements(e),(i||o!==n._stacked)&&(qy(this,n._parsed),n._stacked=tp(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,c=o.axis;let u=e===0&&n===i.length?!0:r._sorted,d=e>0&&r._parsed[e-1],h,p,A;if(this._parsing===!1)r._parsed=i,r._sorted=!0,A=i;else{$t(i[e])?A=this.parseArrayData(r,i,e,n):dt(i[e])?A=this.parseObjectData(r,i,e,n):A=this.parsePrimitiveData(r,i,e,n);const m=()=>p[c]===null||d&&p[c]<d[c];for(h=0;h<n;++h)r._parsed[h+e]=p=A[h],u&&(m()&&(u=!1),d=p);r._sorted=u}a&&qy(this,A)}parsePrimitiveData(e,n,r,i){const{iScale:o,vScale:a}=e,c=o.axis,u=a.axis,d=o.getLabels(),h=o===a,p=new Array(i);let A,m,y;for(A=0,m=i;A<m;++A)y=A+r,p[A]={[c]:h||o.parse(d[y],y),[u]:a.parse(n[y],y)};return p}parseArrayData(e,n,r,i){const{xScale:o,yScale:a}=e,c=new Array(i);let u,d,h,p;for(u=0,d=i;u<d;++u)h=u+r,p=n[h],c[u]={x:o.parse(p[0],h),y:a.parse(p[1],h)};return c}parseObjectData(e,n,r,i){const{xScale:o,yScale:a}=e,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,d=new Array(i);let h,p,A,m;for(h=0,p=i;h<p;++h)A=h+r,m=n[A],d[h]={x:o.parse(Co(m,c),A),y:a.parse(Co(m,u),A)};return d}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){const i=this.chart,o=this._cachedMeta,a=n[e.axis],c={keys:Wy(i,!0),values:n._stacks[e.axis]._visualValues};return Yy(c,a,o.index,{mode:r})}updateRangeFromParsed(e,n,r,i){const o=r[n.axis];let a=o===null?NaN:o;const c=i&&r._stacks[n.axis];i&&c&&(i.values=c,a=Yy(i,o,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&e===r.iScale,a=i.length,c=this._getOtherScale(e),u=nI(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:p}=ZT(c);let A,m;function y(){m=i[A];const k=m[c.axis];return!Br(m[e.axis])||h>k||p<k}for(A=0;A<a&&!(!y()&&(this.updateRangeFromParsed(d,e,m,u),o));++A);if(o){for(A=a-1;A>=0;--A)if(!y()){this.updateRangeFromParsed(d,e,m,u);break}}return d}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i<o;++i)a=n[i][e.axis],Br(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(e);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=GT(ht(this.options.clip,qT(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,a=[],c=this._drawStart||0,u=this._drawCount||i.length-c,d=this.options.drawActiveElementsOnTop;let h;for(r.dataset&&r.dataset.draw(e,o,c,u),h=c;h<c+u;++h){const p=i[h];p.hidden||(p.active&&d?a.push(p):p.draw(e,o))}for(h=0;h<a.length;++h)a[h].draw(e,o)}getStyle(e,n){const r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){const i=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];o=a.$context||(a.$context=tI(this.getContext(),e,a)),o.parsed=this.getParsed(e),o.raw=i.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=eI(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){const i=n==="active",o=this._cachedDataOpts,a=e+"-"+n,c=o[a],u=this.enableOptionSharing&&Dl(r);if(c)return Gy(c,u);const d=this.chart.config,h=d.datasetElementScopeKeys(this._type,e),p=i?[`${e}Hover`,"hover",e,""]:[e,""],A=d.getOptionScopes(this.getDataset(),h),m=Object.keys(Nt.elements[e]),y=()=>this.getContext(r,i,n),k=d.resolveNamedOptions(A,m,y,p);return k.$shared&&(k.$shared=u,o[a]=Object.freeze(Gy(k,u))),k}_resolveAnimations(e,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,c=o[a];if(c)return c;let u;if(i.options.animation!==!1){const h=this.chart.config,p=h.datasetAnimationScopeKeys(this._type,n),A=h.getOptionScopes(this.getDataset(),p);u=h.createResolver(A,this.getContext(e,r,n))}const d=new Uy(i,u&&u.animations);return u&&u._cacheable&&(o[a]=Object.freeze(d)),d}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||rp(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(e,n,r,i){rp(i)?Object.assign(e,r):this._resolveAnimations(n,i).update(e,r)}updateSharedOptions(e,n,r){e&&!rp(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,i){e.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(e,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,r=this._cachedMeta.data;for(const[c,u,d]of this._syncList)this[c](u,d);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,e):o<i&&this._removeElements(o,i-o)}_insertElements(e,n,r=!0){const i=this._cachedMeta,o=i.data,a=e+n;let c;const u=d=>{for(d.length+=n,c=d.length-1;c>=a;c--)d[c]=d[c-n]};for(u(o),c=e;c<a;++c)o[c]=new this.dataElementType;this._parsing&&u(i._parsed),this.parse(e,n),r&&this.updateElements(o,e,n,"reset")}updateElements(e,n,r,i){}_removeElements(e,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(e,n);r._stacked&&Ml(r,i)}r.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,r,i]=e;this[n](r,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function rI(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=gy(r.sort((i,o)=>i-o))}return t._cache.$bar}function iI(t){const e=t.iScale,n=rI(e,t.type);let r=e._length,i,o,a,c;const u=()=>{a===32767||a===-32768||(Dl(c)&&(r=Math.min(r,Math.abs(a-c)||r)),c=a)};for(i=0,o=n.length;i<o;++i)a=e.getPixelForValue(n[i]),u();for(c=void 0,i=0,o=e.ticks.length;i<o;++i)a=e.getPixelForTick(i),u();return r}function oI(t,e,n,r){const i=n.barThickness;let o,a;return St(i)?(o=e.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:e.pixels[t]-o/2}}function sI(t,e,n,r){const i=e.pixels,o=i[t];let a=t>0?i[t-1]:null,c=t<i.length-1?i[t+1]:null;const u=n.categoryPercentage;a===null&&(a=o-(c===null?e.end-e.start:c-o)),c===null&&(c=o+o-a);const d=o-(o-Math.min(a,c))/2*u;return{chunk:Math.abs(c-a)/2*u/r,ratio:n.barPercentage,start:d}}function aI(t,e,n,r){const i=n.parse(t[0],r),o=n.parse(t[1],r),a=Math.min(i,o),c=Math.max(i,o);let u=a,d=c;Math.abs(a)>Math.abs(c)&&(u=c,d=a),e[n.axis]=d,e._custom={barStart:u,barEnd:d,start:i,end:o,min:a,max:c}}function Xy(t,e,n,r){return $t(t)?aI(t,e,n,r):e[n.axis]=n.parse(t,r),e}function Jy(t,e,n,r){const i=t.iScale,o=t.vScale,a=i.getLabels(),c=i===o,u=[];let d,h,p,A;for(d=n,h=n+r;d<h;++d)A=e[d],p={},p[i.axis]=c||i.parse(a[d],d),u.push(Xy(A,p,o,d));return u}function ip(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function lI(t,e,n){return t!==0?Do(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function cI(t){let e,n,r,i,o;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:e,top:i,bottom:o}}function uI(t,e,n,r){let i=e.borderSkipped;const o={};if(!i){t.borderSkipped=o;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:c,reverse:u,top:d,bottom:h}=cI(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?i=d:(n._bottom||0)===r?i=h:(o[Zy(h,a,c,u)]=!0,i=d)),o[Zy(i,a,c,u)]=!0,t.borderSkipped=o}function Zy(t,e,n,r){return r?(t=dI(t,e,n),t=$y(t,n,e)):t=$y(t,e,n),t}function dI(t,e,n){return t===e?n:t===n?e:t}function $y(t,e,n){return t==="start"?e:t==="end"?n:t}function fI(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class hI extends Cu{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,n,r,i){return Jy(e,n,r,i)}parseArrayData(e,n,r,i){return Jy(e,n,r,i)}parseObjectData(e,n,r,i){const{iScale:o,vScale:a}=e,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,d=o.axis==="x"?c:u,h=a.axis==="x"?c:u,p=[];let A,m,y,k;for(A=r,m=r+i;A<m;++A)k=n[A],y={},y[o.axis]=o.parse(Co(k,d),A),p.push(Xy(Co(k,h),y,a,A));return p}updateRangeFromParsed(e,n,r,i){super.updateRangeFromParsed(e,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(e),a=o._custom,c=ip(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,r,i){const o=i==="reset",{index:a,_cachedMeta:{vScale:c}}=this,u=c.getBasePixel(),d=c.isHorizontal(),h=this._getRuler(),{sharedOptions:p,includeOptions:A}=this._getSharedOptions(n,i);for(let m=n;m<n+r;m++){const y=this.getParsed(m),k=o||St(y[c.axis])?{base:u,head:u}:this._calculateBarValuePixels(m),x=this._calculateBarIndexPixels(m,h),C=(y._stacks||{})[c.axis],M={horizontal:d,base:k.base,enableBorderRadius:!C||ip(y._custom)||a===C._top||a===C._bottom,x:d?k.head:x.center,y:d?x.center:k.head,height:d?x.size:Math.abs(k.size),width:d?Math.abs(k.size):x.size};A&&(M.options=p||this.resolveDataElementOptions(m,e[m].active?"active":i));const D=M.options||e[m].options;uI(M,D,C,a),fI(M,D,h.ratio),this.updateElement(e[m],m,M,i)}}_getStacks(e,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),o=r.options.stacked,a=[],c=this._cachedMeta.controller.getParsed(n),u=c&&c[r.axis],d=h=>{const p=h._parsed.find(m=>m[r.axis]===u),A=p&&p[h.vScale.axis];if(St(A)||isNaN(A))return!0};for(const h of i)if(!(n!==void 0&&d(h))&&((o===!1||a.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&a.push(h.stack),h.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(r=>e[r].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)e[ht(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,r){const i=this._getStacks(e,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const e=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o<a;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const c=e.barThickness;return{min:c||iI(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:c?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:a}}=this,c=o||0,u=this.getParsed(e),d=u._custom,h=ip(d);let p=u[n.axis],A=0,m=r?this.applyStack(n,u,r):p,y,k;m!==p&&(A=m-p,m=p),h&&(p=d.barStart,m=d.barEnd-d.barStart,p!==0&&Do(p)!==Do(d.barEnd)&&(A=0),A+=p);const x=!St(o)&&!h?o:A;let C=n.getPixelForValue(x);if(this.chart.getDataVisibility(e)?y=n.getPixelForValue(A+m):y=C,k=y-C,Math.abs(k)<a){k=lI(k,n,c)*a,p===c&&(C-=k/2);const M=n.getPixelForDecimal(0),D=n.getPixelForDecimal(1),P=Math.min(M,D),N=Math.max(M,D);C=Math.max(Math.min(C,N),P),y=C+k,r&&!h&&(u._stacks[n.axis]._visualValues[i]=n.getValueForPixel(y)-n.getValueForPixel(C))}if(C===n.getPixelForValue(c)){const M=Do(k)*n.getLineWidthForValue(c)/2;C+=M,k-=M}return{size:k,base:C,head:y,center:y+k/2}}_calculateBarIndexPixels(e,n){const r=n.scale,i=this.options,o=i.skipNull,a=ht(i.maxBarThickness,1/0);let c,u;const d=this._getAxisCount();if(n.grouped){const h=o?this._getStackCount(e):n.stackCount,p=i.barThickness==="flex"?sI(e,n,i,h*d):oI(e,n,i,h*d),A=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(ht(A,this.getFirstScaleIdForIndexAxis())),y=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0)+m;c=p.start+p.chunk*y+p.chunk/2,u=Math.min(a,p.chunk*p.ratio)}else c=r.getPixelForValue(this.getParsed(e)[r.axis],e),u=Math.min(a,n.min*n.ratio);return{base:c-u/2,head:c+u/2,center:c,size:u}}draw(){const e=this._cachedMeta,n=e.vScale,r=e.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}function pI(t,e,n){let r=1,i=1,o=0,a=0;if(e<fr){const c=t,u=c+e,d=Math.cos(c),h=Math.sin(c),p=Math.cos(u),A=Math.sin(u),m=(D,P,N)=>Qh(D,c,u,!0)?1:Math.max(P,P*n,N,N*n),y=(D,P,N)=>Qh(D,c,u,!0)?-1:Math.min(P,P*n,N,N*n),k=m(0,d,p),x=m(hr,h,A),C=y(en,d,p),M=y(en+hr,h,A);r=(k-C)/2,i=(x-M)/2,o=-(k+C)/2,a=-(x+M)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class AI extends Cu{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=e.legend.options;return n.labels.map((o,a)=>{const u=e.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:i,lineWidth:u.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=u=>+r[u];if(dt(r[e])){const{key:u="value"}=this._parsing;o=d=>+Co(r[d],u)}let a,c;for(a=e,c=e+n;a<c;++a)i._parsed[a]=o(a)}}_getRotation(){return xi(this.options.rotation-90)}_getCircumference(){return xi(this.options.circumference)}_getRotationExtents(){let e=fr,n=-fr;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),a=i._getCircumference();e=Math.min(e,o),n=Math.max(n,o+a)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,c=Math.max((Math.min(r.width,r.height)-a)/2,0),u=Math.min(N8(this.options.cutout,c),1),d=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:A,ratioY:m,offsetX:y,offsetY:k}=pI(p,h,u),x=(r.width-a)/A,C=(r.height-a)/m,M=Math.max(Math.min(x,C)/2,0),D=sy(this.options.radius,M),P=Math.max(D*u,0),N=(D-P)/this._getVisibleDatasetWeightTotal();this.offsetX=y*D,this.offsetY=k*D,i.total=this.calculateTotal(),this.outerRadius=D-N*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-N*d,0),this.updateElements(o,0,o.length,e)}_circumference(e,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*o/fr)}updateElements(e,n,r,i){const o=i==="reset",a=this.chart,c=a.chartArea,d=a.options.animation,h=(c.left+c.right)/2,p=(c.top+c.bottom)/2,A=o&&d.animateScale,m=A?0:this.innerRadius,y=A?0:this.outerRadius,{sharedOptions:k,includeOptions:x}=this._getSharedOptions(n,i);let C=this._getRotation(),M;for(M=0;M<n;++M)C+=this._circumference(M,o);for(M=n;M<n+r;++M){const D=this._circumference(M,o),P=e[M],N={x:h+this.offsetX,y:p+this.offsetY,startAngle:C,endAngle:C+D,circumference:D,outerRadius:y,innerRadius:m};x&&(N.options=k||this.resolveDataElementOptions(M,P.active?"active":i)),C+=D,this.updateElement(P,M,N,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let r=0,i;for(i=0;i<n.length;i++){const o=e._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?fr*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=yu(n._parsed[e],r.options.locale);return{label:i[e]||"",value:o}}getMaxBorderWidth(e){let n=0;const r=this.chart;let i,o,a,c,u;if(!e){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){a=r.getDatasetMeta(i),e=a.data,c=a.controller;break}}if(!e)return 0;for(i=0,o=e.length;i<o;++i)u=c.resolveDataElementOptions(i),u.borderAlign!=="inner"&&(n=Math.max(n,u.borderWidth||0,u.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let r=0,i=e.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(e){return Math.max(ht(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class gI extends Cu{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=e.legend.options;return n.labels.map((o,a)=>{const u=e.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:i,lineWidth:u.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=yu(n._parsed[e].r,r.options.locale);return{label:i[e]||"",value:o}}parseObjectData(e,n,r,i){return IT.bind(this)(e,n,r,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<n.min&&(n.min=o),o>n.max&&(n.max=o))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,r=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),a=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),c=(o-a)/e.getVisibleDatasetCount();this.outerRadius=o-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(e,n,r,i){const o=i==="reset",a=this.chart,u=a.options.animation,d=this._cachedMeta.rScale,h=d.xCenter,p=d.yCenter,A=d.getIndexAngle(0)-.5*en;let m=A,y;const k=360/this.countVisibleElements();for(y=0;y<n;++y)m+=this._computeAngle(y,i,k);for(y=n;y<n+r;y++){const x=e[y];let C=m,M=m+this._computeAngle(y,i,k),D=a.getDataVisibility(y)?d.getDistanceFromCenterForValue(this.getParsed(y).r):0;m=M,o&&(u.animateScale&&(D=0),u.animateRotate&&(C=M=A));const P={x:h,y:p,innerRadius:0,outerRadius:D,startAngle:C,endAngle:M,options:this.resolveDataElementOptions(y,x.active?"active":i)};this.updateElement(x,y,P,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?xi(this.resolveDataElementOptions(e,n).angle||r):0}}function ps(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class op{static override(e){Object.assign(op.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return ps()}parse(){return ps()}format(){return ps()}add(){return ps()}diff(){return ps()}startOf(){return ps()}endOf(){return ps()}}var mI={_date:op};function vI(t,e,n,r){const{controller:i,data:o,_sorted:a}=t,c=i._cachedMeta.iScale,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(c&&e===c.axis&&e!=="r"&&a&&o.length){const d=c._reversePixels?$8:Uh;if(r){if(i._sharedOptions){const h=o[0],p=typeof h.getRange=="function"&&h.getRange(e);if(p){const A=d(o,e,n-p),m=d(o,e,n+p);return{lo:A.lo,hi:m.hi}}}}else{const h=d(o,e,n);if(u){const{vScale:p}=i._cachedMeta,{_parsed:A}=t,m=A.slice(0,h.lo+1).reverse().findIndex(k=>!St(k[p.axis]));h.lo-=Math.max(0,m);const y=A.slice(h.hi).findIndex(k=>!St(k[p.axis]));h.hi+=Math.max(0,y)}return h}}return{lo:0,hi:o.length-1}}function Pu(t,e,n,r,i){const o=t.getSortedVisibleDatasetMetas(),a=n[e];for(let c=0,u=o.length;c<u;++c){const{index:d,data:h}=o[c],{lo:p,hi:A}=vI(o[c],e,a,i);for(let m=p;m<=A;++m){const y=h[m];y.skip||r(y,d,m)}}}function yI(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,i){const o=e?Math.abs(r.x-i.x):0,a=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function sp(t,e,n,r,i){const o=[];return!i&&!t.isPointInArea(e)||Pu(t,n,e,function(c,u,d){!i&&!By(c,t.chartArea,0)||c.inRange(e.x,e.y,r)&&o.push({element:c,datasetIndex:u,index:d})},!0),o}function xI(t,e,n,r){let i=[];function o(a,c,u){const{startAngle:d,endAngle:h}=a.getProps(["startAngle","endAngle"],r),{angle:p}=X8(a,{x:e.x,y:e.y});Qh(p,d,h)&&i.push({element:a,datasetIndex:c,index:u})}return Pu(t,n,e,o),i}function bI(t,e,n,r,i,o){let a=[];const c=yI(n);let u=Number.POSITIVE_INFINITY;function d(h,p,A){const m=h.inRange(e.x,e.y,i);if(r&&!m)return;const y=h.getCenterPoint(i);if(!(!!o||t.isPointInArea(y))&&!m)return;const x=c(e,y);x<u?(a=[{element:h,datasetIndex:p,index:A}],u=x):x===u&&a.push({element:h,datasetIndex:p,index:A})}return Pu(t,n,e,d),a}function ap(t,e,n,r,i,o){return!o&&!t.isPointInArea(e)?[]:n==="r"&&!r?xI(t,e,n,i):bI(t,e,n,r,i,o)}function ex(t,e,n,r,i){const o=[],a=n==="x"?"inXRange":"inYRange";let c=!1;return Pu(t,n,e,(u,d,h)=>{u[a]&&u[a](e[n],i)&&(o.push({element:u,datasetIndex:d,index:h}),c=c||u.inRange(e.x,e.y,i))}),r&&!c?[]:o}var wI={modes:{index(t,e,n,r){const i=hs(e,t),o=n.axis||"x",a=n.includeInvisible||!1,c=n.intersect?sp(t,i,o,r,a):ap(t,i,o,!1,r,a),u=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(d=>{const h=c[0].index,p=d.data[h];p&&!p.skip&&u.push({element:p,datasetIndex:d.index,index:h})}),u):[]},dataset(t,e,n,r){const i=hs(e,t),o=n.axis||"xy",a=n.includeInvisible||!1;let c=n.intersect?sp(t,i,o,r,a):ap(t,i,o,!1,r,a);if(c.length>0){const u=c[0].datasetIndex,d=t.getDatasetMeta(u).data;c=[];for(let h=0;h<d.length;++h)c.push({element:d[h],datasetIndex:u,index:h})}return c},point(t,e,n,r){const i=hs(e,t),o=n.axis||"xy",a=n.includeInvisible||!1;return sp(t,i,o,r,a)},nearest(t,e,n,r){const i=hs(e,t),o=n.axis||"xy",a=n.includeInvisible||!1;return ap(t,i,o,n.intersect,r,a)},x(t,e,n,r){const i=hs(e,t);return ex(t,i,"x",n.intersect,r)},y(t,e,n,r){const i=hs(e,t);return ex(t,i,"y",n.intersect,r)}}};const tx=["left","top","right","bottom"];function _l(t,e){return t.filter(n=>n.pos===e)}function nx(t,e){return t.filter(n=>tx.indexOf(n.pos)===-1&&n.box.axis===e)}function Ol(t,e){return t.sort((n,r)=>{const i=e?r:n,o=e?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function kI(t){const e=[];let n,r,i,o,a,c;for(n=0,r=(t||[]).length;n<r;++n)i=t[n],{position:o,options:{stack:a,stackWeight:c=1}}=i,e.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:c});return e}function SI(t){const e={};for(const n of t){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!tx.includes(i))continue;const a=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return e}function EI(t,e){const n=SI(t),{vBoxMaxWidth:r,hBoxMaxHeight:i}=e;let o,a,c;for(o=0,a=t.length;o<a;++o){c=t[o];const{fullSize:u}=c.box,d=n[c.stack],h=d&&c.stackWeight/d.weight;c.horizontal?(c.width=h?h*r:u&&e.availableWidth,c.height=i):(c.width=r,c.height=h?h*i:u&&e.availableHeight)}return n}function CI(t){const e=kI(t),n=Ol(e.filter(d=>d.box.fullSize),!0),r=Ol(_l(e,"left"),!0),i=Ol(_l(e,"right")),o=Ol(_l(e,"top"),!0),a=Ol(_l(e,"bottom")),c=nx(e,"x"),u=nx(e,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(u).concat(a).concat(c),chartArea:_l(e,"chartArea"),vertical:r.concat(i).concat(u),horizontal:o.concat(a).concat(c)}}function rx(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function ix(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function PI(t,e,n,r){const{pos:i,box:o}=n,a=t.maxPadding;if(!dt(i)){n.size&&(t[i]-=n.size);const p=r[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?o.height:o.width),n.size=p.size/p.count,t[i]+=n.size}o.getPadding&&ix(a,o.getPadding());const c=Math.max(0,e.outerWidth-rx(a,t,"left","right")),u=Math.max(0,e.outerHeight-rx(a,t,"top","bottom")),d=c!==t.w,h=u!==t.h;return t.w=c,t.h=u,n.horizontal?{same:d,other:h}:{same:h,other:d}}function DI(t){const e=t.maxPadding;function n(r){const i=Math.max(e[r]-t[r],0);return t[r]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function BI(t,e){const n=e.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(e[a],n[a])}),o}return r(t?["left","right"]:["top","bottom"])}function Rl(t,e,n,r){const i=[];let o,a,c,u,d,h;for(o=0,a=t.length,d=0;o<a;++o){c=t[o],u=c.box,u.update(c.width||e.w,c.height||e.h,BI(c.horizontal,e));const{same:p,other:A}=PI(e,n,c,r);d|=p&&i.length,h=h||A,u.fullSize||i.push(c)}return d&&Rl(i,e,n,r)||h}function Du(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i}function ox(t,e,n,r){const i=n.padding;let{x:o,y:a}=e;for(const c of t){const u=c.box,d=r[c.stack]||{placed:0,weight:1},h=c.stackWeight/d.weight||1;if(c.horizontal){const p=e.w*h,A=d.size||u.height;Dl(d.start)&&(a=d.start),u.fullSize?Du(u,i.left,a,n.outerWidth-i.right-i.left,A):Du(u,e.left+d.placed,a,p,A),d.start=a,d.placed+=p,a=u.bottom}else{const p=e.h*h,A=d.size||u.width;Dl(d.start)&&(o=d.start),u.fullSize?Du(u,o,i.top,A,n.outerHeight-i.bottom-i.top):Du(u,o,e.top+d.placed,A,p),d.start=o,d.placed+=p,o=u.right}}e.x=o,e.y=a}var Ir={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const i=Tr(t.options.layout.padding),o=Math.max(e-i.width,0),a=Math.max(n-i.height,0),c=CI(t.boxes),u=c.vertical,d=c.horizontal;mt(t.boxes,k=>{typeof k.beforeLayout=="function"&&k.beforeLayout()});const h=u.reduce((k,x)=>x.box.options&&x.box.options.display===!1?k:k+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),A=Object.assign({},i);ix(A,Tr(r));const m=Object.assign({maxPadding:A,w:o,h:a,x:i.left,y:i.top},i),y=EI(u.concat(d),p);Rl(c.fullSize,m,p,y),Rl(u,m,p,y),Rl(d,m,p,y)&&Rl(u,m,p,y),DI(m),ox(c.leftAndTop,m,p,y),m.x+=m.w,m.y+=m.h,ox(c.rightAndBottom,m,p,y),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},mt(c.chartArea,k=>{const x=k.box;Object.assign(x,t.chartArea),x.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class sx{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,i){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(e){return!0}updateConfig(e){}}class TI extends sx{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Bu="$chartjs",II={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ax=t=>t===null||t==="";function MI(t,e){const n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[Bu]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",ax(i)){const o=jy(t,"width");o!==void 0&&(t.width=o)}if(ax(r))if(t.style.height==="")t.height=t.width/(e||2);else{const o=jy(t,"height");o!==void 0&&(t.height=o)}return t}const lx=NT?{passive:!0}:!1;function _I(t,e,n){t&&t.addEventListener(e,n,lx)}function OI(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,lx)}function RI(t,e){const n=II[t.type]||t.type,{x:r,y:i}=hs(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Tu(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function LI(t,e,n){const r=t.canvas,i=new MutationObserver(o=>{let a=!1;for(const c of o)a=a||Tu(c.addedNodes,r),a=a&&!Tu(c.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function FI(t,e,n){const r=t.canvas,i=new MutationObserver(o=>{let a=!1;for(const c of o)a=a||Tu(c.removedNodes,r),a=a&&!Tu(c.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ll=new Map;let cx=0;function ux(){const t=window.devicePixelRatio;t!==cx&&(cx=t,Ll.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function NI(t,e){Ll.size||window.addEventListener("resize",ux),Ll.set(t,e)}function jI(t){Ll.delete(t),Ll.size||window.removeEventListener("resize",ux)}function zI(t,e,n){const r=t.canvas,i=r&&ep(r);if(!i)return;const o=vy((c,u)=>{const d=i.clientWidth;n(c,u),d<i.clientWidth&&n()},window),a=new ResizeObserver(c=>{const u=c[0],d=u.contentRect.width,h=u.contentRect.height;d===0&&h===0||o(d,h)});return a.observe(i),NI(t,o),a}function lp(t,e,n){n&&n.disconnect(),e==="resize"&&jI(t)}function QI(t,e,n){const r=t.canvas,i=vy(o=>{t.ctx!==null&&n(RI(o,t))},t);return _I(r,e,i),i}class HI extends sx{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(MI(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[Bu])return!1;const r=n[Bu].initial;["height","width"].forEach(o=>{const a=r[o];St(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[Bu],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),a={attach:LI,detach:FI,resize:zI}[n]||QI;i[n]=a(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),i=r[n];if(!i)return;({attach:lp,detach:lp,resize:lp}[n]||OI)(e,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return FT(e,n,r,i)}isAttached(e){const n=e&&ep(e);return!!(n&&n.isConnected)}}function UI(t){return!$h()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?TI:HI}let fa=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:r}=this.getProps(["x","y"],e);return{x:n,y:r}}hasValue(){return mu(this.x)&&mu(this.y)}getProps(e,n){const r=this.$animations;if(!n||!r)return this;const i={};return e.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}};function VI(t,e){const n=t.options.ticks,r=WI(t),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?KI(e):[],a=o.length,c=o[0],u=o[a-1],d=[];if(a>i)return qI(e,d,o,a/i),d;const h=YI(o,e,i);if(a>0){let p,A;const m=a>1?Math.round((u-c)/(a-1)):null;for(Iu(e,d,h,St(m)?0:c-m,c),p=0,A=a-1;p<A;p++)Iu(e,d,h,o[p],o[p+1]);return Iu(e,d,h,u,St(m)?e.length:u+m),d}return Iu(e,d,h),d}function WI(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}function YI(t,e,n){const r=GI(t),i=e.length/n;if(!r)return Math.max(i,1);const o=W8(r);for(let a=0,c=o.length-1;a<c;a++){const u=o[a];if(u>i)return u}return Math.max(i,1)}function KI(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function qI(t,e,n,r){let i=0,o=n[0],a;for(r=Math.ceil(r),a=0;a<t.length;a++)a===o&&(e.push(t[a]),i++,o=n[i*r])}function Iu(t,e,n,r,i){const o=ht(r,0),a=Math.min(ht(i,t.length),t.length);let c=0,u,d,h;for(n=Math.ceil(n),i&&(u=i-r,n=u/Math.floor(u/n)),h=o;h<0;)c++,h=Math.round(o+c*n);for(d=Math.max(o,0);d<a;d++)d===h&&(e.push(t[d]),c++,h=Math.round(o+c*n))}function GI(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}const XI=t=>t==="left"?"right":t==="right"?"left":t,dx=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,fx=(t,e)=>Math.min(e||t,t);function hx(t,e){const n=[],r=t.length/e,i=t.length;let o=0;for(;o<i;o+=r)n.push(t[Math.floor(o)]);return n}function JI(t,e,n){const r=t.ticks.length,i=Math.min(e,r-1),o=t._startPixel,a=t._endPixel,c=1e-6;let u=t.getPixelForTick(i),d;if(!(n&&(r===1?d=Math.max(u-o,a-u):e===0?d=(t.getPixelForTick(1)-u)/2:d=(u-t.getPixelForTick(i-1))/2,u+=i<e?d:-d,u<o-c||u>a+c)))return u}function ZI(t,e){mt(t,n=>{const r=n.gc,i=r.length/2;let o;if(i>e){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function Fl(t){return t.drawTicks?t.tickLength:0}function px(t,e){if(!t.display)return 0;const n=kn(t.font,e),r=Tr(t.padding);return($t(t.text)?t.text.length:1)*n.lineHeight+r.height}function $I(t,e){return ca(t,{scale:e,type:"scale"})}function e4(t,e,n){return ca(t,{tick:n,index:e,type:"tick"})}function t4(t,e,n){let r=Vh(t);return(n&&e!=="right"||!n&&e==="right")&&(r=XI(r)),r}function n4(t,e,n,r){const{top:i,left:o,bottom:a,right:c,chart:u}=t,{chartArea:d,scales:h}=u;let p=0,A,m,y;const k=a-i,x=c-o;if(t.isHorizontal()){if(m=wn(r,o,c),dt(n)){const C=Object.keys(n)[0],M=n[C];y=h[C].getPixelForValue(M)+k-e}else n==="center"?y=(d.bottom+d.top)/2+k-e:y=dx(t,n,e);A=c-o}else{if(dt(n)){const C=Object.keys(n)[0],M=n[C];m=h[C].getPixelForValue(M)-x+e}else n==="center"?m=(d.left+d.right)/2-x+e:m=dx(t,n,e);y=wn(r,a,i),p=n==="left"?-hr:hr}return{titleX:m,titleY:y,maxWidth:A,rotation:p}}class ha extends fa{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return e=yi(e,Number.POSITIVE_INFINITY),n=yi(n,Number.NEGATIVE_INFINITY),r=yi(r,Number.POSITIVE_INFINITY),i=yi(i,Number.NEGATIVE_INFINITY),{min:yi(e,r),max:yi(n,i),minDefined:Br(e),maxDefined:Br(n)}}getMinMax(e){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:n,max:r};const c=this.getMatchingVisibleMetas();for(let u=0,d=c.length;u<d;++u)a=c[u].controller.getMinMax(this,e),i||(n=Math.min(n,a.min)),o||(r=Math.max(r,a.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:yi(n,yi(r,n)),max:yi(r,yi(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Tt(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,c=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=bT(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=c<this.ticks.length;this._convertTicksToLabels(u?hx(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=VI(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Tt(this.options.afterUpdate,[this])}beforeSetDimensions(){Tt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Tt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Tt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Tt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r],o.label=Tt(n.callback,[o.value,r,e],this)}afterTickToLabelConversion(){Tt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Tt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,r=fx(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let a=i,c,u,d;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const h=this._getLabelSizes(),p=h.widest.width,A=h.highest.height,m=Wr(this.chart.width-p,0,this.maxWidth);c=e.offset?this.maxWidth/r:m/(r-1),p+6>c&&(c=m/(r-(e.offset?.5:1)),u=this.maxHeight-Fl(e.grid)-n.padding-px(e.title,this.chart.options.font),d=Math.sqrt(p*p+A*A),a=G8(Math.min(Math.asin(Wr((h.highest.height+6)/c,-1,1)),Math.asin(Wr(u/d,-1,1))-Math.asin(Wr(A/d,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){Tt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Tt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),c=this.isHorizontal();if(a){const u=px(i,n.options.font);if(c?(e.width=this.maxWidth,e.height=Fl(o)+u):(e.height=this.maxHeight,e.width=Fl(o)+u),r.display&&this.ticks.length){const{first:d,last:h,widest:p,highest:A}=this._getLabelSizes(),m=r.padding*2,y=xi(this.labelRotation),k=Math.cos(y),x=Math.sin(y);if(c){const C=r.mirror?0:x*p.width+k*A.height;e.height=Math.min(this.maxHeight,e.height+C+m)}else{const C=r.mirror?0:k*p.width+x*A.height;e.width=Math.min(this.maxWidth,e.width+C+m)}this._calculatePadding(d,h,x,k)}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,i){const{ticks:{align:o,padding:a},position:c}=this.options,u=this.labelRotation!==0,d=c!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let A=0,m=0;u?d?(A=i*e.width,m=r*n.height):(A=r*e.height,m=i*n.width):o==="start"?m=n.width:o==="end"?A=e.width:o!=="inner"&&(A=e.width/2,m=n.width/2),this.paddingLeft=Math.max((A-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((m-p+a)*this.width/(this.width-p),0)}else{let h=n.height/2,p=e.height/2;o==="start"?(h=0,p=e.height):o==="end"&&(h=n.height,p=0),this.paddingTop=h+a,this.paddingBottom=p+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Tt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)St(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=hx(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){const{ctx:i,_longestTextCache:o}=this,a=[],c=[],u=Math.floor(n/fx(n,r));let d=0,h=0,p,A,m,y,k,x,C,M,D,P,N;for(p=0;p<n;p+=u){if(y=e[p].label,k=this._resolveTickFontOptions(p),i.font=x=k.string,C=o[x]=o[x]||{data:{},gc:[]},M=k.lineHeight,D=P=0,!St(y)&&!$t(y))D=Ey(i,C.data,C.gc,D,y),P=M;else if($t(y))for(A=0,m=y.length;A<m;++A)N=y[A],!St(N)&&!$t(N)&&(D=Ey(i,C.data,C.gc,D,N),P+=M);a.push(D),c.push(P),d=Math.max(D,d),h=Math.max(P,h)}ZI(o,n);const j=a.indexOf(d),U=c.indexOf(h),V=Y=>({width:a[Y]||0,height:c[Y]||0});return{first:V(0),last:V(n-1),widest:V(j),highest:V(U),widths:a,heights:c}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Z8(this._alignToPixels?ds(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const r=n[e];return r.$context||(r.$context=e4(this.getContext(),e,r))}return this.$context||(this.$context=$I(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=xi(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),a=e.autoSkipPadding||0,c=o?o.widest.width+a:0,u=o?o.highest.height+a:0;return this.isHorizontal()?u*r>c*i?c/r:u/i:u*i<c*r?u/r:c/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:c}=i,u=o.offset,d=this.isHorizontal(),p=this.ticks.length+(u?1:0),A=Fl(o),m=[],y=c.setContext(this.getContext()),k=y.display?y.width:0,x=k/2,C=function(le){return ds(r,le,k)};let M,D,P,N,j,U,V,Y,W,X,q,se;if(a==="top")M=C(this.bottom),U=this.bottom-A,Y=M-x,X=C(e.top)+x,se=e.bottom;else if(a==="bottom")M=C(this.top),X=e.top,se=C(e.bottom)-x,U=M+x,Y=this.top+A;else if(a==="left")M=C(this.right),j=this.right-A,V=M-x,W=C(e.left)+x,q=e.right;else if(a==="right")M=C(this.left),W=e.left,q=C(e.right)-x,j=M+x,V=this.left+A;else if(n==="x"){if(a==="center")M=C((e.top+e.bottom)/2+.5);else if(dt(a)){const le=Object.keys(a)[0],ue=a[le];M=C(this.chart.scales[le].getPixelForValue(ue))}X=e.top,se=e.bottom,U=M+x,Y=U+A}else if(n==="y"){if(a==="center")M=C((e.left+e.right)/2);else if(dt(a)){const le=Object.keys(a)[0],ue=a[le];M=C(this.chart.scales[le].getPixelForValue(ue))}j=M-x,V=j-A,W=e.left,q=e.right}const fe=ht(i.ticks.maxTicksLimit,p),Ae=Math.max(1,Math.ceil(p/fe));for(D=0;D<p;D+=Ae){const le=this.getContext(D),ue=o.setContext(le),$=c.setContext(le),L=ue.lineWidth,ce=ue.color,I=$.dash||[],J=$.dashOffset,ye=ue.tickWidth,me=ue.tickColor,Ee=ue.tickBorderDash||[],De=ue.tickBorderDashOffset;P=JI(this,D,u),P!==void 0&&(N=ds(r,P,L),d?j=V=W=q=N:U=Y=X=se=N,m.push({tx1:j,ty1:U,tx2:V,ty2:Y,x1:W,y1:X,x2:q,y2:se,width:L,color:ce,borderDash:I,borderDashOffset:J,tickWidth:ye,tickColor:me,tickBorderDash:Ee,tickBorderDashOffset:De}))}return this._ticksLength=p,this._borderValue=M,m}_computeLabelItems(e){const n=this.axis,r=this.options,{position:i,ticks:o}=r,a=this.isHorizontal(),c=this.ticks,{align:u,crossAlign:d,padding:h,mirror:p}=o,A=Fl(r.grid),m=A+h,y=p?-h:m,k=-xi(this.labelRotation),x=[];let C,M,D,P,N,j,U,V,Y,W,X,q,se="middle";if(i==="top")j=this.bottom-y,U=this._getXAxisLabelAlignment();else if(i==="bottom")j=this.top+y,U=this._getXAxisLabelAlignment();else if(i==="left"){const Ae=this._getYAxisLabelAlignment(A);U=Ae.textAlign,N=Ae.x}else if(i==="right"){const Ae=this._getYAxisLabelAlignment(A);U=Ae.textAlign,N=Ae.x}else if(n==="x"){if(i==="center")j=(e.top+e.bottom)/2+m;else if(dt(i)){const Ae=Object.keys(i)[0],le=i[Ae];j=this.chart.scales[Ae].getPixelForValue(le)+m}U=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")N=(e.left+e.right)/2-m;else if(dt(i)){const Ae=Object.keys(i)[0],le=i[Ae];N=this.chart.scales[Ae].getPixelForValue(le)}U=this._getYAxisLabelAlignment(A).textAlign}n==="y"&&(u==="start"?se="top":u==="end"&&(se="bottom"));const fe=this._getLabelSizes();for(C=0,M=c.length;C<M;++C){D=c[C],P=D.label;const Ae=o.setContext(this.getContext(C));V=this.getPixelForTick(C)+o.labelOffset,Y=this._resolveTickFontOptions(C),W=Y.lineHeight,X=$t(P)?P.length:1;const le=X/2,ue=Ae.color,$=Ae.textStrokeColor,L=Ae.textStrokeWidth;let ce=U;a?(N=V,U==="inner"&&(C===M-1?ce=this.options.reverse?"left":"right":C===0?ce=this.options.reverse?"right":"left":ce="center"),i==="top"?d==="near"||k!==0?q=-X*W+W/2:d==="center"?q=-fe.highest.height/2-le*W+W:q=-fe.highest.height+W/2:d==="near"||k!==0?q=W/2:d==="center"?q=fe.highest.height/2-le*W:q=fe.highest.height-X*W,p&&(q*=-1),k!==0&&!Ae.showLabelBackdrop&&(N+=W/2*Math.sin(k))):(j=V,q=(1-X)*W/2);let I;if(Ae.showLabelBackdrop){const J=Tr(Ae.backdropPadding),ye=fe.heights[C],me=fe.widths[C];let Ee=q-J.top,De=0-J.left;switch(se){case"middle":Ee-=ye/2;break;case"bottom":Ee-=ye;break}switch(U){case"center":De-=me/2;break;case"right":De-=me;break;case"inner":C===M-1?De-=me:C>0&&(De-=me/2);break}I={left:De,top:Ee,width:me+J.width,height:ye+J.height,color:Ae.backdropColor}}x.push({label:P,font:Y,textOffset:q,options:{rotation:k,color:ue,strokeColor:$,strokeWidth:L,textAlign:ce,textBaseline:se,translation:[N,j],backdrop:I}})}return x}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-xi(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,a=this._getLabelSizes(),c=e+o,u=a.widest.width;let d,h;return n==="left"?i?(h=this.right+o,r==="near"?d="left":r==="center"?(d="center",h+=u/2):(d="right",h+=u)):(h=this.right-c,r==="near"?d="right":r==="center"?(d="center",h-=u/2):(d="left",h=this.left)):n==="right"?i?(h=this.left+o,r==="near"?d="right":r==="center"?(d="center",h-=u/2):(d="left",h-=u)):(h=this.left+c,r==="near"?d="left":r==="center"?(d="center",h+=u/2):(d="right",h=this.right)):d="right",{textAlign:d,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:r,top:i,width:o,height:a}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,i,o,a),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,a;const c=(u,d,h)=>{!h.width||!h.color||(r.save(),r.lineWidth=h.width,r.strokeStyle=h.color,r.setLineDash(h.borderDash||[]),r.lineDashOffset=h.borderDashOffset,r.beginPath(),r.moveTo(u.x,u.y),r.lineTo(d.x,d.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o<a;++o){const u=i[o];n.drawOnChartArea&&c({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&c({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),a=r.display?o.width:0;if(!a)return;const c=i.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let d,h,p,A;this.isHorizontal()?(d=ds(e,this.left,a)-a/2,h=ds(e,this.right,c)+c/2,p=A=u):(p=ds(e,this.top,a)-a/2,A=ds(e,this.bottom,c)+c/2,d=h=u),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(d,p),n.lineTo(h,A),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&qh(r,i);const o=this.getLabelItems(e);for(const a of o){const c=a.options,u=a.font,d=a.label,h=a.textOffset;Il(r,d,0,h,u,c)}i&&Gh(r)}drawTitle(){const{ctx:e,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=kn(r.font),a=Tr(r.padding),c=r.align;let u=o.lineHeight/2;n==="bottom"||n==="center"||dt(n)?(u+=a.bottom,$t(r.text)&&(u+=o.lineHeight*(r.text.length-1))):u+=a.top;const{titleX:d,titleY:h,maxWidth:p,rotation:A}=n4(this,u,n,c);Il(e,r.text,0,0,o,{color:r.color,maxWidth:p,rotation:A,textAlign:t4(c,n,i),textBaseline:"middle",translation:[d,h]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,r=ht(e.grid&&e.grid.z,-1),i=ht(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==ha.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o<a;++o){const c=n[o];c[r]===this.id&&(!e||c.type===e)&&i.push(c)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return kn(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Mu{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let r;o4(n)&&(r=this.register(n));const i=this.items,o=e.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in i||(i[o]=e,r4(e,a,r),this.override&&Nt.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const n=this.items,r=e.id,i=this.scope;r in n&&delete n[r],i&&r in Nt[i]&&(delete Nt[i][r],this.override&&delete us[r])}}function r4(t,e,n){const r=Cl(Object.create(null),[n?Nt.get(n):{},Nt.get(e),t.defaults]);Nt.set(e,r),t.defaultRoutes&&i4(e,t.defaultRoutes),t.descriptors&&Nt.describe(e,t.descriptors)}function i4(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),i=r.pop(),o=[t].concat(r).join("."),a=e[n].split("."),c=a.pop(),u=a.join(".");Nt.route(o,i,u,c)})}function o4(t){return"id"in t&&"defaults"in t}class s4{constructor(){this.controllers=new Mu(Cu,"datasets",!0),this.elements=new Mu(fa,"elements"),this.plugins=new Mu(Object,"plugins"),this.scales=new Mu(ha,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(e,o,i):mt(i,a=>{const c=r||this._getRegistryForType(a);this._exec(e,c,a)})})}_exec(e,n,r){const i=zh(e);Tt(r["before"+i],[],r),n[e](r),Tt(r["after"+i],[],r)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return i}}var bi=new s4;class a4{constructor(){this._init=[]}notify(e,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=i?this._descriptors(e).filter(i):this._descriptors(e),a=this._notify(o,e,n,r);return n==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,n,r,i){i=i||{};for(const o of e){const a=o.plugin,c=a[r],u=[n,i,o.options];if(Tt(c,u,a)===!1&&i.cancelable)return!1}return!0}invalidate(){St(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const r=e&&e.config,i=ht(r.options&&r.options.plugins,{}),o=l4(r);return i===!1&&!n?[]:u4(e,o,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],r=this._cache,i=(o,a)=>o.filter(c=>!a.some(u=>c.plugin.id===u.plugin.id));this._notify(i(n,r),e,"stop"),this._notify(i(r,n),e,"start")}}function l4(t){const e={},n=[],r=Object.keys(bi.plugins.items);for(let o=0;o<r.length;o++)n.push(bi.getPlugin(r[o]));const i=t.plugins||[];for(let o=0;o<i.length;o++){const a=i[o];n.indexOf(a)===-1&&(n.push(a),e[a.id]=!0)}return{plugins:n,localIds:e}}function c4(t,e){return!e&&t===!1?null:t===!0?{}:t}function u4(t,{plugins:e,localIds:n},r,i){const o=[],a=t.getContext();for(const c of e){const u=c.id,d=c4(r[u],i);d!==null&&o.push({plugin:c,options:d4(t.config,{plugin:c,local:n[u]},d,a)})}return o}function d4(t,{plugin:e,local:n},r,i){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(r,o);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function cp(t,e){const n=Nt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function f4(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function h4(t,e){return t===e?"_index_":"_value_"}function Ax(t){if(t==="x"||t==="y"||t==="r")return t}function p4(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function up(t,...e){if(Ax(t))return t;for(const n of e){const r=n.axis||p4(n.position)||t.length>1&&Ax(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function gx(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function A4(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return gx(t,"x",n[0])||gx(t,"y",n[0])}return{}}function g4(t,e){const n=us[t.type]||{scales:{}},r=e.scales||{},i=cp(t.type,e),o=Object.create(null);return Object.keys(r).forEach(a=>{const c=r[a];if(!dt(c))return console.error(`Invalid scale configuration for scale: ${a}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const u=up(a,c,A4(a,t),Nt.scales[c.type]),d=h4(u,i),h=n.scales||{};o[a]=Pl(Object.create(null),[{axis:u},c,h[u],h[d]])}),t.data.datasets.forEach(a=>{const c=a.type||t.type,u=a.indexAxis||cp(c,e),h=(us[c]||{}).scales||{};Object.keys(h).forEach(p=>{const A=f4(p,u),m=a[A+"AxisID"]||A;o[m]=o[m]||Object.create(null),Pl(o[m],[{axis:A},r[m],h[p]])})}),Object.keys(o).forEach(a=>{const c=o[a];Pl(c,[Nt.scales[c.type],Nt.scale])}),o}function mx(t){const e=t.options||(t.options={});e.plugins=ht(e.plugins,{}),e.scales=g4(t,e)}function vx(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function m4(t){return t=t||{},t.data=vx(t.data),mx(t),t}const yx=new Map,xx=new Set;function _u(t,e){let n=yx.get(t);return n||(n=e(),yx.set(t,n),xx.add(n)),n}const Nl=(t,e,n)=>{const r=Co(e,n);r!==void 0&&t.add(r)};let v4=class{constructor(e){this._config=m4(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=vx(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),mx(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return _u(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return _u(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return _u(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return _u(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let i=r.get(e);return(!i||n)&&(i=new Map,r.set(e,i)),i}getOptionScopes(e,n,r){const{options:i,type:o}=this,a=this._cachedScopes(e,r),c=a.get(n);if(c)return c;const u=new Set;n.forEach(h=>{e&&(u.add(e),h.forEach(p=>Nl(u,e,p))),h.forEach(p=>Nl(u,i,p)),h.forEach(p=>Nl(u,us[o]||{},p)),h.forEach(p=>Nl(u,Nt,p)),h.forEach(p=>Nl(u,Yh,p))});const d=Array.from(u);return d.length===0&&d.push(Object.create(null)),xx.has(n)&&a.set(n,d),d}chartOptionScopes(){const{options:e,type:n}=this;return[e,us[n]||{},Nt.datasets[n]||{},{type:n},Nt,Yh]}resolveNamedOptions(e,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:c}=bx(this._resolverCache,e,i);let u=a;if(x4(a,n)){o.$shared=!1,r=Po(r)?r():r;const d=this.createResolver(e,r,c);u=ua(a,r,d)}for(const d of n)o[d]=u[d];return o}createResolver(e,n,r=[""],i){const{resolver:o}=bx(this._resolverCache,e,r);return dt(n)?ua(o,n,void 0,i):o}};function bx(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const i=n.join();let o=r.get(i);return o||(o={resolver:Xh(e,n),subPrefixes:n.filter(c=>!c.toLowerCase().includes("hover"))},r.set(i,o)),o}const y4=t=>dt(t)&&Object.getOwnPropertyNames(t).some(e=>Po(t[e]));function x4(t,e){const{isScriptable:n,isIndexable:r}=My(t);for(const i of e){const o=n(i),a=r(i),c=(a||o)&&t[i];if(o&&(Po(c)||y4(c))||a&&$t(c))return!0}return!1}var b4="4.5.0";const w4=["top","bottom","left","right","chartArea"];function wx(t,e){return t==="top"||t==="bottom"||w4.indexOf(t)===-1&&e==="x"}function kx(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function Sx(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Tt(n&&n.onComplete,[t],e)}function k4(t){const e=t.chart,n=e.options.animation;Tt(n&&n.onProgress,[t],e)}function Ex(t){return $h()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Ou={},Cx=t=>{const e=Ex(t);return Object.values(Ou).filter(n=>n.canvas===e).pop()};function S4(t,e,n){const r=Object.keys(t);for(const i of r){const o=+i;if(o>=e){const a=t[i];delete t[i],(n>0||o>e)&&(t[o+n]=a)}}}function E4(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}let dp=class{static defaults=Nt;static instances=Ou;static overrides=us;static registry=bi;static version=b4;static getChart=Cx;static register(...e){bi.add(...e),Px()}static unregister(...e){bi.remove(...e),Px()}constructor(e,n){const r=this.config=new v4(n),i=Ex(e),o=Cx(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||UI(i)),this.platform.updateConfig(r);const c=this.platform.acquireContext(i,a.aspectRatio),u=c&&c.canvas,d=u&&u.height,h=u&&u.width;if(this.id=F8(),this.ctx=c,this.canvas=u,this.width=h,this.height=d,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new a4,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=nT(p=>this.update(p),a.resizeDelay||0),this._dataChanges=[],Ou[this.id]=this,!c||!u){console.error("Failed to create chart: can't acquire context from the given item");return}Gi.listen(this,"complete",Sx),Gi.listen(this,"progress",k4),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return St(e)?n&&o?o:i?r/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return bi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ny(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Cy(this.canvas,this.ctx),this}stop(){return Gi.stop(this),this}resize(e,n){Gi.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,e,n,o),c=r.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ny(this,c,!0)&&(this.notifyPlugins("resize",{size:a}),Tt(r.onResize,[this,a],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};mt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,r=this.scales,i=Object.keys(r).reduce((a,c)=>(a[c]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const c=n[a],u=up(a,c),d=u==="r",h=u==="x";return{options:c,dposition:d?"chartArea":h?"bottom":"left",dtype:d?"radialLinear":h?"category":"linear"}}))),mt(o,a=>{const c=a.options,u=c.id,d=up(u,c),h=ht(c.type,a.dtype);(c.position===void 0||wx(c.position,d)!==wx(a.dposition))&&(c.position=a.dposition),i[u]=!0;let p=null;if(u in r&&r[u].type===h)p=r[u];else{const A=bi.getScale(h);p=new A({id:u,type:h,ctx:this.ctx,chart:this}),r[p.id]=p}p.init(c,e)}),mt(i,(a,c)=>{a||delete r[c]}),mt(r,a=>{Ir.configure(this,a,a.options),Ir.addBox(this,a)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);e.splice(n,r-n)}this._sortedMetasets=e.slice(0).sort(kx("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let a=this.getDatasetMeta(r);const c=o.type||this.config.type;if(a.type&&a.type!==c&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=c,a.indexAxis=o.indexAxis||cp(c,this.options),a.order=o.order||0,a.index=r,a.label=""+o.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const u=bi.getController(c),{datasetElementType:d,dataElementType:h}=Nt.datasets[c];Object.assign(u,{dataElementType:bi.getElement(h),datasetElementType:d&&bi.getElement(d)}),a.controller=new u(this,r),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){mt(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,h=this.data.datasets.length;d<h;d++){const{controller:p}=this.getDatasetMeta(d),A=!i&&o.indexOf(p)===-1;p.buildOrUpdateElements(A),a=Math.max(+p.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||mt(o,d=>{d.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(kx("z","_idx"));const{_active:c,_lastEvent:u}=this;u?this._eventHandler(u,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){mt(this.scales,e=>{Ir.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!cy(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const a=r==="_removeElements"?-o:o;S4(e,i,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(e.filter(a=>a[0]===o).map((a,c)=>c+","+a.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!cy(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ir.update(this,this.width,this.height,e);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],mt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Po(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const r=this.getDatasetMeta(e),i={meta:r,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Gi.has(this)?this.attached&&!Gi.running(this)&&Gi.start(this):(this.draw(),Sx({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];(!e||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,r={meta:e,index:e.index,cancelable:!0},i=HT(this,e);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&qh(n,i),e.controller.draw(),i&&Gh(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return By(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,i){const o=wI.modes[n];return typeof o=="function"?o(this,e,r,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=ca(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){const r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(e),a=o.controller._resolveAnimations(void 0,i);Dl(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),a.update(o,{visible:r}),this.update(c=>c.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Gi.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Cy(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Ou[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,r=(o,a)=>{n.addEventListener(this,o,a),e[o]=a},i=(o,a,c)=>{o.offsetX=a,o.offsetY=c,this._eventHandler(o)};mt(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,r=(u,d)=>{n.addEventListener(this,u,d),e[u]=d},i=(u,d)=>{e[u]&&(n.removeEventListener(this,u,d),delete e[u])},o=(u,d)=>{this.canvas&&this.resize(u,d)};let a;const c=()=>{i("attach",c),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",c)},n.isAttached(this.canvas)?c():a()}unbindEvents(){mt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},mt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){const i=r?"set":"remove";let o,a,c,u;for(n==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),c=0,u=e.length;c<u;++c){a=e[c];const d=a&&this.getDatasetMeta(a.datasetIndex).controller;d&&d[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],r=e.map(({datasetIndex:o,index:a})=>{const c=this.getDatasetMeta(o);if(!c)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:c.data[a],index:a}});!hu(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){const i=this.options.hover,o=(u,d)=>u.filter(h=>!d.some(p=>h.datasetIndex===p.datasetIndex&&h.index===p.index)),a=o(n,e),c=r?e:o(e,n);a.length&&this.updateHoverStyle(a,i.mode,!1),c.length&&i.mode&&this.updateHoverStyle(c,i.mode,!0)}_eventHandler(e,n){const r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(e,n,r){const{_active:i=[],options:o}=this,a=n,c=this._getActiveElements(e,i,r,a),u=U8(e),d=E4(e,this._lastEvent,r,u);r&&(this._lastEvent=null,Tt(o.onHover,[e,c,this],this),u&&Tt(o.onClick,[e,c,this],this));const h=!hu(c,i);return(h||n)&&(this._active=c,this._updateHoverStyles(c,i,n)),this._lastEvent=d,h}_getActiveElements(e,n,r,i){if(e.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,i)}};function Px(){return mt(dp.instances,t=>t._plugins.invalidate())}function Dx(t,e){const{x:n,y:r,base:i,width:o,height:a}=t.getProps(["x","y","base","width","height"],e);let c,u,d,h,p;return t.horizontal?(p=a/2,c=Math.min(n,i),u=Math.max(n,i),d=r-p,h=r+p):(p=o/2,c=n-p,u=n+p,d=Math.min(r,i),h=Math.max(r,i)),{left:c,top:d,right:u,bottom:h}}function Bo(t,e,n,r){return t?0:Wr(e,n,r)}function C4(t,e,n){const r=t.options.borderWidth,i=t.borderSkipped,o=Iy(r);return{t:Bo(i.top,o.top,0,n),r:Bo(i.right,o.right,0,e),b:Bo(i.bottom,o.bottom,0,n),l:Bo(i.left,o.left,0,e)}}function P4(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,o=la(i),a=Math.min(e,n),c=t.borderSkipped,u=r||dt(i);return{topLeft:Bo(!u||c.top||c.left,o.topLeft,0,a),topRight:Bo(!u||c.top||c.right,o.topRight,0,a),bottomLeft:Bo(!u||c.bottom||c.left,o.bottomLeft,0,a),bottomRight:Bo(!u||c.bottom||c.right,o.bottomRight,0,a)}}function D4(t){const e=Dx(t),n=e.right-e.left,r=e.bottom-e.top,i=C4(t,n/2,r/2),o=P4(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:o},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function fp(t,e,n,r){const i=e===null,o=n===null,c=t&&!(i&&o)&&Dx(t,r);return c&&(i||aa(e,c.left,c.right))&&(o||aa(n,c.top,c.bottom))}function B4(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function T4(t,e){t.rect(e.x,e.y,e.w,e.h)}function hp(t,e,n={}){const r=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-r,a=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+r,y:t.y+i,w:t.w+o,h:t.h+a,radius:t.radius}}class I4 extends fa{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:a}=D4(this),c=B4(a.radius)?xu:T4;e.save(),(a.w!==o.w||a.h!==o.h)&&(e.beginPath(),c(e,hp(a,n,o)),e.clip(),c(e,hp(o,-n,a)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),c(e,hp(o,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,r){return fp(this,e,n,r)}inXRange(e,n){return fp(this,e,null,n)}inYRange(e,n){return fp(this,null,e,n)}getCenterPoint(e){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}const pp=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Bx=pp.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function Tx(t){return pp[t%pp.length]}function Ix(t){return Bx[t%Bx.length]}function M4(t,e){return t.borderColor=Tx(e),t.backgroundColor=Ix(e),++e}function _4(t,e){return t.backgroundColor=t.data.map(()=>Tx(e++)),e}function O4(t,e){return t.backgroundColor=t.data.map(()=>Ix(e++)),e}function R4(t){let e=0;return(n,r)=>{const i=t.getDatasetMeta(r).controller;i instanceof AI?e=_4(n,e):i instanceof gI?e=O4(n,e):i&&(e=M4(n,e))}}function Mx(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function L4(t){return t&&(t.borderColor||t.backgroundColor)}function F4(){return Nt.borderColor!=="rgba(0,0,0,0.1)"||Nt.backgroundColor!=="rgba(0,0,0,0.1)"}var N4={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=t.config,{elements:o}=i,a=Mx(r)||L4(i)||o&&Mx(o)||F4();if(!n.forceOverride&&a)return;const c=R4(t);r.forEach(c)}};const _x=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},j4=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Ox extends fa{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,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 e=this.options.labels||{};let n=Tt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,i)=>e.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const r=e.labels,i=kn(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:c,itemHeight:u}=_x(r,o);let d,h;n.font=i.string,this.isHorizontal()?(d=this.maxWidth,h=this._fitRows(a,o,c,u)+10):(h=this.maxHeight,d=this._fitCols(a,i,c,u)+10),this.width=Math.min(d,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],d=this.lineWidths=[0],h=i+c;let p=e;o.textAlign="left",o.textBaseline="middle";let A=-1,m=-h;return this.legendItems.forEach((y,k)=>{const x=r+n/2+o.measureText(y.text).width;(k===0||d[d.length-1]+x+2*c>a)&&(p+=h,d[d.length-(k>0?0:1)]=0,m+=h,A++),u[k]={left:0,top:m,row:A,width:x,height:i},d[d.length-1]+=x+c}),p}_fitCols(e,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],d=this.columnSizes=[],h=a-e;let p=c,A=0,m=0,y=0,k=0;return this.legendItems.forEach((x,C)=>{const{itemWidth:M,itemHeight:D}=z4(r,n,o,x,i);C>0&&m+D+2*c>h&&(p+=A+c,d.push({width:A,height:m}),y+=A+c,k++,A=m=0),u[C]={left:y,top:m,col:k,width:M,height:D},A=Math.max(A,M),m+=D+c}),p+=A,d.push({width:A,height:m}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=da(o,this.left,this.width);if(this.isHorizontal()){let c=0,u=wn(r,this.left+i,this.right-this.lineWidths[c]);for(const d of n)c!==d.row&&(c=d.row,u=wn(r,this.left+i,this.right-this.lineWidths[c])),d.top+=this.top+e+i,d.left=a.leftForLtr(a.x(u),d.width),u+=d.width+i}else{let c=0,u=wn(r,this.top+e+i,this.bottom-this.columnSizes[c].height);for(const d of n)d.col!==c&&(c=d.col,u=wn(r,this.top+e+i,this.bottom-this.columnSizes[c].height)),d.top=u,d.left+=this.left+i,d.left=a.leftForLtr(a.x(d.left),d.width),u+=d.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;qh(e,this),this._draw(),Gh(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=e,c=Nt.color,u=da(e.rtl,this.left,this.width),d=kn(a.font),{padding:h}=a,p=d.size,A=p/2;let m;this.drawTitle(),i.textAlign=u.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=d.string;const{boxWidth:y,boxHeight:k,itemHeight:x}=_x(a,p),C=function(j,U,V){if(isNaN(y)||y<=0||isNaN(k)||k<0)return;i.save();const Y=ht(V.lineWidth,1);if(i.fillStyle=ht(V.fillStyle,c),i.lineCap=ht(V.lineCap,"butt"),i.lineDashOffset=ht(V.lineDashOffset,0),i.lineJoin=ht(V.lineJoin,"miter"),i.lineWidth=Y,i.strokeStyle=ht(V.strokeStyle,c),i.setLineDash(ht(V.lineDash,[])),a.usePointStyle){const W={radius:k*Math.SQRT2/2,pointStyle:V.pointStyle,rotation:V.rotation,borderWidth:Y},X=u.xPlus(j,y/2),q=U+A;Dy(i,W,X,q,a.pointStyleWidth&&y)}else{const W=U+Math.max((p-k)/2,0),X=u.leftForLtr(j,y),q=la(V.borderRadius);i.beginPath(),Object.values(q).some(se=>se!==0)?xu(i,{x:X,y:W,w:y,h:k,radius:q}):i.rect(X,W,y,k),i.fill(),Y!==0&&i.stroke()}i.restore()},M=function(j,U,V){Il(i,V.text,j,U+x/2,d,{strikethrough:V.hidden,textAlign:u.textAlign(V.textAlign)})},D=this.isHorizontal(),P=this._computeTitleHeight();D?m={x:wn(o,this.left+h,this.right-r[0]),y:this.top+h+P,line:0}:m={x:this.left+h,y:wn(o,this.top+P+h,this.bottom-n[0].height),line:0},zy(this.ctx,e.textDirection);const N=x+h;this.legendItems.forEach((j,U)=>{i.strokeStyle=j.fontColor,i.fillStyle=j.fontColor;const V=i.measureText(j.text).width,Y=u.textAlign(j.textAlign||(j.textAlign=a.textAlign)),W=y+A+V;let X=m.x,q=m.y;u.setWidth(this.width),D?U>0&&X+W+h>this.right&&(q=m.y+=N,m.line++,X=m.x=wn(o,this.left+h,this.right-r[m.line])):U>0&&q+N>this.bottom&&(X=m.x=X+n[m.line].width+h,m.line++,q=m.y=wn(o,this.top+P+h,this.bottom-n[m.line].height));const se=u.x(X);if(C(se,q,j),X=rT(Y,X+y+A,D?X+W:this.right,e.rtl),M(u.x(X),q,j),D)m.x+=W+h;else if(typeof j.text!="string"){const fe=d.lineHeight;m.y+=Rx(j,fe)+h}else m.y+=N}),Qy(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,r=kn(n.font),i=Tr(n.padding);if(!n.display)return;const o=da(e.rtl,this.left,this.width),a=this.ctx,c=n.position,u=r.size/2,d=i.top+u;let h,p=this.left,A=this.width;if(this.isHorizontal())A=Math.max(...this.lineWidths),h=this.top+d,p=wn(e.align,p,this.right-A);else{const y=this.columnSizes.reduce((k,x)=>Math.max(k,x.height),0);h=d+wn(e.align,this.top,this.bottom-y-e.labels.padding-this._computeTitleHeight())}const m=wn(c,p,p+A);a.textAlign=o.textAlign(Vh(c)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Il(a,n.text,m,h,r)}_computeTitleHeight(){const e=this.options.title,n=kn(e.font),r=Tr(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,i,o;if(aa(e,this.left,this.right)&&aa(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],aa(e,i.left,i.left+i.width)&&aa(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(e){const n=this.options;if(!U4(e.type,n))return;const r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,o=j4(i,r);i&&!o&&Tt(n.onLeave,[e,i,this],this),this._hoveredItem=r,r&&!o&&Tt(n.onHover,[e,r,this],this)}else r&&Tt(n.onClick,[e,r,this],this)}}function z4(t,e,n,r,i){const o=Q4(r,t,e,n),a=H4(i,r,e.lineHeight);return{itemWidth:o,itemHeight:a}}function Q4(t,e,n,r){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((o,a)=>o.length>a.length?o:a)),e+n.size/2+r.measureText(i).width}function H4(t,e,n){let r=t;return typeof e.text!="string"&&(r=Rx(e,n)),r}function Rx(t,e){const n=t.text?t.text.length:0;return e*n}function U4(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var V4={id:"legend",_element:Ox,start(t,e,n){const r=t.legend=new Ox({ctx:t.ctx,options:n,chart:t});Ir.configure(t,r,n),Ir.addBox(t,r)},stop(t){Ir.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const r=t.legend;Ir.configure(t,r,n),r.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const r=e.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),e.hidden=!0):(i.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:a,borderRadius:c}}=t.legend.options;return t._getSortedDatasetMetas().map(u=>{const d=u.controller.getStyle(n?0:void 0),h=Tr(d.borderWidth);return{text:e[u.index].label,fillStyle:d.backgroundColor,fontColor:o,hidden:!u.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:d.borderColor,pointStyle:r||d.pointStyle,rotation:d.rotation,textAlign:i||d.textAlign,borderRadius:a&&(c||d.borderRadius),datasetIndex:u.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Lx extends fa{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=$t(r.text)?r.text.length:1;this._padding=Tr(r.padding);const o=i*kn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:r,bottom:i,right:o,options:a}=this,c=a.align;let u=0,d,h,p;return this.isHorizontal()?(h=wn(c,r,o),p=n+e,d=o-r):(a.position==="left"?(h=r+e,p=wn(c,i,n),u=en*-.5):(h=o-e,p=wn(c,n,i),u=en*.5),d=i-n),{titleX:h,titleY:p,maxWidth:d,rotation:u}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const r=kn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:a,titleY:c,maxWidth:u,rotation:d}=this._drawArgs(o);Il(e,n.text,0,0,r,{color:n.color,maxWidth:u,rotation:d,textAlign:Vh(n.align),textBaseline:"middle",translation:[a,c]})}}function W4(t,e){const n=new Lx({ctx:t.ctx,options:e,chart:t});Ir.configure(t,n,e),Ir.addBox(t,n),t.titleBlock=n}var Y4={id:"title",_element:Lx,start(t,e,n){W4(t,n)},stop(t){const e=t.titleBlock;Ir.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const r=t.titleBlock;Ir.configure(t,r,n),r.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 jl={average(t){if(!t.length)return!1;let e,n,r=new Set,i=0,o=0;for(e=0,n=t.length;e<n;++e){const c=t[e].element;if(c&&c.hasValue()){const u=c.tooltipPosition();r.add(u.x),i+=u.y,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((c,u)=>c+u)/r.size,y:i/o}},nearest(t,e){if(!t.length)return!1;let n=e.x,r=e.y,i=Number.POSITIVE_INFINITY,o,a,c;for(o=0,a=t.length;o<a;++o){const u=t[o].element;if(u&&u.hasValue()){const d=u.getCenterPoint(),h=J8(e,d);h<i&&(i=h,c=u)}}if(c){const u=c.tooltipPosition();n=u.x,r=u.y}return{x:n,y:r}}};function wi(t,e){return e&&($t(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Xi(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
212
212
  `)>-1?t.split(`
213
- `):t}function K4(t,e){const{element:n,datasetIndex:r,index:i}=e,o=t.getDatasetMeta(r).controller,{label:a,value:c}=o.getLabelAndValue(i);return{chart:t,label:a,parsed:o.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:c,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Fx(t,e){const n=t.chart.ctx,{body:r,footer:i,title:o}=t,{boxWidth:a,boxHeight:c}=e,u=kn(e.bodyFont),d=kn(e.titleFont),h=kn(e.footerFont),p=o.length,A=i.length,m=r.length,y=Tr(e.padding);let k=y.height,x=0,C=r.reduce((P,N)=>P+N.before.length+N.lines.length+N.after.length,0);if(C+=t.beforeBody.length+t.afterBody.length,p&&(k+=p*d.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),C){const P=e.displayColors?Math.max(c,u.lineHeight):u.lineHeight;k+=m*P+(C-m)*u.lineHeight+(C-1)*e.bodySpacing}A&&(k+=e.footerMarginTop+A*h.lineHeight+(A-1)*e.footerSpacing);let M=0;const D=function(P){x=Math.max(x,n.measureText(P).width+M)};return n.save(),n.font=d.string,mt(t.title,D),n.font=u.string,mt(t.beforeBody.concat(t.afterBody),D),M=e.displayColors?a+2+e.boxPadding:0,mt(r,P=>{mt(P.before,D),mt(P.lines,D),mt(P.after,D)}),M=0,n.font=h.string,mt(t.footer,D),n.restore(),x+=y.width,{width:x,height:k}}function q4(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function G4(t,e,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(t==="left"&&i+o+a>e.width||t==="right"&&i-o-a<0)return!0}function X4(t,e,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:c,right:u}}=t;let d="center";return r==="center"?d=i<=(c+u)/2?"left":"right":i<=o/2?d="left":i>=a-o/2&&(d="right"),G4(d,t,e,n)&&(d="center"),d}function Nx(t,e,n){const r=n.yAlign||e.yAlign||q4(t,n);return{xAlign:n.xAlign||e.xAlign||X4(t,e,n,r),yAlign:r}}function J4(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function Z4(t,e,n){let{y:r,height:i}=t;return e==="top"?r+=n:e==="bottom"?r-=i+n:r-=i/2,r}function jx(t,e,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=t,{xAlign:c,yAlign:u}=n,d=i+o,{topLeft:h,topRight:p,bottomLeft:A,bottomRight:m}=la(a);let y=J4(e,c);const k=Z4(e,u,d);return u==="center"?c==="left"?y+=d:c==="right"&&(y-=d):c==="left"?y-=Math.max(h,A)+i:c==="right"&&(y+=Math.max(p,m)+i),{x:Wr(y,0,r.width-e.width),y:Wr(k,0,r.height-e.height)}}function Ru(t,e,n){const r=Tr(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function zx(t){return wi([],Xi(t))}function $4(t,e,n){return ca(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Qx(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Hx={beforeTitle:qi,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:qi,beforeBody:qi,beforeLabel:qi,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return St(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:qi,afterBody:qi,beforeFooter:qi,footer:qi,afterFooter:qi};function Yn(t,e,n,r){const i=t[e].call(n,r);return typeof i>"u"?Hx[e].call(n,r):i}class Ux extends fa{static positioners=jl;constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new Uy(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=$4(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,i=Yn(r,"beforeTitle",this,e),o=Yn(r,"title",this,e),a=Yn(r,"afterTitle",this,e);let c=[];return c=wi(c,Xi(i)),c=wi(c,Xi(o)),c=wi(c,Xi(a)),c}getBeforeBody(e,n){return zx(Yn(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,i=[];return mt(e,o=>{const a={before:[],lines:[],after:[]},c=Qx(r,o);wi(a.before,Xi(Yn(c,"beforeLabel",this,o))),wi(a.lines,Yn(c,"label",this,o)),wi(a.after,Xi(Yn(c,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(e,n){return zx(Yn(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,i=Yn(r,"beforeFooter",this,e),o=Yn(r,"footer",this,e),a=Yn(r,"afterFooter",this,e);let c=[];return c=wi(c,Xi(i)),c=wi(c,Xi(o)),c=wi(c,Xi(a)),c}_createItems(e){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let c=[],u,d;for(u=0,d=n.length;u<d;++u)c.push(K4(this.chart,n[u]));return e.filter&&(c=c.filter((h,p,A)=>e.filter(h,p,A,r))),e.itemSort&&(c=c.sort((h,p)=>e.itemSort(h,p,r))),mt(c,h=>{const p=Qx(e.callbacks,h);i.push(Yn(p,"labelColor",this,h)),o.push(Yn(p,"labelPointStyle",this,h)),a.push(Yn(p,"labelTextColor",this,h))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=c,c}update(e,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const c=jl[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const u=this._size=Fx(this,r),d=Object.assign({},c,u),h=Nx(this.chart,r,d),p=jx(r,d,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:p.x,y:p.y,width:u.width,height:u.height,caretX:c.x,caretY:c.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,i){const o=this.getCaretPosition(e,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(e,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:c}=r,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:p}=la(c),{x:A,y:m}=e,{width:y,height:k}=n;let x,C,M,D,P,N;return o==="center"?(P=m+k/2,i==="left"?(x=A,C=x-a,D=P+a,N=P-a):(x=A+y,C=x+a,D=P-a,N=P+a),M=x):(i==="left"?C=A+Math.max(u,h)+a:i==="right"?C=A+y-Math.max(d,p)-a:C=this.caretX,o==="top"?(D=m,P=D-a,x=C-a,M=C+a):(D=m+k,P=D+a,x=C+a,M=C-a),N=D),{x1:x,x2:C,x3:M,y1:D,y2:P,y3:N}}drawTitle(e,n,r){const i=this.title,o=i.length;let a,c,u;if(o){const d=da(r.rtl,this.x,this.width);for(e.x=Ru(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",a=kn(r.titleFont),c=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,u=0;u<o;++u)n.fillText(i[u],d.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+c,u+1===o&&(e.y+=r.titleMarginBottom-c)}}_drawColorBox(e,n,r,i,o){const a=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:u,boxWidth:d}=o,h=kn(o.bodyFont),p=Ru(this,"left",o),A=i.x(p),m=u<h.lineHeight?(h.lineHeight-u)/2:0,y=n.y+m;if(o.usePointStyle){const k={radius:Math.min(d,u)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},x=i.leftForLtr(A,d)+d/2,C=y+u/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,Py(e,k,x,C),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,Py(e,k,x,C)}else{e.lineWidth=dt(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const k=i.leftForLtr(A,d),x=i.leftForLtr(i.xPlus(A,1),d-2),C=la(a.borderRadius);Object.values(C).some(M=>M!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,xu(e,{x:k,y,w:d,h:u,radius:C}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),xu(e,{x,y:y+1,w:d-2,h:u-2,radius:C}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(k,y,d,u),e.strokeRect(k,y,d,u),e.fillStyle=a.backgroundColor,e.fillRect(x,y+1,d-2,u-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:c,boxHeight:u,boxWidth:d,boxPadding:h}=r,p=kn(r.bodyFont);let A=p.lineHeight,m=0;const y=da(r.rtl,this.x,this.width),k=function(V){n.fillText(V,y.x(e.x+m),e.y+A/2),e.y+=A+o},x=y.textAlign(a);let C,M,D,P,N,j,U;for(n.textAlign=a,n.textBaseline="middle",n.font=p.string,e.x=Ru(this,x,r),n.fillStyle=r.bodyColor,mt(this.beforeBody,k),m=c&&x!=="right"?a==="center"?d/2+h:d+2+h:0,P=0,j=i.length;P<j;++P){for(C=i[P],M=this.labelTextColors[P],n.fillStyle=M,mt(C.before,k),D=C.lines,c&&D.length&&(this._drawColorBox(n,e,P,y,r),A=Math.max(p.lineHeight,u)),N=0,U=D.length;N<U;++N)k(D[N]),A=p.lineHeight;mt(C.after,k)}m=0,A=p.lineHeight,mt(this.afterBody,k),e.y-=o}drawFooter(e,n,r){const i=this.footer,o=i.length;let a,c;if(o){const u=da(r.rtl,this.x,this.width);for(e.x=Ru(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=u.textAlign(r.footerAlign),n.textBaseline="middle",a=kn(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,c=0;c<o;++c)n.fillText(i[c],u.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+r.footerSpacing}}drawBackground(e,n,r,i){const{xAlign:o,yAlign:a}=this,{x:c,y:u}=e,{width:d,height:h}=r,{topLeft:p,topRight:A,bottomLeft:m,bottomRight:y}=la(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(c+p,u),a==="top"&&this.drawCaret(e,n,r,i),n.lineTo(c+d-A,u),n.quadraticCurveTo(c+d,u,c+d,u+A),a==="center"&&o==="right"&&this.drawCaret(e,n,r,i),n.lineTo(c+d,u+h-y),n.quadraticCurveTo(c+d,u+h,c+d-y,u+h),a==="bottom"&&this.drawCaret(e,n,r,i),n.lineTo(c+m,u+h),n.quadraticCurveTo(c,u+h,c,u+h-m),a==="center"&&o==="left"&&this.drawCaret(e,n,r,i),n.lineTo(c,u+p),n.quadraticCurveTo(c,u,c+p,u),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=jl[e.position].call(this,this._active,this._eventPosition);if(!a)return;const c=this._size=Fx(this,e),u=Object.assign({},a,this._size),d=Nx(n,e,u),h=jx(e,u,d,n);(i._to!==h.x||o._to!==h.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=c.width,this.height=c.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=Tr(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=r,this.drawBackground(o,e,i,n),zy(e,n.textDirection),o.y+=a.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),Qy(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,i=e.map(({datasetIndex:c,index:u})=>{const d=this.chart.getDatasetMeta(c);if(!d)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:d.data[u],index:u}}),o=!hu(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(e,o,n,r),c=this._positionChanged(a,e),u=n||!hu(a,o)||c;return u&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),u}_getActiveElements(e,n,r,i){const o=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:r,caretY:i,options:o}=this,a=jl[o.position].call(this,e,n);return a!==!1&&(r!==a.x||i!==a.y)}}var e3={id:"tooltip",_element:Ux,positioners:jl,afterInit(t,e,n){n&&(t.tooltip=new Ux({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Hx},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const t3=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function n3(t,e,n,r){const i=t.indexOf(e);if(i===-1)return t3(t,e,n,r);const o=t.lastIndexOf(e);return i!==o?n:i}const r3=(t,e)=>t===null?null:Wr(Math.round(t),0,e);function Vx(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class i3 extends ha{static id="category";static defaults={ticks:{callback:Vx}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(St(e))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:n3(r,e,ht(n,e),this._addedLabels),r3(n,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const e=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=e===0&&n===o.length-1?o:o.slice(e,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=e;a<=n;a++)i.push({value:a});return i}getLabelForValue(e){return Vx.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function o3(t,e){const n=[],{bounds:i,step:o,min:a,max:c,precision:u,count:d,maxTicks:h,maxDigits:p,includeBounds:A}=t,m=o||1,y=h-1,{min:k,max:x}=e,C=!St(a),M=!St(c),D=!St(d),P=(x-k)/(p+1);let N=fy((x-k)/y/m)*m,j,U,V,Y;if(N<1e-14&&!C&&!M)return[{value:k},{value:x}];Y=Math.ceil(x/N)-Math.floor(k/N),Y>y&&(N=fy(Y*N/y/m)*m),St(u)||(j=Math.pow(10,u),N=Math.ceil(N*j)/j),i==="ticks"?(U=Math.floor(k/N)*N,V=Math.ceil(x/N)*N):(U=k,V=x),C&&M&&o&&K8((c-a)/o,N/1e3)?(Y=Math.round(Math.min((c-a)/N,h)),N=(c-a)/Y,U=a,V=c):D?(U=C?a:U,V=M?c:V,Y=d-1,N=(V-U)/Y):(Y=(V-U)/N,gu(Y,Math.round(Y),N/1e3)?Y=Math.round(Y):Y=Math.ceil(Y));const W=Math.max(hy(N),hy(U));j=Math.pow(10,St(u)?W:u),U=Math.round(U*j)/j,V=Math.round(V*j)/j;let X=0;for(C&&(A&&U!==a?(n.push({value:a}),U<a&&X++,gu(Math.round((U+X*N)*j)/j,a,Wx(a,P,t))&&X++):U<a&&X++);X<Y;++X){const q=Math.round((U+X*N)*j)/j;if(M&&q>c)break;n.push({value:q})}return M&&A&&V!==c?n.length&&gu(n[n.length-1].value,c,Wx(c,P,t))?n[n.length-1].value=c:n.push({value:c}):(!M||V===c)&&n.push({value:V}),n}function Wx(t,e,{horizontal:n,minRotation:r}){const i=xi(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class s3 extends ha{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return St(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=u=>i=n?i:u,c=u=>o=r?o:u;if(e){const u=Do(i),d=Do(o);u<0&&d<0?c(0):u>0&&d>0&&a(0)}if(i===o){let u=o===0?1:Math.abs(o*.05);c(o+u),e||a(i-u)}this.min=i,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=o3(i,o);return e.bounds==="ticks"&&q8(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const i=(r-n)/Math.max(e.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return yu(e,this.chart.options.locale,this.options.ticks.format)}}class a3 extends s3{static id="linear";static defaults={ticks:{callback:Sy.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Br(e)?e:0,this.max=Br(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=xi(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Lu={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}},Kn=Object.keys(Lu);function Yx(t,e){return t-e}function Kx(t,e){if(St(e))return null;const n=t._adapter,{parser:r,round:i,isoWeekday:o}=t._parseOpts;let a=e;return typeof r=="function"&&(a=r(a)),Br(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(mu(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function qx(t,e,n,r){const i=Kn.length;for(let o=Kn.indexOf(t);o<i-1;++o){const a=Lu[Kn[o]],c=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(c*a.size))<=r)return Kn[o]}return Kn[i-1]}function l3(t,e,n,r,i){for(let o=Kn.length-1;o>=Kn.indexOf(n);o--){const a=Kn[o];if(Lu[a].common&&t._adapter.diff(i,r,a)>=e-1)return a}return Kn[n?Kn.indexOf(n):0]}function c3(t){for(let e=Kn.indexOf(t)+1,n=Kn.length;e<n;++e)if(Lu[Kn[e]].common)return Kn[e]}function Gx(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:r,hi:i}=Hh(n,e),o=n[r]>=e?n[r]:n[i];t[o]=!0}}function u3(t,e,n,r){const i=t._adapter,o=+i.startOf(e[0].value,r),a=e[e.length-1].value;let c,u;for(c=o;c<=a;c=+i.add(c,1,r))u=n[c],u>=0&&(e[u].major=!0);return e}function Xx(t,e,n){const r=[],i={},o=e.length;let a,c;for(a=0;a<o;++a)c=e[a],i[c]=a,r.push({value:c,major:!1});return o===0||!n?r:u3(t,r,i,n)}class Jx extends ha{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const r=e.time||(e.time={}),i=this._adapter=new mI._date(e.adapters.date);i.init(n),Pl(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Kx(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,r=e.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:c}=this.getUserBounds();function u(d){!a&&!isNaN(d.min)&&(i=Math.min(i,d.min)),!c&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!a||!c)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),i=Br(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=Br(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){const e=this.options,n=e.time,r=e.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=this.max,c=eT(i,o,a);return this._unit=n.unit||(r.autoSkip?qx(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):l3(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:c3(this._unit),this.initOffsets(i),e.reverse&&c.reverse(),Xx(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,i,o;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?r=o:r=(o-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=Wr(n,0,a),r=Wr(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||qx(o.minUnit,n,r,this._getLabelCapacity(n)),c=ht(i.ticks.stepSize,1),u=a==="week"?o.isoWeekday:!1,d=mu(u)||u===!0,h={};let p=n,A,m;if(d&&(p=+e.startOf(p,"isoWeek",u)),p=+e.startOf(p,d?"day":a),e.diff(r,n,a)>1e5*c)throw new Error(n+" and "+r+" are too far apart with stepSize of "+c+" "+a);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(A=p,m=0;A<r;A=+e.add(A,c,a),m++)Gx(h,A,y);return(A===r||i.bounds==="ticks"||m===1)&&Gx(h,A,y),Object.keys(h).sort(Yx).map(k=>+k)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(e,a)}_tickFormatFunction(e,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return Tt(a,[e,n,r],this);const c=o.time.displayFormats,u=this._unit,d=this._majorUnit,h=u&&c[u],p=d&&c[d],A=r[n],m=d&&p&&A&&A.major;return this._adapter.format(e,i||(m?p:h))}generateTickLabels(e){let n,r,i;for(n=0,r=e.length;n<r;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,r=this.ctx.measureText(e).width,i=xi(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),c=this._resolveTickFontOptions(0).size;return{w:r*o+c*a,h:r*a+c*o}}_getLabelCapacity(e){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(e,0,Xx(this,[e],this._majorUnit),i),a=this._getLabelSize(o),c=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,r;if(e.length)return e;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)e.push(Kx(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return gy(e.sort(Yx))}}function Fu(t,e,n){let r=0,i=t.length-1,o,a,c,u;n?(e>=t[r].pos&&e<=t[i].pos&&({lo:r,hi:i}=Uh(t,"pos",e)),{pos:o,time:c}=t[r],{pos:a,time:u}=t[i]):(e>=t[r].time&&e<=t[i].time&&({lo:r,hi:i}=Uh(t,"time",e)),{time:o,pos:c}=t[r],{time:a,pos:u}=t[i]);const d=a-o;return d?c+(u-c)*(e-o)/d:c}class dM extends Jx{static id="timeseries";static defaults=Jx.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Fu(n,this.min),this._tableRange=Fu(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,i=[],o=[];let a,c,u,d,h;for(a=0,c=e.length;a<c;++a)d=e[a],d>=n&&d<=r&&i.push(d);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,c=i.length;a<c;++a)h=i[a+1],u=i[a-1],d=i[a],Math.round((h+u)/2)!==d&&o.push({time:d,pos:a/(c-1)});return o}_generate(){const e=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(Fu(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return Fu(this._table,r*this._tableRange+this._minPos,!0)}}dp.register(N4,hI,I4,i3,a3,V4,Y4,e3);function d3({type:t="bar",data:e,options:n}){const r=_.useRef(null),i=_.useRef(null);return _.useLayoutEffect(()=>{i.current&&(r.current?(r.current.options=n,r.current.data=e,r.current.update()):r.current=new dp(i.current,{type:t,data:e,options:n}))},[t,e,n]),E.jsx("div",{className:"chart",children:E.jsx("canvas",{ref:i})})}const Zx=["--teal-700","--yellow-400","--teal-400","--orange-400","--green-400","--red-400"],Ap=["0 - 1s","1 - 30s","30s - 30min","30 - 60min","1 - 5hr","5 - 10hr","10 - 18hr","18+hr"],gp=(t,e,n=0)=>`${t.toFixed(n)} ${e}${t==1?"":"s"}`,$x=t=>{const e=t/3600;if(e>=1)return gp(e,"hour",1);const n=t/60;return n>=1?gp(n,"minute",0):gp(t,"second",0)},Nu=t=>t.replace(/ \([^)]+\)/,"");function f3({infoGroupId:t}){const[e,n]=_.useState("overview"),r=N1(t).filter(d=>d.cider_type=="Compute"),i=Mn(r.length?r.map(d=>`https://rest-test.ccr.xdmod.org/rest/v0.1/custom_queries/wait_times/${d.info_resourceid}/`):null,{defaultValue:[]}),o=Mn(e!=="overview"?`https://rest-test.ccr.xdmod.org/rest/v0.1/custom_queries/wait_times/${e}/queue/job_walltime`:null);if(!i.length||!r.length)return;const a=i.map((d,h)=>d.error?d:{...d.data[0],...r[h]}).filter(d=>!d.error);if(!a.length)return;const c=[E.jsxs("select",{value:e,onChange:d=>n(d.target.value),children:[E.jsx("option",{value:"overview",children:"Overview"},"overview"),a.map(d=>E.jsx("option",{value:d.info_resourceid,children:Nu(d.resource_descriptive_name)},d.info_resourceid))]},"select")];let u=null;if(e==="overview")u=E.jsx("div",{className:"cards",children:a.map(({info_resourceid:d,job_count:h,median_expansion_factor:p,median_wait_time:A,median_wall_time:m,resource_descriptive_name:y})=>E.jsxs("p",{className:"card metrics-overview",children:[E.jsxs("b",{children:[Nu(y),":"]})," Users ran"," ",E.jsxs("strong",{children:[E.jsx(ut,{name:"file-earmark-code"}),parseInt(h).toLocaleString("en-us")," jobs"]})," ","during the last 30 days. Waiting in the queue caused an average"," ",E.jsxs("strong",{children:[E.jsx(ut,{name:"calculator"}),((p-1)*100).toLocaleString("en-us",{maximumFractionDigits:0}),"% increase"]})," ","in the total completion time. The average job waited for"," ",E.jsxs("strong",{children:[E.jsx(ut,{name:"hourglass-split"})," ",$x(A)]})," ","and ran for"," ",E.jsxs("strong",{children:[E.jsx(ut,{name:"stopwatch"}),$x(m)]}),"."," ",E.jsx("a",{title:`Wait time chart for ${Nu(y)}`,href:"#",onClick:k=>{k.preventDefault(),n(d)},children:"View chart »"})]},d))});else if(o&&o.info_resource_id===e){const d={},h=Ap;for(let y of o.data)d[y.queue]=d[y.queue]||{label:y.queue,data:Array(Ap.length).fill(null)},d[y.queue].data[Ap.indexOf(y.job_walltime)]=y.median_wait_time/60;const p=Object.values(d);p.forEach((y,k)=>{let x=Zx[k%(Zx.length-1)];y.backgroundColor=getComputedStyle(document.body).getPropertyValue(x)});const A=a.find(y=>y.info_resourceid==o.info_resource_id),m={interaction:{intersect:!1,mode:"index"},plugins:{title:{display:!0,text:`Median Wait Time by Queue on ${Nu(A.resource_descriptive_name)}: Last 30 Days`}},scales:{x:{title:{display:!0,text:"Job Wall Time (Run Time)"}},y:{title:{display:!0,text:"Median Wait Time (Minutes)"}}}};u=E.jsxs(E.Fragment,{children:[E.jsx(d3,{type:"bar",data:{labels:h,datasets:p},options:m}),E.jsx("p",{children:E.jsx("a",{href:"#",onClick:y=>{y.preventDefault(),n("overview")},children:"« Back to overview"})})]})}return E.jsxs(Ai,{title:"Wait Time",icon:"hourglass-split",headerComponents:c,children:[u,E.jsxs("p",{className:"metrics-disclaimer",children:[E.jsx(ut,{name:"info-circle"}),"These metrics describe activity from ACCESS projects. Many resources have additional projects that are not part of ACCESS."]})]})}function Ji(t){return Array.isArray?Array.isArray(t):nb(t)==="[object Array]"}function h3(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function p3(t){return t==null?"":h3(t)}function ki(t){return typeof t=="string"}function eb(t){return typeof t=="number"}function A3(t){return t===!0||t===!1||g3(t)&&nb(t)=="[object Boolean]"}function tb(t){return typeof t=="object"}function g3(t){return tb(t)&&t!==null}function pr(t){return t!=null}function mp(t){return!t.trim().length}function nb(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const m3="Incorrect 'index' type",v3=t=>`Invalid value for key ${t}`,y3=t=>`Pattern length exceeds max of ${t}.`,x3=t=>`Missing ${t} property in key`,b3=t=>`Property 'weight' in key '${t}' must be a positive integer`,rb=Object.prototype.hasOwnProperty;class w3{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(r=>{let i=ib(r);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(r=>{r.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function ib(t){let e=null,n=null,r=null,i=1,o=null;if(ki(t)||Ji(t))r=t,e=ob(t),n=vp(t);else{if(!rb.call(t,"name"))throw new Error(x3("name"));const a=t.name;if(r=a,rb.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(b3(a));e=ob(a),n=vp(a),o=t.getFn}return{path:e,id:n,weight:i,src:r,getFn:o}}function ob(t){return Ji(t)?t:t.split(".")}function vp(t){return Ji(t)?t.join("."):t}function k3(t,e){let n=[],r=!1;const i=(o,a,c)=>{if(pr(o))if(!a[c])n.push(o);else{let u=a[c];const d=o[u];if(!pr(d))return;if(c===a.length-1&&(ki(d)||eb(d)||A3(d)))n.push(p3(d));else if(Ji(d)){r=!0;for(let h=0,p=d.length;h<p;h+=1)i(d[h],a,c+1)}else a.length&&i(d,a,c+1)}};return i(t,ki(e)?e.split("."):e,0),r?n:n[0]}var Ke={...{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:k3,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const S3=/[^ ]+/g;function E3(t=1,e=3){const n=new Map,r=Math.pow(10,e);return{get(i){const o=i.match(S3).length;if(n.has(o))return n.get(o);const a=1/Math.pow(o,.5*t),c=parseFloat(Math.round(a*r)/r);return n.set(o,c),c},clear(){n.clear()}}}class yp{constructor({getFn:e=Ke.getFn,fieldNormWeight:n=Ke.fieldNormWeight}={}){this.norm=E3(n,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ki(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();ki(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(e,n){return e[this._keysMap[n]]}size(){return this.records.length}_addString(e,n){if(!pr(e)||mp(e))return;let r={v:e,i:n,n:this.norm.get(e)};this.records.push(r)}_addObject(e,n){let r={i:n,$:{}};this.keys.forEach((i,o)=>{let a=i.getFn?i.getFn(e):this.getFn(e,i.path);if(pr(a)){if(Ji(a)){let c=[];const u=[{nestedArrIndex:-1,value:a}];for(;u.length;){const{nestedArrIndex:d,value:h}=u.pop();if(pr(h))if(ki(h)&&!mp(h)){let p={v:h,i:d,n:this.norm.get(h)};c.push(p)}else Ji(h)&&h.forEach((p,A)=>{u.push({nestedArrIndex:A,value:p})})}r.$[o]=c}else if(ki(a)&&!mp(a)){let c={v:a,n:this.norm.get(a)};r.$[o]=c}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function sb(t,e,{getFn:n=Ke.getFn,fieldNormWeight:r=Ke.fieldNormWeight}={}){const i=new yp({getFn:n,fieldNormWeight:r});return i.setKeys(t.map(ib)),i.setSources(e),i.create(),i}function C3(t,{getFn:e=Ke.getFn,fieldNormWeight:n=Ke.fieldNormWeight}={}){const{keys:r,records:i}=t,o=new yp({getFn:e,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(i),o}function ju(t,{errors:e=0,currentLocation:n=0,expectedLocation:r=0,distance:i=Ke.distance,ignoreLocation:o=Ke.ignoreLocation}={}){const a=e/t.length;if(o)return a;const c=Math.abs(r-n);return i?a+c/i:c?1:a}function P3(t=[],e=Ke.minMatchCharLength){let n=[],r=-1,i=-1,o=0;for(let a=t.length;o<a;o+=1){let c=t[o];c&&r===-1?r=o:!c&&r!==-1&&(i=o-1,i-r+1>=e&&n.push([r,i]),r=-1)}return t[o-1]&&o-r>=e&&n.push([r,o-1]),n}const As=32;function D3(t,e,n,{location:r=Ke.location,distance:i=Ke.distance,threshold:o=Ke.threshold,findAllMatches:a=Ke.findAllMatches,minMatchCharLength:c=Ke.minMatchCharLength,includeMatches:u=Ke.includeMatches,ignoreLocation:d=Ke.ignoreLocation}={}){if(e.length>As)throw new Error(y3(As));const h=e.length,p=t.length,A=Math.max(0,Math.min(r,p));let m=o,y=A;const k=c>1||u,x=k?Array(p):[];let C;for(;(C=t.indexOf(e,y))>-1;){let U=ju(e,{currentLocation:C,expectedLocation:A,distance:i,ignoreLocation:d});if(m=Math.min(U,m),y=C+h,k){let V=0;for(;V<h;)x[C+V]=1,V+=1}}y=-1;let M=[],D=1,P=h+p;const N=1<<h-1;for(let U=0;U<h;U+=1){let V=0,Y=P;for(;V<Y;)ju(e,{errors:U,currentLocation:A+Y,expectedLocation:A,distance:i,ignoreLocation:d})<=m?V=Y:P=Y,Y=Math.floor((P-V)/2+V);P=Y;let W=Math.max(1,A-Y+1),X=a?p:Math.min(A+Y,p)+h,q=Array(X+2);q[X+1]=(1<<U)-1;for(let fe=X;fe>=W;fe-=1){let Ae=fe-1,le=n[t.charAt(Ae)];if(k&&(x[Ae]=+!!le),q[fe]=(q[fe+1]<<1|1)&le,U&&(q[fe]|=(M[fe+1]|M[fe])<<1|1|M[fe+1]),q[fe]&N&&(D=ju(e,{errors:U,currentLocation:Ae,expectedLocation:A,distance:i,ignoreLocation:d}),D<=m)){if(m=D,y=Ae,y<=A)break;W=Math.max(1,2*A-y)}}if(ju(e,{errors:U+1,currentLocation:A,expectedLocation:A,distance:i,ignoreLocation:d})>m)break;M=q}const j={isMatch:y>=0,score:Math.max(.001,D)};if(k){const U=P3(x,c);U.length?u&&(j.indices=U):j.isMatch=!1}return j}function B3(t){let e={};for(let n=0,r=t.length;n<r;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<r-n-1}return e}const zu=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class ab{constructor(e,{location:n=Ke.location,threshold:r=Ke.threshold,distance:i=Ke.distance,includeMatches:o=Ke.includeMatches,findAllMatches:a=Ke.findAllMatches,minMatchCharLength:c=Ke.minMatchCharLength,isCaseSensitive:u=Ke.isCaseSensitive,ignoreDiacritics:d=Ke.ignoreDiacritics,ignoreLocation:h=Ke.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:h},e=u?e:e.toLowerCase(),e=d?zu(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const p=(m,y)=>{this.chunks.push({pattern:m,alphabet:B3(m),startIndex:y})},A=this.pattern.length;if(A>As){let m=0;const y=A%As,k=A-y;for(;m<k;)p(this.pattern.substr(m,As),m),m+=As;if(y){const x=A-As;p(this.pattern.substr(x),x)}}else p(this.pattern,0)}searchIn(e){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:i}=this.options;if(e=n?e:e.toLowerCase(),e=r?zu(e):e,this.pattern===e){let k={isMatch:!0,score:0};return i&&(k.indices=[[0,e.length-1]]),k}const{location:o,distance:a,threshold:c,findAllMatches:u,minMatchCharLength:d,ignoreLocation:h}=this.options;let p=[],A=0,m=!1;this.chunks.forEach(({pattern:k,alphabet:x,startIndex:C})=>{const{isMatch:M,score:D,indices:P}=D3(e,k,x,{location:o+C,distance:a,threshold:c,findAllMatches:u,minMatchCharLength:d,includeMatches:i,ignoreLocation:h});M&&(m=!0),A+=D,M&&P&&(p=[...p,...P])});let y={isMatch:m,score:m?A/this.chunks.length:1};return m&&i&&(y.indices=p),y}}class To{constructor(e){this.pattern=e}static isMultiMatch(e){return lb(e,this.multiRegex)}static isSingleMatch(e){return lb(e,this.singleRegex)}search(){}}function lb(t,e){const n=t.match(e);return n?n[1]:null}class T3 extends To{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class I3 extends To{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class M3 extends To{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class _3 extends To{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class O3 extends To{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class R3 extends To{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class cb extends To{constructor(e,{location:n=Ke.location,threshold:r=Ke.threshold,distance:i=Ke.distance,includeMatches:o=Ke.includeMatches,findAllMatches:a=Ke.findAllMatches,minMatchCharLength:c=Ke.minMatchCharLength,isCaseSensitive:u=Ke.isCaseSensitive,ignoreDiacritics:d=Ke.ignoreDiacritics,ignoreLocation:h=Ke.ignoreLocation}={}){super(e),this._bitapSearch=new ab(e,{location:n,threshold:r,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class ub extends To{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,r;const i=[],o=this.pattern.length;for(;(r=e.indexOf(this.pattern,n))>-1;)n=r+o,i.push([r,n-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const xp=[T3,ub,M3,_3,R3,O3,I3,cb],db=xp.length,L3=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,F3="|";function N3(t,e={}){return t.split(F3).map(n=>{let r=n.trim().split(L3).filter(o=>o&&!!o.trim()),i=[];for(let o=0,a=r.length;o<a;o+=1){const c=r[o];let u=!1,d=-1;for(;!u&&++d<db;){const h=xp[d];let p=h.isMultiMatch(c);p&&(i.push(new h(p,e)),u=!0)}if(!u)for(d=-1;++d<db;){const h=xp[d];let p=h.isSingleMatch(c);if(p){i.push(new h(p,e));break}}}return i})}const j3=new Set([cb.type,ub.type]);class z3{constructor(e,{isCaseSensitive:n=Ke.isCaseSensitive,ignoreDiacritics:r=Ke.ignoreDiacritics,includeMatches:i=Ke.includeMatches,minMatchCharLength:o=Ke.minMatchCharLength,ignoreLocation:a=Ke.ignoreLocation,findAllMatches:c=Ke.findAllMatches,location:u=Ke.location,threshold:d=Ke.threshold,distance:h=Ke.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:i,minMatchCharLength:o,findAllMatches:c,ignoreLocation:a,location:u,threshold:d,distance:h},e=n?e:e.toLowerCase(),e=r?zu(e):e,this.pattern=e,this.query=N3(this.pattern,this.options)}static condition(e,n){return n.useExtendedSearch}searchIn(e){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:i,ignoreDiacritics:o}=this.options;e=i?e:e.toLowerCase(),e=o?zu(e):e;let a=0,c=[],u=0;for(let d=0,h=n.length;d<h;d+=1){const p=n[d];c.length=0,a=0;for(let A=0,m=p.length;A<m;A+=1){const y=p[A],{isMatch:k,indices:x,score:C}=y.search(e);if(k){if(a+=1,u+=C,r){const M=y.constructor.type;j3.has(M)?c=[...c,...x]:c.push(x)}}else{u=0,a=0,c.length=0;break}}if(a){let A={isMatch:!0,score:u/a};return r&&(A.indices=c),A}}return{isMatch:!1,score:1}}}const bp=[];function Q3(...t){bp.push(...t)}function wp(t,e){for(let n=0,r=bp.length;n<r;n+=1){let i=bp[n];if(i.condition(t,e))return new i(t,e)}return new ab(t,e)}const Qu={AND:"$and",OR:"$or"},kp={PATH:"$path",PATTERN:"$val"},Sp=t=>!!(t[Qu.AND]||t[Qu.OR]),H3=t=>!!t[kp.PATH],U3=t=>!Ji(t)&&tb(t)&&!Sp(t),fb=t=>({[Qu.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function hb(t,e,{auto:n=!0}={}){const r=i=>{let o=Object.keys(i);const a=H3(i);if(!a&&o.length>1&&!Sp(i))return r(fb(i));if(U3(i)){const u=a?i[kp.PATH]:o[0],d=a?i[kp.PATTERN]:i[u];if(!ki(d))throw new Error(v3(u));const h={keyId:vp(u),pattern:d};return n&&(h.searcher=wp(d,e)),h}let c={children:[],operator:o[0]};return o.forEach(u=>{const d=i[u];Ji(d)&&d.forEach(h=>{c.children.push(r(h))})}),c};return Sp(t)||(t=fb(t)),r(t)}function V3(t,{ignoreFieldNorm:e=Ke.ignoreFieldNorm}){t.forEach(n=>{let r=1;n.matches.forEach(({key:i,norm:o,score:a})=>{const c=i?i.weight:null;r*=Math.pow(a===0&&c?Number.EPSILON:a,(c||1)*(e?1:o))}),n.score=r})}function W3(t,e){const n=t.matches;e.matches=[],pr(n)&&n.forEach(r=>{if(!pr(r.indices)||!r.indices.length)return;const{indices:i,value:o}=r;let a={indices:i,value:o};r.key&&(a.key=r.key.src),r.idx>-1&&(a.refIndex=r.idx),e.matches.push(a)})}function Y3(t,e){e.score=t.score}function K3(t,e,{includeMatches:n=Ke.includeMatches,includeScore:r=Ke.includeScore}={}){const i=[];return n&&i.push(W3),r&&i.push(Y3),t.map(o=>{const{idx:a}=o,c={item:e[a],refIndex:a};return i.length&&i.forEach(u=>{u(o,c)}),c})}class pa{constructor(e,n={},r){this.options={...Ke,...n},this.options.useExtendedSearch,this._keyStore=new w3(this.options.keys),this.setCollection(e,r)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof yp))throw new Error(m3);this._myIndex=n||sb(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){pr(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let r=0,i=this._docs.length;r<i;r+=1){const o=this._docs[r];e(o,r)&&(this.removeAt(r),r-=1,i-=1,n.push(o))}return n}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:n=-1}={}){const{includeMatches:r,includeScore:i,shouldSort:o,sortFn:a,ignoreFieldNorm:c}=this.options;let u=ki(e)?ki(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return V3(u,{ignoreFieldNorm:c}),o&&u.sort(a),eb(n)&&n>-1&&(u=u.slice(0,n)),K3(u,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e){const n=wp(e,this.options),{records:r}=this._myIndex,i=[];return r.forEach(({v:o,i:a,n:c})=>{if(!pr(o))return;const{isMatch:u,score:d,indices:h}=n.searchIn(o);u&&i.push({item:o,idx:a,matches:[{score:d,value:o,norm:c,indices:h}]})}),i}_searchLogical(e){const n=hb(e,this.options),r=(c,u,d)=>{if(!c.children){const{keyId:p,searcher:A}=c,m=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(u,p),searcher:A});return m&&m.length?[{idx:d,item:u,matches:m}]:[]}const h=[];for(let p=0,A=c.children.length;p<A;p+=1){const m=c.children[p],y=r(m,u,d);if(y.length)h.push(...y);else if(c.operator===Qu.AND)return[]}return h},i=this._myIndex.records,o={},a=[];return i.forEach(({$:c,i:u})=>{if(pr(c)){let d=r(n,c,u);d.length&&(o[u]||(o[u]={idx:u,item:c,matches:[]},a.push(o[u])),d.forEach(({matches:h})=>{o[u].matches.push(...h)}))}}),a}_searchObjectList(e){const n=wp(e,this.options),{keys:r,records:i}=this._myIndex,o=[];return i.forEach(({$:a,i:c})=>{if(!pr(a))return;let u=[];r.forEach((d,h)=>{u.push(...this._findMatches({key:d,value:a[h],searcher:n}))}),u.length&&o.push({idx:c,item:a,matches:u})}),o}_findMatches({key:e,value:n,searcher:r}){if(!pr(n))return[];let i=[];if(Ji(n))n.forEach(({v:o,i:a,n:c})=>{if(!pr(o))return;const{isMatch:u,score:d,indices:h}=r.searchIn(o);u&&i.push({score:d,key:e,value:o,idx:a,norm:c,indices:h})});else{const{v:o,n:a}=n,{isMatch:c,score:u,indices:d}=r.searchIn(o);c&&i.push({score:u,key:e,value:o,norm:a,indices:d})}return i}}pa.version="7.1.0",pa.createIndex=sb,pa.parseIndex=C3,pa.config=Ke,pa.parseQuery=hb,Q3(z3);function q3({highlight:t,text:e}){if(!t||!t.length)return e;const n=new RegExp(t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"gi"),r=[...e.matchAll(n)];if(!r.length)return e;const i=[];let o=0;for(let a of r)a.index>o&&i.push(e.substr(o,a.index)),i.push(E.jsx("span",{className:"highlight",children:a[0]})),o=a.index+a[0].length;return i.push(e.substr(o)),i}function G3({delay:t=300,placeholder:e,setSearchText:n,width:r="calc(var(--width) / 4)"}){const i=_.useRef(null),o=_.useRef(null),[a,c]=_.useState(""),u=()=>{c(""),n(""),i.current.value="",i.current.focus()};return _.useLayoutEffect(()=>{i.current&&i.current.addEventListener("keyup",()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,n(i.current.value),c(i.current.value)},t)})},[i.current]),E.jsx(E.Fragment,{children:E.jsxs("div",{className:"search",children:[E.jsx("input",{placeholder:e,style:{width:r},ref:i}),a.length?E.jsx("button",{className:"btn btn-clear",title:"Clear search",onClick:u,children:E.jsx(ut,{name:"x-lg"})}):null]})})}const X3=["software_name","software_description","software_web_page","software_documentation","software_use_link"];function J3({infoGroupId:t}){const e=Mn(`https://ara-db.ccs.uky.edu/api=API_0/z0CiQbts8t4pnv6fJQD4g9nskbCOl6UD-67akYK68wk/rp=${t}?include=${X3.join(",")}`),[n,r]=_.useState(""),i=_.useMemo(()=>e&&e.length?new pa(e,{keys:[{name:"software_name",weight:.6},{name:"software_description",weight:.4}]}):null,[e]);if(!e||!e.length)return;const o=A=>E.jsx(q3,{text:A,highlight:n}),d=[{key:"software_name",name:"Package",format:(A,m)=>{const y=[],k=o(A),x=m.software_web_page||m.software_documentation;return y.push(x?E.jsx("a",{href:x,children:k}):k),m.software_documentation&&y.push(E.jsx(E.Fragment,{children:" "}),E.jsx("a",{href:m.software_documentation,title:`Documentation for ${A}`,children:E.jsx(ut,{name:"book"})})),m.software_use_link&&m.software_use_link!=m.software_documentation&&y.push(E.jsx(E.Fragment,{children:" "}),E.jsx("a",{href:m.software_use_link.split(`
214
- `)[0].trim(),title:`Usage example for ${A}`,children:E.jsx(ut,{name:"terminal"})})),E.jsx("span",{style:{lineHeight:1.3},children:y})}},{key:"software_versions",name:"Versions",format:(A,m)=>A.map(y=>y.replace(`${m.rp_name}: `,"").split(",").join(", "))},{key:"software_description",name:"Description",format:(A,m)=>{const y=/Description Source:[ ]+(http[^ ]+)/,k=A.match(y);return E.jsxs(E.Fragment,{children:[o(A.replace(y,""))," ",k?E.jsx("a",{href:k[1],title:`Description source for ${m.software_name}`,children:E.jsx(ut,{name:"info-circle"})}):null]})}}],h=n.length?i.search(n).map(A=>A.item):e,p=[E.jsx(G3,{placeholder:"Search software packages...",setSearchText:r})];return E.jsx(Ai,{title:"Software",icon:"terminal",headerComponents:p,children:E.jsx(qc,{columns:d,rows:h,scrollResetOnUpdate:!0})})}function Z3({prompt:t="Jump To:"}){const[e,n]=_.useState([]),r=_.useRef(null),i=()=>{const a=[];for(let c of r.current.querySelectorAll("[data-section-title]"))a.push({icon:c.dataset.sectionIcon,id:c.id,title:c.dataset.sectionTitle});n(a)},o=a=>{const c=r.current.querySelector(`#${a}`);c&&c.scrollIntoView()};return _.useEffect(()=>{r.current&&(i(),document.addEventListener("accessci-update-sections",i))},[r.current]),E.jsx("div",{ref:a=>r.current=a?.parentElement,children:e.length>=2?E.jsxs("nav",{className:"section-navigation",children:[t?E.jsx("h2",{children:t}):null,E.jsx("ul",{children:e.map(({icon:a,id:c,title:u})=>E.jsx("li",{children:E.jsxs("a",{href:`#${c}`,onClick:d=>{d.preventDefault(),o(c)},children:[a?E.jsxs(E.Fragment,{children:[E.jsx(ut,{name:a})," "]}):null,u]})},c))})]}):null})}function $3({baseUri:t,showBreadcrumbs:e=!0}){const{infoGroupId:n}=b2(),r=Za(n),i=[{name:"Resources",href:t}];return r&&i.push({name:r.name}),E.jsxs(E.Fragment,{children:[e&&E.jsx(Vd,{expandWidth:!0,items:i,topBorder:!0}),E.jsxs("div",{className:"resource-group-detail",children:[E.jsx(FP,{infoGroupId:n}),E.jsx(Z3,{}),E.jsx(SB,{infoGroupId:n}),E.jsx(mB,{infoGroupId:n}),E.jsx(bB,{infoGroupId:n}),E.jsx(LP,{infoGroupId:n}),E.jsx(J3,{infoGroupId:n}),E.jsx(p8,{infoGroupId:n}),E.jsx(f3,{infoGroupId:n}),E.jsx(zP,{infoGroupId:n})]})]})}const e5=Object.freeze(Object.defineProperty({__proto__:null,default:$3},Symbol.toStringTag,{value:"Module"})),t5={"ACCESS Pegasus":"https://pegasus.isi.edu/wordpress/wp-content/uploads/2016/01/favicon.ico","ACCESS OnDemand":"https://openondemand.org/themes/fire/theme/assets/media/favicons/favicon.ico","Advance reservations":"calendar-check","Composable hardware fabric":"boxes","Compute Resources":"cpu-fill","CPU Compute":"cpu-fill","GPU Compute":"cpu","Innovative / Novel Compute":"lightbulb","Large Memory Nodes":"arrows-fullscreen",Preemption:"clock-history","Science Gateway support":"globe","Service / Other":"stars","Storage Resources":"hdd-fill","Virtual Machines":"pc-display-horizontal",Cloud:"cloud",Storage:"hdd-fill"};function pb({active:t,tagCategory:e,tagId:n,iconUri:r,name:i,toggleTag:o}){const a=r||t5[i]||"tag";return E.jsx("li",{className:`tag tag-category-${e.name.toLowerCase().replace(/[^a-z]+/g,"-")}${t.tagIds.has(n)?" active":""}`,children:E.jsxs("button",{href:"#",disabled:t.disabledTagIds.has(n),onClick:c=>{c.preventDefault(),o(n)},children:[a.startsWith("http")?E.jsx(ut,{alt:i,src:a}):E.jsx(ut,{name:a}),i]})})}function Ab({children:t}){return E.jsx("ul",{className:"tags",children:t})}function n5({active:t,baseUri:e,description:n,imageType:r,imageUri:i,name:o,infoGroupId:a,parentInfoGroupId:c,tags:u,toggleTag:d}){const h=`${e}/${c||a}`;return E.jsxs("div",{className:"resource-group",children:[E.jsx("a",{className:`resource-group-image image-type-${r}`,href:h,children:i?E.jsx("img",{src:i}):E.jsx(ut,{name:"motherboard"})}),E.jsxs("div",{className:"resource-group-text",children:[E.jsx("h3",{children:E.jsx("a",{href:h,children:o})}),E.jsx(Ab,{children:u.map(p=>E.jsx(pb,{...p,active:t,toggleTag:d},p.tagId))}),E.jsxs("p",{children:[n&&n,E.jsx("br",{}),E.jsxs("a",{href:h,children:["Learn more about ",o," »"]})]})]})]})}function r5({active:t,baseUri:e,name:n,resourceGroups:r,toggleTag:i}){return E.jsxs(E.Fragment,{children:[E.jsx("h2",{children:n}),r.filter(({infoGroupId:o})=>t.infoGroupIds.has(o)).map(o=>E.jsx(n5,{...o,baseUri:e,active:t,toggleTag:i},o.infoGroupId))]})}function i5({active:t,clearTags:e,tagCategories:n,toggleTag:r}){const[i,o]=_.useState(!1),a=_.useRef(null);return _.useEffect(()=>{const c=()=>o(!1);return document.body.addEventListener("click",c),()=>document.body.removeEventListener("click",c)},[]),E.jsxs("section",{className:"filters-outer",onClick:c=>{c.stopPropagation()},children:[E.jsxs("button",{ref:a,onClick:()=>o(!i),className:`btn-filters btn ${i?"active":""}`,children:[E.jsx(ut,{name:"filter"})," Filters",t.tagIds.size>0?E.jsx("span",{className:"active-tag-count",children:t.tagIds.size}):null]}),i?E.jsxs("div",{className:"filters-inner",children:[n.map(c=>E.jsxs(E.Fragment,{children:[E.jsx("h2",{children:c.name}),E.jsx(Ab,{children:c.tags.map(u=>E.jsx(pb,{...u,active:t,toggleTag:r}))})]})),E.jsxs("button",{onClick:e,disabled:t.tagIds.size==0,className:"btn danger",children:[E.jsx(ut,{name:"trash"})," Clear Filters"]})]}):null]})}function o5({setBotOpen:t}){const e=_.useRef(null),n=[{title:"Browse resources",icon:"filter-square",description:"Filter resources to find the best match for your research.",onClick:r=>{r.preventDefault(),e.current&&e.current.nextSibling.scrollIntoView({bahavior:"smooth"})}},{title:"Ask a question",icon:"question-circle",onClick:r=>{r.preventDefault(),t(!0)},description:"You have resource questions. Our Q&A bot has answers!",login:!0},{title:"Get suggestions",icon:"card-checklist",href:"https://ara.access-ci.org/",description:"Fill out a form to get resource recommendations."},{title:"Read news",icon:"newspaper",href:"https://access-ci.org/tag/resource-providers/",description:"See the latest news from resource providers."}];return E.jsxs("section",{id:"resource-pathways",ref:e,children:[E.jsxs("p",{className:"intro",children:["ACCESS provides advanced computing resources ",E.jsx("strong",{children:"at no cost"})," ","to researchers and educators."]}),E.jsx("ul",{className:"resource-pathways",children:n.map(({title:r,icon:i,href:o,description:a,login:c,onClick:u},d)=>E.jsx("li",{className:`resource-pathway-${d}`,children:E.jsxs("a",{href:o||"#",onClick:u,children:[i?E.jsx(ut,{name:i}):null," ",E.jsxs("span",{className:"detail",children:[E.jsx("span",{className:"title",children:r}),E.jsx("span",{className:"description",children:a}),c?E.jsxs("span",{className:"login",children:[E.jsx(ut,{name:"key"})," Requires ACCESS Login"]}):null]})]})},r))})]})}function s5({baseUri:t,title:e,setBotOpen:n,showBreadcrumbs:r=!0,showTitle:i=!0}){const[o,a]=_.useState([]),c=fg(),u=_.useMemo(()=>c?z1(c,o):null,[c,o]),d=p=>a(o.includes(p)?o.filter(A=>A!=p):[...o,p]),h=()=>a([]);return E.jsxs(E.Fragment,{children:[r&&E.jsx(Vd,{expandWidth:!0,items:[{name:"Resources"}],topBorder:!0}),e&&E.jsx("h1",{className:i?"":"visually-hidden",children:e}),E.jsx(o5,{setBotOpen:n}),E.jsxs("div",{id:"browse-resources",children:[u?E.jsx(i5,{tagCategories:c.tagCategories,active:u,clearTags:h,toggleTag:d}):null,c?c.resourceCategories.filter(({resourceCategoryId:p})=>u.resourceCategoryIds.has(p)).map(p=>E.jsx(r5,{...p,active:u,baseUri:t,clearTags:h,toggleTag:d},p.name)):null]})]})}const a5=Object.freeze(Object.defineProperty({__proto__:null,default:s5},Symbol.toStringTag,{value:"Module"}));hn.breadcrumbs=Ek,hn.footer=Ck,hn.footerMenus=Ik,hn.header=Pk,hn.loginMenuItem=ng,hn.myAccessMenuItem=tg,hn.qaBot=Dk,hn.resourceCatalog=_k,hn.siteMenus=Tk,hn.tableOfContents=Mk,hn.universalMenuItems=eg,hn.universalMenus=Bk,Object.defineProperty(hn,Symbol.toStringTag,{value:"Module"})});
213
+ `):t}function K4(t,e){const{element:n,datasetIndex:r,index:i}=e,o=t.getDatasetMeta(r).controller,{label:a,value:c}=o.getLabelAndValue(i);return{chart:t,label:a,parsed:o.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:c,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Fx(t,e){const n=t.chart.ctx,{body:r,footer:i,title:o}=t,{boxWidth:a,boxHeight:c}=e,u=kn(e.bodyFont),d=kn(e.titleFont),h=kn(e.footerFont),p=o.length,A=i.length,m=r.length,y=Tr(e.padding);let k=y.height,x=0,C=r.reduce((P,N)=>P+N.before.length+N.lines.length+N.after.length,0);if(C+=t.beforeBody.length+t.afterBody.length,p&&(k+=p*d.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),C){const P=e.displayColors?Math.max(c,u.lineHeight):u.lineHeight;k+=m*P+(C-m)*u.lineHeight+(C-1)*e.bodySpacing}A&&(k+=e.footerMarginTop+A*h.lineHeight+(A-1)*e.footerSpacing);let M=0;const D=function(P){x=Math.max(x,n.measureText(P).width+M)};return n.save(),n.font=d.string,mt(t.title,D),n.font=u.string,mt(t.beforeBody.concat(t.afterBody),D),M=e.displayColors?a+2+e.boxPadding:0,mt(r,P=>{mt(P.before,D),mt(P.lines,D),mt(P.after,D)}),M=0,n.font=h.string,mt(t.footer,D),n.restore(),x+=y.width,{width:x,height:k}}function q4(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function G4(t,e,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(t==="left"&&i+o+a>e.width||t==="right"&&i-o-a<0)return!0}function X4(t,e,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:c,right:u}}=t;let d="center";return r==="center"?d=i<=(c+u)/2?"left":"right":i<=o/2?d="left":i>=a-o/2&&(d="right"),G4(d,t,e,n)&&(d="center"),d}function Nx(t,e,n){const r=n.yAlign||e.yAlign||q4(t,n);return{xAlign:n.xAlign||e.xAlign||X4(t,e,n,r),yAlign:r}}function J4(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function Z4(t,e,n){let{y:r,height:i}=t;return e==="top"?r+=n:e==="bottom"?r-=i+n:r-=i/2,r}function jx(t,e,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=t,{xAlign:c,yAlign:u}=n,d=i+o,{topLeft:h,topRight:p,bottomLeft:A,bottomRight:m}=la(a);let y=J4(e,c);const k=Z4(e,u,d);return u==="center"?c==="left"?y+=d:c==="right"&&(y-=d):c==="left"?y-=Math.max(h,A)+i:c==="right"&&(y+=Math.max(p,m)+i),{x:Wr(y,0,r.width-e.width),y:Wr(k,0,r.height-e.height)}}function Ru(t,e,n){const r=Tr(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function zx(t){return wi([],Xi(t))}function $4(t,e,n){return ca(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Qx(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Hx={beforeTitle:qi,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:qi,beforeBody:qi,beforeLabel:qi,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return St(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:qi,afterBody:qi,beforeFooter:qi,footer:qi,afterFooter:qi};function Yn(t,e,n,r){const i=t[e].call(n,r);return typeof i>"u"?Hx[e].call(n,r):i}class Ux extends fa{static positioners=jl;constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new Uy(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=$4(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,i=Yn(r,"beforeTitle",this,e),o=Yn(r,"title",this,e),a=Yn(r,"afterTitle",this,e);let c=[];return c=wi(c,Xi(i)),c=wi(c,Xi(o)),c=wi(c,Xi(a)),c}getBeforeBody(e,n){return zx(Yn(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,i=[];return mt(e,o=>{const a={before:[],lines:[],after:[]},c=Qx(r,o);wi(a.before,Xi(Yn(c,"beforeLabel",this,o))),wi(a.lines,Yn(c,"label",this,o)),wi(a.after,Xi(Yn(c,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(e,n){return zx(Yn(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,i=Yn(r,"beforeFooter",this,e),o=Yn(r,"footer",this,e),a=Yn(r,"afterFooter",this,e);let c=[];return c=wi(c,Xi(i)),c=wi(c,Xi(o)),c=wi(c,Xi(a)),c}_createItems(e){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let c=[],u,d;for(u=0,d=n.length;u<d;++u)c.push(K4(this.chart,n[u]));return e.filter&&(c=c.filter((h,p,A)=>e.filter(h,p,A,r))),e.itemSort&&(c=c.sort((h,p)=>e.itemSort(h,p,r))),mt(c,h=>{const p=Qx(e.callbacks,h);i.push(Yn(p,"labelColor",this,h)),o.push(Yn(p,"labelPointStyle",this,h)),a.push(Yn(p,"labelTextColor",this,h))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=c,c}update(e,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const c=jl[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const u=this._size=Fx(this,r),d=Object.assign({},c,u),h=Nx(this.chart,r,d),p=jx(r,d,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:p.x,y:p.y,width:u.width,height:u.height,caretX:c.x,caretY:c.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,i){const o=this.getCaretPosition(e,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(e,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:c}=r,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:p}=la(c),{x:A,y:m}=e,{width:y,height:k}=n;let x,C,M,D,P,N;return o==="center"?(P=m+k/2,i==="left"?(x=A,C=x-a,D=P+a,N=P-a):(x=A+y,C=x+a,D=P-a,N=P+a),M=x):(i==="left"?C=A+Math.max(u,h)+a:i==="right"?C=A+y-Math.max(d,p)-a:C=this.caretX,o==="top"?(D=m,P=D-a,x=C-a,M=C+a):(D=m+k,P=D+a,x=C+a,M=C-a),N=D),{x1:x,x2:C,x3:M,y1:D,y2:P,y3:N}}drawTitle(e,n,r){const i=this.title,o=i.length;let a,c,u;if(o){const d=da(r.rtl,this.x,this.width);for(e.x=Ru(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",a=kn(r.titleFont),c=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,u=0;u<o;++u)n.fillText(i[u],d.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+c,u+1===o&&(e.y+=r.titleMarginBottom-c)}}_drawColorBox(e,n,r,i,o){const a=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:u,boxWidth:d}=o,h=kn(o.bodyFont),p=Ru(this,"left",o),A=i.x(p),m=u<h.lineHeight?(h.lineHeight-u)/2:0,y=n.y+m;if(o.usePointStyle){const k={radius:Math.min(d,u)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},x=i.leftForLtr(A,d)+d/2,C=y+u/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,Py(e,k,x,C),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,Py(e,k,x,C)}else{e.lineWidth=dt(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const k=i.leftForLtr(A,d),x=i.leftForLtr(i.xPlus(A,1),d-2),C=la(a.borderRadius);Object.values(C).some(M=>M!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,xu(e,{x:k,y,w:d,h:u,radius:C}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),xu(e,{x,y:y+1,w:d-2,h:u-2,radius:C}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(k,y,d,u),e.strokeRect(k,y,d,u),e.fillStyle=a.backgroundColor,e.fillRect(x,y+1,d-2,u-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:c,boxHeight:u,boxWidth:d,boxPadding:h}=r,p=kn(r.bodyFont);let A=p.lineHeight,m=0;const y=da(r.rtl,this.x,this.width),k=function(V){n.fillText(V,y.x(e.x+m),e.y+A/2),e.y+=A+o},x=y.textAlign(a);let C,M,D,P,N,j,U;for(n.textAlign=a,n.textBaseline="middle",n.font=p.string,e.x=Ru(this,x,r),n.fillStyle=r.bodyColor,mt(this.beforeBody,k),m=c&&x!=="right"?a==="center"?d/2+h:d+2+h:0,P=0,j=i.length;P<j;++P){for(C=i[P],M=this.labelTextColors[P],n.fillStyle=M,mt(C.before,k),D=C.lines,c&&D.length&&(this._drawColorBox(n,e,P,y,r),A=Math.max(p.lineHeight,u)),N=0,U=D.length;N<U;++N)k(D[N]),A=p.lineHeight;mt(C.after,k)}m=0,A=p.lineHeight,mt(this.afterBody,k),e.y-=o}drawFooter(e,n,r){const i=this.footer,o=i.length;let a,c;if(o){const u=da(r.rtl,this.x,this.width);for(e.x=Ru(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=u.textAlign(r.footerAlign),n.textBaseline="middle",a=kn(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,c=0;c<o;++c)n.fillText(i[c],u.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+r.footerSpacing}}drawBackground(e,n,r,i){const{xAlign:o,yAlign:a}=this,{x:c,y:u}=e,{width:d,height:h}=r,{topLeft:p,topRight:A,bottomLeft:m,bottomRight:y}=la(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(c+p,u),a==="top"&&this.drawCaret(e,n,r,i),n.lineTo(c+d-A,u),n.quadraticCurveTo(c+d,u,c+d,u+A),a==="center"&&o==="right"&&this.drawCaret(e,n,r,i),n.lineTo(c+d,u+h-y),n.quadraticCurveTo(c+d,u+h,c+d-y,u+h),a==="bottom"&&this.drawCaret(e,n,r,i),n.lineTo(c+m,u+h),n.quadraticCurveTo(c,u+h,c,u+h-m),a==="center"&&o==="left"&&this.drawCaret(e,n,r,i),n.lineTo(c,u+p),n.quadraticCurveTo(c,u,c+p,u),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=jl[e.position].call(this,this._active,this._eventPosition);if(!a)return;const c=this._size=Fx(this,e),u=Object.assign({},a,this._size),d=Nx(n,e,u),h=jx(e,u,d,n);(i._to!==h.x||o._to!==h.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=c.width,this.height=c.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=Tr(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=r,this.drawBackground(o,e,i,n),zy(e,n.textDirection),o.y+=a.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),Qy(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,i=e.map(({datasetIndex:c,index:u})=>{const d=this.chart.getDatasetMeta(c);if(!d)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:d.data[u],index:u}}),o=!hu(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(e,o,n,r),c=this._positionChanged(a,e),u=n||!hu(a,o)||c;return u&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),u}_getActiveElements(e,n,r,i){const o=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:r,caretY:i,options:o}=this,a=jl[o.position].call(this,e,n);return a!==!1&&(r!==a.x||i!==a.y)}}var e3={id:"tooltip",_element:Ux,positioners:jl,afterInit(t,e,n){n&&(t.tooltip=new Ux({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Hx},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const t3=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function n3(t,e,n,r){const i=t.indexOf(e);if(i===-1)return t3(t,e,n,r);const o=t.lastIndexOf(e);return i!==o?n:i}const r3=(t,e)=>t===null?null:Wr(Math.round(t),0,e);function Vx(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class i3 extends ha{static id="category";static defaults={ticks:{callback:Vx}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(St(e))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:n3(r,e,ht(n,e),this._addedLabels),r3(n,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const e=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=e===0&&n===o.length-1?o:o.slice(e,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=e;a<=n;a++)i.push({value:a});return i}getLabelForValue(e){return Vx.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function o3(t,e){const n=[],{bounds:i,step:o,min:a,max:c,precision:u,count:d,maxTicks:h,maxDigits:p,includeBounds:A}=t,m=o||1,y=h-1,{min:k,max:x}=e,C=!St(a),M=!St(c),D=!St(d),P=(x-k)/(p+1);let N=fy((x-k)/y/m)*m,j,U,V,Y;if(N<1e-14&&!C&&!M)return[{value:k},{value:x}];Y=Math.ceil(x/N)-Math.floor(k/N),Y>y&&(N=fy(Y*N/y/m)*m),St(u)||(j=Math.pow(10,u),N=Math.ceil(N*j)/j),i==="ticks"?(U=Math.floor(k/N)*N,V=Math.ceil(x/N)*N):(U=k,V=x),C&&M&&o&&K8((c-a)/o,N/1e3)?(Y=Math.round(Math.min((c-a)/N,h)),N=(c-a)/Y,U=a,V=c):D?(U=C?a:U,V=M?c:V,Y=d-1,N=(V-U)/Y):(Y=(V-U)/N,gu(Y,Math.round(Y),N/1e3)?Y=Math.round(Y):Y=Math.ceil(Y));const W=Math.max(hy(N),hy(U));j=Math.pow(10,St(u)?W:u),U=Math.round(U*j)/j,V=Math.round(V*j)/j;let X=0;for(C&&(A&&U!==a?(n.push({value:a}),U<a&&X++,gu(Math.round((U+X*N)*j)/j,a,Wx(a,P,t))&&X++):U<a&&X++);X<Y;++X){const q=Math.round((U+X*N)*j)/j;if(M&&q>c)break;n.push({value:q})}return M&&A&&V!==c?n.length&&gu(n[n.length-1].value,c,Wx(c,P,t))?n[n.length-1].value=c:n.push({value:c}):(!M||V===c)&&n.push({value:V}),n}function Wx(t,e,{horizontal:n,minRotation:r}){const i=xi(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class s3 extends ha{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return St(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=u=>i=n?i:u,c=u=>o=r?o:u;if(e){const u=Do(i),d=Do(o);u<0&&d<0?c(0):u>0&&d>0&&a(0)}if(i===o){let u=o===0?1:Math.abs(o*.05);c(o+u),e||a(i-u)}this.min=i,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=o3(i,o);return e.bounds==="ticks"&&q8(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const i=(r-n)/Math.max(e.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return yu(e,this.chart.options.locale,this.options.ticks.format)}}class a3 extends s3{static id="linear";static defaults={ticks:{callback:Sy.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Br(e)?e:0,this.max=Br(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=xi(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Lu={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}},Kn=Object.keys(Lu);function Yx(t,e){return t-e}function Kx(t,e){if(St(e))return null;const n=t._adapter,{parser:r,round:i,isoWeekday:o}=t._parseOpts;let a=e;return typeof r=="function"&&(a=r(a)),Br(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(mu(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function qx(t,e,n,r){const i=Kn.length;for(let o=Kn.indexOf(t);o<i-1;++o){const a=Lu[Kn[o]],c=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(c*a.size))<=r)return Kn[o]}return Kn[i-1]}function l3(t,e,n,r,i){for(let o=Kn.length-1;o>=Kn.indexOf(n);o--){const a=Kn[o];if(Lu[a].common&&t._adapter.diff(i,r,a)>=e-1)return a}return Kn[n?Kn.indexOf(n):0]}function c3(t){for(let e=Kn.indexOf(t)+1,n=Kn.length;e<n;++e)if(Lu[Kn[e]].common)return Kn[e]}function Gx(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:r,hi:i}=Hh(n,e),o=n[r]>=e?n[r]:n[i];t[o]=!0}}function u3(t,e,n,r){const i=t._adapter,o=+i.startOf(e[0].value,r),a=e[e.length-1].value;let c,u;for(c=o;c<=a;c=+i.add(c,1,r))u=n[c],u>=0&&(e[u].major=!0);return e}function Xx(t,e,n){const r=[],i={},o=e.length;let a,c;for(a=0;a<o;++a)c=e[a],i[c]=a,r.push({value:c,major:!1});return o===0||!n?r:u3(t,r,i,n)}class Jx extends ha{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const r=e.time||(e.time={}),i=this._adapter=new mI._date(e.adapters.date);i.init(n),Pl(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Kx(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,r=e.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:c}=this.getUserBounds();function u(d){!a&&!isNaN(d.min)&&(i=Math.min(i,d.min)),!c&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!a||!c)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),i=Br(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=Br(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){const e=this.options,n=e.time,r=e.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=this.max,c=eT(i,o,a);return this._unit=n.unit||(r.autoSkip?qx(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):l3(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:c3(this._unit),this.initOffsets(i),e.reverse&&c.reverse(),Xx(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,i,o;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?r=o:r=(o-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=Wr(n,0,a),r=Wr(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||qx(o.minUnit,n,r,this._getLabelCapacity(n)),c=ht(i.ticks.stepSize,1),u=a==="week"?o.isoWeekday:!1,d=mu(u)||u===!0,h={};let p=n,A,m;if(d&&(p=+e.startOf(p,"isoWeek",u)),p=+e.startOf(p,d?"day":a),e.diff(r,n,a)>1e5*c)throw new Error(n+" and "+r+" are too far apart with stepSize of "+c+" "+a);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(A=p,m=0;A<r;A=+e.add(A,c,a),m++)Gx(h,A,y);return(A===r||i.bounds==="ticks"||m===1)&&Gx(h,A,y),Object.keys(h).sort(Yx).map(k=>+k)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(e,a)}_tickFormatFunction(e,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return Tt(a,[e,n,r],this);const c=o.time.displayFormats,u=this._unit,d=this._majorUnit,h=u&&c[u],p=d&&c[d],A=r[n],m=d&&p&&A&&A.major;return this._adapter.format(e,i||(m?p:h))}generateTickLabels(e){let n,r,i;for(n=0,r=e.length;n<r;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,r=this.ctx.measureText(e).width,i=xi(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),c=this._resolveTickFontOptions(0).size;return{w:r*o+c*a,h:r*a+c*o}}_getLabelCapacity(e){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(e,0,Xx(this,[e],this._majorUnit),i),a=this._getLabelSize(o),c=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,r;if(e.length)return e;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)e.push(Kx(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return gy(e.sort(Yx))}}function Fu(t,e,n){let r=0,i=t.length-1,o,a,c,u;n?(e>=t[r].pos&&e<=t[i].pos&&({lo:r,hi:i}=Uh(t,"pos",e)),{pos:o,time:c}=t[r],{pos:a,time:u}=t[i]):(e>=t[r].time&&e<=t[i].time&&({lo:r,hi:i}=Uh(t,"time",e)),{time:o,pos:c}=t[r],{time:a,pos:u}=t[i]);const d=a-o;return d?c+(u-c)*(e-o)/d:c}class dM extends Jx{static id="timeseries";static defaults=Jx.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Fu(n,this.min),this._tableRange=Fu(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,i=[],o=[];let a,c,u,d,h;for(a=0,c=e.length;a<c;++a)d=e[a],d>=n&&d<=r&&i.push(d);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,c=i.length;a<c;++a)h=i[a+1],u=i[a-1],d=i[a],Math.round((h+u)/2)!==d&&o.push({time:d,pos:a/(c-1)});return o}_generate(){const e=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(Fu(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return Fu(this._table,r*this._tableRange+this._minPos,!0)}}dp.register(N4,hI,I4,i3,a3,V4,Y4,e3);function d3({type:t="bar",data:e,options:n}){const r=_.useRef(null),i=_.useRef(null);return _.useLayoutEffect(()=>{i.current&&(r.current?(r.current.options=n,r.current.data=e,r.current.update()):r.current=new dp(i.current,{type:t,data:e,options:n}))},[t,e,n]),E.jsx("div",{className:"chart",children:E.jsx("canvas",{ref:i})})}const Zx=["--teal-700","--yellow-400","--teal-400","--orange-400","--green-400","--red-400"],Ap=["0 - 1s","1 - 30s","30s - 30min","30 - 60min","1 - 5hr","5 - 10hr","10 - 18hr","18+hr"],gp=(t,e,n=0)=>`${t.toFixed(n)} ${e}${t==1?"":"s"}`,$x=t=>{const e=t/3600;if(e>=1)return gp(e,"hour",1);const n=t/60;return n>=1?gp(n,"minute",0):gp(t,"second",0)},Nu=t=>t.replace(/ \([^)]+\)/,"");function f3({infoGroupId:t}){const[e,n]=_.useState("overview"),r=N1(t).filter(d=>d.cider_type=="Compute"),i=Mn(r.length?r.map(d=>`https://rest-test.ccr.xdmod.org/rest/v0.1/custom_queries/wait_times/${d.info_resourceid}/`):null,{defaultValue:[]}),o=Mn(e!=="overview"?`https://rest-test.ccr.xdmod.org/rest/v0.1/custom_queries/wait_times/${e}/queue/job_walltime`:null);if(!i.length||!r.length)return;const a=i.map((d,h)=>d.error?d:{...d.data[0],...r[h]}).filter(d=>!d.error);if(!a.length)return;const c=[E.jsxs("select",{value:e,onChange:d=>n(d.target.value),children:[E.jsx("option",{value:"overview",children:"Overview"},"overview"),a.map(d=>E.jsx("option",{value:d.info_resourceid,children:Nu(d.resource_descriptive_name)},d.info_resourceid))]},"select")];let u=null;if(e==="overview")u=E.jsx("div",{className:"cards",children:a.map(({info_resourceid:d,job_count:h,median_expansion_factor:p,median_wait_time:A,median_wall_time:m,resource_descriptive_name:y})=>E.jsxs("p",{className:"card metrics-overview",children:[E.jsxs("b",{children:[Nu(y),":"]})," Users ran"," ",E.jsxs("strong",{children:[E.jsx(ut,{name:"file-earmark-code"}),parseInt(h).toLocaleString("en-us")," jobs"]})," ","during the last 30 days. Waiting in the queue caused an average"," ",E.jsxs("strong",{children:[E.jsx(ut,{name:"calculator"}),((p-1)*100).toLocaleString("en-us",{maximumFractionDigits:0}),"% increase"]})," ","in the total completion time. The average job waited for"," ",E.jsxs("strong",{children:[E.jsx(ut,{name:"hourglass-split"})," ",$x(A)]})," ","and ran for"," ",E.jsxs("strong",{children:[E.jsx(ut,{name:"stopwatch"}),$x(m)]}),"."," ",E.jsx("a",{title:`Wait time chart for ${Nu(y)}`,href:"#",onClick:k=>{k.preventDefault(),n(d)},children:"View chart »"})]},d))});else if(o&&o.info_resource_id===e){const d={},h=Ap;for(let y of o.data)d[y.queue]=d[y.queue]||{label:y.queue,data:Array(Ap.length).fill(null)},d[y.queue].data[Ap.indexOf(y.job_walltime)]=y.median_wait_time/60;const p=Object.values(d);p.forEach((y,k)=>{let x=Zx[k%(Zx.length-1)];y.backgroundColor=getComputedStyle(document.body).getPropertyValue(x)});const A=a.find(y=>y.info_resourceid==o.info_resource_id),m={interaction:{intersect:!1,mode:"index"},plugins:{title:{display:!0,text:`Median Wait Time by Queue on ${Nu(A.resource_descriptive_name)}: Last 30 Days`}},scales:{x:{title:{display:!0,text:"Job Wall Time (Run Time)"}},y:{title:{display:!0,text:"Median Wait Time (Minutes)"}}}};u=E.jsxs(E.Fragment,{children:[E.jsx(d3,{type:"bar",data:{labels:h,datasets:p},options:m}),E.jsx("p",{children:E.jsx("a",{href:"#",onClick:y=>{y.preventDefault(),n("overview")},children:"« Back to overview"})})]})}return E.jsxs(Ai,{title:"Wait Time",icon:"hourglass-split",headerComponents:c,children:[u,E.jsxs("p",{className:"metrics-disclaimer",children:[E.jsx(ut,{name:"info-circle"}),"These metrics describe activity from ACCESS projects. Many resources have additional projects that are not part of ACCESS."]})]})}function Ji(t){return Array.isArray?Array.isArray(t):nb(t)==="[object Array]"}function h3(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function p3(t){return t==null?"":h3(t)}function ki(t){return typeof t=="string"}function eb(t){return typeof t=="number"}function A3(t){return t===!0||t===!1||g3(t)&&nb(t)=="[object Boolean]"}function tb(t){return typeof t=="object"}function g3(t){return tb(t)&&t!==null}function pr(t){return t!=null}function mp(t){return!t.trim().length}function nb(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const m3="Incorrect 'index' type",v3=t=>`Invalid value for key ${t}`,y3=t=>`Pattern length exceeds max of ${t}.`,x3=t=>`Missing ${t} property in key`,b3=t=>`Property 'weight' in key '${t}' must be a positive integer`,rb=Object.prototype.hasOwnProperty;class w3{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(r=>{let i=ib(r);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(r=>{r.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function ib(t){let e=null,n=null,r=null,i=1,o=null;if(ki(t)||Ji(t))r=t,e=ob(t),n=vp(t);else{if(!rb.call(t,"name"))throw new Error(x3("name"));const a=t.name;if(r=a,rb.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(b3(a));e=ob(a),n=vp(a),o=t.getFn}return{path:e,id:n,weight:i,src:r,getFn:o}}function ob(t){return Ji(t)?t:t.split(".")}function vp(t){return Ji(t)?t.join("."):t}function k3(t,e){let n=[],r=!1;const i=(o,a,c)=>{if(pr(o))if(!a[c])n.push(o);else{let u=a[c];const d=o[u];if(!pr(d))return;if(c===a.length-1&&(ki(d)||eb(d)||A3(d)))n.push(p3(d));else if(Ji(d)){r=!0;for(let h=0,p=d.length;h<p;h+=1)i(d[h],a,c+1)}else a.length&&i(d,a,c+1)}};return i(t,ki(e)?e.split("."):e,0),r?n:n[0]}var Ke={...{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:k3,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const S3=/[^ ]+/g;function E3(t=1,e=3){const n=new Map,r=Math.pow(10,e);return{get(i){const o=i.match(S3).length;if(n.has(o))return n.get(o);const a=1/Math.pow(o,.5*t),c=parseFloat(Math.round(a*r)/r);return n.set(o,c),c},clear(){n.clear()}}}class yp{constructor({getFn:e=Ke.getFn,fieldNormWeight:n=Ke.fieldNormWeight}={}){this.norm=E3(n,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ki(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();ki(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(e,n){return e[this._keysMap[n]]}size(){return this.records.length}_addString(e,n){if(!pr(e)||mp(e))return;let r={v:e,i:n,n:this.norm.get(e)};this.records.push(r)}_addObject(e,n){let r={i:n,$:{}};this.keys.forEach((i,o)=>{let a=i.getFn?i.getFn(e):this.getFn(e,i.path);if(pr(a)){if(Ji(a)){let c=[];const u=[{nestedArrIndex:-1,value:a}];for(;u.length;){const{nestedArrIndex:d,value:h}=u.pop();if(pr(h))if(ki(h)&&!mp(h)){let p={v:h,i:d,n:this.norm.get(h)};c.push(p)}else Ji(h)&&h.forEach((p,A)=>{u.push({nestedArrIndex:A,value:p})})}r.$[o]=c}else if(ki(a)&&!mp(a)){let c={v:a,n:this.norm.get(a)};r.$[o]=c}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function sb(t,e,{getFn:n=Ke.getFn,fieldNormWeight:r=Ke.fieldNormWeight}={}){const i=new yp({getFn:n,fieldNormWeight:r});return i.setKeys(t.map(ib)),i.setSources(e),i.create(),i}function C3(t,{getFn:e=Ke.getFn,fieldNormWeight:n=Ke.fieldNormWeight}={}){const{keys:r,records:i}=t,o=new yp({getFn:e,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(i),o}function ju(t,{errors:e=0,currentLocation:n=0,expectedLocation:r=0,distance:i=Ke.distance,ignoreLocation:o=Ke.ignoreLocation}={}){const a=e/t.length;if(o)return a;const c=Math.abs(r-n);return i?a+c/i:c?1:a}function P3(t=[],e=Ke.minMatchCharLength){let n=[],r=-1,i=-1,o=0;for(let a=t.length;o<a;o+=1){let c=t[o];c&&r===-1?r=o:!c&&r!==-1&&(i=o-1,i-r+1>=e&&n.push([r,i]),r=-1)}return t[o-1]&&o-r>=e&&n.push([r,o-1]),n}const As=32;function D3(t,e,n,{location:r=Ke.location,distance:i=Ke.distance,threshold:o=Ke.threshold,findAllMatches:a=Ke.findAllMatches,minMatchCharLength:c=Ke.minMatchCharLength,includeMatches:u=Ke.includeMatches,ignoreLocation:d=Ke.ignoreLocation}={}){if(e.length>As)throw new Error(y3(As));const h=e.length,p=t.length,A=Math.max(0,Math.min(r,p));let m=o,y=A;const k=c>1||u,x=k?Array(p):[];let C;for(;(C=t.indexOf(e,y))>-1;){let U=ju(e,{currentLocation:C,expectedLocation:A,distance:i,ignoreLocation:d});if(m=Math.min(U,m),y=C+h,k){let V=0;for(;V<h;)x[C+V]=1,V+=1}}y=-1;let M=[],D=1,P=h+p;const N=1<<h-1;for(let U=0;U<h;U+=1){let V=0,Y=P;for(;V<Y;)ju(e,{errors:U,currentLocation:A+Y,expectedLocation:A,distance:i,ignoreLocation:d})<=m?V=Y:P=Y,Y=Math.floor((P-V)/2+V);P=Y;let W=Math.max(1,A-Y+1),X=a?p:Math.min(A+Y,p)+h,q=Array(X+2);q[X+1]=(1<<U)-1;for(let fe=X;fe>=W;fe-=1){let Ae=fe-1,le=n[t.charAt(Ae)];if(k&&(x[Ae]=+!!le),q[fe]=(q[fe+1]<<1|1)&le,U&&(q[fe]|=(M[fe+1]|M[fe])<<1|1|M[fe+1]),q[fe]&N&&(D=ju(e,{errors:U,currentLocation:Ae,expectedLocation:A,distance:i,ignoreLocation:d}),D<=m)){if(m=D,y=Ae,y<=A)break;W=Math.max(1,2*A-y)}}if(ju(e,{errors:U+1,currentLocation:A,expectedLocation:A,distance:i,ignoreLocation:d})>m)break;M=q}const j={isMatch:y>=0,score:Math.max(.001,D)};if(k){const U=P3(x,c);U.length?u&&(j.indices=U):j.isMatch=!1}return j}function B3(t){let e={};for(let n=0,r=t.length;n<r;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<r-n-1}return e}const zu=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class ab{constructor(e,{location:n=Ke.location,threshold:r=Ke.threshold,distance:i=Ke.distance,includeMatches:o=Ke.includeMatches,findAllMatches:a=Ke.findAllMatches,minMatchCharLength:c=Ke.minMatchCharLength,isCaseSensitive:u=Ke.isCaseSensitive,ignoreDiacritics:d=Ke.ignoreDiacritics,ignoreLocation:h=Ke.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:h},e=u?e:e.toLowerCase(),e=d?zu(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const p=(m,y)=>{this.chunks.push({pattern:m,alphabet:B3(m),startIndex:y})},A=this.pattern.length;if(A>As){let m=0;const y=A%As,k=A-y;for(;m<k;)p(this.pattern.substr(m,As),m),m+=As;if(y){const x=A-As;p(this.pattern.substr(x),x)}}else p(this.pattern,0)}searchIn(e){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:i}=this.options;if(e=n?e:e.toLowerCase(),e=r?zu(e):e,this.pattern===e){let k={isMatch:!0,score:0};return i&&(k.indices=[[0,e.length-1]]),k}const{location:o,distance:a,threshold:c,findAllMatches:u,minMatchCharLength:d,ignoreLocation:h}=this.options;let p=[],A=0,m=!1;this.chunks.forEach(({pattern:k,alphabet:x,startIndex:C})=>{const{isMatch:M,score:D,indices:P}=D3(e,k,x,{location:o+C,distance:a,threshold:c,findAllMatches:u,minMatchCharLength:d,includeMatches:i,ignoreLocation:h});M&&(m=!0),A+=D,M&&P&&(p=[...p,...P])});let y={isMatch:m,score:m?A/this.chunks.length:1};return m&&i&&(y.indices=p),y}}class To{constructor(e){this.pattern=e}static isMultiMatch(e){return lb(e,this.multiRegex)}static isSingleMatch(e){return lb(e,this.singleRegex)}search(){}}function lb(t,e){const n=t.match(e);return n?n[1]:null}class T3 extends To{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class I3 extends To{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class M3 extends To{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class _3 extends To{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class O3 extends To{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class R3 extends To{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class cb extends To{constructor(e,{location:n=Ke.location,threshold:r=Ke.threshold,distance:i=Ke.distance,includeMatches:o=Ke.includeMatches,findAllMatches:a=Ke.findAllMatches,minMatchCharLength:c=Ke.minMatchCharLength,isCaseSensitive:u=Ke.isCaseSensitive,ignoreDiacritics:d=Ke.ignoreDiacritics,ignoreLocation:h=Ke.ignoreLocation}={}){super(e),this._bitapSearch=new ab(e,{location:n,threshold:r,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class ub extends To{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,r;const i=[],o=this.pattern.length;for(;(r=e.indexOf(this.pattern,n))>-1;)n=r+o,i.push([r,n-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const xp=[T3,ub,M3,_3,R3,O3,I3,cb],db=xp.length,L3=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,F3="|";function N3(t,e={}){return t.split(F3).map(n=>{let r=n.trim().split(L3).filter(o=>o&&!!o.trim()),i=[];for(let o=0,a=r.length;o<a;o+=1){const c=r[o];let u=!1,d=-1;for(;!u&&++d<db;){const h=xp[d];let p=h.isMultiMatch(c);p&&(i.push(new h(p,e)),u=!0)}if(!u)for(d=-1;++d<db;){const h=xp[d];let p=h.isSingleMatch(c);if(p){i.push(new h(p,e));break}}}return i})}const j3=new Set([cb.type,ub.type]);class z3{constructor(e,{isCaseSensitive:n=Ke.isCaseSensitive,ignoreDiacritics:r=Ke.ignoreDiacritics,includeMatches:i=Ke.includeMatches,minMatchCharLength:o=Ke.minMatchCharLength,ignoreLocation:a=Ke.ignoreLocation,findAllMatches:c=Ke.findAllMatches,location:u=Ke.location,threshold:d=Ke.threshold,distance:h=Ke.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:i,minMatchCharLength:o,findAllMatches:c,ignoreLocation:a,location:u,threshold:d,distance:h},e=n?e:e.toLowerCase(),e=r?zu(e):e,this.pattern=e,this.query=N3(this.pattern,this.options)}static condition(e,n){return n.useExtendedSearch}searchIn(e){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:i,ignoreDiacritics:o}=this.options;e=i?e:e.toLowerCase(),e=o?zu(e):e;let a=0,c=[],u=0;for(let d=0,h=n.length;d<h;d+=1){const p=n[d];c.length=0,a=0;for(let A=0,m=p.length;A<m;A+=1){const y=p[A],{isMatch:k,indices:x,score:C}=y.search(e);if(k){if(a+=1,u+=C,r){const M=y.constructor.type;j3.has(M)?c=[...c,...x]:c.push(x)}}else{u=0,a=0,c.length=0;break}}if(a){let A={isMatch:!0,score:u/a};return r&&(A.indices=c),A}}return{isMatch:!1,score:1}}}const bp=[];function Q3(...t){bp.push(...t)}function wp(t,e){for(let n=0,r=bp.length;n<r;n+=1){let i=bp[n];if(i.condition(t,e))return new i(t,e)}return new ab(t,e)}const Qu={AND:"$and",OR:"$or"},kp={PATH:"$path",PATTERN:"$val"},Sp=t=>!!(t[Qu.AND]||t[Qu.OR]),H3=t=>!!t[kp.PATH],U3=t=>!Ji(t)&&tb(t)&&!Sp(t),fb=t=>({[Qu.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function hb(t,e,{auto:n=!0}={}){const r=i=>{let o=Object.keys(i);const a=H3(i);if(!a&&o.length>1&&!Sp(i))return r(fb(i));if(U3(i)){const u=a?i[kp.PATH]:o[0],d=a?i[kp.PATTERN]:i[u];if(!ki(d))throw new Error(v3(u));const h={keyId:vp(u),pattern:d};return n&&(h.searcher=wp(d,e)),h}let c={children:[],operator:o[0]};return o.forEach(u=>{const d=i[u];Ji(d)&&d.forEach(h=>{c.children.push(r(h))})}),c};return Sp(t)||(t=fb(t)),r(t)}function V3(t,{ignoreFieldNorm:e=Ke.ignoreFieldNorm}){t.forEach(n=>{let r=1;n.matches.forEach(({key:i,norm:o,score:a})=>{const c=i?i.weight:null;r*=Math.pow(a===0&&c?Number.EPSILON:a,(c||1)*(e?1:o))}),n.score=r})}function W3(t,e){const n=t.matches;e.matches=[],pr(n)&&n.forEach(r=>{if(!pr(r.indices)||!r.indices.length)return;const{indices:i,value:o}=r;let a={indices:i,value:o};r.key&&(a.key=r.key.src),r.idx>-1&&(a.refIndex=r.idx),e.matches.push(a)})}function Y3(t,e){e.score=t.score}function K3(t,e,{includeMatches:n=Ke.includeMatches,includeScore:r=Ke.includeScore}={}){const i=[];return n&&i.push(W3),r&&i.push(Y3),t.map(o=>{const{idx:a}=o,c={item:e[a],refIndex:a};return i.length&&i.forEach(u=>{u(o,c)}),c})}class pa{constructor(e,n={},r){this.options={...Ke,...n},this.options.useExtendedSearch,this._keyStore=new w3(this.options.keys),this.setCollection(e,r)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof yp))throw new Error(m3);this._myIndex=n||sb(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){pr(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let r=0,i=this._docs.length;r<i;r+=1){const o=this._docs[r];e(o,r)&&(this.removeAt(r),r-=1,i-=1,n.push(o))}return n}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:n=-1}={}){const{includeMatches:r,includeScore:i,shouldSort:o,sortFn:a,ignoreFieldNorm:c}=this.options;let u=ki(e)?ki(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return V3(u,{ignoreFieldNorm:c}),o&&u.sort(a),eb(n)&&n>-1&&(u=u.slice(0,n)),K3(u,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e){const n=wp(e,this.options),{records:r}=this._myIndex,i=[];return r.forEach(({v:o,i:a,n:c})=>{if(!pr(o))return;const{isMatch:u,score:d,indices:h}=n.searchIn(o);u&&i.push({item:o,idx:a,matches:[{score:d,value:o,norm:c,indices:h}]})}),i}_searchLogical(e){const n=hb(e,this.options),r=(c,u,d)=>{if(!c.children){const{keyId:p,searcher:A}=c,m=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(u,p),searcher:A});return m&&m.length?[{idx:d,item:u,matches:m}]:[]}const h=[];for(let p=0,A=c.children.length;p<A;p+=1){const m=c.children[p],y=r(m,u,d);if(y.length)h.push(...y);else if(c.operator===Qu.AND)return[]}return h},i=this._myIndex.records,o={},a=[];return i.forEach(({$:c,i:u})=>{if(pr(c)){let d=r(n,c,u);d.length&&(o[u]||(o[u]={idx:u,item:c,matches:[]},a.push(o[u])),d.forEach(({matches:h})=>{o[u].matches.push(...h)}))}}),a}_searchObjectList(e){const n=wp(e,this.options),{keys:r,records:i}=this._myIndex,o=[];return i.forEach(({$:a,i:c})=>{if(!pr(a))return;let u=[];r.forEach((d,h)=>{u.push(...this._findMatches({key:d,value:a[h],searcher:n}))}),u.length&&o.push({idx:c,item:a,matches:u})}),o}_findMatches({key:e,value:n,searcher:r}){if(!pr(n))return[];let i=[];if(Ji(n))n.forEach(({v:o,i:a,n:c})=>{if(!pr(o))return;const{isMatch:u,score:d,indices:h}=r.searchIn(o);u&&i.push({score:d,key:e,value:o,idx:a,norm:c,indices:h})});else{const{v:o,n:a}=n,{isMatch:c,score:u,indices:d}=r.searchIn(o);c&&i.push({score:u,key:e,value:o,norm:a,indices:d})}return i}}pa.version="7.1.0",pa.createIndex=sb,pa.parseIndex=C3,pa.config=Ke,pa.parseQuery=hb,Q3(z3);function q3({highlight:t,text:e}){if(!t||!t.length)return e;const n=new RegExp(t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"gi"),r=[...e.matchAll(n)];if(!r.length)return e;const i=[];let o=0;for(let a of r)a.index>o&&i.push(e.substr(o,a.index)),i.push(E.jsx("span",{className:"highlight",children:a[0]})),o=a.index+a[0].length;return i.push(e.substr(o)),i}function G3({delay:t=300,placeholder:e,setSearchText:n,width:r="calc(var(--width) / 4)"}){const i=_.useRef(null),o=_.useRef(null),[a,c]=_.useState(""),u=()=>{c(""),n(""),i.current.value="",i.current.focus()};return _.useLayoutEffect(()=>{i.current&&i.current.addEventListener("keyup",()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,n(i.current.value),c(i.current.value)},t)})},[i.current]),E.jsx(E.Fragment,{children:E.jsxs("div",{className:"search",children:[E.jsx("input",{placeholder:e,style:{width:r},ref:i}),a.length?E.jsx("button",{className:"btn btn-clear",title:"Clear search",onClick:u,children:E.jsx(ut,{name:"x-lg"})}):null]})})}const X3=["software_name","software_description","software_web_page","software_documentation","software_use_link","software_versions"];function J3({infoGroupId:t}){const e=Mn("https://sds-ara-api.access-ci.org/api/v1",{body:JSON.stringify({rps:[t],columns:X3}),headers:{"Content-Type":"application/json","X-API-Key":"asSuQQ0IfIEUrSRTl44aqn2ZpMPpJ_G02BgemAY4WN0"},method:"POST"}),[n,r]=_.useState(""),i=_.useMemo(()=>e?.data&&e.data.length?new pa(e.data,{keys:[{name:"software_name",weight:.6},{name:"software_description",weight:.4}]}):null,[e?.data]);if(!e?.data||!e.data.length)return;const o=A=>E.jsx(q3,{text:A,highlight:n}),d=[{key:"software_name",name:"Package",format:(A,m)=>{const y=o(A),k=m.software_web_page||m.software_documentation,x=m.software_use_link&&m.software_use_link.length?m.software_use_link[0]:"";return E.jsxs("span",{style:{lineHeight:1.3},children:[k?E.jsx("a",{href:k,children:y},"name"):y," ",m.software_documentation&&E.jsx("a",{href:m.software_documentation,title:`Documentation for ${A}`,children:E.jsx(ut,{name:"book"})},"documentation")," ",x&&x!=m.software_documentation&&E.jsx("a",{href:x,title:`Usage example for ${A}`,children:E.jsx(ut,{name:"terminal"})},"use")]})}},{key:"software_versions",name:"Versions",format:(A,m)=>m.rps[t].software_versions.join(", ")},{key:"software_description",name:"Description",format:(A,m)=>{const y=/Description Source:[ ]+(http[^ ]+)/,k=A.match(y);return E.jsxs(E.Fragment,{children:[o(A.replace(y,""))," ",k?E.jsx("a",{href:k[1],title:`Description source for ${m.software_name}`,children:E.jsx(ut,{name:"info-circle"})}):null]})}}],h=n.length?i.search(n).map(A=>A.item):e.data,p=[E.jsx(G3,{placeholder:"Search software packages...",setSearchText:r},"search")];return E.jsx(Ai,{title:"Software",icon:"terminal",headerComponents:p,children:E.jsx(qc,{columns:d,rows:h,scrollResetOnUpdate:!0})})}function Z3({prompt:t="Jump To:"}){const[e,n]=_.useState([]),r=_.useRef(null),i=()=>{const a=[];for(let c of r.current.querySelectorAll("[data-section-title]"))a.push({icon:c.dataset.sectionIcon,id:c.id,title:c.dataset.sectionTitle});n(a)},o=a=>{const c=r.current.querySelector(`#${a}`);c&&c.scrollIntoView()};return _.useEffect(()=>{r.current&&(i(),document.addEventListener("accessci-update-sections",i))},[r.current]),E.jsx("div",{ref:a=>r.current=a?.parentElement,children:e.length>=2?E.jsxs("nav",{className:"section-navigation",children:[t?E.jsx("h2",{children:t}):null,E.jsx("ul",{children:e.map(({icon:a,id:c,title:u})=>E.jsx("li",{children:E.jsxs("a",{href:`#${c}`,onClick:d=>{d.preventDefault(),o(c)},children:[a?E.jsxs(E.Fragment,{children:[E.jsx(ut,{name:a})," "]}):null,u]})},c))})]}):null})}function $3({baseUri:t,showBreadcrumbs:e=!0}){const{infoGroupId:n}=b2(),r=Za(n),i=[{name:"Resources",href:t}];return r&&i.push({name:r.name}),E.jsxs(E.Fragment,{children:[e&&E.jsx(Vd,{expandWidth:!0,items:i,topBorder:!0}),E.jsxs("div",{className:"resource-group-detail",children:[E.jsx(FP,{infoGroupId:n}),E.jsx(Z3,{}),E.jsx(SB,{infoGroupId:n}),E.jsx(mB,{infoGroupId:n}),E.jsx(bB,{infoGroupId:n}),E.jsx(LP,{infoGroupId:n}),E.jsx(J3,{infoGroupId:n}),E.jsx(p8,{infoGroupId:n}),E.jsx(f3,{infoGroupId:n}),E.jsx(zP,{infoGroupId:n})]})]})}const e5=Object.freeze(Object.defineProperty({__proto__:null,default:$3},Symbol.toStringTag,{value:"Module"})),t5={"ACCESS Pegasus":"https://pegasus.isi.edu/wordpress/wp-content/uploads/2016/01/favicon.ico","ACCESS OnDemand":"https://openondemand.org/themes/fire/theme/assets/media/favicons/favicon.ico","Advance reservations":"calendar-check","Composable hardware fabric":"boxes","Compute Resources":"cpu-fill","CPU Compute":"cpu-fill","GPU Compute":"cpu","Innovative / Novel Compute":"lightbulb","Large Memory Nodes":"arrows-fullscreen",Preemption:"clock-history","Science Gateway support":"globe","Service / Other":"stars","Storage Resources":"hdd-fill","Virtual Machines":"pc-display-horizontal",Cloud:"cloud",Storage:"hdd-fill"};function pb({active:t,tagCategory:e,tagId:n,iconUri:r,name:i,toggleTag:o}){const a=r||t5[i]||"tag";return E.jsx("li",{className:`tag tag-category-${e.name.toLowerCase().replace(/[^a-z]+/g,"-")}${t.tagIds.has(n)?" active":""}`,children:E.jsxs("button",{href:"#",disabled:t.disabledTagIds.has(n),onClick:c=>{c.preventDefault(),o(n)},children:[a.startsWith("http")?E.jsx(ut,{alt:i,src:a}):E.jsx(ut,{name:a}),i]})})}function Ab({children:t}){return E.jsx("ul",{className:"tags",children:t})}function n5({active:t,baseUri:e,description:n,imageType:r,imageUri:i,name:o,infoGroupId:a,parentInfoGroupId:c,tags:u,toggleTag:d}){const h=`${e}/${c||a}`;return E.jsxs("div",{className:"resource-group",children:[E.jsx("a",{className:`resource-group-image image-type-${r}`,href:h,children:i?E.jsx("img",{src:i}):E.jsx(ut,{name:"motherboard"})}),E.jsxs("div",{className:"resource-group-text",children:[E.jsx("h3",{children:E.jsx("a",{href:h,children:o})}),E.jsx(Ab,{children:u.map(p=>E.jsx(pb,{...p,active:t,toggleTag:d},p.tagId))}),E.jsxs("p",{children:[n&&n,E.jsx("br",{}),E.jsxs("a",{href:h,children:["Learn more about ",o," »"]})]})]})]})}function r5({active:t,baseUri:e,name:n,resourceGroups:r,toggleTag:i}){return E.jsxs(E.Fragment,{children:[E.jsx("h2",{children:n}),r.filter(({infoGroupId:o})=>t.infoGroupIds.has(o)).map(o=>E.jsx(n5,{...o,baseUri:e,active:t,toggleTag:i},o.infoGroupId))]})}function i5({active:t,clearTags:e,tagCategories:n,toggleTag:r}){const[i,o]=_.useState(!1),a=_.useRef(null);return _.useEffect(()=>{const c=()=>o(!1);return document.body.addEventListener("click",c),()=>document.body.removeEventListener("click",c)},[]),E.jsxs("section",{className:"filters-outer",onClick:c=>{c.stopPropagation()},children:[E.jsxs("button",{ref:a,onClick:()=>o(!i),className:`btn-filters btn ${i?"active":""}`,children:[E.jsx(ut,{name:"filter"})," Filters",t.tagIds.size>0?E.jsx("span",{className:"active-tag-count",children:t.tagIds.size}):null]}),i?E.jsxs("div",{className:"filters-inner",children:[n.map(c=>E.jsxs(E.Fragment,{children:[E.jsx("h2",{children:c.name}),E.jsx(Ab,{children:c.tags.map(u=>E.jsx(pb,{...u,active:t,toggleTag:r}))})]})),E.jsxs("button",{onClick:e,disabled:t.tagIds.size==0,className:"btn danger",children:[E.jsx(ut,{name:"trash"})," Clear Filters"]})]}):null]})}function o5({setBotOpen:t}){const e=_.useRef(null),n=[{title:"Browse resources",icon:"filter-square",description:"Filter resources to find the best match for your research.",onClick:r=>{r.preventDefault(),e.current&&e.current.nextSibling.scrollIntoView({bahavior:"smooth"})}},{title:"Ask a question",icon:"question-circle",onClick:r=>{r.preventDefault(),t(!0)},description:"You have resource questions. Our Q&A bot has answers!",login:!0},{title:"Get suggestions",icon:"card-checklist",href:"https://ara.access-ci.org/",description:"Fill out a form to get resource recommendations."},{title:"Read news",icon:"newspaper",href:"https://access-ci.org/tag/resource-providers/",description:"See the latest news from resource providers."}];return E.jsxs("section",{id:"resource-pathways",ref:e,children:[E.jsxs("p",{className:"intro",children:["ACCESS provides advanced computing resources ",E.jsx("strong",{children:"at no cost"})," ","to researchers and educators."]}),E.jsx("ul",{className:"resource-pathways",children:n.map(({title:r,icon:i,href:o,description:a,login:c,onClick:u},d)=>E.jsx("li",{className:`resource-pathway-${d}`,children:E.jsxs("a",{href:o||"#",onClick:u,children:[i?E.jsx(ut,{name:i}):null," ",E.jsxs("span",{className:"detail",children:[E.jsx("span",{className:"title",children:r}),E.jsx("span",{className:"description",children:a}),c?E.jsxs("span",{className:"login",children:[E.jsx(ut,{name:"key"})," Requires ACCESS Login"]}):null]})]})},r))})]})}function s5({baseUri:t,title:e,setBotOpen:n,showBreadcrumbs:r=!0,showTitle:i=!0}){const[o,a]=_.useState([]),c=fg(),u=_.useMemo(()=>c?z1(c,o):null,[c,o]),d=p=>a(o.includes(p)?o.filter(A=>A!=p):[...o,p]),h=()=>a([]);return E.jsxs(E.Fragment,{children:[r&&E.jsx(Vd,{expandWidth:!0,items:[{name:"Resources"}],topBorder:!0}),e&&E.jsx("h1",{className:i?"":"visually-hidden",children:e}),E.jsx(o5,{setBotOpen:n}),E.jsxs("div",{id:"browse-resources",children:[u?E.jsx(i5,{tagCategories:c.tagCategories,active:u,clearTags:h,toggleTag:d}):null,c?c.resourceCategories.filter(({resourceCategoryId:p})=>u.resourceCategoryIds.has(p)).map(p=>E.jsx(r5,{...p,active:u,baseUri:t,clearTags:h,toggleTag:d},p.name)):null]})]})}const a5=Object.freeze(Object.defineProperty({__proto__:null,default:s5},Symbol.toStringTag,{value:"Module"}));hn.breadcrumbs=Ek,hn.footer=Ck,hn.footerMenus=Ik,hn.header=Pk,hn.loginMenuItem=ng,hn.myAccessMenuItem=tg,hn.qaBot=Dk,hn.resourceCatalog=_k,hn.siteMenus=Tk,hn.tableOfContents=Mk,hn.universalMenuItems=eg,hn.universalMenus=Bk,Object.defineProperty(hn,Symbol.toStringTag,{value:"Module"})});