@access-ci/ui 0.20.2 → 0.20.4

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.
@@ -298,7 +298,7 @@ ${Kt}`:tt;return await dt(Ut),ot?.({type:"chatbot_answer_received",queryId:Qe,su
298
298
  }
299
299
  `;Ty=P.forwardRef((e,t)=>{let{apiKey:n=Mr.DEFAULT_API_KEY,isLoggedIn:r=!1,loginUrl:o=Xi.LOGIN_URL,userEmail:i,userName:s,accessId:c,actingUser:u,ringEffect:d,defaultOpen:p,onClose:h,open:g,onOpenChange:b,embedded:y=!1,welcome:x,qaEndpoint:v,ratingEndpoint:D,agentEndpoint:M,backendId:T,resourceContext:C,onAnalyticsEvent:z}=e,R=Mr.AGENT_ENABLED,Q=T||Mr.BACKEND_ID,V=P.useRef(null),J=P.useRef(null),[Y,Z]=P.useState({}),[W,$]=P.useState(()=>({categories:[],is_authenticated:!1})),de=P.useMemo(()=>({email:i,name:s,accessId:c}),[i,s,c]);P.useEffect(()=>{ND(J.current)},[]),P.useEffect(()=>{vD({ticketForm:Y,setTicketForm:Z})},[Y]);let ne=M||Mr.AGENT_ENDPOINT,pe=C?`${ne}/capabilities?resource_context=${encodeURIComponent(C)}`:`${ne}/capabilities`;P.useEffect(()=>{},[ne,R]),P.useEffect(()=>{},[R,pe,r]),P.useEffect(()=>{},[R,ne,r]),P.useImperativeHandle(t,()=>({addMessage:X=>{var be,me;(me=(be=V.current)==null?void 0:be.addMessage)==null||me.call(be,X)}}));let oe=x||W?.welcome_message||Xi.WELCOME_MESSAGE,K=P.useMemo(()=>LD(),[]),j=P.useCallback(X=>{z&&z({...X,type:X.type,timestamp:X.timestamp??Date.now(),sessionId:X.sessionId??K})},[z,K]),ue=P.useCallback(X=>{z&&z({...X,type:X.type,timestamp:typeof X.timestamp=="number"?X.timestamp:Date.now(),sessionId:typeof X.sessionId=="string"?X.sessionId:K})},[z,K]),B=P.useMemo(()=>{let X=bD({welcome:oe,setTicketForm:Z,trackEvent:j}),be=PD({ticketForm:{},setTicketForm:Z,userInfo:de,trackEvent:j}),me=ID({ticketForm:{},setTicketForm:Z,userInfo:de,trackEvent:j}),xe=RD({sessionId:K,apiKey:n,trackEvent:j}),_e={...X,...be,...me,...xe};return gD(_e,{disableOnOptions:!0})},[oe,de,K,n,r,j,W]);return W?E.jsx("div",{ref:J,children:E.jsx(Gh,{ref:V,isLoggedIn:r,allowAnonAccess:Mr.ALLOW_ANON_ACCESS,actingUser:u,onAnalyticsEvent:ue,apiKey:n,qaEndpoint:v||Mr.QA_ENDPOINT,ratingEndpoint:D||Mr.RATING_ENDPOINT,backendId:Q,botName:Xi.BOT_NAME,logo:Xi.LOGO,primaryColor:Xi.PRIMARY_COLOR,secondaryColor:Xi.SECONDARY_COLOR,welcomeMessage:oe,tooltipText:Xi.TOOLTIP,turnstileSiteKey:Mr.TURNSTILE_SITE_KEY,loginUrl:o,open:g,onOpenChange:b,embedded:y,footerText:"AI-powered \xB7 Privacy Notice",footerLink:"https://support.access-ci.org/tools/access-qa-tool/privacy",resourceContext:C,customFlow:B})}):E.jsx("div",{ref:J})});Ty.displayName="AccessQABot"});function kt({alt:e=null,name:t=null,src:n=null}){return t?E.jsx("i",{className:`icon bi bi-${t}`}):E.jsx("img",{className:"icon",alt:e,src:n})}var $h=zl(()=>{Us()});var Bw={};Lu(Bw,{default:()=>N4});function Ko({children:e,headerComponents:t=null,icon:n=null,sectionId:r=null,title:o}){let i=r||o.toLowerCase().replace(/[^0-9a-z]+/g,"-");return P.useLayoutEffect(()=>(By(),By),[]),E.jsxs("section",{id:i,"data-section-title":o,"data-section-icon":n,children:[E.jsxs("div",{className:"flex-header",children:[E.jsxs("h2",{children:[n?E.jsx(kt,{name:n}):null,o]}),t?E.jsx("div",{className:"header-components",children:t}):null]}),e]})}function zD({infoGroupId:e}){let t=Kn(`https://support.access-ci.org/api/1.0/affinity_groups/${e}`);if(!t||t.error||!t.length)return;let n=gf(t[0].slack_link);return E.jsxs(Ko,{title:"User Community",icon:"people-fill",children:[E.jsx("p",{children:"Join the community by participating in an affinity group! Members get update about announcements, events, and outages."}),E.jsxs("div",{className:"button-group",children:[E.jsxs("a",{href:t[0].url,className:"btn secondary",children:[E.jsx(kt,{name:"person-plus-fill"})," Join Affinity Group"]}),n?E.jsxs("a",{href:n,className:"btn",children:[E.jsx(kt,{name:"slack"})," Connect on Slack"]}):null,E.jsxs("a",{href:"#questions-and-answers",className:"btn",children:[E.jsx(kt,{name:"chat-fill"})," Ask and Answer Questions"]})]})]})}function FD({infoGroupId:e}){let t=il(e),n=Kn(t&&t.infoResourceIds.length?`https://operations-api.access-ci.org/wh2/cider/v1/info_resourceid/${t.infoResourceIds[0]}/?format=json`:null);if(!t)return;let{accessAllocated:r,name:o,description:i,imageUri:s,organizations:c}=t,u=r?"https://allocations.access-ci.org/get-your-first-project":null,d=n&&n.results?(n.results.compute||n.results.storage||{}).user_guide_url:null;return E.jsxs("div",{className:"resource-group-description",children:[s?E.jsx("img",{className:"resource-group-feature-image",src:s}):null,E.jsx("h1",{children:t.name}),c.map(p=>E.jsx("p",{children:E.jsxs("a",{href:p.organization_url||"#",children:[p.organization_favicon_url?E.jsx(kt,{alt:p.organization_name,src:p.organization_favicon_url}):null,p.organization_name]})},p.organization_name)),i?E.jsx("p",{children:i}):null,E.jsxs("div",{style:{marginTop:"1rem"},children:[u?E.jsxs("a",{href:u,className:"btn secondary lg",children:[E.jsx(kt,{name:"check2-circle"})," Get Started with ",o]}):null,d?E.jsxs("a",{href:d,className:"btn lg",children:[E.jsx(kt,{name:"book"})," User Guide"]}):null]})]})}function QD({column:e,row:t,style:n={}}){let r=e.format?e.format(t[e.key],t):t[e.key],o=["cell"];return e.class&&o.push(e.class),e.rowClass&&o.push(e.rowClass(t)),E.jsx("td",{className:o.join(" "),style:n,children:r})}function sf({columns:e,rows:t,classes:n,frozenColumns:r=0,maxHeight:o=400,minWidth:i,rowClasses:s=[],scrollResetOnUpdate:c=!1}){let u=P.useRef();P.useLayoutEffect(()=>{u.current&&c&&(u.current.scrollTop=0)},[t]);let d=[0];for(let y=0;y<r;y++)d[y+1]=d[y]+(e[y].width||100);let p=(y,x)=>y<r?{position:"sticky",left:`${d[y]}px`,minWidth:`${e[y].width||100}px`,width:`${e[y].width||100}px`,zIndex:x||1}:{},h=e.map((y,x)=>E.jsx("th",{className:y.headerClass||y.class||"",style:p(x,100),children:y.formatHeader?y.formatHeader(y.name,y):y.name},y.key)),g=t.map((y,x)=>{let v=e.map((D,M)=>{let T=UD[D.type||"text"];return E.jsx(T,{column:D,row:y,style:p(M)},D.key)});return E.jsx("tr",{className:s[x]||"",children:v},x)}),b={};return i&&(b.minWidth=i),E.jsx("div",{className:`grid ${n||""}`,style:{maxHeight:Number.isInteger(o)?`${o}px`:o||null},ref:u,children:E.jsxs("table",{className:"table",style:b,children:[E.jsx("thead",{children:E.jsx("tr",{children:h})}),E.jsx("tbody",{children:g})]})})}function HD({infoGroupId:e}){let t=Kn(`https://support.access-ci.org/api/1.0/affinity_groups/${e}`),n=t&&!t.error&&t.length?t[0].field_ask_ci_locale:null,r=n?`${n}.json`:null,o=Kn(r);if(!o||o.error||!o.topic_list||!o.topic_list.topics||!o.topic_list.topics.length)return;let i=[{key:"title",name:"Topic",format:(c,u)=>E.jsxs(E.Fragment,{children:[u.pinned?E.jsx(kt,{name:"pin-fill"}):null,E.jsx("a",{href:`https://ask.cyberinfrastructure.org/t/${u.slug}/${u.id}`,children:c})]})},{key:"posts_count",name:"Posts",format:c=>c.toLocaleString("en-us")},{key:"bumped_at",name:"Last Update",format:c=>new Date(c).toLocaleString("en-US",{dateStyle:"medium"})}],s=[E.jsx("a",{href:n,className:"btn secondary",children:"Ask a Question"},"ask"),E.jsx("a",{href:n,className:"btn",children:"View All Topics"},"all")];return E.jsx(Ko,{title:"Questions and Answers",icon:"chat-fill",headerComponents:s,children:E.jsx(sf,{columns:i,rows:o.topic_list.topics.slice(0,5)})})}function Xo(e){return e?(e.nodeName||"").toLowerCase():null}function zr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function $a(e){var t=zr(e).Element;return e instanceof t||e instanceof Element}function Zr(e){var t=zr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function dg(e){if(typeof ShadowRoot>"u")return!1;var t=zr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function nP(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Zr(i)||!Xo(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var c=o[s];c===!1?i.removeAttribute(s):i.setAttribute(s,c===!0?"":c)}))})}function rP(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),c=s.reduce(function(u,d){return u[d]="",u},{});!Zr(o)||!Xo(o)||(Object.assign(o.style,c),Object.keys(i).forEach(function(u){o.removeAttribute(u)}))})}}function Go(e){return e.split("-")[0]}function yA(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function kx(){return!/^((?!chrome|android).)*safari/i.test(yA())}function Js(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Zr(e)&&(o=e.offsetWidth>0&&Xs(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Xs(r.height)/e.offsetHeight||1);var s=$a(e)?zr(e):window,c=s.visualViewport,u=!kx()&&n,d=(r.left+(u&&c?c.offsetLeft:0))/o,p=(r.top+(u&&c?c.offsetTop:0))/i,h=r.width/o,g=r.height/i;return{width:h,height:g,top:p,right:d+h,bottom:p+g,left:d,x:d,y:p}}function fg(e){var t=Js(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Sx(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&dg(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function wi(e){return zr(e).getComputedStyle(e)}function oP(e){return["table","td","th"].indexOf(Xo(e))>=0}function ua(e){return(($a(e)?e.ownerDocument:e.document)||window.document).documentElement}function lf(e){return Xo(e)==="html"?e:e.assignedSlot||e.parentNode||(dg(e)?e.host:null)||ua(e)}function Oy(e){return!Zr(e)||wi(e).position==="fixed"?null:e.offsetParent}function iP(e){var t=/firefox/i.test(yA()),n=/Trident/i.test(yA());if(n&&Zr(e)){var r=wi(e);if(r.position==="fixed")return null}var o=lf(e);for(dg(o)&&(o=o.host);Zr(o)&&["html","body"].indexOf(Xo(o))<0;){var i=wi(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Ec(e){for(var t=zr(e),n=Oy(e);n&&oP(n)&&wi(n).position==="static";)n=Oy(n);return n&&(Xo(n)==="html"||Xo(n)==="body"&&wi(n).position==="static")?t:n||iP(e)||t}function pg(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function uc(e,t,n){return Ja(e,Rd(t,n))}function aP(e,t,n){var r=uc(e,t,n);return r>n?n:r}function Ex(){return{top:0,right:0,bottom:0,left:0}}function Cx(e){return Object.assign({},Ex(),e)}function Dx(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}function lP(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,c=Go(n.placement),u=pg(c),d=[yr,eo].indexOf(c)>=0,p=d?"height":"width";if(!(!i||!s)){var h=sP(o.padding,n),g=fg(i),b=u==="y"?vr:yr,y=u==="y"?$r:eo,x=n.rects.reference[p]+n.rects.reference[u]-s[u]-n.rects.popper[p],v=s[u]-n.rects.reference[u],D=Ec(i),M=D?u==="y"?D.clientHeight||0:D.clientWidth||0:0,T=x/2-v/2,C=h[b],z=M-g[p]-h[y],R=M/2-g[p]/2+T,Q=uc(C,R,z),V=u;n.modifiersData[r]=(t={},t[V]=Q,t.centerOffset=Q-R,t)}}function cP(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Sx(t.elements.popper,o)&&(t.elements.arrow=o))}function Zs(e){return e.split("-")[1]}function fP(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Xs(n*o)/o||0,y:Xs(r*o)/o||0}}function Ry(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,c=e.position,u=e.gpuAcceleration,d=e.adaptive,p=e.roundOffsets,h=e.isFixed,g=s.x,b=g===void 0?0:g,y=s.y,x=y===void 0?0:y,v=typeof p=="function"?p({x:b,y:x}):{x:b,y:x};b=v.x,x=v.y;var D=s.hasOwnProperty("x"),M=s.hasOwnProperty("y"),T=yr,C=vr,z=window;if(d){var R=Ec(n),Q="clientHeight",V="clientWidth";if(R===zr(n)&&(R=ua(n),wi(R).position!=="static"&&c==="absolute"&&(Q="scrollHeight",V="scrollWidth")),R=R,o===vr||(o===yr||o===eo)&&i===gc){C=$r;var J=h&&R===z&&z.visualViewport?z.visualViewport.height:R[Q];x-=J-r.height,x*=u?1:-1}if(o===yr||(o===vr||o===$r)&&i===gc){T=eo;var Y=h&&R===z&&z.visualViewport?z.visualViewport.width:R[V];b-=Y-r.width,b*=u?1:-1}}var Z=Object.assign({position:c},d&&dP),W=p===!0?fP({x:b,y:x},zr(n)):{x:b,y:x};if(b=W.x,x=W.y,u){var $;return Object.assign({},Z,($={},$[C]=M?"0":"",$[T]=D?"0":"",$.transform=(z.devicePixelRatio||1)<=1?"translate("+b+"px, "+x+"px)":"translate3d("+b+"px, "+x+"px, 0)",$))}return Object.assign({},Z,(t={},t[C]=M?x+"px":"",t[T]=D?b+"px":"",t.transform="",t))}function pP(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,c=n.roundOffsets,u=c===void 0?!0:c,d={placement:Go(t.placement),variation:Zs(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ry(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ry(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}function AP(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,c=s===void 0?!0:s,u=zr(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&d.forEach(function(p){p.addEventListener("scroll",n.update,fd)}),c&&u.addEventListener("resize",n.update,fd),function(){i&&d.forEach(function(p){p.removeEventListener("scroll",n.update,fd)}),c&&u.removeEventListener("resize",n.update,fd)}}function Td(e){return e.replace(/left|right|bottom|top/g,function(t){return mP[t]})}function Ly(e){return e.replace(/start|end/g,function(t){return bP[t]})}function hg(e){var t=zr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ag(e){return Js(ua(e)).left+hg(e).scrollLeft}function vP(e,t){var n=zr(e),r=ua(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,c=0,u=0;if(o){i=o.width,s=o.height;var d=kx();(d||!d&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}return{width:i,height:s,x:c+Ag(e),y:u}}function yP(e){var t,n=ua(e),r=hg(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Ja(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Ja(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+Ag(e),u=-r.scrollTop;return wi(o||n).direction==="rtl"&&(c+=Ja(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:c,y:u}}function gg(e){var t=wi(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Px(e){return["html","body","#document"].indexOf(Xo(e))>=0?e.ownerDocument.body:Zr(e)&&gg(e)?e:Px(lf(e))}function dc(e,t){var n;t===void 0&&(t=[]);var r=Px(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=zr(r),s=o?[i].concat(i.visualViewport||[],gg(r)?r:[]):r,c=t.concat(s);return o?c:c.concat(dc(lf(s)))}function xA(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function xP(e,t){var n=Js(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function jy(e,t,n){return t===yx?xA(vP(e,n)):$a(t)?xP(t,n):xA(yP(ua(e)))}function wP(e){var t=dc(lf(e)),n=["absolute","fixed"].indexOf(wi(e).position)>=0,r=n&&Zr(e)?Ec(e):e;return $a(r)?t.filter(function(o){return $a(o)&&Sx(o,r)&&Xo(o)!=="body"}):[]}function kP(e,t,n,r){var o=t==="clippingParents"?wP(e):[].concat(t),i=[].concat(o,[n]),s=i[0],c=i.reduce(function(u,d){var p=jy(e,d,r);return u.top=Ja(p.top,u.top),u.right=Rd(p.right,u.right),u.bottom=Rd(p.bottom,u.bottom),u.left=Ja(p.left,u.left),u},jy(e,s,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function Tx(e){var t=e.reference,n=e.element,r=e.placement,o=r?Go(r):null,i=r?Zs(r):null,s=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,u;switch(o){case vr:u={x:s,y:t.y-n.height};break;case $r:u={x:s,y:t.y+t.height};break;case eo:u={x:t.x+t.width,y:c};break;case yr:u={x:t.x-n.width,y:c};break;default:u={x:t.x,y:t.y}}var d=o?pg(o):null;if(d!=null){var p=d==="y"?"height":"width";switch(i){case Gs:u[d]=u[d]-(t[p]/2-n[p]/2);break;case gc:u[d]=u[d]+(t[p]/2-n[p]/2);break}}return u}function mc(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,s=i===void 0?e.strategy:i,c=n.boundary,u=c===void 0?VD:c,d=n.rootBoundary,p=d===void 0?yx:d,h=n.elementContext,g=h===void 0?tc:h,b=n.altBoundary,y=b===void 0?!1:b,x=n.padding,v=x===void 0?0:x,D=Cx(typeof v!="number"?v:Dx(v,Sc)),M=g===tc?WD:tc,T=e.rects.popper,C=e.elements[y?M:g],z=kP($a(C)?C:C.contextElement||ua(e.elements.popper),u,p,s),R=Js(e.elements.reference),Q=Tx({reference:R,element:T,placement:o}),V=xA(Object.assign({},T,Q)),J=g===tc?V:R,Y={top:z.top-J.top+D.top,bottom:J.bottom-z.bottom+D.bottom,left:z.left-J.left+D.left,right:J.right-z.right+D.right},Z=e.modifiersData.offset;if(g===tc&&Z){var W=Z[o];Object.keys(Y).forEach(function($){var de=[eo,$r].indexOf($)>=0?1:-1,ne=[vr,$r].indexOf($)>=0?"y":"x";Y[$]+=W[ne]*de})}return Y}function SP(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,d=u===void 0?xx:u,p=Zs(r),h=p?c?My:My.filter(function(y){return Zs(y)===p}):Sc,g=h.filter(function(y){return d.indexOf(y)>=0});g.length===0&&(g=h);var b=g.reduce(function(y,x){return y[x]=mc(e,{placement:x,boundary:o,rootBoundary:i,padding:s})[Go(x)],y},{});return Object.keys(b).sort(function(y,x){return b[y]-b[x]})}function EP(e){if(Go(e)===ug)return[];var t=Td(e);return[Ly(e),t,Ly(t)]}function CP(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,c=s===void 0?!0:s,u=n.fallbackPlacements,d=n.padding,p=n.boundary,h=n.rootBoundary,g=n.altBoundary,b=n.flipVariations,y=b===void 0?!0:b,x=n.allowedAutoPlacements,v=t.options.placement,D=Go(v),M=D===v,T=u||(M||!y?[Td(v)]:EP(v)),C=[v].concat(T).reduce(function(me,xe){return me.concat(Go(xe)===ug?SP(t,{placement:xe,boundary:p,rootBoundary:h,padding:d,flipVariations:y,allowedAutoPlacements:x}):xe)},[]),z=t.rects.reference,R=t.rects.popper,Q=new Map,V=!0,J=C[0],Y=0;Y<C.length;Y++){var Z=C[Y],W=Go(Z),$=Zs(Z)===Gs,de=[vr,$r].indexOf(W)>=0,ne=de?"width":"height",pe=mc(t,{placement:Z,boundary:p,rootBoundary:h,altBoundary:g,padding:d}),oe=de?$?eo:yr:$?$r:vr;z[ne]>R[ne]&&(oe=Td(oe));var K=Td(oe),j=[];if(i&&j.push(pe[W]<=0),c&&j.push(pe[oe]<=0,pe[K]<=0),j.every(function(me){return me})){J=Z,V=!1;break}Q.set(Z,j)}if(V)for(var ue=y?3:1,B=function(me){var xe=C.find(function(_e){var Oe=Q.get(_e);if(Oe)return Oe.slice(0,me).every(function(Ve){return Ve})});if(xe)return J=xe,"break"},X=ue;X>0;X--){var be=B(X);if(be==="break")break}t.placement!==J&&(t.modifiersData[r]._skip=!0,t.placement=J,t.reset=!0)}}function Ny(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function zy(e){return[vr,eo,$r,yr].some(function(t){return e[t]>=0})}function PP(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=mc(t,{elementContext:"reference"}),c=mc(t,{altBoundary:!0}),u=Ny(s,r),d=Ny(c,o,i),p=zy(u),h=zy(d);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:d,isReferenceHidden:p,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":h})}function IP(e,t,n){var r=Go(e),o=[yr,vr].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=i[0],c=i[1];return s=s||0,c=(c||0)*o,[yr,eo].indexOf(r)>=0?{x:c,y:s}:{x:s,y:c}}function _P(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,s=xx.reduce(function(p,h){return p[h]=IP(h,t.rects,i),p},{}),c=s[t.placement],u=c.x,d=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}function MP(e){var t=e.state,n=e.name;t.modifiersData[n]=Tx({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}function RP(e){return e==="x"?"y":"x"}function LP(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,c=s===void 0?!1:s,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,h=n.padding,g=n.tether,b=g===void 0?!0:g,y=n.tetherOffset,x=y===void 0?0:y,v=mc(t,{boundary:u,rootBoundary:d,padding:h,altBoundary:p}),D=Go(t.placement),M=Zs(t.placement),T=!M,C=pg(D),z=RP(C),R=t.modifiersData.popperOffsets,Q=t.rects.reference,V=t.rects.popper,J=typeof x=="function"?x(Object.assign({},t.rects,{placement:t.placement})):x,Y=typeof J=="number"?{mainAxis:J,altAxis:J}:Object.assign({mainAxis:0,altAxis:0},J),Z=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(R){if(i){var $,de=C==="y"?vr:yr,ne=C==="y"?$r:eo,pe=C==="y"?"height":"width",oe=R[C],K=oe+v[de],j=oe-v[ne],ue=b?-V[pe]/2:0,B=M===Gs?Q[pe]:V[pe],X=M===Gs?-V[pe]:-Q[pe],be=t.elements.arrow,me=b&&be?fg(be):{width:0,height:0},xe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ex(),_e=xe[de],Oe=xe[ne],Ve=uc(0,Q[pe],me[pe]),Ue=T?Q[pe]/2-ue-Ve-_e-Y.mainAxis:B-Ve-_e-Y.mainAxis,Ze=T?-Q[pe]/2+ue+Ve+Oe+Y.mainAxis:X+Ve+Oe+Y.mainAxis,xt=t.elements.arrow&&Ec(t.elements.arrow),Me=xt?C==="y"?xt.clientTop||0:xt.clientLeft||0:0,Pe=($=Z?.[C])!=null?$:0,Ge=oe+Ue-Pe-Me,Ke=oe+Ze-Pe,ht=uc(b?Rd(K,Ge):K,oe,b?Ja(j,Ke):j);R[C]=ht,W[C]=ht-oe}if(c){var lt,gt=C==="x"?vr:yr,wt=C==="x"?$r:eo,mt=R[z],Ot=z==="y"?"height":"width",ut=mt+v[gt],ot=mt-v[wt],hn=[vr,yr].indexOf(D)!==-1,tn=(lt=Z?.[z])!=null?lt:0,An=hn?ut:mt-Q[Ot]-V[Ot]-tn+Y.altAxis,nn=hn?mt+Q[Ot]+V[Ot]-tn-Y.altAxis:ot,It=b&&hn?aP(An,mt,nn):uc(b?An:ut,mt,b?nn:ot);R[z]=It,W[z]=It-mt}t.modifiersData[r]=W}}function NP(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function zP(e){return e===zr(e)||!Zr(e)?hg(e):NP(e)}function FP(e){var t=e.getBoundingClientRect(),n=Xs(t.width)/e.offsetWidth||1,r=Xs(t.height)/e.offsetHeight||1;return n!==1||r!==1}function QP(e,t,n){n===void 0&&(n=!1);var r=Zr(t),o=Zr(t)&&FP(t),i=ua(t),s=Js(e,o,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((Xo(t)!=="body"||gg(i))&&(c=zP(t)),Zr(t)?(u=Js(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=Ag(i))),{x:s.left+c.scrollLeft-u.x,y:s.top+c.scrollTop-u.y,width:s.width,height:s.height}}function UP(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(c){if(!n.has(c)){var u=t.get(c);u&&o(u)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function HP(e){var t=UP(e);return tP.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function VP(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function WP(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}function Qy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function YP(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?Fy:o;return function(s,c,u){u===void 0&&(u=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Fy,i),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},p=[],h=!1,g={state:d,setOptions:function(x){var v=typeof x=="function"?x(d.options):x;y(),d.options=Object.assign({},i,d.options,v),d.scrollParents={reference:$a(s)?dc(s):s.contextElement?dc(s.contextElement):[],popper:dc(c)};var D=HP(WP([].concat(r,d.options.modifiers)));return d.orderedModifiers=D.filter(function(M){return M.enabled}),b(),g.update()},forceUpdate:function(){if(!h){var x=d.elements,v=x.reference,D=x.popper;if(Qy(v,D)){d.rects={reference:QP(v,Ec(D),d.options.strategy==="fixed"),popper:fg(D)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(V){return d.modifiersData[V.name]=Object.assign({},V.data)});for(var M=0;M<d.orderedModifiers.length;M++){if(d.reset===!0){d.reset=!1,M=-1;continue}var T=d.orderedModifiers[M],C=T.fn,z=T.options,R=z===void 0?{}:z,Q=T.name;typeof C=="function"&&(d=C({state:d,options:R,name:Q,instance:g})||d)}}}},update:VP(function(){return new Promise(function(x){g.forceUpdate(),x(d)})}),destroy:function(){y(),h=!0}};if(!Qy(s,c))return g;g.setOptions(u).then(function(x){!h&&u.onFirstUpdate&&u.onFirstUpdate(x)});function b(){d.orderedModifiers.forEach(function(x){var v=x.name,D=x.options,M=D===void 0?{}:D,T=x.effect;if(typeof T=="function"){var C=T({state:d,name:v,instance:g,options:M}),z=function(){};p.push(C||z)}})}function y(){p.forEach(function(x){return x()}),p=[]}return g}}function eA(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function mg(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function Ox(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Uy(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function JP(e){return e.split(/\s+/).filter(Boolean)}function Vs(e){return[].concat(e)}function Hy(e,t){e.indexOf(t)===-1&&e.push(t)}function ZP(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function $P(e){return e.split("-")[0]}function Ld(e){return[].slice.call(e)}function Vy(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function fc(){return document.createElement("div")}function cf(e){return["Element","Fragment"].some(function(t){return mg(e,t)})}function e8(e){return mg(e,"NodeList")}function t8(e){return mg(e,"MouseEvent")}function n8(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function r8(e){return cf(e)?[e]:e8(e)?Ld(e):Array.isArray(e)?e:Ld(document.querySelectorAll(e))}function tA(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function Wy(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function o8(e){var t,n=Vs(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function i8(e,t){var n=t.clientX,r=t.clientY;return e.every(function(o){var i=o.popperRect,s=o.popperState,c=o.props,u=c.interactiveBorder,d=$P(s.placement),p=s.modifiersData.offset;if(!p)return!0;var h=d==="bottom"?p.top.y:0,g=d==="top"?p.bottom.y:0,b=d==="right"?p.left.x:0,y=d==="left"?p.right.x:0,x=i.top-r+h>u,v=r-i.bottom-g>u,D=i.left-n+b>u,M=n-i.right-y>u;return x||v||D||M})}function nA(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){e[r](o,n)})}function Yy(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}function a8(){Wo.isTouch||(Wo.isTouch=!0,window.performance&&document.addEventListener("mousemove",Rx))}function Rx(){var e=performance.now();e-qy<20&&(Wo.isTouch=!1,document.removeEventListener("mousemove",Rx)),qy=e}function s8(){var e=document.activeElement;if(n8(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function l8(){document.addEventListener("touchstart",a8,Ka),window.addEventListener("blur",s8)}function Lx(e){var t=e.plugins||[],n=t.reduce(function(r,o){var i=o.name,s=o.defaultValue;if(i){var c;r[i]=e[i]!==void 0?e[i]:(c=vo[i])!=null?c:s}return r},{});return Object.assign({},e,n)}function A8(e,t){var n=t?Object.keys(Lx(Object.assign({},vo,{plugins:t}))):p8,r=n.reduce(function(o,i){var s=(e.getAttribute("data-tippy-"+i)||"").trim();if(!s)return o;if(i==="content")o[i]=s;else try{o[i]=JSON.parse(s)}catch{o[i]=s}return o},{});return r}function Ky(e,t){var n=Object.assign({},t,{content:Ox(t.content,[e])},t.ignoreAttributes?{}:A8(e,t.plugins));return n.aria=Object.assign({},vo.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function wA(e,t){e[g8()]=t}function Gy(e){var t=fc();return e===!0?t.className=_x:(t.className=Bx,cf(e)?t.appendChild(e):wA(t,e)),t}function Xy(e,t){cf(t.content)?(wA(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?wA(e,t.content):e.textContent=t.content)}function kA(e){var t=e.firstElementChild,n=Ld(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(Ix)}),arrow:n.find(function(r){return r.classList.contains(_x)||r.classList.contains(Bx)}),backdrop:n.find(function(r){return r.classList.contains(XP)})}}function jx(e){var t=fc(),n=fc();n.className=GP,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=fc();r.className=Ix,r.setAttribute("data-state","hidden"),Xy(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props);function o(i,s){var c=kA(t),u=c.box,d=c.content,p=c.arrow;s.theme?u.setAttribute("data-theme",s.theme):u.removeAttribute("data-theme"),typeof s.animation=="string"?u.setAttribute("data-animation",s.animation):u.removeAttribute("data-animation"),s.inertia?u.setAttribute("data-inertia",""):u.removeAttribute("data-inertia"),u.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?u.setAttribute("role",s.role):u.removeAttribute("role"),(i.content!==s.content||i.allowHTML!==s.allowHTML)&&Xy(d,e.props),s.arrow?p?i.arrow!==s.arrow&&(u.removeChild(p),u.appendChild(Gy(s.arrow))):u.appendChild(Gy(s.arrow)):p&&u.removeChild(p)}return{popper:t,onUpdate:o}}function b8(e,t){var n=Ky(e,Object.assign({},vo,Lx(Vy(t)))),r,o,i,s=!1,c=!1,u=!1,d=!1,p,h,g,b=[],y=Uy(Ge,n.interactiveDebounce),x,v=m8++,D=null,M=ZP(n.plugins),T={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:v,reference:e,popper:fc(),popperInstance:D,props:n,state:T,plugins:M,clearDelayTimeouts:An,setProps:nn,setContent:It,show:fe,hide:Le,hideWithInteractivity:Ie,enable:hn,disable:tn,unmount:dt,destroy:We};if(!n.render)return C;var z=n.render(C),R=z.popper,Q=z.onUpdate;R.setAttribute("data-tippy-root",""),R.id="tippy-"+C.id,C.popper=R,e._tippy=C,R._tippy=C;var V=M.map(function(le){return le.fn(C)}),J=e.hasAttribute("aria-expanded");return xt(),ue(),oe(),K("onCreate",[C]),n.showOnCreate&&ut(),R.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),R.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&de().addEventListener("mousemove",y)}),C;function Y(){var le=C.props.touch;return Array.isArray(le)?le:[le,0]}function Z(){return Y()[0]==="hold"}function W(){var le;return!!((le=C.props.render)!=null&&le.$$tippy)}function $(){return x||e}function de(){var le=$().parentNode;return le?o8(le):document}function ne(){return kA(R)}function pe(le){return C.state.isMounted&&!C.state.isVisible||Wo.isTouch||p&&p.type==="focus"?0:eA(C.props.delay,le?0:1,vo.delay)}function oe(le){le===void 0&&(le=!1),R.style.pointerEvents=C.props.interactive&&!le?"":"none",R.style.zIndex=""+C.props.zIndex}function K(le,Ee,Te){if(Te===void 0&&(Te=!0),V.forEach(function(Qe){Qe[le]&&Qe[le].apply(Qe,Ee)}),Te){var qe;(qe=C.props)[le].apply(qe,Ee)}}function j(){var le=C.props.aria;if(le.content){var Ee="aria-"+le.content,Te=R.id,qe=Vs(C.props.triggerTarget||e);qe.forEach(function(Qe){var je=Qe.getAttribute(Ee);if(C.state.isVisible)Qe.setAttribute(Ee,je?je+" "+Te:Te);else{var vt=je&&je.replace(Te,"").trim();vt?Qe.setAttribute(Ee,vt):Qe.removeAttribute(Ee)}})}}function ue(){if(!(J||!C.props.aria.expanded)){var le=Vs(C.props.triggerTarget||e);le.forEach(function(Ee){C.props.interactive?Ee.setAttribute("aria-expanded",C.state.isVisible&&Ee===$()?"true":"false"):Ee.removeAttribute("aria-expanded")})}}function B(){de().removeEventListener("mousemove",y),pd=pd.filter(function(le){return le!==y})}function X(le){if(!(Wo.isTouch&&(u||le.type==="mousedown"))){var Ee=le.composedPath&&le.composedPath()[0]||le.target;if(!(C.props.interactive&&Yy(R,Ee))){if(Vs(C.props.triggerTarget||e).some(function(Te){return Yy(Te,Ee)})){if(Wo.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else K("onClickOutside",[C,le]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),c=!0,setTimeout(function(){c=!1}),C.state.isMounted||_e())}}}function be(){u=!0}function me(){u=!1}function xe(){var le=de();le.addEventListener("mousedown",X,!0),le.addEventListener("touchend",X,Ka),le.addEventListener("touchstart",me,Ka),le.addEventListener("touchmove",be,Ka)}function _e(){var le=de();le.removeEventListener("mousedown",X,!0),le.removeEventListener("touchend",X,Ka),le.removeEventListener("touchstart",me,Ka),le.removeEventListener("touchmove",be,Ka)}function Oe(le,Ee){Ue(le,function(){!C.state.isVisible&&R.parentNode&&R.parentNode.contains(R)&&Ee()})}function Ve(le,Ee){Ue(le,Ee)}function Ue(le,Ee){var Te=ne().box;function qe(Qe){Qe.target===Te&&(nA(Te,"remove",qe),Ee())}if(le===0)return Ee();nA(Te,"remove",h),nA(Te,"add",qe),h=qe}function Ze(le,Ee,Te){Te===void 0&&(Te=!1);var qe=Vs(C.props.triggerTarget||e);qe.forEach(function(Qe){Qe.addEventListener(le,Ee,Te),b.push({node:Qe,eventType:le,handler:Ee,options:Te})})}function xt(){Z()&&(Ze("touchstart",Pe,{passive:!0}),Ze("touchend",Ke,{passive:!0})),JP(C.props.trigger).forEach(function(le){if(le!=="manual")switch(Ze(le,Pe),le){case"mouseenter":Ze("mouseleave",Ke);break;case"focus":Ze(u8?"focusout":"blur",ht);break;case"focusin":Ze("focusout",ht);break}})}function Me(){b.forEach(function(le){var Ee=le.node,Te=le.eventType,qe=le.handler,Qe=le.options;Ee.removeEventListener(Te,qe,Qe)}),b=[]}function Pe(le){var Ee,Te=!1;if(!(!C.state.isEnabled||lt(le)||c)){var qe=((Ee=p)==null?void 0:Ee.type)==="focus";p=le,x=le.currentTarget,ue(),!C.state.isVisible&&t8(le)&&pd.forEach(function(Qe){return Qe(le)}),le.type==="click"&&(C.props.trigger.indexOf("mouseenter")<0||s)&&C.props.hideOnClick!==!1&&C.state.isVisible?Te=!0:ut(le),le.type==="click"&&(s=!Te),Te&&!qe&&ot(le)}}function Ge(le){var Ee=le.target,Te=$().contains(Ee)||R.contains(Ee);if(!(le.type==="mousemove"&&Te)){var qe=Ot().concat(R).map(function(Qe){var je,vt=Qe._tippy,yt=(je=vt.popperInstance)==null?void 0:je.state;return yt?{popperRect:Qe.getBoundingClientRect(),popperState:yt,props:n}:null}).filter(Boolean);i8(qe,le)&&(B(),ot(le))}}function Ke(le){var Ee=lt(le)||C.props.trigger.indexOf("click")>=0&&s;if(!Ee){if(C.props.interactive){C.hideWithInteractivity(le);return}ot(le)}}function ht(le){C.props.trigger.indexOf("focusin")<0&&le.target!==$()||C.props.interactive&&le.relatedTarget&&R.contains(le.relatedTarget)||ot(le)}function lt(le){return Wo.isTouch?Z()!==le.type.indexOf("touch")>=0:!1}function gt(){wt();var le=C.props,Ee=le.popperOptions,Te=le.placement,qe=le.offset,Qe=le.getReferenceClientRect,je=le.moveTransition,vt=W()?kA(R).arrow:null,yt=Qe?{getBoundingClientRect:Qe,contextElement:Qe.contextElement||$()}:e,tt={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Ut){var Yt=Ut.state;if(W()){var cn=ne(),Gt=cn.box;["placement","reference-hidden","escaped"].forEach(function(Rt){Rt==="placement"?Gt.setAttribute("data-placement",Yt.placement):Yt.attributes.popper["data-popper-"+Rt]?Gt.setAttribute("data-"+Rt,""):Gt.removeAttribute("data-"+Rt)}),Yt.attributes.popper={}}}},Kt=[{name:"offset",options:{offset:qe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!je}},tt];W()&&vt&&Kt.push({name:"arrow",options:{element:vt,padding:3}}),Kt.push.apply(Kt,Ee?.modifiers||[]),C.popperInstance=KP(yt,R,Object.assign({},Ee,{placement:Te,onFirstUpdate:g,modifiers:Kt}))}function wt(){C.popperInstance&&(C.popperInstance.destroy(),C.popperInstance=null)}function mt(){var le=C.props.appendTo,Ee,Te=$();C.props.interactive&&le===Mx||le==="parent"?Ee=Te.parentNode:Ee=Ox(le,[Te]),Ee.contains(R)||Ee.appendChild(R),C.state.isMounted=!0,gt()}function Ot(){return Ld(R.querySelectorAll("[data-tippy-root]"))}function ut(le){C.clearDelayTimeouts(),le&&K("onTrigger",[C,le]),xe();var Ee=pe(!0),Te=Y(),qe=Te[0],Qe=Te[1];Wo.isTouch&&qe==="hold"&&Qe&&(Ee=Qe),Ee?r=setTimeout(function(){C.show()},Ee):C.show()}function ot(le){if(C.clearDelayTimeouts(),K("onUntrigger",[C,le]),!C.state.isVisible){_e();return}if(!(C.props.trigger.indexOf("mouseenter")>=0&&C.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(le.type)>=0&&s)){var Ee=pe(!1);Ee?o=setTimeout(function(){C.state.isVisible&&C.hide()},Ee):i=requestAnimationFrame(function(){C.hide()})}}function hn(){C.state.isEnabled=!0}function tn(){C.hide(),C.state.isEnabled=!1}function An(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)}function nn(le){if(!C.state.isDestroyed){K("onBeforeUpdate",[C,le]),Me();var Ee=C.props,Te=Ky(e,Object.assign({},Ee,Vy(le),{ignoreAttributes:!0}));C.props=Te,xt(),Ee.interactiveDebounce!==Te.interactiveDebounce&&(B(),y=Uy(Ge,Te.interactiveDebounce)),Ee.triggerTarget&&!Te.triggerTarget?Vs(Ee.triggerTarget).forEach(function(qe){qe.removeAttribute("aria-expanded")}):Te.triggerTarget&&e.removeAttribute("aria-expanded"),ue(),oe(),Q&&Q(Ee,Te),C.popperInstance&&(gt(),Ot().forEach(function(qe){requestAnimationFrame(qe._tippy.popperInstance.forceUpdate)})),K("onAfterUpdate",[C,le])}}function It(le){C.setProps({content:le})}function fe(){var le=C.state.isVisible,Ee=C.state.isDestroyed,Te=!C.state.isEnabled,qe=Wo.isTouch&&!C.props.touch,Qe=eA(C.props.duration,0,vo.duration);if(!(le||Ee||Te||qe)&&!$().hasAttribute("disabled")&&(K("onShow",[C],!1),C.props.onShow(C)!==!1)){if(C.state.isVisible=!0,W()&&(R.style.visibility="visible"),oe(),xe(),C.state.isMounted||(R.style.transition="none"),W()){var je=ne(),vt=je.box,yt=je.content;tA([vt,yt],0)}g=function(){var tt;if(!(!C.state.isVisible||d)){if(d=!0,R.offsetHeight,R.style.transition=C.props.moveTransition,W()&&C.props.animation){var Kt=ne(),Ut=Kt.box,Yt=Kt.content;tA([Ut,Yt],Qe),Wy([Ut,Yt],"visible")}j(),ue(),Hy(rA,C),(tt=C.popperInstance)==null||tt.forceUpdate(),K("onMount",[C]),C.props.animation&&W()&&Ve(Qe,function(){C.state.isShown=!0,K("onShown",[C])})}},mt()}}function Le(){var le=!C.state.isVisible,Ee=C.state.isDestroyed,Te=!C.state.isEnabled,qe=eA(C.props.duration,1,vo.duration);if(!(le||Ee||Te)&&(K("onHide",[C],!1),C.props.onHide(C)!==!1)){if(C.state.isVisible=!1,C.state.isShown=!1,d=!1,s=!1,W()&&(R.style.visibility="hidden"),B(),_e(),oe(!0),W()){var Qe=ne(),je=Qe.box,vt=Qe.content;C.props.animation&&(tA([je,vt],qe),Wy([je,vt],"hidden"))}j(),ue(),C.props.animation?W()&&Oe(qe,C.unmount):C.unmount()}}function Ie(le){de().addEventListener("mousemove",y),Hy(pd,y),y(le)}function dt(){C.state.isVisible&&C.hide(),C.state.isMounted&&(wt(),Ot().forEach(function(le){le._tippy.unmount()}),R.parentNode&&R.parentNode.removeChild(R),rA=rA.filter(function(le){return le!==C}),C.state.isMounted=!1,K("onHidden",[C]))}function We(){C.state.isDestroyed||(C.clearDelayTimeouts(),C.unmount(),Me(),delete e._tippy,C.state.isDestroyed=!0,K("onDestroy",[C]))}}function Cc(e,t){t===void 0&&(t={});var n=vo.plugins.concat(t.plugins||[]);l8();var r=Object.assign({},t,{plugins:n}),o=r8(e),i=o.reduce(function(s,c){var u=c&&b8(c,r);return u&&s.push(u),s},[]);return cf(e)?i[0]:i}function v8({color:e="var(--contrast-6)",icon:t="info-circle-fill",tooltip:n}){let r=P.useRef(null);return P.useLayoutEffect(()=>{r.current&&Cc(r.current,{content:n,theme:"access",appendTo:r.current.parentElement})},[r.current]),E.jsx("button",{className:"info-tip",style:{color:e},ref:r,children:E.jsx(kt,{name:t})})}function y8({infoGroupId:e}){let t=Kn(`https://support.access-ci.org/api/1.0/kb/${e}`);if(!(!t||t.error||!t.length))return E.jsx(Ko,{title:"Documentation",icon:"book",children:E.jsx("ul",{children:t.map(({title:n,description:r,link:o})=>E.jsxs("li",{children:[E.jsx("a",{href:Mg(o),children:n}),r?E.jsx(v8,{tooltip:gf(r)}):null]},n))})})}function x8({children:e,icon:t="megaphone-fill"}){return E.jsxs("div",{className:"alert",children:[t?E.jsx(kt,{name:t}):null,E.jsx("div",{className:"alert-body",children:e})]})}function w8({children:e}){let[t,n]=P.useState(!1);return E.jsxs("div",{className:`expand-text ${t?"expanded":"contracted"}`,children:[e,E.jsxs("button",{className:"expand-button",onClick:()=>n(!t),children:[E.jsx(kt,{name:`caret-${t?"up":"left"}-fill`}),t?"Less":"More"]})]})}function k8({date__end:e,date__start:t,description:n,location:r,registration:o,speaker:i,title:s}){let c=o,u=c?E.jsx("a",{href:c,children:s}):s,d=[],p=null,h=t,g=e;if(h){let b=new Date(h),y=new Date(g||h),[x,v]=[b,y].map(R=>R.toLocaleString("en-US",{dateStyle:"long"})),[D,M]=[b,y].map(R=>R.toLocaleString("en-US",{timeStyle:"short"})),T=b.toLocaleTimeString("en-US",{timeZoneName:"short"}).split(" ")[2],C=[`${x},`,D];(M!=D||v!=x)&&(C.push("-"),v!=x&&C.push(`${v},`),C.push(M)),C.push(`(${T})`),d.push(E.jsx(kt,{name:"calendar"}),C.join(" ")),i&&d.push(E.jsx(kt,{name:"people-fill"}),i),r&&d.push(E.jsx(kt,{name:"geo-alt-fill"}),r);let z=b.toLocaleString("en-US",{dateStyle:"medium"}).split(",")[0].split(" ").map(R=>E.jsx("span",{children:R},R));p=c?E.jsx("a",{href:c,className:"event-icon",children:z}):E.jsx("div",{className:"event-icon",children:z})}return E.jsxs("div",{className:"event",children:[p,E.jsxs("div",{className:"event-details",children:[E.jsx("h3",{children:u}),d.length?E.jsx("div",{className:"event-metadata",children:d}):null,n?E.jsx(w8,{children:E.jsx("div",{children:af(n)})}):null]})]})}function S8({infoGroupId:e}){let t=il(e),n=Kn("https://operations-api.access-ci.org/wh2/news/v1/affiliation/access-ci.org/current_outages/"),r=Kn("https://operations-api.access-ci.org/wh2/news/v1/affiliation/access-ci.org/future_outages/"),o=Kn(`https://support.access-ci.org/api/1.1/events/ag/${e}`),i=of([t,n,r],(c,u,d)=>[...u.results,...d.results].filter(p=>p.AffectedResources.some(h=>c.infoResourceIds.includes(h.ResourceID))),[]),s=of([o],c=>c.filter(u=>new Date(u.date__start)>=new Date),[]);if(!(!i.length&&!s.length))return E.jsxs(Ko,{title:"Announcements and Events",icon:"calendar3",children:[i.map(({Subject:c,Content:u})=>E.jsxs(x8,{children:[c," ",E.jsx("a",{href:"https://operations.access-ci.org/infrastructure_news_view",children:"Learn more."})]},c)),s.map(c=>E.jsx(k8,{...c},c.title))]})}function E8({children:e,headingLevel:t=2,title:n}){let[r,o]=P.useState(!1),i=`h${t}`;return E.jsxs("div",{className:"accordion",children:[E.jsx(i,{className:"accordion-heading",children:E.jsxs("button",{"aria-expanded":r,onClick:()=>o(!r),children:[n,E.jsx(kt,{name:r?"caret-up-fill":"caret-down-fill"})]})}),E.jsx("div",{className:"accordion-content",style:{display:r?"block":"none"},children:e})]})}function C8({resource_descriptive_name:e,resource_description:t,compute:n,storage:r}){let o=(n||r||{}).recommended_use;return E.jsxs(E8,{title:e,children:[t?af(t):null,o?E.jsxs(E.Fragment,{children:[E.jsx("h3",{children:"Recommended Use"}),af(o)]}):null]})}function D8({infoGroupId:e}){let t=il(e),n=Kn(t?t.infoResourceIds.map(u=>`https://operations-api.access-ci.org/wh2/cider/v1/info_resourceid/${u}/?format=json`):null,{defaultValue:[]}),r=n.filter(u=>u.results&&u.results.cider_type=="Compute").map(u=>({...u.results.compute,key:u.results.info_resourceid,name:u.results.resource_descriptive_name,format:(d,p)=>{let h=u.results.compute[p.attr];return p.format&&h?p.format(h,p):h||E.jsx(E.Fragment,{children:"\u2014"})}})),o=n.length?[{name:"Nodes",attr:"node_count",format:u=>u.toLocaleString("en-us")},{name:"CPU Type",attr:"cpu_type"},{name:"CPU Speed",attr:"cpu_speed_ghz",format:u=>`${u} Ghz`},{name:"CPU Cores per Node",attr:"cpu_count_per_node"},{name:"RAM per CPU Core",attr:"memory_per_cpu_gb",format:u=>`${u.toLocaleString("en-us")} GB`},{name:"GPU",attr:"gpu_description"},{name:"Local Storage per Node",attr:"local_storage_per_node_gb",format:u=>`${u.toLocaleString("en-us")} GB`},{name:"Network Interconnect",attr:"interconnect"},{name:"Operating System",attr:"operating_system"},{name:"Batch System",attr:"batch_system"}].filter(u=>r.some(d=>d[u.attr])):[],i={key:"name",name:"Attribute",format:u=>E.jsx("strong",{children:u})},s=r.length>0&&o.length>0,c={compute:[],storage:[],other:[]};for(let{results:u}of n)(c[u.cider_type.toLowerCase()]||c.other).push(E.jsx(C8,{...u},u.resource_descriptive_name));return E.jsxs(E.Fragment,{children:[s||c.compute.length>0?E.jsxs(Ko,{title:"Compute Resources",icon:"cpu-fill",children:[c.compute,s&&E.jsxs(E.Fragment,{children:[E.jsx("h3",{children:"Specifications"}),E.jsx(sf,{columns:[i,...r],rows:o,maxHeight:null})]})]}):null,c.storage.length>0?E.jsx(Ko,{title:"Storage Resources",icon:"hdd-fill",children:c.storage}):null,c.other.length>0?E.jsx(Ko,{title:"Other Resources",icon:"stars",children:c.other}):null]})}function Jy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Zy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jy(Object(n),!0).forEach(function(r){T8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Id(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Id=function(t){return typeof t}:Id=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Id(e)}function uf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function df(e,t,n){return t&&P8(e.prototype,t),e}function T8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&SA(e,t)}function $s(e){return $s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(e)}function SA(e,t){return SA=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},SA(e,t)}function _8(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M8(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return B8(e)}function O8(e){var t=_8();return function(){var n=$s(e),r;if(t){var o=$s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return M8(this,r)}}function R8(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=$s(e),e!==null););return e}function _d(){return typeof Reflect<"u"&&Reflect.get?_d=Reflect.get:_d=function(e,t,n){var r=R8(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},_d.apply(this,arguments)}function oa(e){console.error("[Glide warn]: ".concat(e))}function bo(e){return parseInt(e)}function EA(e){return typeof e=="string"}function bc(e){var t=Id(e);return t==="function"||t==="object"&&!!e}function jd(e){return typeof e=="function"}function j8(e){return typeof e>"u"}function CA(e){return e.constructor===Array}function N8(e,t,n){var r={};for(var o in t)jd(t[o])?r[o]=t[o](e,r,n):oa("Extension must be a function");for(var i in r)jd(r[i].mount)&&r[i].mount();return r}function an(e,t,n){Object.defineProperty(e,t,n)}function $y(e,t){var n=Object.assign({},e,t);if(t.hasOwnProperty("classes")){n.classes=Object.assign({},e.classes,t.classes);var r=["direction","type","slide","arrow","nav"];r.forEach(function(o){t.classes.hasOwnProperty(o)&&(n.classes[o]=Zy(Zy({},e.classes[o]),t.classes[o]))})}return t.hasOwnProperty("breakpoints")&&(n.breakpoints=Object.assign({},e.breakpoints,t.breakpoints)),n}function Q8(e,t,n){var r={mount:function(){this._o=!1},make:function(u){var d=this;e.disabled||(!e.settings.waitForTransition||e.disable(),this.move=u,n.emit("run.before",this.move),this.calculate(),n.emit("run",this.move),t.Transition.after(function(){d.isStart()&&n.emit("run.start",d.move),d.isEnd()&&n.emit("run.end",d.move),d.isOffset()&&(d._o=!1,n.emit("run.offset",d.move)),n.emit("run.after",d.move),e.enable()}))},calculate:function(){var u=this.move,d=this.length,p=u.steps,h=u.direction,g=1;if(h==="="){if(e.settings.bound&&bo(p)>d){e.index=d;return}e.index=p;return}if(h===">"&&p===">"){e.index=d;return}if(h==="<"&&p==="<"){e.index=0;return}if(h==="|"&&(g=e.settings.perView||1),h===">"||h==="|"&&p===">"){var b=o(g);b>d&&(this._o=!0),e.index=i(b,g);return}if(h==="<"||h==="|"&&p==="<"){var y=s(g);y<0&&(this._o=!0),e.index=c(y,g);return}oa("Invalid direction pattern [".concat(h).concat(p,"] has been used"))},isStart:function(){return e.index<=0},isEnd:function(){return e.index>=this.length},isOffset:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return u?this._o?u==="|>"?this.move.direction==="|"&&this.move.steps===">":u==="|<"?this.move.direction==="|"&&this.move.steps==="<":this.move.direction===u:!1:this._o},isBound:function(){return e.isType("slider")&&e.settings.focusAt!=="center"&&e.settings.bound}};function o(u){var d=e.index;return e.isType("carousel")?d+u:d+(u-d%u)}function i(u,d){var p=r.length;return u<=p?u:e.isType("carousel")?u-(p+1):e.settings.rewind?r.isBound()&&!r.isEnd()?p:0:r.isBound()?p:Math.floor(p/d)*d}function s(u){var d=e.index;if(e.isType("carousel"))return d-u;var p=Math.ceil(d/u);return(p-1)*u}function c(u,d){var p=r.length;return u>=0?u:e.isType("carousel")?u+(p+1):e.settings.rewind?r.isBound()&&r.isStart()?p:Math.floor(p/d)*d:0}return an(r,"move",{get:function(){return this._m},set:function(u){var d=u.substr(1);this._m={direction:u.substr(0,1),steps:d?bo(d)?bo(d):d:0}}}),an(r,"length",{get:function(){var u=e.settings,d=t.Html.slides.length;return this.isBound()?d-1-(bo(u.perView)-1)+bo(u.focusAt):d-1}}),an(r,"offset",{get:function(){return this._o}}),r}function e1(){return new Date().getTime()}function Nx(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,o,i,s,c=0,u=function(){c=n.leading===!1?0:e1(),r=null,s=e.apply(o,i),r||(o=i=null)},d=function(){var p=e1();!c&&n.leading===!1&&(c=p);var h=t-(p-c);return o=this,i=arguments,h<=0||h>t?(r&&(clearTimeout(r),r=null),c=p,s=e.apply(o,i),r||(o=i=null)):!r&&n.trailing!==!1&&(r=setTimeout(u,h)),s};return d.cancel=function(){clearTimeout(r),c=0,r=o=i=null},d}function U8(e,t,n){var r={apply:function(o){for(var i=0,s=o.length;i<s;i++){var c=o[i].style,u=t.Direction.value;i!==0?c[hd[u][0]]="".concat(this.value/2,"px"):c[hd[u][0]]="",i!==o.length-1?c[hd[u][1]]="".concat(this.value/2,"px"):c[hd[u][1]]=""}},remove:function(o){for(var i=0,s=o.length;i<s;i++){var c=o[i].style;c.marginLeft="",c.marginRight=""}}};return an(r,"value",{get:function(){return bo(e.settings.gap)}}),an(r,"grow",{get:function(){return r.value*t.Sizes.length}}),an(r,"reductor",{get:function(){var o=e.settings.perView;return r.value*(o-1)/o}}),n.on(["build.after","update"],Nx(function(){r.apply(t.Html.wrapper.children)},30)),n.on("destroy",function(){r.remove(t.Html.wrapper.children)}),r}function zx(e){if(e&&e.parentNode){for(var t=e.parentNode.firstChild,n=[];t;t=t.nextSibling)t.nodeType===1&&t!==e&&n.push(t);return n}return[]}function DA(e){return Array.prototype.slice.call(e)}function V8(e,t,n){var r={mount:function(){this.root=e.selector,this.track=this.root.querySelector(H8),this.collectSlides()},collectSlides:function(){this.slides=DA(this.wrapper.children).filter(function(o){return!o.classList.contains(e.settings.classes.slide.clone)})}};return an(r,"root",{get:function(){return r._r},set:function(o){EA(o)&&(o=document.querySelector(o)),o!==null?r._r=o:oa("Root element must be a existing Html node")}}),an(r,"track",{get:function(){return r._t},set:function(o){r._t=o}}),an(r,"wrapper",{get:function(){return r.track.children[0]}}),n.on("update",function(){r.collectSlides()}),r}function W8(e,t,n){var r={mount:function(){this.value=e.settings.peek}};return an(r,"value",{get:function(){return r._v},set:function(o){bc(o)?(o.before=bo(o.before),o.after=bo(o.after)):o=bo(o),r._v=o}}),an(r,"reductor",{get:function(){var o=r.value,i=e.settings.perView;return bc(o)?o.before/i+o.after/i:o*2/i}}),n.on(["resize","update"],function(){r.mount()}),r}function Y8(e,t,n){var r={mount:function(){this._o=0},make:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.offset=i,n.emit("move",{movement:this.value}),t.Transition.after(function(){n.emit("move.after",{movement:o.value})})}};return an(r,"offset",{get:function(){return r._o},set:function(o){r._o=j8(o)?0:bo(o)}}),an(r,"translate",{get:function(){return t.Sizes.slideWidth*e.index}}),an(r,"value",{get:function(){var o=this.offset,i=this.translate;return t.Direction.is("rtl")?i+o:i-o}}),n.on(["build.before","run"],function(){r.make()}),r}function q8(e,t,n){var r={setupSlides:function(){for(var o="".concat(this.slideWidth,"px"),i=t.Html.slides,s=0;s<i.length;s++)i[s].style.width=o},setupWrapper:function(){t.Html.wrapper.style.width="".concat(this.wrapperSize,"px")},remove:function(){for(var o=t.Html.slides,i=0;i<o.length;i++)o[i].style.width="";t.Html.wrapper.style.width=""}};return an(r,"length",{get:function(){return t.Html.slides.length}}),an(r,"width",{get:function(){return t.Html.track.offsetWidth}}),an(r,"wrapperSize",{get:function(){return r.slideWidth*r.length+t.Gaps.grow+t.Clones.grow}}),an(r,"slideWidth",{get:function(){return r.width/e.settings.perView-t.Peek.reductor-t.Gaps.reductor}}),n.on(["build.before","resize","update"],function(){r.setupSlides(),r.setupWrapper()}),n.on("destroy",function(){r.remove()}),r}function K8(e,t,n){var r={mount:function(){n.emit("build.before"),this.typeClass(),this.activeClass(),n.emit("build.after")},typeClass:function(){t.Html.root.classList.add(e.settings.classes.type[e.settings.type])},activeClass:function(){var o=e.settings.classes,i=t.Html.slides[e.index];i&&(i.classList.add(o.slide.active),zx(i).forEach(function(s){s.classList.remove(o.slide.active)}))},removeClasses:function(){var o=e.settings.classes,i=o.type,s=o.slide;t.Html.root.classList.remove(i[e.settings.type]),t.Html.slides.forEach(function(c){c.classList.remove(s.active)})}};return n.on(["destroy","update"],function(){r.removeClasses()}),n.on(["resize","update"],function(){r.mount()}),n.on("move.after",function(){r.activeClass()}),r}function G8(e,t,n){var r={mount:function(){this.items=[],e.isType("carousel")&&(this.items=this.collect())},collect:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=t.Html.slides,s=e.settings,c=s.perView,u=s.classes,d=s.cloningRatio;if(i.length>0)for(var p=+!!e.settings.peek,h=c+p+Math.round(c/2),g=i.slice(0,h).reverse(),b=i.slice(h*-1),y=0;y<Math.max(d,Math.floor(c/i.length));y++){for(var x=0;x<g.length;x++){var v=g[x].cloneNode(!0);v.classList.add(u.slide.clone),o.push(v)}for(var D=0;D<b.length;D++){var M=b[D].cloneNode(!0);M.classList.add(u.slide.clone),o.unshift(M)}}return o},append:function(){for(var o=this.items,i=t.Html,s=i.wrapper,c=i.slides,u=Math.floor(o.length/2),d=o.slice(0,u).reverse(),p=o.slice(u*-1).reverse(),h="".concat(t.Sizes.slideWidth,"px"),g=0;g<p.length;g++)s.appendChild(p[g]);for(var b=0;b<d.length;b++)s.insertBefore(d[b],c[0]);for(var y=0;y<o.length;y++)o[y].style.width=h},remove:function(){for(var o=this.items,i=0;i<o.length;i++)t.Html.wrapper.removeChild(o[i])}};return an(r,"grow",{get:function(){return(t.Sizes.slideWidth+t.Gaps.value)*r.items.length}}),n.on("update",function(){r.remove(),r.mount(),r.append()}),n.on("build.before",function(){e.isType("carousel")&&r.append()}),n.on("destroy",function(){r.remove()}),r}function X8(e,t,n){var r=new Fx,o={mount:function(){this.bind()},bind:function(){r.on("resize",window,Nx(function(){n.emit("resize")},e.settings.throttle))},unbind:function(){r.off("resize",window)}};return n.on("destroy",function(){o.unbind(),r.destroy()}),o}function $8(e,t,n){var r={mount:function(){this.value=e.settings.direction},resolve:function(o){var i=o.slice(0,1);return this.is("rtl")?o.split(i).join(Z8[i]):o},is:function(o){return this.value===o},addClass:function(){t.Html.root.classList.add(e.settings.classes.direction[this.value])},removeClass:function(){t.Html.root.classList.remove(e.settings.classes.direction[this.value])}};return an(r,"value",{get:function(){return r._v},set:function(o){J8.indexOf(o)>-1?r._v=o:oa("Direction value must be `ltr` or `rtl`")}}),n.on(["destroy","update"],function(){r.removeClass()}),n.on("update",function(){r.mount()}),n.on(["build.before","update"],function(){r.addClass()}),r}function eT(e,t){return{modify:function(n){return t.Direction.is("rtl")?-n:n}}}function tT(e,t){return{modify:function(n){var r=Math.floor(n/t.Sizes.slideWidth);return n+t.Gaps.value*r}}}function nT(e,t){return{modify:function(n){return n+t.Clones.grow/2}}}function rT(e,t){return{modify:function(n){if(e.settings.focusAt>=0){var r=t.Peek.value;return bc(r)?n-r.before:n-r}return n}}}function oT(e,t){return{modify:function(n){var r=t.Gaps.value,o=t.Sizes.width,i=e.settings.focusAt,s=t.Sizes.slideWidth;return i==="center"?n-(o/2-s/2):n-s*i-r*i}}}function iT(e,t,n){var r=[tT,nT,rT,oT].concat(e._t,[eT]);return{mutate:function(o){for(var i=0;i<r.length;i++){var s=r[i];jd(s)&&jd(s().modify)?o=s(e,t,n).modify(o):oa("Transformer should be a function that returns an object with `modify()` method")}return o}}}function aT(e,t,n){var r={set:function(o){var i=iT(e,t).mutate(o),s="translate3d(".concat(-1*i,"px, 0px, 0px)");t.Html.wrapper.style.mozTransform=s,t.Html.wrapper.style.webkitTransform=s,t.Html.wrapper.style.transform=s},remove:function(){t.Html.wrapper.style.transform=""},getStartIndex:function(){var o=t.Sizes.length,i=e.index,s=e.settings.perView;return t.Run.isOffset(">")||t.Run.isOffset("|>")?o+(i-s):(i+s)%o},getTravelDistance:function(){var o=t.Sizes.slideWidth*e.settings.perView;return t.Run.isOffset(">")||t.Run.isOffset("|>")?o*-1:o}};return n.on("move",function(o){if(!e.isType("carousel")||!t.Run.isOffset())return r.set(o.movement);t.Transition.after(function(){n.emit("translate.jump"),r.set(t.Sizes.slideWidth*e.index)});var i=t.Sizes.slideWidth*t.Translate.getStartIndex();return r.set(i-t.Translate.getTravelDistance())}),n.on("destroy",function(){r.remove()}),r}function sT(e,t,n){var r=!1,o={compose:function(i){var s=e.settings;return r?"".concat(i," 0ms ").concat(s.animationTimingFunc):"".concat(i," ").concat(this.duration,"ms ").concat(s.animationTimingFunc)},set:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";t.Html.wrapper.style.transition=this.compose(i)},remove:function(){t.Html.wrapper.style.transition=""},after:function(i){setTimeout(function(){i()},this.duration)},enable:function(){r=!1,this.set()},disable:function(){r=!0,this.set()}};return an(o,"duration",{get:function(){var i=e.settings;return e.isType("slider")&&t.Run.offset?i.rewindDuration:i.animationDuration}}),n.on("move",function(){o.set()}),n.on(["build.before","resize","translate.jump"],function(){o.disable()}),n.on("run",function(){o.enable()}),n.on("destroy",function(){o.remove()}),o}function dT(e,t,n){var r=new Fx,o=t1?{passive:!0}:!1,i={mount:function(){this._n=t.Html.root.querySelectorAll(lT),this._c=t.Html.root.querySelectorAll(bg),this._arrowControls={previous:t.Html.root.querySelectorAll(cT),next:t.Html.root.querySelectorAll(uT)},this.addBindings()},setActive:function(){for(var s=0;s<this._n.length;s++)this.addClass(this._n[s].children)},removeActive:function(){for(var s=0;s<this._n.length;s++)this.removeClass(this._n[s].children)},addClass:function(s){var c=e.settings,u=s[e.index];u&&(u.classList.add(c.classes.nav.active),zx(u).forEach(function(d){d.classList.remove(c.classes.nav.active)}))},removeClass:function(s){var c=s[e.index];c?.classList.remove(e.settings.classes.nav.active)},setArrowState:function(){if(!e.settings.rewind){var s=i._arrowControls.next,c=i._arrowControls.previous;this.resetArrowState(s,c),e.index===0&&this.disableArrow(c),e.index===t.Run.length&&this.disableArrow(s)}},resetArrowState:function(){for(var s=e.settings,c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];u.forEach(function(p){DA(p).forEach(function(h){h.classList.remove(s.classes.arrow.disabled)})})},disableArrow:function(){for(var s=e.settings,c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];u.forEach(function(p){DA(p).forEach(function(h){h.classList.add(s.classes.arrow.disabled)})})},addBindings:function(){for(var s=0;s<this._c.length;s++)this.bind(this._c[s].children)},removeBindings:function(){for(var s=0;s<this._c.length;s++)this.unbind(this._c[s].children)},bind:function(s){for(var c=0;c<s.length;c++)r.on("click",s[c],this.click),r.on("touchstart",s[c],this.click,o)},unbind:function(s){for(var c=0;c<s.length;c++)r.off(["click","touchstart"],s[c])},click:function(s){!t1&&s.type==="touchstart"&&s.preventDefault();var c=s.currentTarget.getAttribute("data-glide-dir");t.Run.make(t.Direction.resolve(c))}};return an(i,"items",{get:function(){return i._c}}),n.on(["mount.after","move.after"],function(){i.setActive()}),n.on(["mount.after","run"],function(){i.setArrowState()}),n.on("destroy",function(){i.removeBindings(),i.removeActive(),r.destroy()}),i}function Nd({children:e,cssClass:t=""}){let n=P.useRef(null);return P.useEffect(()=>{n.current&&new pT(n.current).mount({Controls:dT})},[]),E.jsx("section",{className:`carousel ${t}`,children:E.jsxs("div",{className:"glide",ref:n,children:[E.jsx("div",{className:"glide__track","data-glide-el":"track",children:E.jsx("ul",{className:"glide__slides",children:e})}),E.jsxs("div",{className:"glide__arrows","data-glide-el":"controls",children:[E.jsx("button",{className:"glide__arrow glide__arrow--left","data-glide-dir":"<",children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:E.jsx("path",{d:"M0 12l10.975 11 2.848-2.828-6.176-6.176H24v-3.992H7.646l6.176-6.176L10.975 1 0 12z"})})}),E.jsx("button",{className:"glide__arrow glide__arrow--right","data-glide-dir":">",children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:E.jsx("path",{d:"M13.025 1l-2.847 2.828 6.176 6.176h-16.354v3.992h16.354l-6.176 6.176 2.847 2.828 10.975-11z"})})})]})]})})}function Ux({children:e}){return E.jsx("li",{className:"glide__slide",children:e})}function hT({title:e,description:t,linkText:n,linkURI:r,imageURI:o,imageAltText:i}){return E.jsx(Ux,{children:E.jsxs("span",{className:"slide-inner",children:[o&&E.jsx("a",{href:r,className:"slide-image",children:E.jsx("img",{src:o,alt:i})}),E.jsxs("span",{className:"slide-text",children:[e&&E.jsx("h2",{children:e}),t&&E.jsx("p",{children:t}),n&&E.jsx("a",{href:r,children:n})]})]})})}function AT({children:e,maxHeight:t="400px"}){return E.jsx("div",{className:"scroll-text",children:E.jsx("div",{className:"scroll-text-inner",style:{maxHeight:t},children:e})})}function Ad({icon:e,text:t,title:n}){if(t)return E.jsxs("abbr",{className:"project-meta",title:n,children:[E.jsx(kt,{name:e}),t]})}function mT({infoGroupId:e}){let t=il(e),n=Kn(t?`${gT}?${t.infoResourceIds.map(o=>`info_resourceids[]=${o}`).join("&")}`:null);if(!n||!n.projects||!n.projects.length)return null;let r=[{key:"resourceName",name:"Resource"},{key:"allocation",name:"Current Allocation",format:(o,i)=>i.units=="[Yes = 1, No = 0]"?o==1?"Yes":"No":`${o.toLocaleString("en-us")} ${i.units||""}`}];return E.jsx(Ko,{title:"Recent Projects",icon:"pc-display",children:E.jsx(Nd,{cssclassName:"carousel-projects",children:n.projects.map(o=>E.jsxs(Nd.Slide,{children:[E.jsx("h3",{children:o.requestTitle}),E.jsxs("div",{className:"project-metadata",children:[E.jsx(Ad,{icon:"cash-coin",text:o.allocationType,title:"Allocation Type"}),E.jsx(Ad,{icon:"person-fill",text:`${o.pi} (${o.piInstitution})`,title:"Primary Investigator"}),E.jsx(Ad,{icon:"folder",text:o.fos,title:"Field of Science"}),E.jsx(Ad,{icon:"calendar-range",text:[o.beginDate,o.endDate].map(i=>new Date(i).toLocaleString("en-US",{dateStyle:"medium"})).join(" to "),title:"Project Dates"})]}),E.jsxs(AT,{children:[E.jsx("p",{children:o.abstract}),E.jsx(sf,{columns:r,rows:o.resources,maxHeight:null})]})]},o.requestTitle))})})}function Dc(e){return e+.5|0}function sc(e){return ta(Dc(e*2.55),0,255)}function ia(e){return ta(Dc(e*255),0,255)}function xi(e){return ta(Dc(e/2.55)/100,0,1)}function n1(e){return ta(Dc(e*100),0,100)}function xT(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Xr[e[1]]*17,g:255&Xr[e[2]]*17,b:255&Xr[e[3]]*17,a:t===5?Xr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Xr[e[1]]<<4|Xr[e[2]],g:Xr[e[3]]<<4|Xr[e[4]],b:Xr[e[5]]<<4|Xr[e[6]],a:t===9?Xr[e[7]]<<4|Xr[e[8]]:255})),n}function kT(e){var t=yT(e)?bT:vT;return e?"#"+t(e.r)+t(e.g)+t(e.b)+wT(e.a,t):void 0}function Hx(e,t,n){let r=t*Math.min(n,1-n),o=(i,s=(i+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[o(0),o(8),o(4)]}function ET(e,t,n){let r=(o,i=(o+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function CT(e,t,n){let r=Hx(e,1,.5),o;for(t+n>1&&(o=1/(t+n),t*=o,n*=o),o=0;o<3;o++)r[o]*=1-t-n,r[o]+=t;return r}function DT(e,t,n,r,o){return e===o?(t-n)/r+(t<n?6:0):t===o?(n-e)/r+2:(e-t)/r+4}function vg(e){let t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),i=Math.min(t,n,r),s=(o+i)/2,c,u,d;return o!==i&&(d=o-i,u=s>.5?d/(2-o-i):d/(o+i),c=DT(t,n,r,d,o),c=c*60+.5),[c|0,u||0,s]}function yg(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ia)}function xg(e,t,n){return yg(Hx,e,t,n)}function PT(e,t,n){return yg(CT,e,t,n)}function TT(e,t,n){return yg(ET,e,t,n)}function Vx(e){return(e%360+360)%360}function IT(e){let t=ST.exec(e),n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?sc(+t[5]):ia(+t[5]));let o=Vx(+t[2]),i=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=PT(o,i,s):t[1]==="hsv"?r=TT(o,i,s):r=xg(o,i,s),{r:r[0],g:r[1],b:r[2],a:n}}function _T(e,t){var n=vg(e);n[0]=Vx(n[0]+t),n=xg(n),e.r=n[0],e.g=n[1],e.b=n[2]}function BT(e){if(!e)return;let t=vg(e),n=t[0],r=n1(t[1]),o=n1(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${o}%, ${xi(e.a)})`:`hsl(${n}, ${r}%, ${o}%)`}function MT(){let e={},t=Object.keys(o1),n=Object.keys(r1),r,o,i,s,c;for(r=0;r<t.length;r++){for(s=c=t[r],o=0;o<n.length;o++)i=n[o],c=c.replace(i,r1[i]);i=parseInt(o1[s],16),e[c]=[i>>16&255,i>>8&255,i&255]}return e}function OT(e){md||(md=MT(),md.transparent=[0,0,0,0]);let t=md[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}function LT(e){let t=RT.exec(e),n=255,r,o,i;if(t){if(t[7]!==r){let s=+t[7];n=t[8]?sc(s):ta(s*255,0,255)}return r=+t[1],o=+t[3],i=+t[5],r=255&(t[2]?sc(r):ta(r,0,255)),o=255&(t[4]?sc(o):ta(o,0,255)),i=255&(t[6]?sc(i):ta(i,0,255)),{r,g:o,b:i,a:n}}}function jT(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${xi(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}function NT(e,t,n){let r=Hs(xi(e.r)),o=Hs(xi(e.g)),i=Hs(xi(e.b));return{r:ia(iA(r+n*(Hs(xi(t.r))-r))),g:ia(iA(o+n*(Hs(xi(t.g))-o))),b:ia(iA(i+n*(Hs(xi(t.b))-i))),a:e.a+n*(t.a-e.a)}}function bd(e,t,n){if(e){let r=vg(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=xg(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Wx(e,t){return e&&Object.assign(t||{},e)}function i1(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ia(e[3]))):(t=Wx(e,{r:0,g:0,b:0,a:1}),t.a=ia(t.a)),t}function zT(e){return e.charAt(0)==="r"?LT(e):IT(e)}function bi(){}function Nt(e){return e==null}function xn(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Et(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function to(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Uo(e,t){return to(e)?e:t}function Dt(e,t){return typeof e>"u"?t:e}function Wt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Tt(e,t,n,r){let o,i,s;if(xn(e))for(i=e.length,o=0;o<i;o++)t.call(n,e[o],o);else if(Et(e))for(s=Object.keys(e),i=s.length,o=0;o<i;o++)t.call(n,e[s[o]],s[o])}function Fd(e,t){let n,r,o,i;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(o=e[n],i=t[n],o.datasetIndex!==i.datasetIndex||o.index!==i.index)return!1;return!0}function Qd(e){if(xn(e))return e.map(Qd);if(Et(e)){let t=Object.create(null),n=Object.keys(e),r=n.length,o=0;for(;o<r;++o)t[n[o]]=Qd(e[n[o]]);return t}return e}function qx(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function UT(e,t,n,r){if(!qx(e))return;let o=t[e],i=n[e];Et(o)&&Et(i)?vc(o,i,r):t[e]=Qd(i)}function vc(e,t,n){let r=xn(t)?t:[t],o=r.length;if(!Et(e))return e;n=n||{};let i=n.merger||UT,s;for(let c=0;c<o;++c){if(s=r[c],!Et(s))continue;let u=Object.keys(s);for(let d=0,p=u.length;d<p;++d)i(u[d],e,s,n)}return e}function pc(e,t){return vc(e,t,{merger:HT})}function HT(e,t,n){if(!qx(e))return;let r=t[e],o=n[e];Et(r)&&Et(o)?pc(r,o):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Qd(o))}function VT(e){let t=e.split("."),n=[],r="";for(let o of t)r+=o,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function WT(e){let t=VT(e);return n=>{for(let r of t){if(r==="")break;n=n&&n[r]}return n}}function sa(e,t){return(a1[t]||(a1[t]=WT(t)))(e)}function wg(e){return e.charAt(0).toUpperCase()+e.slice(1)}function YT(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}function Bd(e,t,n){return Math.abs(e-t)<n}function c1(e){let t=Math.round(e);e=Bd(e,t,e/1e3)?t:e;let n=Math.pow(10,Math.floor(Kx(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function KT(e){let t=[],n=Math.sqrt(e),r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((o,i)=>o-i).pop(),t}function GT(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Hd(e){return!GT(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function XT(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function JT(e,t,n){let r,o,i;for(r=0,o=e.length;r<o;r++)i=e[r][n],isNaN(i)||(t.min=Math.min(t.min,i),t.max=Math.max(t.max,i))}function Yo(e){return e*(wn/180)}function ZT(e){return e*(180/wn)}function u1(e){if(!to(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function $T(e,t){let n=t.x-e.x,r=t.y-e.y,o=Math.sqrt(n*n+r*r),i=Math.atan2(r,n);return i<-.5*wn&&(i+=jr),{angle:i,distance:o}}function eI(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Wa(e){return(e%jr+jr)%jr}function TA(e,t,n,r){let o=Wa(e),i=Wa(t),s=Wa(n),c=Wa(i-o),u=Wa(s-o),d=Wa(o-i),p=Wa(o-s);return o===i||o===s||r&&i===s||c>u&&d<p}function yo(e,t,n){return Math.max(t,Math.min(n,e))}function tI(e){return yo(e,-32768,32767)}function Ws(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function kg(e,t,n){n=n||(s=>e[s]<t);let r=e.length-1,o=0,i;for(;r-o>1;)i=o+r>>1,n(i)?o=i:r=i;return{lo:o,hi:r}}function rI(e,t,n){let r=0,o=e.length;for(;r<o&&e[r]<t;)r++;for(;o>r&&e[o-1]>n;)o--;return r>0||o<e.length?e.slice(r,o):e}function oI(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Gx.forEach(n=>{let r="_onData"+wg(n),o=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...i){let s=o.apply(this,i);return e._chartjs.listeners.forEach(c=>{typeof c[r]=="function"&&c[r](...i)}),s}})})}function d1(e,t){let n=e._chartjs;if(!n)return;let r=n.listeners,o=r.indexOf(t);o!==-1&&r.splice(o,1),!(r.length>0)&&(Gx.forEach(i=>{delete e[i]}),delete e._chartjs)}function Xx(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}function Zx(e,t){let n=[],r=!1;return function(...o){n=o,r||(r=!0,Jx.call(window,()=>{r=!1,e.apply(t,n)}))}}function iI(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}function $x(e){if(e&&typeof e=="object"){let t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function h1(e){return $x(e)?e:new zd(e)}function aA(e){return $x(e)?e:new zd(e).saturate(.5).darken(.1).hexString()}function cI(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:lI},numbers:{type:"number",properties:sI}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function uI(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}function dI(e,t){t=t||{};let n=e+JSON.stringify(t),r=A1.get(n);return r||(r=new Intl.NumberFormat(e,t),A1.set(n,r)),r}function ff(e,t,n){return dI(t,n).format(e)}function pI(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}function hI(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ew.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}function Ac(e,t){if(!t)return e;let n=t.split(".");for(let r=0,o=n.length;r<o;++r){let i=n[r];e=e[i]||(e[i]=Object.create(null))}return e}function sA(e,t,n){return typeof t=="string"?vc(Ac(e,t),n):vc(Ac(e,""),t)}function AI(e){return!e||Nt(e.size)||Nt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function g1(e,t,n,r,o){let i=t[o];return i||(i=t[o]=e.measureText(o).width,n.push(o)),i>r&&(r=i),r}function Ya(e,t,n){let r=e.currentDevicePixelRatio,o=n!==0?Math.max(n/2,.5):0;return Math.round((t-o)*r)/r+o}function m1(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function b1(e,t,n,r){tw(e,t,n,r,null)}function tw(e,t,n,r,o){let i,s,c,u,d,p,h,g,b=t.pointStyle,y=t.rotation,x=t.radius,v=(y||0)*qT;if(b&&typeof b=="object"&&(i=b.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(v),e.drawImage(b,-b.width/2,-b.height/2,b.width,b.height),e.restore();return}if(!(isNaN(x)||x<=0)){switch(e.beginPath(),b){default:o?e.ellipse(n,r,o/2,x,0,0,jr):e.arc(n,r,x,0,jr),e.closePath();break;case"triangle":p=o?o/2:x,e.moveTo(n+Math.sin(v)*p,r-Math.cos(v)*x),v+=l1,e.lineTo(n+Math.sin(v)*p,r-Math.cos(v)*x),v+=l1,e.lineTo(n+Math.sin(v)*p,r-Math.cos(v)*x),e.closePath();break;case"rectRounded":d=x*.516,u=x-d,s=Math.cos(v+Va)*u,h=Math.cos(v+Va)*(o?o/2-d:u),c=Math.sin(v+Va)*u,g=Math.sin(v+Va)*(o?o/2-d:u),e.arc(n-h,r-c,d,v-wn,v-Nr),e.arc(n+g,r-s,d,v-Nr,v),e.arc(n+h,r+c,d,v,v+Nr),e.arc(n-g,r+s,d,v+Nr,v+wn),e.closePath();break;case"rect":if(!y){u=Math.SQRT1_2*x,p=o?o/2:u,e.rect(n-p,r-u,2*p,2*u);break}v+=Va;case"rectRot":h=Math.cos(v)*(o?o/2:x),s=Math.cos(v)*x,c=Math.sin(v)*x,g=Math.sin(v)*(o?o/2:x),e.moveTo(n-h,r-c),e.lineTo(n+g,r-s),e.lineTo(n+h,r+c),e.lineTo(n-g,r+s),e.closePath();break;case"crossRot":v+=Va;case"cross":h=Math.cos(v)*(o?o/2:x),s=Math.cos(v)*x,c=Math.sin(v)*x,g=Math.sin(v)*(o?o/2:x),e.moveTo(n-h,r-c),e.lineTo(n+h,r+c),e.moveTo(n+g,r-s),e.lineTo(n-g,r+s);break;case"star":h=Math.cos(v)*(o?o/2:x),s=Math.cos(v)*x,c=Math.sin(v)*x,g=Math.sin(v)*(o?o/2:x),e.moveTo(n-h,r-c),e.lineTo(n+h,r+c),e.moveTo(n+g,r-s),e.lineTo(n-g,r+s),v+=Va,h=Math.cos(v)*(o?o/2:x),s=Math.cos(v)*x,c=Math.sin(v)*x,g=Math.sin(v)*(o?o/2:x),e.moveTo(n-h,r-c),e.lineTo(n+h,r+c),e.moveTo(n+g,r-s),e.lineTo(n-g,r+s);break;case"line":s=o?o/2:Math.cos(v)*x,c=Math.sin(v)*x,e.moveTo(n-s,r-c),e.lineTo(n+s,r+c);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(v)*(o?o/2:x),r+Math.sin(v)*x);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function nw(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Eg(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Cg(e){e.restore()}function gI(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Nt(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function mI(e,t,n,r,o){if(o.strikethrough||o.underline){let i=e.measureText(r),s=t-i.actualBoundingBoxLeft,c=t+i.actualBoundingBoxRight,u=n-i.actualBoundingBoxAscent,d=n+i.actualBoundingBoxDescent,p=o.strikethrough?(u+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=o.decorationWidth||2,e.moveTo(s,p),e.lineTo(c,p),e.stroke()}}function bI(e,t){let n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function xc(e,t,n,r,o,i={}){let s=xn(t)?t:[t],c=i.strokeWidth>0&&i.strokeColor!=="",u,d;for(e.save(),e.font=o.string,gI(e,i),u=0;u<s.length;++u)d=s[u],i.backdrop&&bI(e,i.backdrop),c&&(i.strokeColor&&(e.strokeStyle=i.strokeColor),Nt(i.strokeWidth)||(e.lineWidth=i.strokeWidth),e.strokeText(d,n,r,i.maxWidth)),e.fillText(d,n,r,i.maxWidth),mI(e,n,r,d,i),r+=Number(o.lineHeight);e.restore()}function Vd(e,t){let{x:n,y:r,w:o,h:i,radius:s}=t;e.arc(n+s.topLeft,r+s.topLeft,s.topLeft,1.5*wn,wn,!0),e.lineTo(n,r+i-s.bottomLeft),e.arc(n+s.bottomLeft,r+i-s.bottomLeft,s.bottomLeft,wn,Nr,!0),e.lineTo(n+o-s.bottomRight,r+i),e.arc(n+o-s.bottomRight,r+i-s.bottomRight,s.bottomRight,Nr,0,!0),e.lineTo(n+o,r+s.topRight),e.arc(n+o-s.topRight,r+s.topRight,s.topRight,0,-Nr,!0),e.lineTo(n+s.topLeft,r)}function xI(e,t){let n=(""+e).match(vI);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}function rw(e,t){let n={},r=Et(t),o=r?Object.keys(t):t,i=Et(e)?r?s=>Dt(e[s],e[t[s]]):s=>e[s]:()=>e;for(let s of o)n[s]=wI(i(s));return n}function ow(e){return rw(e,{top:"y",right:"x",bottom:"y",left:"x"})}function qs(e){return rw(e,["topLeft","topRight","bottomLeft","bottomRight"])}function no(e){let t=ow(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function qn(e,t){e=e||{},t=t||$t.font;let n=Dt(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Dt(e.style,t.style);r&&!(""+r).match(yI)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);let o={family:Dt(e.family,t.family),lineHeight:xI(Dt(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Dt(e.weight,t.weight),string:""};return o.string=AI(o),o}function yd(e,t,n,r){let o,i,s;for(o=0,i=e.length;o<i;++o)if(s=e[o],s!==void 0&&s!==void 0)return s}function kI(e,t,n){let{min:r,max:o}=e,i=Yx(t,(o-r)/2),s=(c,u)=>n&&c===0?0:c+u;return{min:s(r,-Math.abs(i)),max:s(o,i)}}function rl(e,t){return Object.assign(Object.create(e),t)}function Dg(e,t=[""],n,r,o=()=>e[0]){let i=n||e;typeof r>"u"&&(r=lw("_fallback",e));let s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:r,_getTarget:o,override:c=>Dg([c,...e],t,i,r)};return new Proxy(s,{deleteProperty(c,u){return delete c[u],delete c._keys,delete e[0][u],!0},get(c,u){return aw(c,u,()=>_I(u,t,e,c))},getOwnPropertyDescriptor(c,u){return Reflect.getOwnPropertyDescriptor(c._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(c,u){return y1(c).includes(u)},ownKeys(c){return y1(c)},set(c,u,d){let p=c._storage||(c._storage=o());return c[u]=p[u]=d,delete c._keys,!0}})}function el(e,t,n,r){let o={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:iw(e,r),setContext:i=>el(e,i,n,r),override:i=>el(e.override(i),t,n,r)};return new Proxy(o,{deleteProperty(i,s){return delete i[s],delete e[s],!0},get(i,s,c){return aw(i,s,()=>EI(i,s,c))},getOwnPropertyDescriptor(i,s){return i._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(i,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(i,s,c){return e[s]=c,delete i[s],!0}})}function iw(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:o=t.allKeys}=e;return{allKeys:o,scriptable:n,indexable:r,isScriptable:la(n)?n:()=>n,isIndexable:la(r)?r:()=>r}}function aw(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];let r=n();return e[t]=r,r}function EI(e,t,n){let{_proxy:r,_context:o,_subProxy:i,_descriptors:s}=e,c=r[t];return la(c)&&s.isScriptable(t)&&(c=CI(t,c,e,n)),xn(c)&&c.length&&(c=DI(t,c,e,s.isIndexable)),Pg(t,c)&&(c=el(c,o,i&&i[t],s)),c}function CI(e,t,n,r){let{_proxy:o,_context:i,_subProxy:s,_stack:c}=n;if(c.has(e))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+e);c.add(e);let u=t(i,s||r);return c.delete(e),Pg(e,u)&&(u=Tg(o._scopes,o,e,u)),u}function DI(e,t,n,r){let{_proxy:o,_context:i,_subProxy:s,_descriptors:c}=n;if(typeof i.index<"u"&&r(e))return t[i.index%t.length];if(Et(t[0])){let u=t,d=o._scopes.filter(p=>p!==u);t=[];for(let p of u){let h=Tg(d,o,e,p);t.push(el(h,i,s&&s[e],c))}}return t}function sw(e,t,n){return la(e)?e(t,n):e}function TI(e,t,n,r,o){for(let i of t){let s=PI(n,i);if(s){e.add(s);let c=sw(s._fallback,n,o);if(typeof c<"u"&&c!==n&&c!==r)return c}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function Tg(e,t,n,r){let o=t._rootScopes,i=sw(t._fallback,n,r),s=[...e,...o],c=new Set;c.add(r);let u=v1(c,s,n,i||n,r);return u===null||typeof i<"u"&&i!==n&&(u=v1(c,s,i,u,r),u===null)?!1:Dg(Array.from(c),[""],o,i,()=>II(t,n,r))}function v1(e,t,n,r,o){for(;n;)n=TI(e,t,n,r,o);return n}function II(e,t,n){let r=e._getTarget();t in r||(r[t]={});let o=r[t];return xn(o)&&Et(n)?n:o||{}}function _I(e,t,n,r){let o;for(let i of t)if(o=lw(SI(i,e),n),typeof o<"u")return Pg(e,o)?Tg(n,r,e,o):o}function lw(e,t){for(let n of t){if(!n)continue;let r=n[e];if(typeof r<"u")return r}}function y1(e){let t=e._keys;return t||(t=e._keys=BI(e._scopes)),t}function BI(e){let t=new Set;for(let n of e)for(let r of Object.keys(n).filter(o=>!o.startsWith("_")))t.add(r);return Array.from(t)}function MI(e,t,n,r){let{iScale:o}=e,{key:i="r"}=this._parsing,s=new Array(r),c,u,d,p;for(c=0,u=r;c<u;++c)d=c+n,p=t[d],s[c]={r:o.parse(sa(p,i),d)};return s}function Ig(){return typeof window<"u"&&typeof document<"u"}function _g(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Wd(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}function OI(e,t){return pf(e).getPropertyValue(t)}function Za(e,t,n){let r={};n=n?"-"+n:"";for(let o=0;o<4;o++){let i=RI[o];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function jI(e,t){let n=e.touches,r=n&&n.length?n[0]:e,{offsetX:o,offsetY:i}=r,s=!1,c,u;if(LI(o,i,e.target))c=o,u=i;else{let d=t.getBoundingClientRect();c=r.clientX-d.left,u=r.clientY-d.top,s=!0}return{x:c,y:u,box:s}}function Ga(e,t){if("native"in e)return e;let{canvas:n,currentDevicePixelRatio:r}=t,o=pf(n),i=o.boxSizing==="border-box",s=Za(o,"padding"),c=Za(o,"border","width"),{x:u,y:d,box:p}=jI(e,n),h=s.left+(p&&c.left),g=s.top+(p&&c.top),{width:b,height:y}=t;return i&&(b-=s.width+c.width,y-=s.height+c.height),{x:Math.round((u-h)/b*n.width/r),y:Math.round((d-g)/y*n.height/r)}}function NI(e,t,n){let r,o;if(t===void 0||n===void 0){let i=e&&_g(e);if(!i)t=e.clientWidth,n=e.clientHeight;else{let s=i.getBoundingClientRect(),c=pf(i),u=Za(c,"border","width"),d=Za(c,"padding");t=s.width-d.width-u.width,n=s.height-d.height-u.height,r=Wd(c.maxWidth,i,"clientWidth"),o=Wd(c.maxHeight,i,"clientHeight")}}return{width:t,height:n,maxWidth:r||Ud,maxHeight:o||Ud}}function zI(e,t,n,r){let o=pf(e),i=Za(o,"margin"),s=Wd(o.maxWidth,e,"clientWidth")||Ud,c=Wd(o.maxHeight,e,"clientHeight")||Ud,u=NI(e,t,n),{width:d,height:p}=u;if(o.boxSizing==="content-box"){let h=Za(o,"border","width"),g=Za(o,"padding");d-=g.width+h.width,p-=g.height+h.height}return d=Math.max(0,d-i.width),p=Math.max(0,r?d/r:p-i.height),d=na(Math.min(d,s,u.maxWidth)),p=na(Math.min(p,c,u.maxHeight)),d&&!p&&(p=na(d/2)),(t!==void 0||n!==void 0)&&r&&u.height&&p>u.height&&(p=u.height,d=na(Math.floor(p*r))),{width:d,height:p}}function x1(e,t,n){let r=t||1,o=na(e.height*r),i=na(e.width*r);e.height=na(e.height),e.width=na(e.width);let s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==o||s.width!==i?(e.currentDevicePixelRatio=r,s.height=o,s.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}function w1(e,t){let n=OI(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Ks(e,t,n){return e?QI(t,n):UI()}function cw(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function uw(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function xd(e,t,n){return e.options.clip?e[n]:t[n]}function HI(e,t){let{xScale:n,yScale:r}=e;return n&&r?{left:xd(n,t,"left"),right:xd(n,t,"right"),top:xd(r,t,"top"),bottom:xd(r,t,"bottom")}:t}function VI(e,t){let n=t._clip;if(n.disabled)return!1;let r=HI(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}function YI(e,t){let n=[],r=Object.keys(t);for(let o=0;o<r.length;o++){let i=e[r[o]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function qI(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function S1(e,t){let n=e&&e.options||{},r=n.reverse,o=n.min===void 0?t:0,i=n.max===void 0?t:0;return{start:r?i:o,end:r?o:i}}function KI(e,t,n){if(n===!1)return!1;let r=S1(e,n),o=S1(t,n);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}function GI(e){let t,n,r,o;return Et(e)?(t=e.top,n=e.right,r=e.bottom,o=e.left):t=n=r=o=e,{top:t,right:n,bottom:r,left:o,disabled:e===!1}}function dw(e,t){let n=[],r=e._getSortedDatasetMetas(t),o,i;for(o=0,i=r.length;o<i;++o)n.push(r[o].index);return n}function E1(e,t,n,r={}){let o=e.keys,i=r.mode==="single",s,c,u,d;if(t===null)return;let p=!1;for(s=0,c=o.length;s<c;++s){if(u=+o[s],u===n){if(p=!0,r.all)continue;break}d=e.values[u],to(d)&&(i||t===0||aa(t)===aa(d))&&(t+=d)}return!p&&!r.all?0:t}function XI(e,t){let{iScale:n,vScale:r}=t,o=n.axis==="x"?"x":"y",i=r.axis==="x"?"x":"y",s=Object.keys(e),c=new Array(s.length),u,d,p;for(u=0,d=s.length;u<d;++u)p=s[u],c[u]={[o]:p,[i]:e[p]};return c}function lA(e,t){let n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function JI(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function ZI(e){let{min:t,max:n,minDefined:r,maxDefined:o}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}function $I(e,t,n){let r=e[t]||(e[t]={});return r[n]||(r[n]={})}function C1(e,t,n,r){for(let o of t.getMatchingVisibleMetas(r).reverse()){let i=e[o.index];if(n&&i>0||!n&&i<0)return o.index}return null}function D1(e,t){let{chart:n,_cachedMeta:r}=e,o=n._stacks||(n._stacks={}),{iScale:i,vScale:s,index:c}=r,u=i.axis,d=s.axis,p=JI(i,s,r),h=t.length,g;for(let b=0;b<h;++b){let y=t[b],{[u]:x,[d]:v}=y,D=y._stacks||(y._stacks={});g=D[d]=$I(o,p,x),g[c]=v,g._top=C1(g,s,!0,r.type),g._bottom=C1(g,s,!1,r.type);let M=g._visualValues||(g._visualValues={});M[c]=v}}function cA(e,t){let n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function e_(e,t){return rl(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function t_(e,t,n){return rl(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function nc(e,t){let n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(let o of t){let i=o._stacks;if(!i||i[r]===void 0||i[r][n]===void 0)return;delete i[r][n],i[r]._visualValues!==void 0&&i[r]._visualValues[n]!==void 0&&delete i[r]._visualValues[n]}}}function r_(e,t){if(!e._cache.$bar){let n=e.getMatchingVisibleMetas(t),r=[];for(let o=0,i=n.length;o<i;o++)r=r.concat(n[o].controller.getAllParsedValues(e));e._cache.$bar=Xx(r.sort((o,i)=>o-i))}return e._cache.$bar}function o_(e){let t=e.iScale,n=r_(t,e.type),r=t._length,o,i,s,c,u=()=>{s===32767||s===-32768||(yc(c)&&(r=Math.min(r,Math.abs(s-c)||r)),c=s)};for(o=0,i=n.length;o<i;++o)s=t.getPixelForValue(n[o]),u();for(c=void 0,o=0,i=t.ticks.length;o<i;++o)s=t.getPixelForTick(o),u();return r}function i_(e,t,n,r){let o=n.barThickness,i,s;return Nt(o)?(i=t.min*n.categoryPercentage,s=n.barPercentage):(i=o*r,s=1),{chunk:i/r,ratio:s,start:t.pixels[e]-i/2}}function a_(e,t,n,r){let o=t.pixels,i=o[e],s=e>0?o[e-1]:null,c=e<o.length-1?o[e+1]:null,u=n.categoryPercentage;s===null&&(s=i-(c===null?t.end-t.start:c-i)),c===null&&(c=i+i-s);let d=i-(i-Math.min(s,c))/2*u;return{chunk:Math.abs(c-s)/2*u/r,ratio:n.barPercentage,start:d}}function s_(e,t,n,r){let o=n.parse(e[0],r),i=n.parse(e[1],r),s=Math.min(o,i),c=Math.max(o,i),u=s,d=c;Math.abs(s)>Math.abs(c)&&(u=c,d=s),t[n.axis]=d,t._custom={barStart:u,barEnd:d,start:o,end:i,min:s,max:c}}function fw(e,t,n,r){return xn(e)?s_(e,t,n,r):t[n.axis]=n.parse(e,r),t}function T1(e,t,n,r){let o=e.iScale,i=e.vScale,s=o.getLabels(),c=o===i,u=[],d,p,h,g;for(d=n,p=n+r;d<p;++d)g=t[d],h={},h[o.axis]=c||o.parse(s[d],d),u.push(fw(g,h,i,d));return u}function dA(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function l_(e,t,n){return e!==0?aa(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function c_(e){let t,n,r,o,i;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(o="end",i="start"):(o="start",i="end"),{start:n,end:r,reverse:t,top:o,bottom:i}}function u_(e,t,n,r){let o=t.borderSkipped,i={};if(!o){e.borderSkipped=i;return}if(o===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:s,end:c,reverse:u,top:d,bottom:p}=c_(e);o==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?o=d:(n._bottom||0)===r?o=p:(i[I1(p,s,c,u)]=!0,o=d)),i[I1(o,s,c,u)]=!0,e.borderSkipped=i}function I1(e,t,n,r){return r?(e=d_(e,t,n),e=_1(e,n,t)):e=_1(e,t,n),e}function d_(e,t,n){return e===t?n:e===n?t:e}function _1(e,t,n){return e==="start"?t:e==="end"?n:e}function f_(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}function p_(e,t,n){let r=1,o=1,i=0,s=0;if(t<jr){let c=e,u=c+t,d=Math.cos(c),p=Math.sin(c),h=Math.cos(u),g=Math.sin(u),b=(T,C,z)=>TA(T,c,u,!0)?1:Math.max(C,C*n,z,z*n),y=(T,C,z)=>TA(T,c,u,!0)?-1:Math.min(C,C*n,z,z*n),x=b(0,d,h),v=b(Nr,p,g),D=y(wn,d,h),M=y(wn+Nr,p,g);r=(x-D)/2,o=(v-M)/2,i=-(x+D)/2,s=-(v+M)/2}return{ratioX:r,ratioY:o,offsetX:i,offsetY:s}}function qa(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}function A_(e,t,n,r){let{controller:o,data:i,_sorted:s}=e,c=o._cachedMeta.iScale,u=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(c&&t===c.axis&&t!=="r"&&s&&i.length){let d=c._reversePixels?nI:IA;if(r){if(o._sharedOptions){let p=i[0],h=typeof p.getRange=="function"&&p.getRange(t);if(h){let g=d(i,t,n-h),b=d(i,t,n+h);return{lo:g.lo,hi:b.hi}}}}else{let p=d(i,t,n);if(u){let{vScale:h}=o._cachedMeta,{_parsed:g}=e,b=g.slice(0,p.lo+1).reverse().findIndex(x=>!Nt(x[h.axis]));p.lo-=Math.max(0,b);let y=g.slice(p.hi).findIndex(x=>!Nt(x[h.axis]));p.hi+=Math.max(0,y)}return p}}return{lo:0,hi:i.length-1}}function hf(e,t,n,r,o){let i=e.getSortedVisibleDatasetMetas(),s=n[t];for(let c=0,u=i.length;c<u;++c){let{index:d,data:p}=i[c],{lo:h,hi:g}=A_(i[c],t,s,o);for(let b=h;b<=g;++b){let y=p[b];y.skip||r(y,d,b)}}}function g_(e){let t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,o){let i=t?Math.abs(r.x-o.x):0,s=n?Math.abs(r.y-o.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(s,2))}}function fA(e,t,n,r,o){let i=[];return!o&&!e.isPointInArea(t)||hf(e,n,t,function(s,c,u){!o&&!nw(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&i.push({element:s,datasetIndex:c,index:u})},!0),i}function m_(e,t,n,r){let o=[];function i(s,c,u){let{startAngle:d,endAngle:p}=s.getProps(["startAngle","endAngle"],r),{angle:h}=$T(s,{x:t.x,y:t.y});TA(h,d,p)&&o.push({element:s,datasetIndex:c,index:u})}return hf(e,n,t,i),o}function b_(e,t,n,r,o,i){let s=[],c=g_(n),u=Number.POSITIVE_INFINITY;function d(p,h,g){let b=p.inRange(t.x,t.y,o);if(r&&!b)return;let y=p.getCenterPoint(o);if(!(i||e.isPointInArea(y))&&!b)return;let x=c(t,y);x<u?(s=[{element:p,datasetIndex:h,index:g}],u=x):x===u&&s.push({element:p,datasetIndex:h,index:g})}return hf(e,n,t,d),s}function pA(e,t,n,r,o,i){return!i&&!e.isPointInArea(t)?[]:n==="r"&&!r?m_(e,t,n,o):b_(e,t,n,r,o,i)}function B1(e,t,n,r,o){let i=[],s=n==="x"?"inXRange":"inYRange",c=!1;return hf(e,n,t,(u,d,p)=>{u[s]&&u[s](t[n],o)&&(i.push({element:u,datasetIndex:d,index:p}),c=c||u.inRange(t.x,t.y,o))}),r&&!c?[]:i}function rc(e,t){return e.filter(n=>n.pos===t)}function M1(e,t){return e.filter(n=>pw.indexOf(n.pos)===-1&&n.box.axis===t)}function oc(e,t){return e.sort((n,r)=>{let o=t?r:n,i=t?n:r;return o.weight===i.weight?o.index-i.index:o.weight-i.weight})}function y_(e){let t=[],n,r,o,i,s,c;for(n=0,r=(e||[]).length;n<r;++n)o=e[n],{position:i,options:{stack:s,stackWeight:c=1}}=o,t.push({index:n,box:o,pos:i,horizontal:o.isHorizontal(),weight:o.weight,stack:s&&i+s,stackWeight:c});return t}function x_(e){let t={};for(let n of e){let{stack:r,pos:o,stackWeight:i}=n;if(!r||!pw.includes(o))continue;let s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=i}return t}function w_(e,t){let n=x_(e),{vBoxMaxWidth:r,hBoxMaxHeight:o}=t,i,s,c;for(i=0,s=e.length;i<s;++i){c=e[i];let{fullSize:u}=c.box,d=n[c.stack],p=d&&c.stackWeight/d.weight;c.horizontal?(c.width=p?p*r:u&&t.availableWidth,c.height=o):(c.width=r,c.height=p?p*o:u&&t.availableHeight)}return n}function k_(e){let t=y_(e),n=oc(t.filter(d=>d.box.fullSize),!0),r=oc(rc(t,"left"),!0),o=oc(rc(t,"right")),i=oc(rc(t,"top"),!0),s=oc(rc(t,"bottom")),c=M1(t,"x"),u=M1(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:o.concat(u).concat(s).concat(c),chartArea:rc(t,"chartArea"),vertical:r.concat(o).concat(u),horizontal:i.concat(s).concat(c)}}function O1(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function hw(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function S_(e,t,n,r){let{pos:o,box:i}=n,s=e.maxPadding;if(!Et(o)){n.size&&(e[o]-=n.size);let h=r[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?i.height:i.width),n.size=h.size/h.count,e[o]+=n.size}i.getPadding&&hw(s,i.getPadding());let c=Math.max(0,t.outerWidth-O1(s,e,"left","right")),u=Math.max(0,t.outerHeight-O1(s,e,"top","bottom")),d=c!==e.w,p=u!==e.h;return e.w=c,e.h=u,n.horizontal?{same:d,other:p}:{same:p,other:d}}function E_(e){let t=e.maxPadding;function n(r){let o=Math.max(t[r]-e[r],0);return e[r]+=o,o}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function C_(e,t){let n=t.maxPadding;function r(o){let i={left:0,top:0,right:0,bottom:0};return o.forEach(s=>{i[s]=Math.max(t[s],n[s])}),i}return r(e?["left","right"]:["top","bottom"])}function lc(e,t,n,r){let o=[],i,s,c,u,d,p;for(i=0,s=e.length,d=0;i<s;++i){c=e[i],u=c.box,u.update(c.width||t.w,c.height||t.h,C_(c.horizontal,t));let{same:h,other:g}=S_(t,n,c,r);d|=h&&o.length,p=p||g,u.fullSize||o.push(c)}return d&&lc(o,t,n,r)||p}function wd(e,t,n,r,o){e.top=n,e.left=t,e.right=t+r,e.bottom=n+o,e.width=r,e.height=o}function R1(e,t,n,r){let o=n.padding,{x:i,y:s}=t;for(let c of e){let u=c.box,d=r[c.stack]||{placed:0,weight:1},p=c.stackWeight/d.weight||1;if(c.horizontal){let h=t.w*p,g=d.size||u.height;yc(d.start)&&(s=d.start),u.fullSize?wd(u,o.left,s,n.outerWidth-o.right-o.left,g):wd(u,t.left+d.placed,s,h,g),d.start=s,d.placed+=h,s=u.bottom}else{let h=t.h*p,g=d.size||u.width;yc(d.start)&&(i=d.start),u.fullSize?wd(u,i,o.top,g,n.outerHeight-o.bottom-o.top):wd(u,i,t.top+d.placed,g,h),d.start=i,d.placed+=h,i=u.right}}t.x=i,t.y=s}function P_(e,t){let n=e.style,r=e.getAttribute("height"),o=e.getAttribute("width");if(e[Md]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",L1(o)){let i=w1(e,"width");i!==void 0&&(e.width=i)}if(L1(r))if(e.style.height==="")e.height=e.width/(t||2);else{let i=w1(e,"height");i!==void 0&&(e.height=i)}return e}function T_(e,t,n){e&&e.addEventListener(t,n,Aw)}function I_(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Aw)}function __(e,t){let n=D_[e.type]||e.type,{x:r,y:o}=Ga(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:o!==void 0?o:null}}function Kd(e,t){for(let n of e)if(n===t||n.contains(t))return!0}function B_(e,t,n){let r=e.canvas,o=new MutationObserver(i=>{let s=!1;for(let c of i)s=s||Kd(c.addedNodes,r),s=s&&!Kd(c.removedNodes,r);s&&n()});return o.observe(document,{childList:!0,subtree:!0}),o}function M_(e,t,n){let r=e.canvas,o=new MutationObserver(i=>{let s=!1;for(let c of i)s=s||Kd(c.removedNodes,r),s=s&&!Kd(c.addedNodes,r);s&&n()});return o.observe(document,{childList:!0,subtree:!0}),o}function gw(){let e=window.devicePixelRatio;e!==j1&&(j1=e,wc.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function O_(e,t){wc.size||window.addEventListener("resize",gw),wc.set(e,t)}function R_(e){wc.delete(e),wc.size||window.removeEventListener("resize",gw)}function L_(e,t,n){let r=e.canvas,o=r&&_g(r);if(!o)return;let i=Zx((c,u)=>{let d=o.clientWidth;n(c,u),d<o.clientWidth&&n()},window),s=new ResizeObserver(c=>{let u=c[0],d=u.contentRect.width,p=u.contentRect.height;d===0&&p===0||i(d,p)});return s.observe(o),O_(e,i),s}function hA(e,t,n){n&&n.disconnect(),t==="resize"&&R_(e)}function j_(e,t,n){let r=e.canvas,o=Zx(i=>{e.ctx!==null&&n(__(i,e))},e);return T_(r,t,o),o}function N_(e){return!Ig()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?zA:FA}function z_(e,t){let n=e.options.ticks,r=F_(e),o=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?U_(t):[],s=i.length,c=i[0],u=i[s-1],d=[];if(s>o)return H_(t,d,i,s/o),d;let p=Q_(i,t,o);if(s>0){let h,g,b=s>1?Math.round((u-c)/(s-1)):null;for(kd(t,d,p,Nt(b)?0:c-b,c),h=0,g=s-1;h<g;h++)kd(t,d,p,i[h],i[h+1]);return kd(t,d,p,u,Nt(b)?t.length:u+b),d}return kd(t,d,p),d}function F_(e){let t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),o=e._maxLength/n;return Math.floor(Math.min(r,o))}function Q_(e,t,n){let r=V_(e),o=t.length/n;if(!r)return Math.max(o,1);let i=KT(r);for(let s=0,c=i.length-1;s<c;s++){let u=i[s];if(u>o)return u}return Math.max(o,1)}function U_(e){let t=[],n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function H_(e,t,n,r){let o=0,i=n[0],s;for(r=Math.ceil(r),s=0;s<e.length;s++)s===i&&(t.push(e[s]),o++,i=n[o*r])}function kd(e,t,n,r,o){let i=Dt(r,0),s=Math.min(Dt(o,e.length),e.length),c=0,u,d,p;for(n=Math.ceil(n),o&&(u=o-r,n=u/Math.floor(u/n)),p=i;p<0;)c++,p=Math.round(i+c*n);for(d=Math.max(i,0);d<s;d++)d===p&&(t.push(e[d]),c++,p=Math.round(i+c*n))}function V_(e){let t=e.length,n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}function F1(e,t){let n=[],r=e.length/t,o=e.length,i=0;for(;i<o;i+=r)n.push(e[Math.floor(i)]);return n}function Y_(e,t,n){let r=e.ticks.length,o=Math.min(t,r-1),i=e._startPixel,s=e._endPixel,c=1e-6,u=e.getPixelForTick(o),d;if(!(n&&(r===1?d=Math.max(u-i,s-u):t===0?d=(e.getPixelForTick(1)-u)/2:d=(u-e.getPixelForTick(o-1))/2,u+=o<t?d:-d,u<i-c||u>s+c)))return u}function q_(e,t){Tt(e,n=>{let r=n.gc,o=r.length/2,i;if(o>t){for(i=0;i<o;++i)delete n.data[r[i]];r.splice(0,o)}})}function ic(e){return e.drawTicks?e.tickLength:0}function Q1(e,t){if(!e.display)return 0;let n=qn(e.font,t),r=no(e.padding);return(xn(e.text)?e.text.length:1)*n.lineHeight+r.height}function K_(e,t){return rl(e,{scale:t,type:"scale"})}function G_(e,t,n){return rl(e,{tick:n,index:t,type:"tick"})}function X_(e,t,n){let r=Sg(e);return(n&&t!=="right"||!n&&t==="right")&&(r=W_(r)),r}function J_(e,t,n,r){let{top:o,left:i,bottom:s,right:c,chart:u}=e,{chartArea:d,scales:p}=u,h=0,g,b,y,x=s-o,v=c-i;if(e.isHorizontal()){if(b=Yn(r,i,c),Et(n)){let D=Object.keys(n)[0],M=n[D];y=p[D].getPixelForValue(M)+x-t}else n==="center"?y=(d.bottom+d.top)/2+x-t:y=N1(e,n,t);g=c-i}else{if(Et(n)){let D=Object.keys(n)[0],M=n[D];b=p[D].getPixelForValue(M)-v+t}else n==="center"?b=(d.left+d.right)/2-v+t:b=N1(e,n,t);y=Yn(r,s,o),h=n==="left"?-Nr:Nr}return{titleX:b,titleY:y,maxWidth:g,rotation:h}}function Z_(e,t,n){let r=vc(Object.create(null),[n?$t.get(n):{},$t.get(t),e.defaults]);$t.set(t,r),e.defaultRoutes&&$_(t,e.defaultRoutes),e.descriptors&&$t.describe(t,e.descriptors)}function $_(e,t){Object.keys(t).forEach(n=>{let r=n.split("."),o=r.pop(),i=[e].concat(r).join("."),s=t[n].split("."),c=s.pop(),u=s.join(".");$t.route(i,o,u,c)})}function e5(e){return"id"in e&&"defaults"in e}function t5(e){let t={},n=[],r=Object.keys(Vo.plugins.items);for(let i=0;i<r.length;i++)n.push(Vo.getPlugin(r[i]));let o=e.plugins||[];for(let i=0;i<o.length;i++){let s=o[i];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function n5(e,t){return!t&&e===!1?null:e===!0?{}:e}function r5(e,{plugins:t,localIds:n},r,o){let i=[],s=e.getContext();for(let c of t){let u=c.id,d=n5(r[u],o);d!==null&&i.push({plugin:c,options:o5(e.config,{plugin:c,local:n[u]},d,s)})}return i}function o5(e,{plugin:t,local:n},r,o){let i=e.pluginScopeKeys(t),s=e.getOptionScopes(r,i);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function HA(e,t){let n=$t.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function i5(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function a5(e,t){return e===t?"_index_":"_value_"}function U1(e){if(e==="x"||e==="y"||e==="r")return e}function s5(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function VA(e,...t){if(U1(e))return e;for(let n of t){let r=n.axis||s5(n.position)||e.length>1&&U1(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function H1(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function l5(e,t){if(t.data&&t.data.datasets){let n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return H1(e,"x",n[0])||H1(e,"y",n[0])}return{}}function c5(e,t){let n=es[e.type]||{scales:{}},r=t.scales||{},o=HA(e.type,t),i=Object.create(null);return Object.keys(r).forEach(s=>{let c=r[s];if(!Et(c))return console.error(`Invalid scale configuration for scale: ${s}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);let u=VA(s,c,l5(s,e),$t.scales[c.type]),d=a5(u,o),p=n.scales||{};i[s]=pc(Object.create(null),[{axis:u},c,p[u],p[d]])}),e.data.datasets.forEach(s=>{let c=s.type||e.type,u=s.indexAxis||HA(c,t),d=(es[c]||{}).scales||{};Object.keys(d).forEach(p=>{let h=i5(p,u),g=s[h+"AxisID"]||h;i[g]=i[g]||Object.create(null),pc(i[g],[{axis:h},r[g],d[p]])})}),Object.keys(i).forEach(s=>{let c=i[s];pc(c,[$t.scales[c.type],$t.scale])}),i}function mw(e){let t=e.options||(e.options={});t.plugins=Dt(t.plugins,{}),t.scales=c5(e,t)}function bw(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function u5(e){return e=e||{},e.data=bw(e.data),mw(e),e}function Sd(e,t){let n=V1.get(e);return n||(n=t(),V1.set(e,n),vw.add(n)),n}function W1(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let o=n.join(),i=r.get(o);return i||(i={resolver:Dg(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(o,i)),i}function p5(e,t){let{isScriptable:n,isIndexable:r}=iw(e);for(let o of t){let i=n(o),s=r(o),c=(s||i)&&e[o];if(i&&(la(c)||f5(c))||s&&xn(c))return!0}return!1}function Y1(e,t){return e==="top"||e==="bottom"||A5.indexOf(e)===-1&&t==="x"}function q1(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function K1(e){let t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Wt(n&&n.onComplete,[e],t)}function g5(e){let t=e.chart,n=t.options.animation;Wt(n&&n.onProgress,[e],t)}function yw(e){return Ig()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}function m5(e,t,n){let r=Object.keys(e);for(let o of r){let i=+o;if(i>=t){let s=e[o];delete e[o],(n>0||i>t)&&(e[i+n]=s)}}}function b5(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function X1(){return Tt(Bg.instances,e=>e._plugins.invalidate())}function xw(e,t){let{x:n,y:r,base:o,width:i,height:s}=e.getProps(["x","y","base","width","height"],t),c,u,d,p,h;return e.horizontal?(h=s/2,c=Math.min(n,o),u=Math.max(n,o),d=r-h,p=r+h):(h=i/2,c=n-h,u=n+h,d=Math.min(r,o),p=Math.max(r,o)),{left:c,top:d,right:u,bottom:p}}function ra(e,t,n,r){return e?0:yo(t,n,r)}function v5(e,t,n){let r=e.options.borderWidth,o=e.borderSkipped,i=ow(r);return{t:ra(o.top,i.top,0,n),r:ra(o.right,i.right,0,t),b:ra(o.bottom,i.bottom,0,n),l:ra(o.left,i.left,0,t)}}function y5(e,t,n){let{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),o=e.options.borderRadius,i=qs(o),s=Math.min(t,n),c=e.borderSkipped,u=r||Et(o);return{topLeft:ra(!u||c.top||c.left,i.topLeft,0,s),topRight:ra(!u||c.top||c.right,i.topRight,0,s),bottomLeft:ra(!u||c.bottom||c.left,i.bottomLeft,0,s),bottomRight:ra(!u||c.bottom||c.right,i.bottomRight,0,s)}}function x5(e){let t=xw(e),n=t.right-t.left,r=t.bottom-t.top,o=v5(e,n/2,r/2),i=y5(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:i},inner:{x:t.left+o.l,y:t.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,i.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(o.b,o.r))}}}}function AA(e,t,n,r){let o=t===null,i=n===null,s=e&&!(o&&i)&&xw(e,r);return s&&(o||Ws(t,s.left,s.right))&&(i||Ws(n,s.top,s.bottom))}function w5(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function k5(e,t){e.rect(t.x,t.y,t.w,t.h)}function gA(e,t,n={}){let r=e.x!==n.x?-t:0,o=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,s=(e.y+e.h!==n.y+n.h?t:0)-o;return{x:e.x+r,y:e.y+o,w:e.w+i,h:e.h+s,radius:e.radius}}function ww(e){return YA[e%YA.length]}function kw(e){return J1[e%J1.length]}function S5(e,t){return e.borderColor=ww(t),e.backgroundColor=kw(t),++t}function E5(e,t){return e.backgroundColor=e.data.map(()=>ww(t++)),t}function C5(e,t){return e.backgroundColor=e.data.map(()=>kw(t++)),t}function D5(e){let t=0;return(n,r)=>{let o=e.getDatasetMeta(r).controller;o instanceof LA?t=E5(n,t):o instanceof jA?t=C5(n,t):o&&(t=S5(n,t))}}function Z1(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function P5(e){return e&&(e.borderColor||e.backgroundColor)}function T5(){return $t.borderColor!=="rgba(0,0,0,0.1)"||$t.backgroundColor!=="rgba(0,0,0,0.1)"}function B5(e,t,n,r,o){let i=M5(r,e,t,n),s=O5(o,r,t.lineHeight);return{itemWidth:i,itemHeight:s}}function M5(e,t,n,r){let o=e.text;return o&&typeof o!="string"&&(o=o.reduce((i,s)=>i.length>s.length?i:s)),t+n.size/2+r.measureText(o).width}function O5(e,t,n){let r=e;return typeof t.text!="string"&&(r=Sw(t,n)),r}function Sw(e,t){let n=e.text?e.text.length:0;return t*n}function R5(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}function j5(e,t){let n=new Xd({ctx:e.ctx,options:t,chart:e});Jr.configure(e,n,t),Jr.addBox(e,n),e.titleBlock=n}function Ho(e,t){return t&&(xn(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function yi(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
300
300
  `)>-1?e.split(`
301
- `):e}function z5(e,t){let{element:n,datasetIndex:r,index:o}=t,i=e.getDatasetMeta(r).controller,{label:s,value:c}=i.getLabelAndValue(o);return{chart:e,label:s,parsed:i.getParsed(o),raw:e.data.datasets[r].data[o],formattedValue:c,dataset:i.getDataset(),dataIndex:o,datasetIndex:r,element:n}}function ex(e,t){let n=e.chart.ctx,{body:r,footer:o,title:i}=e,{boxWidth:s,boxHeight:c}=t,u=qn(t.bodyFont),d=qn(t.titleFont),p=qn(t.footerFont),h=i.length,g=o.length,b=r.length,y=no(t.padding),x=y.height,v=0,D=r.reduce((C,z)=>C+z.before.length+z.lines.length+z.after.length,0);if(D+=e.beforeBody.length+e.afterBody.length,h&&(x+=h*d.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),D){let C=t.displayColors?Math.max(c,u.lineHeight):u.lineHeight;x+=b*C+(D-b)*u.lineHeight+(D-1)*t.bodySpacing}g&&(x+=t.footerMarginTop+g*p.lineHeight+(g-1)*t.footerSpacing);let M=0,T=function(C){v=Math.max(v,n.measureText(C).width+M)};return n.save(),n.font=d.string,Tt(e.title,T),n.font=u.string,Tt(e.beforeBody.concat(e.afterBody),T),M=t.displayColors?s+2+t.boxPadding:0,Tt(r,C=>{Tt(C.before,T),Tt(C.lines,T),Tt(C.after,T)}),M=0,n.font=p.string,Tt(e.footer,T),n.restore(),v+=y.width,{width:v,height:x}}function F5(e,t){let{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Q5(e,t,n,r){let{x:o,width:i}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&o+i+s>t.width||e==="right"&&o-i-s<0)return!0}function U5(e,t,n,r){let{x:o,width:i}=n,{width:s,chartArea:{left:c,right:u}}=e,d="center";return r==="center"?d=o<=(c+u)/2?"left":"right":o<=i/2?d="left":o>=s-i/2&&(d="right"),Q5(d,e,t,n)&&(d="center"),d}function tx(e,t,n){let r=n.yAlign||t.yAlign||F5(e,n);return{xAlign:n.xAlign||t.xAlign||U5(e,t,n,r),yAlign:r}}function H5(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function V5(e,t,n){let{y:r,height:o}=e;return t==="top"?r+=n:t==="bottom"?r-=o+n:r-=o/2,r}function nx(e,t,n,r){let{caretSize:o,caretPadding:i,cornerRadius:s}=e,{xAlign:c,yAlign:u}=n,d=o+i,{topLeft:p,topRight:h,bottomLeft:g,bottomRight:b}=qs(s),y=H5(t,c),x=V5(t,u,d);return u==="center"?c==="left"?y+=d:c==="right"&&(y-=d):c==="left"?y-=Math.max(p,g)+o:c==="right"&&(y+=Math.max(h,b)+o),{x:yo(y,0,r.width-t.width),y:yo(x,0,r.height-t.height)}}function Ed(e,t,n){let r=no(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function rx(e){return Ho([],yi(e))}function W5(e,t,n){return rl(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function ox(e,t){let n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}function mr(e,t,n,r){let o=e[t].call(n,r);return typeof o>"u"?Ew[t].call(n,r):o}function K5(e,t,n,r){let o=e.indexOf(t);if(o===-1)return q5(e,t,n,r);let i=e.lastIndexOf(t);return o!==i?n:o}function ix(e){let t=this.getLabels();return e>=0&&e<t.length?t[e]:e}function X5(e,t){let n=[],{bounds:r,step:o,min:i,max:s,precision:c,count:u,maxTicks:d,maxDigits:p,includeBounds:h}=e,g=o||1,b=d-1,{min:y,max:x}=t,v=!Nt(i),D=!Nt(s),M=!Nt(u),T=(x-y)/(p+1),C=c1((x-y)/b/g)*g,z,R,Q,V;if(C<1e-14&&!v&&!D)return[{value:y},{value:x}];V=Math.ceil(x/C)-Math.floor(y/C),V>b&&(C=c1(V*C/b/g)*g),Nt(c)||(z=Math.pow(10,c),C=Math.ceil(C*z)/z),r==="ticks"?(R=Math.floor(y/C)*C,Q=Math.ceil(x/C)*C):(R=y,Q=x),v&&D&&o&&XT((s-i)/o,C/1e3)?(V=Math.round(Math.min((s-i)/C,d)),C=(s-i)/V,R=i,Q=s):M?(R=v?i:R,Q=D?s:Q,V=u-1,C=(Q-R)/V):(V=(Q-R)/C,Bd(V,Math.round(V),C/1e3)?V=Math.round(V):V=Math.ceil(V));let J=Math.max(u1(C),u1(R));z=Math.pow(10,Nt(c)?J:c),R=Math.round(R*z)/z,Q=Math.round(Q*z)/z;let Y=0;for(v&&(h&&R!==i?(n.push({value:i}),R<i&&Y++,Bd(Math.round((R+Y*C)*z)/z,i,ax(i,T,e))&&Y++):R<i&&Y++);Y<V;++Y){let Z=Math.round((R+Y*C)*z)/z;if(D&&Z>s)break;n.push({value:Z})}return D&&h&&Q!==s?n.length&&Bd(n[n.length-1].value,s,ax(s,T,e))?n[n.length-1].value=s:n.push({value:s}):(!D||Q===s)&&n.push({value:Q}),n}function ax(e,t,{horizontal:n,minRotation:r}){let o=Yo(r),i=(n?Math.sin(o):Math.cos(o))||.001,s=.75*t*(""+e).length;return Math.min(t/i,s)}function sx(e,t){return e-t}function lx(e,t){if(Nt(t))return null;let n=e._adapter,{parser:r,round:o,isoWeekday:i}=e._parseOpts,s=t;return typeof r=="function"&&(s=r(s)),to(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(o&&(s=o==="week"&&(Hd(i)||i===!0)?n.startOf(s,"isoWeek",i):n.startOf(s,o)),+s)}function cx(e,t,n,r){let o=br.length;for(let i=br.indexOf(e);i<o-1;++i){let s=Af[br[i]],c=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(c*s.size))<=r)return br[i]}return br[o-1]}function J5(e,t,n,r,o){for(let i=br.length-1;i>=br.indexOf(n);i--){let s=br[i];if(Af[s].common&&e._adapter.diff(o,r,s)>=t-1)return s}return br[n?br.indexOf(n):0]}function Z5(e){for(let t=br.indexOf(e)+1,n=br.length;t<n;++t)if(Af[br[t]].common)return br[t]}function ux(e,t,n){if(!n)e[t]=!0;else if(n.length){let{lo:r,hi:o}=kg(n,t),i=n[r]>=t?n[r]:n[o];e[i]=!0}}function $5(e,t,n,r){let o=e._adapter,i=+o.startOf(t[0].value,r),s=t[t.length-1].value,c,u;for(c=i;c<=s;c=+o.add(c,1,r))u=n[c],u>=0&&(t[u].major=!0);return t}function dx(e,t,n){let r=[],o={},i=t.length,s,c;for(s=0;s<i;++s)c=t[s],o[c]=s,r.push({value:c,major:!1});return i===0||!n?r:$5(e,r,o,n)}function Cd(e,t,n){let r=0,o=e.length-1,i,s,c,u;n?(t>=e[r].pos&&t<=e[o].pos&&({lo:r,hi:o}=IA(e,"pos",t)),{pos:i,time:c}=e[r],{pos:s,time:u}=e[o]):(t>=e[r].time&&t<=e[o].time&&({lo:r,hi:o}=IA(e,"time",t)),{time:i,pos:c}=e[r],{time:s,pos:u}=e[o]);let d=s-i;return d?c+(u-c)*(t-i)/d:c}function e4({type:e="bar",data:t,options:n}){let r=P.useRef(null),o=P.useRef(null);return P.useLayoutEffect(()=>{o.current&&(r.current?(r.current.options=n,r.current.data=t,r.current.update()):r.current=new Bg(o.current,{type:e,data:t,options:n}))},[e,t,n]),E.jsx("div",{className:"chart",children:E.jsx("canvas",{ref:o})})}function t4({infoGroupId:e}){let[t,n]=P.useState("overview"),r=Ow(e).filter(d=>d.cider_type=="Compute"),o=Kn(r.length?r.map(d=>`https://rest-test.ccr.xdmod.org/rest/v0.1/custom_queries/wait_times/${d.info_resourceid}/`):null,{defaultValue:[]}),i=Kn(t!=="overview"?`https://rest-test.ccr.xdmod.org/rest/v0.1/custom_queries/wait_times/${t}/queue/job_walltime`:null);if(!o.length||!r.length)return;let s=o.map((d,p)=>d.error?d:{...d.data[0],...r[p]}).filter(d=>!d.error);if(!s.length)return;let c=[E.jsxs("select",{value:t,onChange:d=>n(d.target.value),children:[E.jsx("option",{value:"overview",children:"Overview"},"overview"),s.map(d=>E.jsx("option",{value:d.info_resourceid,children:Dd(d.resource_descriptive_name)},d.info_resourceid))]},"select")],u=null;if(t==="overview")u=E.jsx("div",{className:"cards",children:s.map(({info_resourceid:d,job_count:p,median_expansion_factor:h,median_wait_time:g,median_wall_time:b,resource_descriptive_name:y})=>E.jsxs("p",{className:"card metrics-overview",children:[E.jsxs("b",{children:[Dd(y),":"]})," Users ran"," ",E.jsxs("strong",{children:[E.jsx(kt,{name:"file-earmark-code"}),parseInt(p).toLocaleString("en-us")," jobs"]})," ","during the last 30 days. Waiting in the queue caused an average"," ",E.jsxs("strong",{children:[E.jsx(kt,{name:"calculator"}),((h-1)*100).toLocaleString("en-us",{maximumFractionDigits:0}),"% increase"]})," ","in the total completion time. The average job waited for"," ",E.jsxs("strong",{children:[E.jsx(kt,{name:"hourglass-split"})," ",hx(g)]})," ","and ran for"," ",E.jsxs("strong",{children:[E.jsx(kt,{name:"stopwatch"}),hx(b)]}),"."," ",E.jsx("a",{title:`Wait time chart for ${Dd(y)}`,href:"#",onClick:x=>{x.preventDefault(),n(d)},children:"View chart \xBB"})]},d))});else if(i&&i.info_resource_id===t){let d={},p=mA;for(let y of i.data)d[y.queue]=d[y.queue]||{label:y.queue,data:Array(mA.length).fill(null)},d[y.queue].data[mA.indexOf(y.job_walltime)]=y.median_wait_time/60;let h=Object.values(d);h.forEach((y,x)=>{let v=px[x%(px.length-1)];y.backgroundColor=getComputedStyle(document.body).getPropertyValue(v)});let g=s.find(y=>y.info_resourceid==i.info_resource_id),b={interaction:{intersect:!1,mode:"index"},plugins:{title:{display:!0,text:`Median Wait Time by Queue on ${Dd(g.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(e4,{type:"bar",data:{labels:p,datasets:h},options:b}),E.jsx("p",{children:E.jsx("a",{href:"#",onClick:y=>{y.preventDefault(),n("overview")},children:"\xAB Back to overview"})})]})}return E.jsxs(Ko,{title:"Wait Time",icon:"hourglass-split",headerComponents:c,children:[u,E.jsxs("p",{className:"metrics-disclaimer",children:[E.jsx(kt,{name:"info-circle"}),"These metrics describe activity from ACCESS projects. Many resources have additional projects that are not part of ACCESS."]})]})}function ki(e){return Array.isArray?Array.isArray(e):Pw(e)==="[object Array]"}function n4(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function r4(e){return e==null?"":n4(e)}function qo(e){return typeof e=="string"}function Cw(e){return typeof e=="number"}function o4(e){return e===!0||e===!1||i4(e)&&Pw(e)=="[object Boolean]"}function Dw(e){return typeof e=="object"}function i4(e){return Dw(e)&&e!==null}function Lr(e){return e!=null}function vA(e){return!e.trim().length}function Pw(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function Tw(e){let t=null,n=null,r=null,o=1,i=null;if(qo(e)||ki(e))r=e,t=gx(e),n=JA(e);else{if(!Ax.call(e,"name"))throw new Error(c4("name"));let s=e.name;if(r=s,Ax.call(e,"weight")&&(o=e.weight,o<=0))throw new Error(u4(s));t=gx(s),n=JA(s),i=e.getFn}return{path:t,id:n,weight:o,src:r,getFn:i}}function gx(e){return ki(e)?e:e.split(".")}function JA(e){return ki(e)?e.join("."):e}function d4(e,t){let n=[],r=!1,o=(i,s,c)=>{if(Lr(i))if(!s[c])n.push(i);else{let u=s[c],d=i[u];if(!Lr(d))return;if(c===s.length-1&&(qo(d)||Cw(d)||o4(d)))n.push(r4(d));else if(ki(d)){r=!0;for(let p=0,h=d.length;p<h;p+=1)o(d[p],s,c+1)}else s.length&&o(d,s,c+1)}};return o(e,qo(t)?t.split("."):t,0),r?n:n[0]}function m4(e=1,t=3){let n=new Map,r=Math.pow(10,t);return{get(o){let i=o.match(g4).length;if(n.has(i))return n.get(i);let s=1/Math.pow(i,.5*e),c=parseFloat(Math.round(s*r)/r);return n.set(i,c),c},clear(){n.clear()}}}function Iw(e,t,{getFn:n=rt.getFn,fieldNormWeight:r=rt.fieldNormWeight}={}){let o=new kc({getFn:n,fieldNormWeight:r});return o.setKeys(e.map(Tw)),o.setSources(t),o.create(),o}function b4(e,{getFn:t=rt.getFn,fieldNormWeight:n=rt.fieldNormWeight}={}){let{keys:r,records:o}=e,i=new kc({getFn:t,fieldNormWeight:n});return i.setKeys(r),i.setIndexRecords(o),i}function Pd(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:o=rt.distance,ignoreLocation:i=rt.ignoreLocation}={}){let s=t/e.length;if(i)return s;let c=Math.abs(r-n);return o?s+c/o:c?1:s}function v4(e=[],t=rt.minMatchCharLength){let n=[],r=-1,o=-1,i=0;for(let s=e.length;i<s;i+=1){let c=e[i];c&&r===-1?r=i:!c&&r!==-1&&(o=i-1,o-r+1>=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}function y4(e,t,n,{location:r=rt.location,distance:o=rt.distance,threshold:i=rt.threshold,findAllMatches:s=rt.findAllMatches,minMatchCharLength:c=rt.minMatchCharLength,includeMatches:u=rt.includeMatches,ignoreLocation:d=rt.ignoreLocation}={}){if(t.length>Xa)throw new Error(l4(Xa));let p=t.length,h=e.length,g=Math.max(0,Math.min(r,h)),b=i,y=g,x=c>1||u,v=x?Array(h):[],D;for(;(D=e.indexOf(t,y))>-1;){let Q=Pd(t,{currentLocation:D,expectedLocation:g,distance:o,ignoreLocation:d});if(b=Math.min(Q,b),y=D+p,x){let V=0;for(;V<p;)v[D+V]=1,V+=1}}y=-1;let M=[],T=1,C=p+h,z=1<<p-1;for(let Q=0;Q<p;Q+=1){let V=0,J=C;for(;V<J;)Pd(t,{errors:Q,currentLocation:g+J,expectedLocation:g,distance:o,ignoreLocation:d})<=b?V=J:C=J,J=Math.floor((C-V)/2+V);C=J;let Y=Math.max(1,g-J+1),Z=s?h:Math.min(g+J,h)+p,W=Array(Z+2);W[Z+1]=(1<<Q)-1;for(let $=Z;$>=Y;$-=1){let de=$-1,ne=n[e.charAt(de)];if(x&&(v[de]=+!!ne),W[$]=(W[$+1]<<1|1)&ne,Q&&(W[$]|=(M[$+1]|M[$])<<1|1|M[$+1]),W[$]&z&&(T=Pd(t,{errors:Q,currentLocation:de,expectedLocation:g,distance:o,ignoreLocation:d}),T<=b)){if(b=T,y=de,y<=g)break;Y=Math.max(1,2*g-y)}}if(Pd(t,{errors:Q+1,currentLocation:g,expectedLocation:g,distance:o,ignoreLocation:d})>b)break;M=W}let R={isMatch:y>=0,score:Math.max(.001,T)};if(x){let Q=v4(v,c);Q.length?u&&(R.indices=Q):R.isMatch=!1}return R}function x4(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let o=e.charAt(n);t[o]=(t[o]||0)|1<<r-n-1}return t}function mx(e,t){let n=e.match(t);return n?n[1]:null}function S4(e,t={}){return e.split(k4).map(n=>{let r=n.trim().split(w4).filter(i=>i&&!!i.trim()),o=[];for(let i=0,s=r.length;i<s;i+=1){let c=r[i],u=!1,d=-1;for(;!u&&++d<bx;){let p=og[d],h=p.isMultiMatch(c);h&&(o.push(new p(h,t)),u=!0)}if(!u)for(d=-1;++d<bx;){let p=og[d],h=p.isSingleMatch(c);if(h){o.push(new p(h,t));break}}}return o})}function C4(...e){ag.push(...e)}function sg(e,t){for(let n=0,r=ag.length;n<r;n+=1){let o=ag[n];if(o.condition(e,t))return new o(e,t)}return new ef(e,t)}function _w(e,t,{auto:n=!0}={}){let r=o=>{let i=Object.keys(o),s=D4(o);if(!s&&i.length>1&&!cg(o))return r(vx(o));if(P4(o)){let u=s?o[lg.PATH]:i[0],d=s?o[lg.PATTERN]:o[u];if(!qo(d))throw new Error(s4(u));let p={keyId:JA(u),pattern:d};return n&&(p.searcher=sg(d,t)),p}let c={children:[],operator:i[0]};return i.forEach(u=>{let d=o[u];ki(d)&&d.forEach(p=>{c.children.push(r(p))})}),c};return cg(e)||(e=vx(e)),r(e)}function T4(e,{ignoreFieldNorm:t=rt.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:o,norm:i,score:s})=>{let c=o?o.weight:null;r*=Math.pow(s===0&&c?Number.EPSILON:s,(c||1)*(t?1:i))}),n.score=r})}function I4(e,t){let n=e.matches;t.matches=[],Lr(n)&&n.forEach(r=>{if(!Lr(r.indices)||!r.indices.length)return;let{indices:o,value:i}=r,s={indices:o,value:i};r.key&&(s.key=r.key.src),r.idx>-1&&(s.refIndex=r.idx),t.matches.push(s)})}function _4(e,t){t.score=e.score}function B4(e,t,{includeMatches:n=rt.includeMatches,includeScore:r=rt.includeScore}={}){let o=[];return n&&o.push(I4),r&&o.push(_4),e.map(i=>{let{idx:s}=i,c={item:t[s],refIndex:s};return o.length&&o.forEach(u=>{u(i,c)}),c})}function M4({highlight:e,text:t}){if(!e||!e.length)return t;let n=new RegExp(e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"gi"),r=[...t.matchAll(n)];if(!r.length)return t;let o=[],i=0;for(let s of r)s.index>i&&o.push(t.substr(i,s.index)),o.push(E.jsx("span",{className:"highlight",children:s[0]})),i=s.index+s[0].length;return o.push(t.substr(i)),o}function O4({delay:e=300,placeholder:t,setSearchText:n,width:r="calc(var(--width) / 4)"}){let o=P.useRef(null),i=P.useRef(null),[s,c]=P.useState(""),u=()=>{c(""),n(""),o.current.value="",o.current.focus()};return P.useLayoutEffect(()=>{o.current&&o.current.addEventListener("keyup",()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,n(o.current.value),c(o.current.value)},e)})},[o.current]),E.jsx(E.Fragment,{children:E.jsxs("div",{className:"search",children:[E.jsx("input",{placeholder:t,style:{width:r},ref:o}),s.length?E.jsx("button",{className:"btn btn-clear",title:"Clear search",onClick:u,children:E.jsx(kt,{name:"x-lg"})}):null]})})}function L4({infoGroupId:e}){let t=Kn("https://sds-ara-api.access-ci.org/api/v1",{body:JSON.stringify({rps:[e],columns:R4}),headers:{"Content-Type":"application/json","X-API-Key":"asSuQQ0IfIEUrSRTl44aqn2ZpMPpJ_G02BgemAY4WN0"},method:"POST"}),[n,r]=P.useState(""),o=P.useMemo(()=>t?.data&&t.data.length?new ca(t.data,{keys:[{name:"software_name",weight:.6},{name:"software_description",weight:.4}]}):null,[t?.data]);if(!t?.data||!t.data.length)return;let i=d=>E.jsx(M4,{text:d,highlight:n}),s=[{key:"software_name",name:"Package",format:(d,p)=>{let h=i(d),g=p.software_web_page||p.software_documentation,b=p.software_use_link&&p.software_use_link.length?p.software_use_link[0]:"";return E.jsxs("span",{style:{lineHeight:1.3},children:[g?E.jsx("a",{href:g,children:h},"name"):h," ",p.software_documentation&&E.jsx("a",{href:p.software_documentation,title:`Documentation for ${d}`,children:E.jsx(kt,{name:"book"})},"documentation")," ",b&&b!=p.software_documentation&&E.jsx("a",{href:b,title:`Usage example for ${d}`,children:E.jsx(kt,{name:"terminal"})},"use")]})}},{key:"software_versions",name:"Versions",format:(d,p)=>p.rps[e].software_versions.join(", ")},{key:"software_description",name:"Description",format:(d,p)=>{let h=/Description Source:[ ]+(http[^ ]+)/,g=d.match(h);return E.jsxs(E.Fragment,{children:[i(d.replace(h,""))," ",g?E.jsx("a",{href:g[1],title:`Description source for ${p.software_name}`,children:E.jsx(kt,{name:"info-circle"})}):null]})}}],c=n.length?o.search(n).map(d=>d.item):t.data,u=[E.jsx(O4,{placeholder:"Search software packages...",setSearchText:r},"search")];return E.jsx(Ko,{title:"Software",icon:"terminal",headerComponents:u,children:E.jsx(sf,{columns:s,rows:c,scrollResetOnUpdate:!0})})}function j4({prompt:e="Jump To:"}){let[t,n]=P.useState([]),r=P.useRef(null),o=()=>{let s=[];for(let c of r.current.querySelectorAll("[data-section-title]"))s.push({icon:c.dataset.sectionIcon,id:c.id,title:c.dataset.sectionTitle});n(s)},i=s=>{let c=r.current.querySelector(`#${s}`);c&&c.scrollIntoView()};return P.useEffect(()=>{r.current&&(o(),document.addEventListener("accessci-update-sections",o))},[r.current]),E.jsx("div",{ref:s=>r.current=s?.parentElement,children:t.length>=2?E.jsxs("nav",{className:"section-navigation",children:[e?E.jsx("h2",{children:e}):null,E.jsx("ul",{children:t.map(({icon:s,id:c,title:u})=>E.jsx("li",{children:E.jsxs("a",{href:`#${c}`,onClick:d=>{d.preventDefault(),i(c)},children:[s?E.jsxs(E.Fragment,{children:[E.jsx(kt,{name:s})," "]}):null,u]})},c))})]}):null})}function N4({baseUri:e,showBreadcrumbs:t=!0}){let{infoGroupId:n}=Rw(),r=il(n),o=[{name:"Resources",href:e}];return r&&o.push({name:r.name}),E.jsxs(E.Fragment,{children:[t&&E.jsx(Pc,{expandWidth:!0,items:o,topBorder:!0}),E.jsxs("div",{className:"resource-group-detail",children:[E.jsx(FD,{infoGroupId:n}),E.jsx(j4,{}),E.jsx(D8,{infoGroupId:n}),E.jsx(y8,{infoGroupId:n}),E.jsx(S8,{infoGroupId:n}),E.jsx(zD,{infoGroupId:n}),E.jsx(L4,{infoGroupId:n}),E.jsx(mT,{infoGroupId:n}),E.jsx(t4,{infoGroupId:n}),E.jsx(HD,{infoGroupId:n})]})]})}var By,UD,vr,$r,eo,yr,ug,Sc,Gs,gc,VD,yx,tc,WD,My,xx,YD,qD,KD,GD,XD,JD,ZD,$D,eP,tP,wx,Ja,Rd,Xs,sP,uP,dP,hP,fd,gP,mP,bP,DP,TP,BP,OP,jP,Fy,qP,KP,GP,Ix,XP,_x,Bx,Ka,Mx,Wo,qy,c8,u8,d8,f8,vo,p8,h8,g8,m8,pd,rA,L8,z8,F8,hd,H8,Fx,J8,Z8,Qx,oA,t1,lT,bg,cT,uT,fT,pT,gT,ta,Xr,PA,bT,vT,gd,yT,wT,ST,r1,o1,md,RT,iA,Hs,zd,FT,QT,Yx,a1,yc,la,s1,wn,jr,Ud,qT,Nr,Va,l1,Kx,aa,IA,nI,Gx,Jx,Sg,Yn,aI,vd,f1,p1,hc,sI,lI,A1,fI,ew,es,_A,BA,$t,vI,yI,wI,SI,Pg,PI,pf,RI,LI,na,FI,QI,UI,MA,vi,k1,WI,OA,Yd,uA,P1,n_,tl,RA,LA,jA,NA,h_,v_,pw,Jr,qd,zA,Md,D_,L1,Aw,wc,j1,FA,ol,W_,N1,z1,nl,Ys,QA,Vo,UA,V1,vw,ac,d5,f5,h5,A5,Od,G1,Bg,WA,YA,J1,I5,$1,_5,Gd,L5,Xd,N5,cc,Ew,Jd,Y5,q5,G5,qA,KA,GA,Af,br,Zd,fx,px,mA,bA,hx,Dd,a4,s4,l4,c4,u4,Ax,XA,f4,p4,h4,A4,rt,g4,kc,Xa,$d,ef,Jo,ZA,$A,eg,tg,ng,rg,tf,nf,og,bx,w4,k4,E4,ig,ag,rf,lg,cg,D4,P4,vx,ca,R4,Mw=zl(()=>{Us();$h();By=()=>{let e=new Event("accessci-update-sections");document.dispatchEvent(e)};UD={text:QD};vr="top",$r="bottom",eo="right",yr="left",ug="auto",Sc=[vr,$r,eo,yr],Gs="start",gc="end",VD="clippingParents",yx="viewport",tc="popper",WD="reference",My=Sc.reduce(function(e,t){return e.concat([t+"-"+Gs,t+"-"+gc])},[]),xx=[].concat(Sc,[ug]).reduce(function(e,t){return e.concat([t,t+"-"+Gs,t+"-"+gc])},[]),YD="beforeRead",qD="read",KD="afterRead",GD="beforeMain",XD="main",JD="afterMain",ZD="beforeWrite",$D="write",eP="afterWrite",tP=[YD,qD,KD,GD,XD,JD,ZD,$D,eP];wx={name:"applyStyles",enabled:!0,phase:"write",fn:nP,effect:rP,requires:["computeStyles"]};Ja=Math.max,Rd=Math.min,Xs=Math.round;sP=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Cx(typeof e!="number"?e:Dx(e,Sc))};uP={name:"arrow",enabled:!0,phase:"main",fn:lP,effect:cP,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};dP={top:"auto",right:"auto",bottom:"auto",left:"auto"};hP={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:pP,data:{}},fd={passive:!0};gP={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:AP,data:{}},mP={left:"right",right:"left",bottom:"top",top:"bottom"};bP={start:"end",end:"start"};DP={name:"flip",enabled:!0,phase:"main",fn:CP,requiresIfExists:["offset"],data:{_skip:!1}};TP={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:PP};BP={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_P};OP={name:"popperOffsets",enabled:!0,phase:"read",fn:MP,data:{}};jP={name:"preventOverflow",enabled:!0,phase:"main",fn:LP,requiresIfExists:["offset"]};Fy={placement:"bottom",modifiers:[],strategy:"absolute"};qP=[gP,OP,hP,wx,BP,DP,jP,uP,TP],KP=YP({defaultModifiers:qP}),GP="tippy-box",Ix="tippy-content",XP="tippy-backdrop",_x="tippy-arrow",Bx="tippy-svg-arrow",Ka={passive:!0,capture:!0},Mx=function(){return document.body};Wo={isTouch:!1},qy=0;c8=typeof window<"u"&&typeof document<"u",u8=c8?!!window.msCrypto:!1,d8={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},f8={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},vo=Object.assign({appendTo:Mx,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},d8,f8),p8=Object.keys(vo),h8=function(e){var t=Object.keys(e);t.forEach(function(n){vo[n]=e[n]})};g8=function(){return"innerHTML"};jx.$$tippy=!0;m8=1,pd=[],rA=[];Cc.defaultProps=vo;Cc.setDefaultProps=h8;Cc.currentInput=Wo;Object.assign({},wx,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Cc.setDefaultProps({render:jx});L8={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perSwipe:"",touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(.165, .840, .440, 1)",waitForTransition:!0,throttle:10,direction:"ltr",peek:0,cloningRatio:1,breakpoints:{},classes:{swipeable:"glide--swipeable",dragging:"glide--dragging",direction:{ltr:"glide--ltr",rtl:"glide--rtl"},type:{slider:"glide--slider",carousel:"glide--carousel"},slide:{clone:"glide__slide--clone",active:"glide__slide--active"},arrow:{disabled:"glide__arrow--disabled"},nav:{active:"glide__bullet--active"}}};z8=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uf(this,e),this.events=t,this.hop=t.hasOwnProperty}return df(e,[{key:"on",value:function(t,n){if(CA(t)){for(var r=0;r<t.length;r++)this.on(t[r],n);return}this.hop.call(this.events,t)||(this.events[t]=[]);var o=this.events[t].push(n)-1;return{remove:function(){delete this.events[t][o]}}}},{key:"emit",value:function(t,n){if(CA(t)){for(var r=0;r<t.length;r++)this.emit(t[r],n);return}this.hop.call(this.events,t)&&this.events[t].forEach(function(o){o(n||{})})}}]),e})(),F8=(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};uf(this,e),this._c={},this._t=[],this._e=new z8,this.disabled=!1,this.selector=t,this.settings=$y(L8,n),this.index=this.settings.startAt}return df(e,[{key:"mount",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._e.emit("mount.before"),bc(t)?this._c=N8(this,t,this._e):oa("You need to provide a object on `mount()`"),this._e.emit("mount.after"),this}},{key:"mutate",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return CA(t)?this._t=t:oa("You need to provide a array on `mutate()`"),this}},{key:"update",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.settings=$y(this.settings,t),t.hasOwnProperty("startAt")&&(this.index=t.startAt),this._e.emit("update"),this}},{key:"go",value:function(t){return this._c.Run.make(t),this}},{key:"move",value:function(t){return this._c.Transition.disable(),this._c.Move.make(t),this}},{key:"destroy",value:function(){return this._e.emit("destroy"),this}},{key:"play",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return t&&(this.settings.autoplay=t),this._e.emit("play"),this}},{key:"pause",value:function(){return this._e.emit("pause"),this}},{key:"disable",value:function(){return this.disabled=!0,this}},{key:"enable",value:function(){return this.disabled=!1,this}},{key:"on",value:function(t,n){return this._e.on(t,n),this}},{key:"isType",value:function(t){return this.settings.type===t}},{key:"settings",get:function(){return this._o},set:function(t){bc(t)?this._o=t:oa("Options must be an `object` instance.")}},{key:"index",get:function(){return this._i},set:function(t){this._i=bo(t)}},{key:"type",get:function(){return this.settings.type}},{key:"disabled",get:function(){return this._d},set:function(t){this._d=!!t}}]),e})();hd={ltr:["marginLeft","marginRight"],rtl:["marginRight","marginLeft"]};H8='[data-glide-el="track"]';Fx=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uf(this,e),this.listeners=t}return df(e,[{key:"on",value:function(t,n,r){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;EA(t)&&(t=[t]);for(var i=0;i<t.length;i++)this.listeners[t[i]]=r,n.addEventListener(t[i],this.listeners[t[i]],o)}},{key:"off",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;EA(t)&&(t=[t]);for(var o=0;o<t.length;o++)n.removeEventListener(t[o],this.listeners[t[o]],r)}},{key:"destroy",value:function(){delete this.listeners}}]),e})();J8=["ltr","rtl"],Z8={">":"<","<":">","=":"="};Qx=!1;try{oA=Object.defineProperty({},"passive",{get:function(){Qx=!0}}),window.addEventListener("testPassive",null,oA),window.removeEventListener("testPassive",null,oA)}catch{}t1=Qx,lT='[data-glide-el="controls[nav]"]',bg='[data-glide-el^="controls"]',cT="".concat(bg,' [data-glide-dir*="<"]'),uT="".concat(bg,' [data-glide-dir*=">"]');fT={Html:V8,Translate:aT,Transition:sT,Direction:$8,Peek:W8,Sizes:q8,Gaps:U8,Move:Y8,Clones:G8,Resize:X8,Build:K8,Run:Q8},pT=(function(e){I8(n,e);var t=O8(n);function n(){return uf(this,n),t.apply(this,arguments)}return df(n,[{key:"mount",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return _d($s(n.prototype),"mount",this).call(this,Object.assign({},fT,r))}}]),n})(F8);Nd.Slide=Ux;Nd.ImageSlide=hT;gT="https://allocations.access-ci.org/current-projects.json";ta=(e,t,n)=>Math.max(Math.min(e,n),t);Xr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},PA=[..."0123456789ABCDEF"],bT=e=>PA[e&15],vT=e=>PA[(e&240)>>4]+PA[e&15],gd=e=>(e&240)>>4===(e&15),yT=e=>gd(e.r)&&gd(e.g)&&gd(e.b)&&gd(e.a);wT=(e,t)=>e<255?t(e):"";ST=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;r1={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},o1={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};RT=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;iA=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Hs=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);zd=class e{constructor(t){if(t instanceof e)return t;let n=typeof t,r;n==="object"?r=i1(t):n==="string"&&(r=xT(t)||OT(t)||zT(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=Wx(this._rgb);return t&&(t.a=xi(t.a)),t}set rgb(t){this._rgb=i1(t)}rgbString(){return this._valid?jT(this._rgb):void 0}hexString(){return this._valid?kT(this._rgb):void 0}hslString(){return this._valid?BT(this._rgb):void 0}mix(t,n){if(t){let r=this.rgb,o=t.rgb,i,s=n===i?.5:n,c=2*s-1,u=r.a-o.a,d=((c*u===-1?c:(c+u)/(1+c*u))+1)/2;i=1-d,r.r=255&d*r.r+i*o.r+.5,r.g=255&d*r.g+i*o.g+.5,r.b=255&d*r.b+i*o.b+.5,r.a=s*r.a+(1-s)*o.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=NT(this._rgb,t._rgb,n)),this}clone(){return new e(this.rgb)}alpha(t){return this._rgb.a=ia(t),this}clearer(t){let n=this._rgb;return n.a*=1-t,this}greyscale(){let t=this._rgb,n=Dc(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){let n=this._rgb;return n.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return bd(this._rgb,2,t),this}darken(t){return bd(this._rgb,2,-t),this}saturate(t){return bd(this._rgb,1,t),this}desaturate(t){return bd(this._rgb,1,-t),this}rotate(t){return _T(this._rgb,t),this}};FT=(()=>{let e=0;return()=>e++})();QT=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Yx=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;a1={"":e=>e,x:e=>e.x,y:e=>e.y};yc=e=>typeof e<"u",la=e=>typeof e=="function",s1=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};wn=Math.PI,jr=2*wn,Ud=Number.POSITIVE_INFINITY,qT=wn/180,Nr=wn/2,Va=wn/4,l1=wn*2/3,Kx=Math.log10,aa=Math.sign;IA=(e,t,n,r)=>kg(e,n,r?o=>{let i=e[o][t];return i<n||i===n&&e[o+1][t]===n}:o=>e[o][t]<n),nI=(e,t,n)=>kg(e,n,r=>e[r][t]>=n);Gx=["push","pop","shift","splice","unshift"];Jx=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();Sg=e=>e==="start"?"left":e==="end"?"right":"center",Yn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,aI=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t,vd=e=>e===0||e===1,f1=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*jr/n)),p1=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*jr/n)+1,hc={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Nr)+1,easeOutSine:e=>Math.sin(e*Nr),easeInOutSine:e=>-.5*(Math.cos(wn*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>vd(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>vd(e)?e:f1(e,.075,.3),easeOutElastic:e=>vd(e)?e:p1(e,.075,.3),easeInOutElastic(e){return vd(e)?e:e<.5?.5*f1(e*2,.1125,.45):.5+.5*p1(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-hc.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?hc.easeInBounce(e*2)*.5:hc.easeOutBounce(e*2-1)*.5+.5};sI=["x","y","borderWidth","radius","tension"],lI=["color","borderColor","backgroundColor"];A1=new Map;fI={values(e){return xn(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";let r=this.chart.options.locale,o,i=e;if(n.length>1){let d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(o="scientific"),i=pI(e,n)}let s=Kx(Math.abs(i)),c=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),u={notation:o,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(u,this.options.ticks.format),ff(e,r,u)}};ew={formatters:fI};es=Object.create(null),_A=Object.create(null);BA=class{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,o)=>aA(o.backgroundColor),this.hoverBorderColor=(r,o)=>aA(o.borderColor),this.hoverColor=(r,o)=>aA(o.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return sA(this,t,n)}get(t){return Ac(this,t)}describe(t,n){return sA(_A,t,n)}override(t,n){return sA(es,t,n)}route(t,n,r,o){let i=Ac(this,t),s=Ac(this,r),c="_"+n;Object.defineProperties(i,{[c]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){let u=this[c],d=s[o];return Et(u)?Object.assign({},d,u):Dt(u,d)},set(u){this[c]=u}}})}apply(t){t.forEach(n=>n(this))}},$t=new BA({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[cI,uI,hI]);vI=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,yI=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;wI=e=>+e||0;SI=(e,t)=>e?e+wg(t):t,Pg=(e,t)=>Et(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);PI=(e,t)=>e===!0?t:typeof e=="string"?sa(t,e):void 0;pf=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);RI=["top","right","bottom","left"];LI=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);na=e=>Math.round(e*10)/10;FI=(function(){let e=!1;try{let t={get passive(){return e=!0,!1}};Ig()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();QI=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},UI=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};MA=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,o){let i=n.listeners[o],s=n.duration;i.forEach(c=>c({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Jx.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,o)=>{if(!r.running||!r.items.length)return;let i=r.items,s=i.length-1,c=!1,u;for(;s>=0;--s)u=i[s],u._active?(u._total>r.duration&&(r.duration=u._total),u.tick(t),c=!0):(i[s]=i[i.length-1],i.pop());c&&(o.draw(),this._notify(o,r,t,"progress")),i.length||(r.running=!1,this._notify(o,r,t,"complete"),r.initial=!1),n+=i.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){let n=this._charts,r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){let n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,o)=>Math.max(r,o._duration),0),this._refresh())}running(t){if(!this._running)return!1;let n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){let n=this._charts.get(t);if(!n||!n.items.length)return;let r=n.items,o=r.length-1;for(;o>=0;--o)r[o].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},vi=new MA,k1="transparent",WI={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let r=h1(e||k1),o=r.valid&&h1(t||k1);return o&&o.valid?o.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}},OA=class{constructor(t,n,r,o){let i=n[r];o=yd([t.to,o,i,t.from]);let s=yd([t.from,i,o]);this._active=!0,this._fn=t.fn||WI[t.type||typeof s],this._easing=hc[t.easing]||hc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=o,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);let o=this._target[this._prop],i=r-this._start,s=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=yd([t.to,n,o,t.from]),this._from=yd([t.from,o,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let n=t-this._start,r=this._duration,o=this._prop,i=this._from,s=this._loop,c=this._to,u;if(this._active=i!==c&&(s||n<r),!this._active){this._target[o]=c,this._notify(!0);return}if(n<0){this._target[o]=i;return}u=n/r%2,u=s&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[o]=this._fn(i,c,u)}wait(){let t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){let n=t?"res":"rej",r=this._promises||[];for(let o=0;o<r.length;o++)r[o][n]()}},Yd=class{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Et(t))return;let n=Object.keys($t.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(o=>{let i=t[o];if(!Et(i))return;let s={};for(let c of n)s[c]=i[c];(xn(i.properties)&&i.properties||[o]).forEach(c=>{(c===o||!r.has(c))&&r.set(c,s)})})}_animateOptions(t,n){let r=n.options,o=qI(t,r);if(!o)return[];let i=this._createAnimations(o,r);return r.$shared&&YI(t.options.$animations,r).then(()=>{t.options=r},()=>{}),i}_createAnimations(t,n){let r=this._properties,o=[],i=t.$animations||(t.$animations={}),s=Object.keys(n),c=Date.now(),u;for(u=s.length-1;u>=0;--u){let d=s[u];if(d.charAt(0)==="$")continue;if(d==="options"){o.push(...this._animateOptions(t,n));continue}let p=n[d],h=i[d],g=r.get(d);if(h)if(g&&h.active()){h.update(g,p,c);continue}else h.cancel();if(!g||!g.duration){t[d]=p;continue}i[d]=h=new OA(g,t,d,p),o.push(h)}return o}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}let r=this._createAnimations(t,n);if(r.length)return vi.add(this._chart,r),!0}};uA=e=>e==="reset"||e==="none",P1=(e,t)=>t?e:Object.assign({},e),n_=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:dw(n,!0),values:null},tl=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=lA(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&nc(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,n=this._cachedMeta,r=this.getDataset(),o=(h,g,b,y)=>h==="x"?g:h==="r"?y:b,i=n.xAxisID=Dt(r.xAxisID,cA(t,"x")),s=n.yAxisID=Dt(r.yAxisID,cA(t,"y")),c=n.rAxisID=Dt(r.rAxisID,cA(t,"r")),u=n.indexAxis,d=n.iAxisID=o(u,i,s,c),p=n.vAxisID=o(u,s,i,c);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&d1(this._data,this),t._stacked&&nc(t)}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Et(n)){let o=this._cachedMeta;this._data=XI(n,o)}else if(r!==n){if(r){d1(r,this);let o=this._cachedMeta;nc(o),o._parsed=[]}n&&Object.isExtensible(n)&&oI(n,this),this._syncList=[],this._data=n}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let n=this._cachedMeta,r=this.getDataset(),o=!1;this._dataCheck();let i=n._stacked;n._stacked=lA(n.vScale,n),n.stack!==r.stack&&(o=!0,nc(n),n.stack=r.stack),this._resyncElements(t),(o||i!==n._stacked)&&(D1(this,n._parsed),n._stacked=lA(n.vScale,n))}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){let{_cachedMeta:r,_data:o}=this,{iScale:i,_stacked:s}=r,c=i.axis,u=t===0&&n===o.length?!0:r._sorted,d=t>0&&r._parsed[t-1],p,h,g;if(this._parsing===!1)r._parsed=o,r._sorted=!0,g=o;else{xn(o[t])?g=this.parseArrayData(r,o,t,n):Et(o[t])?g=this.parseObjectData(r,o,t,n):g=this.parsePrimitiveData(r,o,t,n);let b=()=>h[c]===null||d&&h[c]<d[c];for(p=0;p<n;++p)r._parsed[p+t]=h=g[p],u&&(b()&&(u=!1),d=h);r._sorted=u}s&&D1(this,g)}parsePrimitiveData(t,n,r,o){let{iScale:i,vScale:s}=t,c=i.axis,u=s.axis,d=i.getLabels(),p=i===s,h=new Array(o),g,b,y;for(g=0,b=o;g<b;++g)y=g+r,h[g]={[c]:p||i.parse(d[y],y),[u]:s.parse(n[y],y)};return h}parseArrayData(t,n,r,o){let{xScale:i,yScale:s}=t,c=new Array(o),u,d,p,h;for(u=0,d=o;u<d;++u)p=u+r,h=n[p],c[u]={x:i.parse(h[0],p),y:s.parse(h[1],p)};return c}parseObjectData(t,n,r,o){let{xScale:i,yScale:s}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,d=new Array(o),p,h,g,b;for(p=0,h=o;p<h;++p)g=p+r,b=n[g],d[p]={x:i.parse(sa(b,c),g),y:s.parse(sa(b,u),g)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){let o=this.chart,i=this._cachedMeta,s=n[t.axis],c={keys:dw(o,!0),values:n._stacks[t.axis]._visualValues};return E1(c,s,i.index,{mode:r})}updateRangeFromParsed(t,n,r,o){let i=r[n.axis],s=i===null?NaN:i,c=o&&r._stacks[n.axis];o&&c&&(o.values=c,s=E1(o,i,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){let r=this._cachedMeta,o=r._parsed,i=r._sorted&&t===r.iScale,s=o.length,c=this._getOtherScale(t),u=n_(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:h}=ZI(c),g,b;function y(){b=o[g];let x=b[c.axis];return!to(b[t.axis])||p>x||h<x}for(g=0;g<s&&!(!y()&&(this.updateRangeFromParsed(d,t,b,u),i));++g);if(i){for(g=s-1;g>=0;--g)if(!y()){this.updateRangeFromParsed(d,t,b,u);break}}return d}getAllParsedValues(t){let n=this._cachedMeta._parsed,r=[],o,i,s;for(o=0,i=n.length;o<i;++o)s=n[o][t.axis],to(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){let n=this._cachedMeta,r=n.iScale,o=n.vScale,i=this.getParsed(t);return{label:r?""+r.getLabelForValue(i[r.axis]):"",value:o?""+o.getLabelForValue(i[o.axis]):""}}_update(t){let n=this._cachedMeta;this.update(t||"default"),n._clip=GI(Dt(this.options.clip,KI(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,n=this.chart,r=this._cachedMeta,o=r.data||[],i=n.chartArea,s=[],c=this._drawStart||0,u=this._drawCount||o.length-c,d=this.options.drawActiveElementsOnTop,p;for(r.dataset&&r.dataset.draw(t,i,c,u),p=c;p<c+u;++p){let h=o[p];h.hidden||(h.active&&d?s.push(h):h.draw(t,i))}for(p=0;p<s.length;++p)s[p].draw(t,i)}getStyle(t,n){let r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){let o=this.getDataset(),i;if(t>=0&&t<this._cachedMeta.data.length){let s=this._cachedMeta.data[t];i=s.$context||(s.$context=t_(this.getContext(),t,s)),i.parsed=this.getParsed(t),i.raw=o.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=e_(this.chart.getContext(),this.index)),i.dataset=o,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=r,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){let o=n==="active",i=this._cachedDataOpts,s=t+"-"+n,c=i[s],u=this.enableOptionSharing&&yc(r);if(c)return P1(c,u);let d=this.chart.config,p=d.datasetElementScopeKeys(this._type,t),h=o?[`${t}Hover`,"hover",t,""]:[t,""],g=d.getOptionScopes(this.getDataset(),p),b=Object.keys($t.elements[t]),y=()=>this.getContext(r,o,n),x=d.resolveNamedOptions(g,b,y,h);return x.$shared&&(x.$shared=u,i[s]=Object.freeze(P1(x,u))),x}_resolveAnimations(t,n,r){let o=this.chart,i=this._cachedDataOpts,s=`animation-${n}`,c=i[s];if(c)return c;let u;if(o.options.animation!==!1){let p=this.chart.config,h=p.datasetAnimationScopeKeys(this._type,n),g=p.getOptionScopes(this.getDataset(),h);u=p.createResolver(g,this.getContext(t,r,n))}let d=new Yd(o,u&&u.animations);return u&&u._cacheable&&(i[s]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||uA(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){let r=this.resolveDataElementOptions(t,n),o=this._sharedOptions,i=this.getSharedOptions(r),s=this.includeOptions(n,i)||i!==o;return this.updateSharedOptions(i,n,r),{sharedOptions:i,includeOptions:s}}updateElement(t,n,r,o){uA(o)?Object.assign(t,r):this._resolveAnimations(n,o).update(t,r)}updateSharedOptions(t,n,r){t&&!uA(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,o){t.active=o;let i=this.getStyle(n,o);this._resolveAnimations(n,r,o).update(t,{options:!o&&this.getSharedOptions(i)||i})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let n=this._data,r=this._cachedMeta.data;for(let[c,u,d]of this._syncList)this[c](u,d);this._syncList=[];let o=r.length,i=n.length,s=Math.min(i,o);s&&this.parse(0,s),i>o?this._insertElements(o,i-o,t):i<o&&this._removeElements(i,o-i)}_insertElements(t,n,r=!0){let o=this._cachedMeta,i=o.data,s=t+n,c,u=d=>{for(d.length+=n,c=d.length-1;c>=s;c--)d[c]=d[c-n]};for(u(i),c=t;c<s;++c)i[c]=new this.dataElementType;this._parsing&&u(o._parsed),this.parse(t,n),r&&this.updateElements(i,t,n,"reset")}updateElements(t,n,r,o){}_removeElements(t,n){let r=this._cachedMeta;if(this._parsing){let o=r._parsed.splice(t,n);r._stacked&&nc(r,o)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[n,r,o]=t;this[n](r,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);let r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}};RA=class extends tl{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,o){return T1(t,n,r,o)}parseArrayData(t,n,r,o){return T1(t,n,r,o)}parseObjectData(t,n,r,o){let{iScale:i,vScale:s}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,d=i.axis==="x"?c:u,p=s.axis==="x"?c:u,h=[],g,b,y,x;for(g=r,b=r+o;g<b;++g)x=n[g],y={},y[i.axis]=i.parse(sa(x,d),g),h.push(fw(sa(x,p),y,s,g));return h}updateRangeFromParsed(t,n,r,o){super.updateRangeFromParsed(t,n,r,o);let i=r._custom;i&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let n=this._cachedMeta,{iScale:r,vScale:o}=n,i=this.getParsed(t),s=i._custom,c=dA(s)?"["+s.start+", "+s.end+"]":""+o.getLabelForValue(i[o.axis]);return{label:""+r.getLabelForValue(i[r.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,o){let i=o==="reset",{index:s,_cachedMeta:{vScale:c}}=this,u=c.getBasePixel(),d=c.isHorizontal(),p=this._getRuler(),{sharedOptions:h,includeOptions:g}=this._getSharedOptions(n,o);for(let b=n;b<n+r;b++){let y=this.getParsed(b),x=i||Nt(y[c.axis])?{base:u,head:u}:this._calculateBarValuePixels(b),v=this._calculateBarIndexPixels(b,p),D=(y._stacks||{})[c.axis],M={horizontal:d,base:x.base,enableBorderRadius:!D||dA(y._custom)||s===D._top||s===D._bottom,x:d?x.head:v.center,y:d?v.center:x.head,height:d?v.size:Math.abs(x.size),width:d?Math.abs(x.size):v.size};g&&(M.options=h||this.resolveDataElementOptions(b,t[b].active?"active":o));let T=M.options||t[b].options;u_(M,T,D,s),f_(M,T,p.ratio),this.updateElement(t[b],b,M,o)}}_getStacks(t,n){let{iScale:r}=this._cachedMeta,o=r.getMatchingVisibleMetas(this._type).filter(p=>p.controller.options.grouped),i=r.options.stacked,s=[],c=this._cachedMeta.controller.getParsed(n),u=c&&c[r.axis],d=p=>{let h=p._parsed.find(b=>b[r.axis]===u),g=h&&h[p.vScale.axis];if(Nt(g)||isNaN(g))return!0};for(let p of o)if(!(n!==void 0&&d(p))&&((i===!1||s.indexOf(p.stack)===-1||i===void 0&&p.stack===void 0)&&s.push(p.stack),p.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){let t={},n=this.getFirstScaleIdForIndexAxis();for(let r of this.chart.data.datasets)t[Dt(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){let o=this._getStacks(t,r),i=n!==void 0?o.indexOf(n):-1;return i===-1?o.length-1:i}_getRuler(){let t=this.options,n=this._cachedMeta,r=n.iScale,o=[],i,s;for(i=0,s=n.data.length;i<s;++i)o.push(r.getPixelForValue(this.getParsed(i)[r.axis],i));let c=t.barThickness;return{min:c||o_(n),pixels:o,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:c?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:n,_stacked:r,index:o},options:{base:i,minBarLength:s}}=this,c=i||0,u=this.getParsed(t),d=u._custom,p=dA(d),h=u[n.axis],g=0,b=r?this.applyStack(n,u,r):h,y,x;b!==h&&(g=b-h,b=h),p&&(h=d.barStart,b=d.barEnd-d.barStart,h!==0&&aa(h)!==aa(d.barEnd)&&(g=0),g+=h);let v=!Nt(i)&&!p?i:g,D=n.getPixelForValue(v);if(this.chart.getDataVisibility(t)?y=n.getPixelForValue(g+b):y=D,x=y-D,Math.abs(x)<s){x=l_(x,n,c)*s,h===c&&(D-=x/2);let M=n.getPixelForDecimal(0),T=n.getPixelForDecimal(1),C=Math.min(M,T),z=Math.max(M,T);D=Math.max(Math.min(D,z),C),y=D+x,r&&!p&&(u._stacks[n.axis]._visualValues[o]=n.getValueForPixel(y)-n.getValueForPixel(D))}if(D===n.getPixelForValue(c)){let M=aa(x)*n.getLineWidthForValue(c)/2;D+=M,x-=M}return{size:x,base:D,head:y,center:y+x/2}}_calculateBarIndexPixels(t,n){let r=n.scale,o=this.options,i=o.skipNull,s=Dt(o.maxBarThickness,1/0),c,u,d=this._getAxisCount();if(n.grouped){let p=i?this._getStackCount(t):n.stackCount,h=o.barThickness==="flex"?a_(t,n,o,p*d):i_(t,n,o,p*d),g=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,b=this._getAxis().indexOf(Dt(g,this.getFirstScaleIdForIndexAxis())),y=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0)+b;c=h.start+h.chunk*y+h.chunk/2,u=Math.min(s,h.chunk*h.ratio)}else c=r.getPixelForValue(this.getParsed(t)[r.axis],t),u=Math.min(s,n.min*n.ratio);return{base:c-u/2,head:c+u/2,center:c,size:u}}draw(){let t=this._cachedMeta,n=t.vScale,r=t.data,o=r.length,i=0;for(;i<o;++i)this.getParsed(i)[n.axis]!==null&&!r[i].hidden&&r[i].draw(this._ctx)}};LA=class extends tl{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data,{labels:{pointStyle:r,textAlign:o,color:i,useBorderRadius:s,borderRadius:c}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((u,d)=>{let p=t.getDatasetMeta(0).controller.getStyle(d);return{text:u,fillStyle:p.backgroundColor,fontColor:i,hidden:!t.getDataVisibility(d),lineDash:p.borderDash,lineDashOffset:p.borderDashOffset,lineJoin:p.borderJoinStyle,lineWidth:p.borderWidth,strokeStyle:p.borderColor,textAlign:o,pointStyle:r,borderRadius:s&&(c||p.borderRadius),index:d}}):[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){let r=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=r;else{let i=u=>+r[u];if(Et(r[t])){let{key:u="value"}=this._parsing;i=d=>+sa(r[d],u)}let s,c;for(s=t,c=t+n;s<c;++s)o._parsed[s]=i(s)}}_getRotation(){return Yo(this.options.rotation-90)}_getCircumference(){return Yo(this.options.circumference)}_getRotationExtents(){let t=jr,n=-jr;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){let o=this.chart.getDatasetMeta(r).controller,i=o._getRotation(),s=o._getCircumference();t=Math.min(t,i),n=Math.max(n,i+s)}return{rotation:t,circumference:n-t}}update(t){let n=this.chart,{chartArea:r}=n,o=this._cachedMeta,i=o.data,s=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,c=Math.max((Math.min(r.width,r.height)-s)/2,0),u=Math.min(QT(this.options.cutout,c),1),d=this._getRingWeight(this.index),{circumference:p,rotation:h}=this._getRotationExtents(),{ratioX:g,ratioY:b,offsetX:y,offsetY:x}=p_(h,p,u),v=(r.width-s)/g,D=(r.height-s)/b,M=Math.max(Math.min(v,D)/2,0),T=Yx(this.options.radius,M),C=Math.max(T*u,0),z=(T-C)/this._getVisibleDatasetWeightTotal();this.offsetX=y*T,this.offsetY=x*T,o.total=this.calculateTotal(),this.outerRadius=T-z*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-z*d,0),this.updateElements(i,0,i.length,t)}_circumference(t,n){let r=this.options,o=this._cachedMeta,i=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||o._parsed[t]===null||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*i/jr)}updateElements(t,n,r,o){let i=o==="reset",s=this.chart,c=s.chartArea,u=s.options.animation,d=(c.left+c.right)/2,p=(c.top+c.bottom)/2,h=i&&u.animateScale,g=h?0:this.innerRadius,b=h?0:this.outerRadius,{sharedOptions:y,includeOptions:x}=this._getSharedOptions(n,o),v=this._getRotation(),D;for(D=0;D<n;++D)v+=this._circumference(D,i);for(D=n;D<n+r;++D){let M=this._circumference(D,i),T=t[D],C={x:d+this.offsetX,y:p+this.offsetY,startAngle:v,endAngle:v+M,circumference:M,outerRadius:b,innerRadius:g};x&&(C.options=y||this.resolveDataElementOptions(D,T.active?"active":o)),v+=M,this.updateElement(T,D,C,o)}}calculateTotal(){let t=this._cachedMeta,n=t.data,r=0,o;for(o=0;o<n.length;o++){let i=t._parsed[o];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(o)&&!n[o].hidden&&(r+=Math.abs(i))}return r}calculateCircumference(t){let n=this._cachedMeta.total;return n>0&&!isNaN(t)?jr*(Math.abs(t)/n):0}getLabelAndValue(t){let n=this._cachedMeta,r=this.chart,o=r.data.labels||[],i=ff(n._parsed[t],r.options.locale);return{label:o[t]||"",value:i}}getMaxBorderWidth(t){let n=0,r=this.chart,o,i,s,c,u;if(!t){for(o=0,i=r.data.datasets.length;o<i;++o)if(r.isDatasetVisible(o)){s=r.getDatasetMeta(o),t=s.data,c=s.controller;break}}if(!t)return 0;for(o=0,i=t.length;o<i;++o)u=c.resolveDataElementOptions(o),u.borderAlign!=="inner"&&(n=Math.max(n,u.borderWidth||0,u.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,o=t.length;r<o;++r){let i=this.resolveDataElementOptions(r);n=Math.max(n,i.offset||0,i.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Dt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}},jA=class extends tl{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(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:r,color:o}}=t.legend.options;return n.labels.map((i,s)=>{let c=t.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,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(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let n=this._cachedMeta,r=this.chart,o=r.data.labels||[],i=ff(n._parsed[t].r,r.options.locale);return{label:o[t]||"",value:i}}parseObjectData(t,n,r,o){return MI.bind(this)(t,n,r,o)}update(t){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){let t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,o)=>{let i=this.getParsed(o).r;!isNaN(i)&&this.chart.getDataVisibility(o)&&(i<n.min&&(n.min=i),i>n.max&&(n.max=i))}),n}_updateRadius(){let t=this.chart,n=t.chartArea,r=t.options,o=Math.min(n.right-n.left,n.bottom-n.top),i=Math.max(o/2,0),s=Math.max(r.cutoutPercentage?i/100*r.cutoutPercentage:1,0),c=(i-s)/t.getVisibleDatasetCount();this.outerRadius=i-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(t,n,r,o){let i=o==="reset",s=this.chart,c=s.options.animation,u=this._cachedMeta.rScale,d=u.xCenter,p=u.yCenter,h=u.getIndexAngle(0)-.5*wn,g=h,b,y=360/this.countVisibleElements();for(b=0;b<n;++b)g+=this._computeAngle(b,o,y);for(b=n;b<n+r;b++){let x=t[b],v=g,D=g+this._computeAngle(b,o,y),M=s.getDataVisibility(b)?u.getDistanceFromCenterForValue(this.getParsed(b).r):0;g=D,i&&(c.animateScale&&(M=0),c.animateRotate&&(v=D=h));let T={x:d,y:p,innerRadius:0,outerRadius:M,startAngle:v,endAngle:D,options:this.resolveDataElementOptions(b,x.active?"active":o)};this.updateElement(x,b,T,o)}}countVisibleElements(){let t=this._cachedMeta,n=0;return t.data.forEach((r,o)=>{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Yo(this.resolveDataElementOptions(t,n).angle||r):0}};NA=class e{static override(t){Object.assign(e.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return qa()}parse(){return qa()}format(){return qa()}add(){return qa()}diff(){return qa()}startOf(){return qa()}endOf(){return qa()}},h_={_date:NA};v_={modes:{index(e,t,n,r){let o=Ga(t,e),i=n.axis||"x",s=n.includeInvisible||!1,c=n.intersect?fA(e,o,i,r,s):pA(e,o,i,!1,r,s),u=[];return c.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{let p=c[0].index,h=d.data[p];h&&!h.skip&&u.push({element:h,datasetIndex:d.index,index:p})}),u):[]},dataset(e,t,n,r){let o=Ga(t,e),i=n.axis||"xy",s=n.includeInvisible||!1,c=n.intersect?fA(e,o,i,r,s):pA(e,o,i,!1,r,s);if(c.length>0){let u=c[0].datasetIndex,d=e.getDatasetMeta(u).data;c=[];for(let p=0;p<d.length;++p)c.push({element:d[p],datasetIndex:u,index:p})}return c},point(e,t,n,r){let o=Ga(t,e),i=n.axis||"xy",s=n.includeInvisible||!1;return fA(e,o,i,r,s)},nearest(e,t,n,r){let o=Ga(t,e),i=n.axis||"xy",s=n.includeInvisible||!1;return pA(e,o,i,n.intersect,r,s)},x(e,t,n,r){let o=Ga(t,e);return B1(e,o,"x",n.intersect,r)},y(e,t,n,r){let o=Ga(t,e);return B1(e,o,"y",n.intersect,r)}}},pw=["left","top","right","bottom"];Jr={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){let n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;let o=no(e.options.layout.padding),i=Math.max(t-o.width,0),s=Math.max(n-o.height,0),c=k_(e.boxes),u=c.vertical,d=c.horizontal;Tt(e.boxes,x=>{typeof x.beforeLayout=="function"&&x.beforeLayout()});let p=u.reduce((x,v)=>v.box.options&&v.box.options.display===!1?x:x+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:o,availableWidth:i,availableHeight:s,vBoxMaxWidth:i/2/p,hBoxMaxHeight:s/2}),g=Object.assign({},o);hw(g,no(r));let b=Object.assign({maxPadding:g,w:i,h:s,x:o.left,y:o.top},o),y=w_(u.concat(d),h);lc(c.fullSize,b,h,y),lc(u,b,h,y),lc(d,b,h,y)&&lc(u,b,h,y),E_(b),R1(c.leftAndTop,b,h,y),b.x+=b.w,b.y+=b.h,R1(c.rightAndBottom,b,h,y),e.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},Tt(c.chartArea,x=>{let v=x.box;Object.assign(v,e.chartArea),v.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}},qd=class{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,o){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,o?Math.floor(n/o):r)}}isAttached(t){return!0}updateConfig(t){}},zA=class extends qd{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},Md="$chartjs",D_={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},L1=e=>e===null||e==="";Aw=FI?{passive:!0}:!1;wc=new Map,j1=0;FA=class extends qd{acquireContext(t,n){let r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(P_(t,n),r):null}releaseContext(t){let n=t.canvas;if(!n[Md])return!1;let r=n[Md].initial;["height","width"].forEach(i=>{let s=r[i];Nt(s)?n.removeAttribute(i):n.setAttribute(i,s)});let o=r.style||{};return Object.keys(o).forEach(i=>{n.style[i]=o[i]}),n.width=n.width,delete n[Md],!0}addEventListener(t,n,r){this.removeEventListener(t,n);let o=t.$proxies||(t.$proxies={}),i={attach:B_,detach:M_,resize:L_}[n]||j_;o[n]=i(t,n,r)}removeEventListener(t,n){let r=t.$proxies||(t.$proxies={}),o=r[n];o&&(({attach:hA,detach:hA,resize:hA}[n]||I_)(t,n,o),r[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,o){return zI(t,n,r,o)}isAttached(t){let n=t&&_g(t);return!!(n&&n.isConnected)}};ol=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return Hd(this.x)&&Hd(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(o=>{r[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),r}};W_=e=>e==="left"?"right":e==="right"?"left":e,N1=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,z1=(e,t)=>Math.min(t||e,e);nl=class e extends ol{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:o}=this;return t=Uo(t,Number.POSITIVE_INFINITY),n=Uo(n,Number.NEGATIVE_INFINITY),r=Uo(r,Number.POSITIVE_INFINITY),o=Uo(o,Number.NEGATIVE_INFINITY),{min:Uo(t,r),max:Uo(n,o),minDefined:to(t),maxDefined:to(n)}}getMinMax(t){let{min:n,max:r,minDefined:o,maxDefined:i}=this.getUserBounds(),s;if(o&&i)return{min:n,max:r};let c=this.getMatchingVisibleMetas();for(let u=0,d=c.length;u<d;++u)s=c[u].controller.getMinMax(this,t),o||(n=Math.min(n,s.min)),i||(r=Math.max(r,s.max));return n=i&&n>r?r:n,r=o&&n>r?n:r,{min:Uo(n,Uo(r,n)),max:Uo(r,Uo(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(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Wt(this.options.beforeUpdate,[this])}update(t,n,r){let{beginAtZero:o,grace:i,ticks:s}=this.options,c=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,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=kI(this,i,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let u=c<this.ticks.length;this._convertTicksToLabels(u?F1(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=z_(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Wt(this.options.afterUpdate,[this])}beforeSetDimensions(){Wt(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(){Wt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Wt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Wt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let n=this.options.ticks,r,o,i;for(r=0,o=t.length;r<o;r++)i=t[r],i.label=Wt(n.callback,[i.value,r,t],this)}afterTickToLabelConversion(){Wt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Wt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t=this.options,n=t.ticks,r=z1(this.ticks.length,t.ticks.maxTicksLimit),o=n.minRotation||0,i=n.maxRotation,s=o,c,u,d;if(!this._isVisible()||!n.display||o>=i||r<=1||!this.isHorizontal()){this.labelRotation=o;return}let p=this._getLabelSizes(),h=p.widest.width,g=p.highest.height,b=yo(this.chart.width-h,0,this.maxWidth);c=t.offset?this.maxWidth/r:b/(r-1),h+6>c&&(c=b/(r-(t.offset?.5:1)),u=this.maxHeight-ic(t.grid)-n.padding-Q1(t.title,this.chart.options.font),d=Math.sqrt(h*h+g*g),s=ZT(Math.min(Math.asin(yo((p.highest.height+6)/c,-1,1)),Math.asin(yo(u/d,-1,1))-Math.asin(yo(g/d,-1,1)))),s=Math.max(o,Math.min(i,s))),this.labelRotation=s}afterCalculateLabelRotation(){Wt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Wt(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:n,options:{ticks:r,title:o,grid:i}}=this,s=this._isVisible(),c=this.isHorizontal();if(s){let u=Q1(o,n.options.font);if(c?(t.width=this.maxWidth,t.height=ic(i)+u):(t.height=this.maxHeight,t.width=ic(i)+u),r.display&&this.ticks.length){let{first:d,last:p,widest:h,highest:g}=this._getLabelSizes(),b=r.padding*2,y=Yo(this.labelRotation),x=Math.cos(y),v=Math.sin(y);if(c){let D=r.mirror?0:v*h.width+x*g.height;t.height=Math.min(this.maxHeight,t.height+D+b)}else{let D=r.mirror?0:x*h.width+v*g.height;t.width=Math.min(this.maxWidth,t.width+D+b)}this._calculatePadding(d,p,v,x)}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,o){let{ticks:{align:i,padding:s},position:c}=this.options,u=this.labelRotation!==0,d=c!=="top"&&this.axis==="x";if(this.isHorizontal()){let p=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1),g=0,b=0;u?d?(g=o*t.width,b=r*n.height):(g=r*t.height,b=o*n.width):i==="start"?b=n.width:i==="end"?g=t.width:i!=="inner"&&(g=t.width/2,b=n.width/2),this.paddingLeft=Math.max((g-p+s)*this.width/(this.width-p),0),this.paddingRight=Math.max((b-h+s)*this.width/(this.width-h),0)}else{let p=n.height/2,h=t.height/2;i==="start"?(p=0,h=t.height):i==="end"&&(p=n.height,h=0),this.paddingTop=p+s,this.paddingBottom=h+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Wt(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Nt(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let n=this.options.ticks.sampleSize,r=this.ticks;n<r.length&&(r=F1(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){let{ctx:o,_longestTextCache:i}=this,s=[],c=[],u=Math.floor(n/z1(n,r)),d=0,p=0,h,g,b,y,x,v,D,M,T,C,z;for(h=0;h<n;h+=u){if(y=t[h].label,x=this._resolveTickFontOptions(h),o.font=v=x.string,D=i[v]=i[v]||{data:{},gc:[]},M=x.lineHeight,T=C=0,!Nt(y)&&!xn(y))T=g1(o,D.data,D.gc,T,y),C=M;else if(xn(y))for(g=0,b=y.length;g<b;++g)z=y[g],!Nt(z)&&!xn(z)&&(T=g1(o,D.data,D.gc,T,z),C+=M);s.push(T),c.push(C),d=Math.max(T,d),p=Math.max(C,p)}q_(i,n);let R=s.indexOf(d),Q=c.indexOf(p),V=J=>({width:s[J]||0,height:c[J]||0});return{first:V(0),last:V(n-1),widest:V(R),highest:V(Q),widths:s,heights:c}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let n=this._startPixel+t*this._length;return tI(this._alignToPixels?Ya(this.chart,n,0):n)}getDecimalForPixel(t){let n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){let n=this.ticks||[];if(t>=0&&t<n.length){let r=n[t];return r.$context||(r.$context=G_(this.getContext(),t,r))}return this.$context||(this.$context=K_(this.chart.getContext(),this))}_tickSize(){let t=this.options.ticks,n=Yo(this.labelRotation),r=Math.abs(Math.cos(n)),o=Math.abs(Math.sin(n)),i=this._getLabelSizes(),s=t.autoSkipPadding||0,c=i?i.widest.width+s:0,u=i?i.highest.height+s:0;return this.isHorizontal()?u*r>c*o?c/r:u/o:u*o<c*r?u/r:c/o}_isVisible(){let t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let n=this.axis,r=this.chart,o=this.options,{grid:i,position:s,border:c}=o,u=i.offset,d=this.isHorizontal(),p=this.ticks.length+(u?1:0),h=ic(i),g=[],b=c.setContext(this.getContext()),y=b.display?b.width:0,x=y/2,v=function(ne){return Ya(r,ne,y)},D,M,T,C,z,R,Q,V,J,Y,Z,W;if(s==="top")D=v(this.bottom),R=this.bottom-h,V=D-x,Y=v(t.top)+x,W=t.bottom;else if(s==="bottom")D=v(this.top),Y=t.top,W=v(t.bottom)-x,R=D+x,V=this.top+h;else if(s==="left")D=v(this.right),z=this.right-h,Q=D-x,J=v(t.left)+x,Z=t.right;else if(s==="right")D=v(this.left),J=t.left,Z=v(t.right)-x,z=D+x,Q=this.left+h;else if(n==="x"){if(s==="center")D=v((t.top+t.bottom)/2+.5);else if(Et(s)){let ne=Object.keys(s)[0],pe=s[ne];D=v(this.chart.scales[ne].getPixelForValue(pe))}Y=t.top,W=t.bottom,R=D+x,V=R+h}else if(n==="y"){if(s==="center")D=v((t.left+t.right)/2);else if(Et(s)){let ne=Object.keys(s)[0],pe=s[ne];D=v(this.chart.scales[ne].getPixelForValue(pe))}z=D-x,Q=z-h,J=t.left,Z=t.right}let $=Dt(o.ticks.maxTicksLimit,p),de=Math.max(1,Math.ceil(p/$));for(M=0;M<p;M+=de){let ne=this.getContext(M),pe=i.setContext(ne),oe=c.setContext(ne),K=pe.lineWidth,j=pe.color,ue=oe.dash||[],B=oe.dashOffset,X=pe.tickWidth,be=pe.tickColor,me=pe.tickBorderDash||[],xe=pe.tickBorderDashOffset;T=Y_(this,M,u),T!==void 0&&(C=Ya(r,T,K),d?z=Q=J=Z=C:R=V=Y=W=C,g.push({tx1:z,ty1:R,tx2:Q,ty2:V,x1:J,y1:Y,x2:Z,y2:W,width:K,color:j,borderDash:ue,borderDashOffset:B,tickWidth:X,tickColor:be,tickBorderDash:me,tickBorderDashOffset:xe}))}return this._ticksLength=p,this._borderValue=D,g}_computeLabelItems(t){let n=this.axis,r=this.options,{position:o,ticks:i}=r,s=this.isHorizontal(),c=this.ticks,{align:u,crossAlign:d,padding:p,mirror:h}=i,g=ic(r.grid),b=g+p,y=h?-p:b,x=-Yo(this.labelRotation),v=[],D,M,T,C,z,R,Q,V,J,Y,Z,W,$="middle";if(o==="top")R=this.bottom-y,Q=this._getXAxisLabelAlignment();else if(o==="bottom")R=this.top+y,Q=this._getXAxisLabelAlignment();else if(o==="left"){let ne=this._getYAxisLabelAlignment(g);Q=ne.textAlign,z=ne.x}else if(o==="right"){let ne=this._getYAxisLabelAlignment(g);Q=ne.textAlign,z=ne.x}else if(n==="x"){if(o==="center")R=(t.top+t.bottom)/2+b;else if(Et(o)){let ne=Object.keys(o)[0],pe=o[ne];R=this.chart.scales[ne].getPixelForValue(pe)+b}Q=this._getXAxisLabelAlignment()}else if(n==="y"){if(o==="center")z=(t.left+t.right)/2-b;else if(Et(o)){let ne=Object.keys(o)[0],pe=o[ne];z=this.chart.scales[ne].getPixelForValue(pe)}Q=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(u==="start"?$="top":u==="end"&&($="bottom"));let de=this._getLabelSizes();for(D=0,M=c.length;D<M;++D){T=c[D],C=T.label;let ne=i.setContext(this.getContext(D));V=this.getPixelForTick(D)+i.labelOffset,J=this._resolveTickFontOptions(D),Y=J.lineHeight,Z=xn(C)?C.length:1;let pe=Z/2,oe=ne.color,K=ne.textStrokeColor,j=ne.textStrokeWidth,ue=Q;s?(z=V,Q==="inner"&&(D===M-1?ue=this.options.reverse?"left":"right":D===0?ue=this.options.reverse?"right":"left":ue="center"),o==="top"?d==="near"||x!==0?W=-Z*Y+Y/2:d==="center"?W=-de.highest.height/2-pe*Y+Y:W=-de.highest.height+Y/2:d==="near"||x!==0?W=Y/2:d==="center"?W=de.highest.height/2-pe*Y:W=de.highest.height-Z*Y,h&&(W*=-1),x!==0&&!ne.showLabelBackdrop&&(z+=Y/2*Math.sin(x))):(R=V,W=(1-Z)*Y/2);let B;if(ne.showLabelBackdrop){let X=no(ne.backdropPadding),be=de.heights[D],me=de.widths[D],xe=W-X.top,_e=0-X.left;switch($){case"middle":xe-=be/2;break;case"bottom":xe-=be;break}switch(Q){case"center":_e-=me/2;break;case"right":_e-=me;break;case"inner":D===M-1?_e-=me:D>0&&(_e-=me/2);break}B={left:_e,top:xe,width:me+X.width,height:be+X.height,color:ne.backdropColor}}v.push({label:C,font:J,textOffset:W,options:{rotation:x,color:oe,strokeColor:K,strokeWidth:j,textAlign:ue,textBaseline:$,translation:[z,R],backdrop:B}})}return v}_getXAxisLabelAlignment(){let{position:t,ticks:n}=this.options;if(-Yo(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){let{position:n,ticks:{crossAlign:r,mirror:o,padding:i}}=this.options,s=this._getLabelSizes(),c=t+i,u=s.widest.width,d,p;return n==="left"?o?(p=this.right+i,r==="near"?d="left":r==="center"?(d="center",p+=u/2):(d="right",p+=u)):(p=this.right-c,r==="near"?d="right":r==="center"?(d="center",p-=u/2):(d="left",p=this.left)):n==="right"?o?(p=this.left+i,r==="near"?d="right":r==="center"?(d="center",p-=u/2):(d="left",p-=u)):(p=this.left+c,r==="near"?d="left":r==="center"?(d="center",p+=u/2):(d="right",p=this.right)):d="right",{textAlign:d,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:n},left:r,top:o,width:i,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,o,i,s),t.restore())}getLineWidthForValue(t){let n=this.options.grid;if(!this._isVisible()||!n.display)return 0;let r=this.ticks.findIndex(o=>o.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){let n=this.options.grid,r=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),i,s,c=(u,d,p)=>{!p.width||!p.color||(r.save(),r.lineWidth=p.width,r.strokeStyle=p.color,r.setLineDash(p.borderDash||[]),r.lineDashOffset=p.borderDashOffset,r.beginPath(),r.moveTo(u.x,u.y),r.lineTo(d.x,d.y),r.stroke(),r.restore())};if(n.display)for(i=0,s=o.length;i<s;++i){let u=o[i];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(){let{chart:t,ctx:n,options:{border:r,grid:o}}=this,i=r.setContext(this.getContext()),s=r.display?i.width:0;if(!s)return;let c=o.setContext(this.getContext(0)).lineWidth,u=this._borderValue,d,p,h,g;this.isHorizontal()?(d=Ya(t,this.left,s)-s/2,p=Ya(t,this.right,c)+c/2,h=g=u):(h=Ya(t,this.top,s)-s/2,g=Ya(t,this.bottom,c)+c/2,d=p=u),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(d,h),n.lineTo(p,g),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;let n=this.ctx,r=this._computeLabelArea();r&&Eg(n,r);let o=this.getLabelItems(t);for(let i of o){let s=i.options,c=i.font,u=i.label,d=i.textOffset;xc(n,u,0,d,c,s)}r&&Cg(n)}drawTitle(){let{ctx:t,options:{position:n,title:r,reverse:o}}=this;if(!r.display)return;let i=qn(r.font),s=no(r.padding),c=r.align,u=i.lineHeight/2;n==="bottom"||n==="center"||Et(n)?(u+=s.bottom,xn(r.text)&&(u+=i.lineHeight*(r.text.length-1))):u+=s.top;let{titleX:d,titleY:p,maxWidth:h,rotation:g}=J_(this,u,n,c);xc(t,r.text,0,0,i,{color:r.color,maxWidth:h,rotation:g,textAlign:X_(c,n,o),textBaseline:"middle",translation:[d,p]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){let t=this.options,n=t.ticks&&t.ticks.z||0,r=Dt(t.grid&&t.grid.z,-1),o=Dt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==e.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){let n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",o=[],i,s;for(i=0,s=n.length;i<s;++i){let c=n[i];c[r]===this.id&&(!t||c.type===t)&&o.push(c)}return o}_resolveTickFontOptions(t){let n=this.options.ticks.setContext(this.getContext(t));return qn(n.font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}},Ys=class{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){let n=Object.getPrototypeOf(t),r;e5(n)&&(r=this.register(n));let o=this.items,i=t.id,s=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+t);return i in o||(o[i]=t,Z_(t,s,r),this.override&&$t.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){let n=this.items,r=t.id,o=this.scope;r in n&&delete n[r],o&&r in $t[o]&&(delete $t[o][r],this.override&&delete es[r])}};QA=class{constructor(){this.controllers=new Ys(tl,"datasets",!0),this.elements=new Ys(ol,"elements"),this.plugins=new Ys(Object,"plugins"),this.scales=new Ys(nl,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(o=>{let i=r||this._getRegistryForType(o);r||i.isForType(o)||i===this.plugins&&o.id?this._exec(t,i,o):Tt(o,s=>{let c=r||this._getRegistryForType(s);this._exec(t,c,s)})})}_exec(t,n,r){let o=wg(t);Wt(r["before"+o],[],r),n[t](r),Wt(r["after"+o],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){let r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){let o=n.get(t);if(o===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return o}},Vo=new QA,UA=class{constructor(){this._init=void 0}notify(t,n,r,o){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;let i=o?this._descriptors(t).filter(o):this._descriptors(t),s=this._notify(i,t,n,r);return n==="afterDestroy"&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),s}_notify(t,n,r,o){o=o||{};for(let i of t){let s=i.plugin,c=s[r],u=[n,o,i.options];if(Wt(c,u,s)===!1&&o.cancelable)return!1}return!0}invalidate(){Nt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){let r=t&&t.config,o=Dt(r.options&&r.options.plugins,{}),i=t5(r);return o===!1&&!n?[]:r5(t,i,o,n)}_notifyStateChanges(t){let n=this._oldCache||[],r=this._cache,o=(i,s)=>i.filter(c=>!s.some(u=>c.plugin.id===u.plugin.id));this._notify(o(n,r),t,"stop"),this._notify(o(r,n),t,"start")}};V1=new Map,vw=new Set;ac=(e,t,n)=>{let r=sa(t,n);r!==void 0&&e.add(r)},d5=class{constructor(e){this._config=u5(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=bw(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),mw(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Sd(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Sd(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Sd(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){let t=e.id,n=this.type;return Sd(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){let{options:r,type:o}=this,i=this._cachedScopes(e,n),s=i.get(t);if(s)return s;let c=new Set;t.forEach(d=>{e&&(c.add(e),d.forEach(p=>ac(c,e,p))),d.forEach(p=>ac(c,r,p)),d.forEach(p=>ac(c,es[o]||{},p)),d.forEach(p=>ac(c,$t,p)),d.forEach(p=>ac(c,_A,p))});let u=Array.from(c);return u.length===0&&u.push(Object.create(null)),vw.has(t)&&i.set(t,u),u}chartOptionScopes(){let{options:e,type:t}=this;return[e,es[t]||{},$t.datasets[t]||{},{type:t},$t,_A]}resolveNamedOptions(e,t,n,r=[""]){let o={$shared:!0},{resolver:i,subPrefixes:s}=W1(this._resolverCache,e,r),c=i;if(p5(i,t)){o.$shared=!1,n=la(n)?n():n;let u=this.createResolver(e,n,s);c=el(i,n,u)}for(let u of t)o[u]=c[u];return o}createResolver(e,t,n=[""],r){let{resolver:o}=W1(this._resolverCache,e,n);return Et(t)?el(o,t,void 0,r):o}};f5=e=>Et(e)&&Object.getOwnPropertyNames(e).some(t=>la(e[t]));h5="4.5.1",A5=["top","bottom","left","right","chartArea"];Od={},G1=e=>{let t=yw(e);return Object.values(Od).filter(n=>n.canvas===t).pop()};Bg=class{static defaults=$t;static instances=Od;static overrides=es;static registry=Vo;static version=h5;static getChart=G1;static register(...e){Vo.add(...e),X1()}static unregister(...e){Vo.remove(...e),X1()}constructor(e,t){let n=this.config=new d5(t),r=yw(e),o=G1(r);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.");let i=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||N_(r)),this.platform.updateConfig(n);let s=this.platform.acquireContext(r,i.aspectRatio),c=s&&s.canvas,u=c&&c.height,d=c&&c.width;if(this.id=FT(),this.ctx=s,this.canvas=c,this.width=d,this.height=u,this._options=i,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 UA,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=iI(p=>this.update(p),i.resizeDelay||0),this._dataChanges=[],Od[this.id]=this,!s||!c){console.error("Failed to create chart: can't acquire context from the given item");return}vi.listen(this,"complete",K1),vi.listen(this,"progress",g5),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:o}=this;return Nt(e)?t&&o?o:r?n/r: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 Vo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():x1(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return m1(this.canvas,this.ctx),this}stop(){return vi.stop(this),this}resize(e,t){vi.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(r,e,t,o),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,x1(this,s,!0)&&(this.notifyPlugins("resize",{size:i}),Wt(n.onResize,[this,i],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};Tt(e,(t,n)=>{t.id=n})}buildOrUpdateScales(){let e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((i,s)=>(i[s]=!1,i),{}),o=[];t&&(o=o.concat(Object.keys(t).map(i=>{let s=t[i],c=VA(i,s),u=c==="r",d=c==="x";return{options:s,dposition:u?"chartArea":d?"bottom":"left",dtype:u?"radialLinear":d?"category":"linear"}}))),Tt(o,i=>{let s=i.options,c=s.id,u=VA(c,s),d=Dt(s.type,i.dtype);(s.position===void 0||Y1(s.position,u)!==Y1(i.dposition))&&(s.position=i.dposition),r[c]=!0;let p=null;if(c in n&&n[c].type===d)p=n[c];else{let h=Vo.getScale(d);p=new h({id:c,type:d,ctx:this.ctx,chart:this}),n[p.id]=p}p.init(s,e)}),Tt(r,(i,s)=>{i||delete n[s]}),Tt(n,i=>{Jr.configure(this,i,i.options),Jr.addBox(this,i)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((r,o)=>r.index-o.index),n>t){for(let r=t;r<n;++r)this._destroyDatasetMeta(r);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(q1("order","index"))}_removeUnreferencedMetasets(){let{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((n,r)=>{t.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){let e=[],t=this.data.datasets,n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n<r;n++){let o=t[n],i=this.getDatasetMeta(n),s=o.type||this.config.type;if(i.type&&i.type!==s&&(this._destroyDatasetMeta(n),i=this.getDatasetMeta(n)),i.type=s,i.indexAxis=o.indexAxis||HA(s,this.options),i.order=o.order||0,i.index=n,i.label=""+o.label,i.visible=this.isDatasetVisible(n),i.controller)i.controller.updateIndex(n),i.controller.linkScales();else{let c=Vo.getController(s),{datasetElementType:u,dataElementType:d}=$t.datasets[s];Object.assign(c,{dataElementType:Vo.getElement(d),datasetElementType:u&&Vo.getElement(u)}),i.controller=new c(this,n),e.push(i.controller)}}return this._updateMetasets(),e}_resetElements(){Tt(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let t=this.config;t.update();let n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let u=0,d=this.data.datasets.length;u<d;u++){let{controller:p}=this.getDatasetMeta(u),h=!r&&o.indexOf(p)===-1;p.buildOrUpdateElements(h),i=Math.max(+p.getMaxOverflow(),i)}i=this._minPadding=n.layout.autoPadding?i:0,this._updateLayout(i),r||Tt(o,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(q1("z","_idx"));let{_active:s,_lastEvent:c}=this;c?this._eventHandler(c,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Tt(this.scales,e=>{Jr.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!s1(t,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:n,start:r,count:o}of t){let i=n==="_removeElements"?-o:o;m5(e,r,i)}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,n=o=>new Set(e.filter(i=>i[0]===o).map((i,s)=>s+","+i.splice(1).join(","))),r=n(0);for(let o=1;o<t;o++)if(!s1(r,n(o)))return;return Array.from(r).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;Jr.update(this,this.width,this.height,e);let t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],Tt(this.boxes,r=>{n&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,o)=>{r._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,n=this.data.datasets.length;t<n;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,la(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){let n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(vi.has(this)?this.attached&&!vi.running(this)&&vi.start(this):(this.draw(),K1({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){let{width:n,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){let t=this._sortedMetasets,n=[],r,o;for(r=0,o=t.length;r<o;++r){let i=t[r];(!e||i.visible)&&n.push(i)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=VI(this,e);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(r&&Eg(t,r),e.controller.draw(),r&&Cg(t),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(e){return nw(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){let o=v_.modes[t];return typeof o=="function"?o(this,e,n,r):[]}getDatasetMeta(e){let t=this.data.datasets[e],n=this._metasets,r=n.filter(o=>o&&o._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=rl(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!t.hidden}setDatasetVisibility(e,t){let n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){let r=n?"show":"hide",o=this.getDatasetMeta(e),i=o.controller._resolveAnimations(void 0,r);yc(t)?(o.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),i.update(o,{visible:n}),this.update(s=>s.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),vi.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),m1(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Od[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let e=this._listeners,t=this.platform,n=(o,i)=>{t.addEventListener(this,o,i),e[o]=i},r=(o,i,s)=>{o.offsetX=i,o.offsetY=s,this._eventHandler(o)};Tt(this.options.events,o=>n(o,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,t=this.platform,n=(c,u)=>{t.addEventListener(this,c,u),e[c]=u},r=(c,u)=>{e[c]&&(t.removeEventListener(this,c,u),delete e[c])},o=(c,u)=>{this.canvas&&this.resize(c,u)},i,s=()=>{r("attach",s),this.attached=!0,this.resize(),n("resize",o),n("detach",i)};i=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),n("attach",s)},t.isAttached(this.canvas)?s():i()}unbindEvents(){Tt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},Tt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){let r=n?"set":"remove",o,i,s,c;for(t==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),s=0,c=e.length;s<c;++s){i=e[s];let u=i&&this.getDatasetMeta(i.datasetIndex).controller;u&&u[r+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){let t=this._active||[],n=e.map(({datasetIndex:r,index:o})=>{let i=this.getDatasetMeta(r);if(!i)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:i.data[o],index:o}});!Fd(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){let r=this.options.hover,o=(c,u)=>c.filter(d=>!u.some(p=>d.datasetIndex===p.datasetIndex&&d.index===p.index)),i=o(t,e),s=n?e:o(e,t);i.length&&this.updateHoverStyle(i,r.mode,!1),s.length&&r.mode&&this.updateHoverStyle(s,r.mode,!0)}_eventHandler(e,t){let n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=i=>(i.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,r)===!1)return;let o=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(o||n.changed)&&this.render(),this}_handleEvent(e,t,n){let{_active:r=[],options:o}=this,i=t,s=this._getActiveElements(e,r,n,i),c=YT(e),u=b5(e,this._lastEvent,n,c);n&&(this._lastEvent=null,Wt(o.onHover,[e,s,this],this),c&&Wt(o.onClick,[e,s,this],this));let d=!Fd(s,r);return(d||t)&&(this._active=s,this._updateHoverStyles(s,r,t)),this._lastEvent=u,d}_getActiveElements(e,t,n,r){if(e.type==="mouseout")return[];if(!n)return t;let o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,r)}};WA=class extends ol{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){let{inflateAmount:n,options:{borderColor:r,backgroundColor:o}}=this,{inner:i,outer:s}=x5(this),c=w5(s.radius)?Vd:k5;t.save(),(s.w!==i.w||s.h!==i.h)&&(t.beginPath(),c(t,gA(s,n,i)),t.clip(),c(t,gA(i,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),c(t,gA(i,n)),t.fillStyle=o,t.fill(),t.restore()}inRange(t,n,r){return AA(this,t,n,r)}inXRange(t,n){return AA(this,t,null,n)}inYRange(t,n){return AA(this,null,t,n)}getCenterPoint(t){let{x:n,y:r,base:o,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(n+o)/2:n,y:i?r:(r+o)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}},YA=["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)"],J1=YA.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));I5={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;let{data:{datasets:r},options:o}=e.config,{elements:i}=o,s=Z1(r)||P5(o)||i&&Z1(i)||T5();if(!n.forceOverride&&s)return;let c=D5(e);r.forEach(c)}},$1=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},_5=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,Gd=class extends ol{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,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(){let t=this.options.labels||{},n=Wt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,o)=>t.sort(r,o,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){let{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}let r=t.labels,o=qn(r.font),i=o.size,s=this._computeTitleHeight(),{boxWidth:c,itemHeight:u}=$1(r,i),d,p;n.font=o.string,this.isHorizontal()?(d=this.maxWidth,p=this._fitRows(s,i,c,u)+10):(p=this.maxHeight,d=this._fitCols(s,o,c,u)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(p,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,o){let{ctx:i,maxWidth:s,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],d=this.lineWidths=[0],p=o+c,h=t;i.textAlign="left",i.textBaseline="middle";let g=-1,b=-p;return this.legendItems.forEach((y,x)=>{let v=r+n/2+i.measureText(y.text).width;(x===0||d[d.length-1]+v+2*c>s)&&(h+=p,d[d.length-(x>0?0:1)]=0,b+=p,g++),u[x]={left:0,top:b,row:g,width:v,height:o},d[d.length-1]+=v+c}),h}_fitCols(t,n,r,o){let{ctx:i,maxHeight:s,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],d=this.columnSizes=[],p=s-t,h=c,g=0,b=0,y=0,x=0;return this.legendItems.forEach((v,D)=>{let{itemWidth:M,itemHeight:T}=B5(r,n,i,v,o);D>0&&b+T+2*c>p&&(h+=g+c,d.push({width:g,height:b}),y+=g+c,x++,g=b=0),u[D]={left:y,top:b,col:x,width:M,height:T},g=Math.max(g,M),b+=T+c}),h+=g,d.push({width:g,height:b}),h}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:o},rtl:i}}=this,s=Ks(i,this.left,this.width);if(this.isHorizontal()){let c=0,u=Yn(r,this.left+o,this.right-this.lineWidths[c]);for(let d of n)c!==d.row&&(c=d.row,u=Yn(r,this.left+o,this.right-this.lineWidths[c])),d.top+=this.top+t+o,d.left=s.leftForLtr(s.x(u),d.width),u+=d.width+o}else{let c=0,u=Yn(r,this.top+t+o,this.bottom-this.columnSizes[c].height);for(let d of n)d.col!==c&&(c=d.col,u=Yn(r,this.top+t+o,this.bottom-this.columnSizes[c].height)),d.top=u,d.left+=this.left+o,d.left=s.leftForLtr(s.x(d.left),d.width),u+=d.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;Eg(t,this),this._draw(),Cg(t)}}_draw(){let{options:t,columnSizes:n,lineWidths:r,ctx:o}=this,{align:i,labels:s}=t,c=$t.color,u=Ks(t.rtl,this.left,this.width),d=qn(s.font),{padding:p}=s,h=d.size,g=h/2,b;this.drawTitle(),o.textAlign=u.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=d.string;let{boxWidth:y,boxHeight:x,itemHeight:v}=$1(s,h),D=function(R,Q,V){if(isNaN(y)||y<=0||isNaN(x)||x<0)return;o.save();let J=Dt(V.lineWidth,1);if(o.fillStyle=Dt(V.fillStyle,c),o.lineCap=Dt(V.lineCap,"butt"),o.lineDashOffset=Dt(V.lineDashOffset,0),o.lineJoin=Dt(V.lineJoin,"miter"),o.lineWidth=J,o.strokeStyle=Dt(V.strokeStyle,c),o.setLineDash(Dt(V.lineDash,[])),s.usePointStyle){let Y={radius:x*Math.SQRT2/2,pointStyle:V.pointStyle,rotation:V.rotation,borderWidth:J},Z=u.xPlus(R,y/2),W=Q+g;tw(o,Y,Z,W,s.pointStyleWidth&&y)}else{let Y=Q+Math.max((h-x)/2,0),Z=u.leftForLtr(R,y),W=qs(V.borderRadius);o.beginPath(),Object.values(W).some($=>$!==0)?Vd(o,{x:Z,y:Y,w:y,h:x,radius:W}):o.rect(Z,Y,y,x),o.fill(),J!==0&&o.stroke()}o.restore()},M=function(R,Q,V){xc(o,V.text,R,Q+v/2,d,{strikethrough:V.hidden,textAlign:u.textAlign(V.textAlign)})},T=this.isHorizontal(),C=this._computeTitleHeight();T?b={x:Yn(i,this.left+p,this.right-r[0]),y:this.top+p+C,line:0}:b={x:this.left+p,y:Yn(i,this.top+C+p,this.bottom-n[0].height),line:0},cw(this.ctx,t.textDirection);let z=v+p;this.legendItems.forEach((R,Q)=>{o.strokeStyle=R.fontColor,o.fillStyle=R.fontColor;let V=o.measureText(R.text).width,J=u.textAlign(R.textAlign||(R.textAlign=s.textAlign)),Y=y+g+V,Z=b.x,W=b.y;u.setWidth(this.width),T?Q>0&&Z+Y+p>this.right&&(W=b.y+=z,b.line++,Z=b.x=Yn(i,this.left+p,this.right-r[b.line])):Q>0&&W+z>this.bottom&&(Z=b.x=Z+n[b.line].width+p,b.line++,W=b.y=Yn(i,this.top+C+p,this.bottom-n[b.line].height));let $=u.x(Z);if(D($,W,R),Z=aI(J,Z+y+g,T?Z+Y:this.right,t.rtl),M(u.x(Z),W,R),T)b.x+=Y+p;else if(typeof R.text!="string"){let de=d.lineHeight;b.y+=Sw(R,de)+p}else b.y+=z}),uw(this.ctx,t.textDirection)}drawTitle(){let t=this.options,n=t.title,r=qn(n.font),o=no(n.padding);if(!n.display)return;let i=Ks(t.rtl,this.left,this.width),s=this.ctx,c=n.position,u=r.size/2,d=o.top+u,p,h=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),p=this.top+d,h=Yn(t.align,h,this.right-g);else{let y=this.columnSizes.reduce((x,v)=>Math.max(x,v.height),0);p=d+Yn(t.align,this.top,this.bottom-y-t.labels.padding-this._computeTitleHeight())}let b=Yn(c,h,h+g);s.textAlign=i.textAlign(Sg(c)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,xc(s,n.text,b,p,r)}_computeTitleHeight(){let t=this.options.title,n=qn(t.font),r=no(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,o,i;if(Ws(t,this.left,this.right)&&Ws(n,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(o=i[r],Ws(t,o.left,o.left+o.width)&&Ws(n,o.top,o.top+o.height))return this.legendItems[r]}return null}handleEvent(t){let n=this.options;if(!R5(t.type,n))return;let r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){let o=this._hoveredItem,i=_5(o,r);o&&!i&&Wt(n.onLeave,[t,o,this],this),this._hoveredItem=r,r&&!i&&Wt(n.onHover,[t,r,this],this)}else r&&Wt(n.onClick,[t,r,this],this)}};L5={id:"legend",_element:Gd,start(e,t,n){let r=e.legend=new Gd({ctx:e.ctx,options:n,chart:e});Jr.configure(e,r,n),Jr.addBox(e,r)},stop(e){Jr.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let r=e.legend;Jr.configure(e,r,n),r.options=n},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){let r=t.datasetIndex,o=n.chart;o.isDatasetVisible(r)?(o.hide(r),t.hidden=!0):(o.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:i,useBorderRadius:s,borderRadius:c}}=e.legend.options;return e._getSortedDatasetMetas().map(u=>{let d=u.controller.getStyle(n?0:void 0),p=no(d.borderWidth);return{text:t[u.index].label,fillStyle:d.backgroundColor,fontColor:i,hidden:!u.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:d.borderColor,pointStyle:r||d.pointStyle,rotation:d.rotation,textAlign:o||d.textAlign,borderRadius:s&&(c||d.borderRadius),datasetIndex:u.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}},Xd=class extends ol{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){let 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=t,this.height=this.bottom=n;let o=xn(r.text)?r.text.length:1;this._padding=no(r.padding);let i=o*qn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:n,left:r,bottom:o,right:i,options:s}=this,c=s.align,u=0,d,p,h;return this.isHorizontal()?(p=Yn(c,r,i),h=n+t,d=i-r):(s.position==="left"?(p=r+t,h=Yn(c,o,n),u=wn*-.5):(p=i-t,h=Yn(c,n,o),u=wn*.5),d=o-n),{titleX:p,titleY:h,maxWidth:d,rotation:u}}draw(){let t=this.ctx,n=this.options;if(!n.display)return;let r=qn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:i,titleY:s,maxWidth:c,rotation:u}=this._drawArgs(o);xc(t,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:u,textAlign:Sg(n.align),textBaseline:"middle",translation:[i,s]})}};N5={id:"title",_element:Xd,start(e,t,n){j5(e,n)},stop(e){let t=e.titleBlock;Jr.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){let r=e.titleBlock;Jr.configure(e,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}},cc={average(e){if(!e.length)return!1;let t,n,r=new Set,o=0,i=0;for(t=0,n=e.length;t<n;++t){let s=e[t].element;if(s&&s.hasValue()){let c=s.tooltipPosition();r.add(c.x),o+=c.y,++i}}return i===0||r.size===0?!1:{x:[...r].reduce((s,c)=>s+c)/r.size,y:o/i}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,o=Number.POSITIVE_INFINITY,i,s,c;for(i=0,s=e.length;i<s;++i){let u=e[i].element;if(u&&u.hasValue()){let d=u.getCenterPoint(),p=eI(t,d);p<o&&(o=p,c=u)}}if(c){let u=c.tooltipPosition();n=u.x,r=u.y}return{x:n,y:r}}};Ew={beforeTitle:bi,title(e){if(e.length>0){let t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:bi,beforeBody:bi,beforeLabel:bi,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");let n=e.formattedValue;return Nt(n)||(t+=n),t},labelColor(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:bi,afterBody:bi,beforeFooter:bi,footer:bi,afterFooter:bi};Jd=class extends ol{static positioners=cc;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let n=this.chart,r=this.options.setContext(this.getContext()),o=r.enabled&&n.options.animation&&r.animations,i=new Yd(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=W5(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){let{callbacks:r}=n,o=mr(r,"beforeTitle",this,t),i=mr(r,"title",this,t),s=mr(r,"afterTitle",this,t),c=[];return c=Ho(c,yi(o)),c=Ho(c,yi(i)),c=Ho(c,yi(s)),c}getBeforeBody(t,n){return rx(mr(n.callbacks,"beforeBody",this,t))}getBody(t,n){let{callbacks:r}=n,o=[];return Tt(t,i=>{let s={before:[],lines:[],after:[]},c=ox(r,i);Ho(s.before,yi(mr(c,"beforeLabel",this,i))),Ho(s.lines,mr(c,"label",this,i)),Ho(s.after,yi(mr(c,"afterLabel",this,i))),o.push(s)}),o}getAfterBody(t,n){return rx(mr(n.callbacks,"afterBody",this,t))}getFooter(t,n){let{callbacks:r}=n,o=mr(r,"beforeFooter",this,t),i=mr(r,"footer",this,t),s=mr(r,"afterFooter",this,t),c=[];return c=Ho(c,yi(o)),c=Ho(c,yi(i)),c=Ho(c,yi(s)),c}_createItems(t){let n=this._active,r=this.chart.data,o=[],i=[],s=[],c=[],u,d;for(u=0,d=n.length;u<d;++u)c.push(z5(this.chart,n[u]));return t.filter&&(c=c.filter((p,h,g)=>t.filter(p,h,g,r))),t.itemSort&&(c=c.sort((p,h)=>t.itemSort(p,h,r))),Tt(c,p=>{let h=ox(t.callbacks,p);o.push(mr(h,"labelColor",this,p)),i.push(mr(h,"labelPointStyle",this,p)),s.push(mr(h,"labelTextColor",this,p))}),this.labelColors=o,this.labelPointStyles=i,this.labelTextColors=s,this.dataPoints=c,c}update(t,n){let r=this.options.setContext(this.getContext()),o=this._active,i,s=[];if(!o.length)this.opacity!==0&&(i={opacity:0});else{let c=cc[r.position].call(this,o,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);let u=this._size=ex(this,r),d=Object.assign({},c,u),p=tx(this.chart,r,d),h=nx(r,d,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,i={opacity:1,x:h.x,y:h.y,width:u.width,height:u.height,caretX:c.x,caretY:c.y}}this._tooltipItems=s,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,o){let i=this.getCaretPosition(t,r,o);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(t,n,r){let{xAlign:o,yAlign:i}=this,{caretSize:s,cornerRadius:c}=r,{topLeft:u,topRight:d,bottomLeft:p,bottomRight:h}=qs(c),{x:g,y:b}=t,{width:y,height:x}=n,v,D,M,T,C,z;return i==="center"?(C=b+x/2,o==="left"?(v=g,D=v-s,T=C+s,z=C-s):(v=g+y,D=v+s,T=C-s,z=C+s),M=v):(o==="left"?D=g+Math.max(u,p)+s:o==="right"?D=g+y-Math.max(d,h)-s:D=this.caretX,i==="top"?(T=b,C=T-s,v=D-s,M=D+s):(T=b+x,C=T+s,v=D+s,M=D-s),z=T),{x1:v,x2:D,x3:M,y1:T,y2:C,y3:z}}drawTitle(t,n,r){let o=this.title,i=o.length,s,c,u;if(i){let d=Ks(r.rtl,this.x,this.width);for(t.x=Ed(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",s=qn(r.titleFont),c=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,u=0;u<i;++u)n.fillText(o[u],d.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+c,u+1===i&&(t.y+=r.titleMarginBottom-c)}}_drawColorBox(t,n,r,o,i){let s=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:u,boxWidth:d}=i,p=qn(i.bodyFont),h=Ed(this,"left",i),g=o.x(h),b=u<p.lineHeight?(p.lineHeight-u)/2:0,y=n.y+b;if(i.usePointStyle){let x={radius:Math.min(d,u)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},v=o.leftForLtr(g,d)+d/2,D=y+u/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,b1(t,x,v,D),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,b1(t,x,v,D)}else{t.lineWidth=Et(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;let x=o.leftForLtr(g,d),v=o.leftForLtr(o.xPlus(g,1),d-2),D=qs(s.borderRadius);Object.values(D).some(M=>M!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,Vd(t,{x,y,w:d,h:u,radius:D}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Vd(t,{x:v,y:y+1,w:d-2,h:u-2,radius:D}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(x,y,d,u),t.strokeRect(x,y,d,u),t.fillStyle=s.backgroundColor,t.fillRect(v,y+1,d-2,u-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){let{body:o}=this,{bodySpacing:i,bodyAlign:s,displayColors:c,boxHeight:u,boxWidth:d,boxPadding:p}=r,h=qn(r.bodyFont),g=h.lineHeight,b=0,y=Ks(r.rtl,this.x,this.width),x=function(V){n.fillText(V,y.x(t.x+b),t.y+g/2),t.y+=g+i},v=y.textAlign(s),D,M,T,C,z,R,Q;for(n.textAlign=s,n.textBaseline="middle",n.font=h.string,t.x=Ed(this,v,r),n.fillStyle=r.bodyColor,Tt(this.beforeBody,x),b=c&&v!=="right"?s==="center"?d/2+p:d+2+p:0,C=0,R=o.length;C<R;++C){for(D=o[C],M=this.labelTextColors[C],n.fillStyle=M,Tt(D.before,x),T=D.lines,c&&T.length&&(this._drawColorBox(n,t,C,y,r),g=Math.max(h.lineHeight,u)),z=0,Q=T.length;z<Q;++z)x(T[z]),g=h.lineHeight;Tt(D.after,x)}b=0,g=h.lineHeight,Tt(this.afterBody,x),t.y-=i}drawFooter(t,n,r){let o=this.footer,i=o.length,s,c;if(i){let u=Ks(r.rtl,this.x,this.width);for(t.x=Ed(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=u.textAlign(r.footerAlign),n.textBaseline="middle",s=qn(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,c=0;c<i;++c)n.fillText(o[c],u.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,o){let{xAlign:i,yAlign:s}=this,{x:c,y:u}=t,{width:d,height:p}=r,{topLeft:h,topRight:g,bottomLeft:b,bottomRight:y}=qs(o.cornerRadius);n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.beginPath(),n.moveTo(c+h,u),s==="top"&&this.drawCaret(t,n,r,o),n.lineTo(c+d-g,u),n.quadraticCurveTo(c+d,u,c+d,u+g),s==="center"&&i==="right"&&this.drawCaret(t,n,r,o),n.lineTo(c+d,u+p-y),n.quadraticCurveTo(c+d,u+p,c+d-y,u+p),s==="bottom"&&this.drawCaret(t,n,r,o),n.lineTo(c+b,u+p),n.quadraticCurveTo(c,u+p,c,u+p-b),s==="center"&&i==="left"&&this.drawCaret(t,n,r,o),n.lineTo(c,u+h),n.quadraticCurveTo(c,u,c+h,u),n.closePath(),n.fill(),o.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){let n=this.chart,r=this.$animations,o=r&&r.x,i=r&&r.y;if(o||i){let s=cc[t.position].call(this,this._active,this._eventPosition);if(!s)return;let c=this._size=ex(this,t),u=Object.assign({},s,this._size),d=tx(n,t,u),p=nx(t,u,d,n);(o._to!==p.x||i._to!==p.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=c.width,this.height=c.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(t){let n=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(n);let o={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;let s=no(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(t.save(),t.globalAlpha=r,this.drawBackground(i,t,o,n),cw(t,n.textDirection),i.y+=s.top,this.drawTitle(i,t,n),this.drawBody(i,t,n),this.drawFooter(i,t,n),uw(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){let r=this._active,o=t.map(({datasetIndex:c,index:u})=>{let 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}}),i=!Fd(r,o),s=this._positionChanged(o,n);(i||s)&&(this._active=o,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,i=this._active||[],s=this._getActiveElements(t,i,n,r),c=this._positionChanged(s,t),u=n||!Fd(s,i)||c;return u&&(this._active=s,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),u}_getActiveElements(t,n,r,o){let i=this.options;if(t.type==="mouseout")return[];if(!o)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);let s=this.chart.getElementsAtEventForMode(t,i.mode,i,r);return i.reverse&&s.reverse(),s}_positionChanged(t,n){let{caretX:r,caretY:o,options:i}=this,s=cc[i.position].call(this,t,n);return s!==!1&&(r!==s.x||o!==s.y)}},Y5={id:"tooltip",_element:Jd,positioners:cc,afterInit(e,t,n){n&&(e.tooltip=new Jd({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){let t=e.tooltip;if(t&&t._willRender()){let n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){let n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Ew},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},q5=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);G5=(e,t)=>e===null?null:yo(Math.round(e),0,t);qA=class extends nl{static id="category";static defaults={ticks:{callback:ix}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let n=this._addedLabels;if(n.length){let r=this.getLabels();for(let{index:o,label:i}of n)r[o]===i&&r.splice(o,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Nt(t))return null;let r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:K5(r,t,Dt(n,t),this._addedLabels),G5(n,r.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:r,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(o=this.getLabels().length-1)),this.min=r,this.max=o}buildTicks(){let t=this.min,n=this.max,r=this.options.offset,o=[],i=this.getLabels();i=t===0&&n===i.length-1?i:i.slice(t,n+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)o.push({value:s});return o}getLabelForValue(t){return ix.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};KA=class extends nl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Nt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds(),{min:o,max:i}=this,s=u=>o=n?o:u,c=u=>i=r?i:u;if(t){let u=aa(o),d=aa(i);u<0&&d<0?c(0):u>0&&d>0&&s(0)}if(o===i){let u=i===0?1:Math.abs(i*.05);c(i+u),t||s(o-u)}this.min=o,this.max=i}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:n,stepSize:r}=t,o;return r?(o=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),n=n||11),n&&(o=Math.min(n,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,n=t.ticks,r=this.getTickLimit();r=Math.max(2,r);let o={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,s=X5(o,i);return t.bounds==="ticks"&&JT(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){let t=this.ticks,n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){let o=(r-n)/Math.max(t.length-1,1)/2;n-=o,r+=o}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return ff(t,this.chart.options.locale,this.options.ticks.format)}},GA=class extends KA{static id="linear";static defaults={ticks:{callback:ew.formatters.numeric}};determineDataLimits(){let{min:t,max:n}=this.getMinMax(!0);this.min=to(t)?t:0,this.max=to(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),n=t?this.width:this.height,r=Yo(this.options.ticks.minRotation),o=(t?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/o))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}},Af={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}},br=Object.keys(Af);Zd=class extends nl{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){let r=t.time||(t.time={}),o=this._adapter=new h_._date(t.adapters.date);o.init(n),pc(r.displayFormats,o.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:lx(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,n=this._adapter,r=t.time.unit||"day",{min:o,max:i,minDefined:s,maxDefined:c}=this.getUserBounds();function u(d){!s&&!isNaN(d.min)&&(o=Math.min(o,d.min)),!c&&!isNaN(d.max)&&(i=Math.max(i,d.max))}(!s||!c)&&(u(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&u(this.getMinMax(!1))),o=to(o)&&!isNaN(o)?o:+n.startOf(Date.now(),r),i=to(i)&&!isNaN(i)?i:+n.endOf(Date.now(),r)+1,this.min=Math.min(o,i-1),this.max=Math.max(o+1,i)}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){let t=this.options,n=t.time,r=t.ticks,o=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let i=this.min,s=this.max,c=rI(o,i,s);return this._unit=n.unit||(r.autoSkip?cx(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):J5(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Z5(this._unit),this.initOffsets(o),t.reverse&&c.reverse(),dx(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,o,i;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?n=1-o:n=(this.getDecimalForValue(t[1])-o)/2,i=this.getDecimalForValue(t[t.length-1]),t.length===1?r=i:r=(i-this.getDecimalForValue(t[t.length-2]))/2);let s=t.length<3?.5:.25;n=yo(n,0,s),r=yo(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){let t=this._adapter,n=this.min,r=this.max,o=this.options,i=o.time,s=i.unit||cx(i.minUnit,n,r,this._getLabelCapacity(n)),c=Dt(o.ticks.stepSize,1),u=s==="week"?i.isoWeekday:!1,d=Hd(u)||u===!0,p={},h=n,g,b;if(d&&(h=+t.startOf(h,"isoWeek",u)),h=+t.startOf(h,d?"day":s),t.diff(r,n,s)>1e5*c)throw new Error(n+" and "+r+" are too far apart with stepSize of "+c+" "+s);let y=o.ticks.source==="data"&&this.getDataTimestamps();for(g=h,b=0;g<r;g=+t.add(g,c,s),b++)ux(p,g,y);return(g===r||o.bounds==="ticks"||b===1)&&ux(p,g,y),Object.keys(p).sort(sx).map(x=>+x)}getLabelForValue(t){let n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){let r=this.options.time.displayFormats,o=this._unit,i=n||r[o];return this._adapter.format(t,i)}_tickFormatFunction(t,n,r,o){let i=this.options,s=i.ticks.callback;if(s)return Wt(s,[t,n,r],this);let c=i.time.displayFormats,u=this._unit,d=this._majorUnit,p=u&&c[u],h=d&&c[d],g=r[n],b=d&&h&&g&&g.major;return this._adapter.format(t,o||(b?h:p))}generateTickLabels(t){let n,r,o;for(n=0,r=t.length;n<r;++n)o=t[n],o.label=this._tickFormatFunction(o.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){let n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){let n=this.options.ticks,r=this.ctx.measureText(t).width,o=Yo(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(o),s=Math.sin(o),c=this._resolveTickFontOptions(0).size;return{w:r*i+c*s,h:r*s+c*i}}_getLabelCapacity(t){let n=this.options.time,r=n.displayFormats,o=r[n.unit]||r.millisecond,i=this._tickFormatFunction(t,0,dx(this,[t],this._majorUnit),o),s=this._getLabelSize(i),c=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return c>0?c:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,r=o.length;n<r;++n)t=t.concat(o[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],n,r;if(t.length)return t;let o=this.getLabels();for(n=0,r=o.length;n<r;++n)t.push(lx(this,o[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Xx(t.sort(sx))}};fx=class extends Zd{static id="timeseries";static defaults=Zd.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Cd(n,this.min),this._tableRange=Cd(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:n,max:r}=this,o=[],i=[],s,c,u,d,p;for(s=0,c=t.length;s<c;++s)d=t[s],d>=n&&d<=r&&o.push(d);if(o.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,c=o.length;s<c;++s)p=o[s+1],u=o[s-1],d=o[s],Math.round((p+u)/2)!==d&&i.push({time:d,pos:s/(c-1)});return i}_generate(){let t=this.min,n=this.max,r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((o,i)=>o-i)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Cd(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Cd(this._table,r*this._tableRange+this._minPos,!0)}};Bg.register(I5,RA,WA,qA,GA,L5,N5,Y5);px=["--teal-700","--yellow-400","--teal-400","--orange-400","--green-400","--red-400"],mA=["0 - 1s","1 - 30s","30s - 30min","30 - 60min","1 - 5hr","5 - 10hr","10 - 18hr","18+hr"],bA=(e,t,n=0)=>`${e.toFixed(n)} ${t}${e==1?"":"s"}`,hx=e=>{let t=e/3600;if(t>=1)return bA(t,"hour",1);let n=e/60;return n>=1?bA(n,"minute",0):bA(e,"second",0)},Dd=e=>e.replace(/ \([^)]+\)/,"");a4="Incorrect 'index' type",s4=e=>`Invalid value for key ${e}`,l4=e=>`Pattern length exceeds max of ${e}.`,c4=e=>`Missing ${e} property in key`,u4=e=>`Property 'weight' in key '${e}' must be a positive integer`,Ax=Object.prototype.hasOwnProperty,XA=class{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let o=Tw(r);this._keys.push(o),this._keyMap[o.id]=o,n+=o.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};f4={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},p4={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},h4={location:0,threshold:.6,distance:100},A4={useExtendedSearch:!1,getFn:d4,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},rt={...p4,...f4,...h4,...A4},g4=/[^ ]+/g;kc=class{constructor({getFn:t=rt.getFn,fieldNormWeight:n=rt.fieldNormWeight}={}){this.norm=m4(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,qo(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){let n=this.size();qo(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Lr(t)||vA(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((o,i)=>{let s=o.getFn?o.getFn(t):this.getFn(t,o.path);if(Lr(s)){if(ki(s)){let c=[],u=[{nestedArrIndex:-1,value:s}];for(;u.length;){let{nestedArrIndex:d,value:p}=u.pop();if(Lr(p))if(qo(p)&&!vA(p)){let h={v:p,i:d,n:this.norm.get(p)};c.push(h)}else ki(p)&&p.forEach((h,g)=>{u.push({nestedArrIndex:g,value:h})})}r.$[i]=c}else if(qo(s)&&!vA(s)){let c={v:s,n:this.norm.get(s)};r.$[i]=c}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}};Xa=32;$d=String.prototype.normalize?(e=>e.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,"")):(e=>e),ef=class{constructor(t,{location:n=rt.location,threshold:r=rt.threshold,distance:o=rt.distance,includeMatches:i=rt.includeMatches,findAllMatches:s=rt.findAllMatches,minMatchCharLength:c=rt.minMatchCharLength,isCaseSensitive:u=rt.isCaseSensitive,ignoreDiacritics:d=rt.ignoreDiacritics,ignoreLocation:p=rt.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:o,includeMatches:i,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:p},t=u?t:t.toLowerCase(),t=d?$d(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;let h=(b,y)=>{this.chunks.push({pattern:b,alphabet:x4(b),startIndex:y})},g=this.pattern.length;if(g>Xa){let b=0,y=g%Xa,x=g-y;for(;b<x;)h(this.pattern.substr(b,Xa),b),b+=Xa;if(y){let v=g-Xa;h(this.pattern.substr(v),v)}}else h(this.pattern,0)}searchIn(t){let{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:o}=this.options;if(t=n?t:t.toLowerCase(),t=r?$d(t):t,this.pattern===t){let x={isMatch:!0,score:0};return o&&(x.indices=[[0,t.length-1]]),x}let{location:i,distance:s,threshold:c,findAllMatches:u,minMatchCharLength:d,ignoreLocation:p}=this.options,h=[],g=0,b=!1;this.chunks.forEach(({pattern:x,alphabet:v,startIndex:D})=>{let{isMatch:M,score:T,indices:C}=y4(t,x,v,{location:i+D,distance:s,threshold:c,findAllMatches:u,minMatchCharLength:d,includeMatches:o,ignoreLocation:p});M&&(b=!0),g+=T,M&&C&&(h=[...h,...C])});let y={isMatch:b,score:b?g/this.chunks.length:1};return b&&o&&(y.indices=h),y}},Jo=class{constructor(t){this.pattern=t}static isMultiMatch(t){return mx(t,this.multiRegex)}static isSingleMatch(t){return mx(t,this.singleRegex)}search(){}};ZA=class extends Jo{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){let n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}},$A=class extends Jo{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){let n=t.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}},eg=class extends Jo{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){let n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}},tg=class extends Jo{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){let n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}},ng=class extends Jo{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){let n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},rg=class extends Jo{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){let n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}},tf=class extends Jo{constructor(t,{location:n=rt.location,threshold:r=rt.threshold,distance:o=rt.distance,includeMatches:i=rt.includeMatches,findAllMatches:s=rt.findAllMatches,minMatchCharLength:c=rt.minMatchCharLength,isCaseSensitive:u=rt.isCaseSensitive,ignoreDiacritics:d=rt.ignoreDiacritics,ignoreLocation:p=rt.ignoreLocation}={}){super(t),this._bitapSearch=new ef(t,{location:n,threshold:r,distance:o,includeMatches:i,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:p})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}},nf=class extends Jo{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r,o=[],i=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+i,o.push([r,n-1]);let s=!!o.length;return{isMatch:s,score:s?0:1,indices:o}}},og=[ZA,nf,eg,tg,rg,ng,$A,tf],bx=og.length,w4=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,k4="|";E4=new Set([tf.type,nf.type]),ig=class{constructor(t,{isCaseSensitive:n=rt.isCaseSensitive,ignoreDiacritics:r=rt.ignoreDiacritics,includeMatches:o=rt.includeMatches,minMatchCharLength:i=rt.minMatchCharLength,ignoreLocation:s=rt.ignoreLocation,findAllMatches:c=rt.findAllMatches,location:u=rt.location,threshold:d=rt.threshold,distance:p=rt.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:o,minMatchCharLength:i,findAllMatches:c,ignoreLocation:s,location:u,threshold:d,distance:p},t=n?t:t.toLowerCase(),t=r?$d(t):t,this.pattern=t,this.query=S4(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){let n=this.query;if(!n)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:o,ignoreDiacritics:i}=this.options;t=o?t:t.toLowerCase(),t=i?$d(t):t;let s=0,c=[],u=0;for(let d=0,p=n.length;d<p;d+=1){let h=n[d];c.length=0,s=0;for(let g=0,b=h.length;g<b;g+=1){let y=h[g],{isMatch:x,indices:v,score:D}=y.search(t);if(x){if(s+=1,u+=D,r){let M=y.constructor.type;E4.has(M)?c=[...c,...v]:c.push(v)}}else{u=0,s=0,c.length=0;break}}if(s){let g={isMatch:!0,score:u/s};return r&&(g.indices=c),g}}return{isMatch:!1,score:1}}},ag=[];rf={AND:"$and",OR:"$or"},lg={PATH:"$path",PATTERN:"$val"},cg=e=>!!(e[rf.AND]||e[rf.OR]),D4=e=>!!e[lg.PATH],P4=e=>!ki(e)&&Dw(e)&&!cg(e),vx=e=>({[rf.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});ca=class{constructor(t,n={},r){this.options={...rt,...n},this.options.useExtendedSearch,this._keyStore=new XA(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof kc))throw new Error(a4);this._myIndex=n||Iw(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Lr(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){let n=[];for(let r=0,o=this._docs.length;r<o;r+=1){let i=this._docs[r];t(i,r)&&(this.removeAt(r),r-=1,o-=1,n.push(i))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){let{includeMatches:r,includeScore:o,shouldSort:i,sortFn:s,ignoreFieldNorm:c}=this.options,u=qo(t)?qo(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return T4(u,{ignoreFieldNorm:c}),i&&u.sort(s),Cw(n)&&n>-1&&(u=u.slice(0,n)),B4(u,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(t){let n=sg(t,this.options),{records:r}=this._myIndex,o=[];return r.forEach(({v:i,i:s,n:c})=>{if(!Lr(i))return;let{isMatch:u,score:d,indices:p}=n.searchIn(i);u&&o.push({item:i,idx:s,matches:[{score:d,value:i,norm:c,indices:p}]})}),o}_searchLogical(t){let n=_w(t,this.options),r=(c,u,d)=>{if(!c.children){let{keyId:h,searcher:g}=c,b=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(u,h),searcher:g});return b&&b.length?[{idx:d,item:u,matches:b}]:[]}let p=[];for(let h=0,g=c.children.length;h<g;h+=1){let b=c.children[h],y=r(b,u,d);if(y.length)p.push(...y);else if(c.operator===rf.AND)return[]}return p},o=this._myIndex.records,i={},s=[];return o.forEach(({$:c,i:u})=>{if(Lr(c)){let d=r(n,c,u);d.length&&(i[u]||(i[u]={idx:u,item:c,matches:[]},s.push(i[u])),d.forEach(({matches:p})=>{i[u].matches.push(...p)}))}}),s}_searchObjectList(t){let n=sg(t,this.options),{keys:r,records:o}=this._myIndex,i=[];return o.forEach(({$:s,i:c})=>{if(!Lr(s))return;let u=[];r.forEach((d,p)=>{u.push(...this._findMatches({key:d,value:s[p],searcher:n}))}),u.length&&i.push({idx:c,item:s,matches:u})}),i}_findMatches({key:t,value:n,searcher:r}){if(!Lr(n))return[];let o=[];if(ki(n))n.forEach(({v:i,i:s,n:c})=>{if(!Lr(i))return;let{isMatch:u,score:d,indices:p}=r.searchIn(i);u&&o.push({score:d,key:t,value:i,idx:s,norm:c,indices:p})});else{let{v:i,n:s}=n,{isMatch:c,score:u,indices:d}=r.searchIn(i);c&&o.push({score:u,key:t,value:i,norm:s,indices:d})}return o}};ca.version="7.1.0";ca.createIndex=Iw;ca.parseIndex=b4;ca.config=rt;ca.parseQuery=_w;C4(ig);R4=["software_name","software_description","software_web_page","software_documentation","software_use_link","software_versions"]});var Nw={};Lu(Nw,{default:()=>V4});function Lw({active:e,tagCategory:t,tagId:n,iconUri:r,name:o,toggleTag:i}){let s=r||z4[o]||"tag";return E.jsx("li",{className:`tag tag-category-${t.name.toLowerCase().replace(/[^a-z]+/g,"-")}${e.tagIds.has(n)?" active":""}`,children:E.jsxs("button",{href:"#",disabled:e.disabledTagIds.has(n),onClick:c=>{c.preventDefault(),i(n)},children:[s.startsWith("http")?E.jsx(kt,{alt:o,src:s}):E.jsx(kt,{name:s}),o]})})}function jw({children:e}){return E.jsx("ul",{className:"tags",children:e})}function F4({active:e,baseUri:t,description:n,imageType:r,imageUri:o,name:i,infoGroupId:s,parentInfoGroupId:c,tags:u,toggleTag:d}){let p=`${t}/${c||s}`;return E.jsxs("div",{className:"resource-group",children:[E.jsx("a",{className:`resource-group-image image-type-${r}`,href:p,children:o?E.jsx("img",{src:o}):E.jsx(kt,{name:"motherboard"})}),E.jsxs("div",{className:"resource-group-text",children:[E.jsx("h3",{children:E.jsx("a",{href:p,children:i})}),E.jsx(jw,{children:u.map(h=>E.jsx(Lw,{...h,active:e,toggleTag:d},h.tagId))}),E.jsxs("p",{children:[n&&n,E.jsx("br",{}),E.jsxs("a",{href:p,children:["Learn more about ",i," \xBB"]})]})]})]})}function Q4({active:e,baseUri:t,name:n,resourceGroups:r,toggleTag:o}){return E.jsxs(E.Fragment,{children:[E.jsx("h2",{children:n}),r.filter(({infoGroupId:i})=>e.infoGroupIds.has(i)).map(i=>E.jsx(F4,{...i,baseUri:t,active:e,toggleTag:o},i.infoGroupId))]})}function U4({active:e,clearTags:t,tagCategories:n,toggleTag:r}){let[o,i]=P.useState(!1),s=P.useRef(null);return P.useEffect(()=>{let c=()=>i(!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:s,onClick:()=>i(!o),className:`btn-filters btn ${o?"active":""}`,children:[E.jsx(kt,{name:"filter"})," Filters",e.tagIds.size>0?E.jsx("span",{className:"active-tag-count",children:e.tagIds.size}):null]}),o?E.jsxs("div",{className:"filters-inner",children:[n.map(c=>E.jsxs(E.Fragment,{children:[E.jsx("h2",{children:c.name}),E.jsx(jw,{children:c.tags.map(u=>E.jsx(Lw,{...u,active:e,toggleTag:r}))})]})),E.jsxs("button",{onClick:t,disabled:e.tagIds.size==0,className:"btn danger",children:[E.jsx(kt,{name:"trash"})," Clear Filters"]})]}):null]})}function H4({setBotOpen:e}){let t=P.useRef(null),n=[{title:"Browse resources",icon:"filter-square",description:"Filter resources to find the best match for your research.",onClick:r=>{r.preventDefault(),t.current&&t.current.nextSibling.scrollIntoView({bahavior:"smooth"})}},{title:"Ask a question",icon:"question-circle",onClick:r=>{r.preventDefault(),e(!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:t,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:o,href:i,description:s,login:c,onClick:u},d)=>E.jsx("li",{className:`resource-pathway-${d}`,children:E.jsxs("a",{href:i||"#",onClick:u,children:[o?E.jsx(kt,{name:o}):null," ",E.jsxs("span",{className:"detail",children:[E.jsx("span",{className:"title",children:r}),E.jsx("span",{className:"description",children:s}),c?E.jsxs("span",{className:"login",children:[E.jsx(kt,{name:"key"})," Requires ACCESS Login"]}):null]})]})},r))})]})}function V4({baseUri:e,title:t,setBotOpen:n,showBreadcrumbs:r=!0,showTitle:o=!0}){let[i,s]=P.useState([]),c=Og(),u=P.useMemo(()=>c?Fw(c,i):null,[c,i]),d=h=>s(i.includes(h)?i.filter(g=>g!=h):[...i,h]),p=()=>s([]);return E.jsxs(E.Fragment,{children:[r&&E.jsx(Pc,{expandWidth:!0,items:[{name:"Resources"}],topBorder:!0}),t&&E.jsx("h1",{className:o?"":"visually-hidden",children:t}),E.jsx(H4,{setBotOpen:n}),E.jsxs("div",{id:"browse-resources",children:[u?E.jsx(U4,{tagCategories:c.tagCategories,active:u,clearTags:p,toggleTag:d}):null,c?c.resourceCategories.filter(({resourceCategoryId:h})=>u.resourceCategoryIds.has(h)).map(h=>E.jsx(Q4,{...h,active:u,baseUri:e,clearTags:p,toggleTag:d},h.name)):null]})]})}var z4,zw=zl(()=>{Us();$h();z4={"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 dd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function W4(){if(Hw)return bt;Hw=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=h&&B[h]||B["@@iterator"],typeof B=="function"?B:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,x={};function v(B,X,be){this.props=B,this.context=X,this.refs=x,this.updater=be||b}v.prototype.isReactComponent={},v.prototype.setState=function(B,X){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,X,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function D(){}D.prototype=v.prototype;function M(B,X,be){this.props=B,this.context=X,this.refs=x,this.updater=be||b}var T=M.prototype=new D;T.constructor=M,y(T,v.prototype),T.isPureReactComponent=!0;var C=Array.isArray,z=Object.prototype.hasOwnProperty,R={current:null},Q={key:!0,ref:!0,__self:!0,__source:!0};function V(B,X,be){var me,xe={},_e=null,Oe=null;if(X!=null)for(me in X.ref!==void 0&&(Oe=X.ref),X.key!==void 0&&(_e=""+X.key),X)z.call(X,me)&&!Q.hasOwnProperty(me)&&(xe[me]=X[me]);var Ve=arguments.length-2;if(Ve===1)xe.children=be;else if(1<Ve){for(var Ue=Array(Ve),Ze=0;Ze<Ve;Ze++)Ue[Ze]=arguments[Ze+2];xe.children=Ue}if(B&&B.defaultProps)for(me in Ve=B.defaultProps,Ve)xe[me]===void 0&&(xe[me]=Ve[me]);return{$$typeof:e,type:B,key:_e,ref:Oe,props:xe,_owner:R.current}}function J(B,X){return{$$typeof:e,type:B.type,key:X,ref:B.ref,props:B.props,_owner:B._owner}}function Y(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function Z(B){var X={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(be){return X[be]})}var W=/\/+/g;function $(B,X){return typeof B=="object"&&B!==null&&B.key!=null?Z(""+B.key):X.toString(36)}function de(B,X,be,me,xe){var _e=typeof B;(_e==="undefined"||_e==="boolean")&&(B=null);var Oe=!1;if(B===null)Oe=!0;else switch(_e){case"string":case"number":Oe=!0;break;case"object":switch(B.$$typeof){case e:case t:Oe=!0}}if(Oe)return Oe=B,xe=xe(Oe),B=me===""?"."+$(Oe,0):me,C(xe)?(be="",B!=null&&(be=B.replace(W,"$&/")+"/"),de(xe,X,be,"",function(Ze){return Ze})):xe!=null&&(Y(xe)&&(xe=J(xe,be+(!xe.key||Oe&&Oe.key===xe.key?"":(""+xe.key).replace(W,"$&/")+"/")+B)),X.push(xe)),1;if(Oe=0,me=me===""?".":me+":",C(B))for(var Ve=0;Ve<B.length;Ve++){_e=B[Ve];var Ue=me+$(_e,Ve);Oe+=de(_e,X,be,Ue,xe)}else if(Ue=g(B),typeof Ue=="function")for(B=Ue.call(B),Ve=0;!(_e=B.next()).done;)_e=_e.value,Ue=me+$(_e,Ve++),Oe+=de(_e,X,be,Ue,xe);else if(_e==="object")throw X=String(B),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.");return Oe}function ne(B,X,be){if(B==null)return B;var me=[],xe=0;return de(B,me,"","",function(_e){return X.call(be,_e,xe++)}),me}function pe(B){if(B._status===-1){var X=B._result;X=X(),X.then(function(be){(B._status===0||B._status===-1)&&(B._status=1,B._result=be)},function(be){(B._status===0||B._status===-1)&&(B._status=2,B._result=be)}),B._status===-1&&(B._status=0,B._result=X)}if(B._status===1)return B._result.default;throw B._result}var oe={current:null},K={transition:null},j={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:K,ReactCurrentOwner:R};function ue(){throw Error("act(...) is not supported in production builds of React.")}return bt.Children={map:ne,forEach:function(B,X,be){ne(B,function(){X.apply(this,arguments)},be)},count:function(B){var X=0;return ne(B,function(){X++}),X},toArray:function(B){return ne(B,function(X){return X})||[]},only:function(B){if(!Y(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},bt.Component=v,bt.Fragment=n,bt.Profiler=o,bt.PureComponent=M,bt.StrictMode=r,bt.Suspense=u,bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,bt.act=ue,bt.cloneElement=function(B,X,be){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var me=y({},B.props),xe=B.key,_e=B.ref,Oe=B._owner;if(X!=null){if(X.ref!==void 0&&(_e=X.ref,Oe=R.current),X.key!==void 0&&(xe=""+X.key),B.type&&B.type.defaultProps)var Ve=B.type.defaultProps;for(Ue in X)z.call(X,Ue)&&!Q.hasOwnProperty(Ue)&&(me[Ue]=X[Ue]===void 0&&Ve!==void 0?Ve[Ue]:X[Ue])}var Ue=arguments.length-2;if(Ue===1)me.children=be;else if(1<Ue){Ve=Array(Ue);for(var Ze=0;Ze<Ue;Ze++)Ve[Ze]=arguments[Ze+2];me.children=Ve}return{$$typeof:e,type:B.type,key:xe,ref:_e,props:me,_owner:Oe}},bt.createContext=function(B){return B={$$typeof:s,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:i,_context:B},B.Consumer=B},bt.createElement=V,bt.createFactory=function(B){var X=V.bind(null,B);return X.type=B,X},bt.createRef=function(){return{current:null}},bt.forwardRef=function(B){return{$$typeof:c,render:B}},bt.isValidElement=Y,bt.lazy=function(B){return{$$typeof:p,_payload:{_status:-1,_result:B},_init:pe}},bt.memo=function(B,X){return{$$typeof:d,type:B,compare:X===void 0?null:X}},bt.startTransition=function(B){var X=K.transition;K.transition={};try{B()}finally{K.transition=X}},bt.unstable_act=ue,bt.useCallback=function(B,X){return oe.current.useCallback(B,X)},bt.useContext=function(B){return oe.current.useContext(B)},bt.useDebugValue=function(){},bt.useDeferredValue=function(B){return oe.current.useDeferredValue(B)},bt.useEffect=function(B,X){return oe.current.useEffect(B,X)},bt.useId=function(){return oe.current.useId()},bt.useImperativeHandle=function(B,X,be){return oe.current.useImperativeHandle(B,X,be)},bt.useInsertionEffect=function(B,X){return oe.current.useInsertionEffect(B,X)},bt.useLayoutEffect=function(B,X){return oe.current.useLayoutEffect(B,X)},bt.useMemo=function(B,X){return oe.current.useMemo(B,X)},bt.useReducer=function(B,X,be){return oe.current.useReducer(B,X,be)},bt.useRef=function(B){return oe.current.useRef(B)},bt.useState=function(B){return oe.current.useState(B)},bt.useSyncExternalStore=function(B,X,be){return oe.current.useSyncExternalStore(B,X,be)},bt.useTransition=function(){return oe.current.useTransition()},bt.version="18.3.1",bt}function Qs(){return Vw||(Vw=1,Uw.exports=W4()),Uw.exports}function Y4(){if(Ww)return Tc;Ww=1;var e=Qs(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(c,u,d){var p,h={},g=null,b=null;d!==void 0&&(g=""+d),u.key!==void 0&&(g=""+u.key),u.ref!==void 0&&(b=u.ref);for(p in u)r.call(u,p)&&!i.hasOwnProperty(p)&&(h[p]=u[p]);if(c&&c.defaultProps)for(p in u=c.defaultProps,u)h[p]===void 0&&(h[p]=u[p]);return{$$typeof:t,type:c,key:g,ref:b,props:h,_owner:o.current}}return Tc.Fragment=n,Tc.jsx=s,Tc.jsxs=s,Tc}function q4(){return Yw||(Yw=1,Qw.exports=Y4()),Qw.exports}function K4(){return Gw||(Gw=1,(function(e){function t(K,j){var ue=K.length;K.push(j);e:for(;0<ue;){var B=ue-1>>>1,X=K[B];if(0<o(X,j))K[B]=j,K[ue]=X,ue=B;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var j=K[0],ue=K.pop();if(ue!==j){K[0]=ue;e:for(var B=0,X=K.length,be=X>>>1;B<be;){var me=2*(B+1)-1,xe=K[me],_e=me+1,Oe=K[_e];if(0>o(xe,ue))_e<X&&0>o(Oe,xe)?(K[B]=Oe,K[_e]=ue,B=_e):(K[B]=xe,K[me]=ue,B=me);else if(_e<X&&0>o(Oe,ue))K[B]=Oe,K[_e]=ue,B=_e;else break e}}return j}function o(K,j){var ue=K.sortIndex-j.sortIndex;return ue!==0?ue:K.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,c=s.now();e.unstable_now=function(){return s.now()-c}}var u=[],d=[],p=1,h=null,g=3,b=!1,y=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(K){for(var j=n(d);j!==null;){if(j.callback===null)r(d);else if(j.startTime<=K)r(d),j.sortIndex=j.expirationTime,t(u,j);else break;j=n(d)}}function C(K){if(x=!1,T(K),!y)if(n(u)!==null)y=!0,pe(z);else{var j=n(d);j!==null&&oe(C,j.startTime-K)}}function z(K,j){y=!1,x&&(x=!1,D(V),V=-1),b=!0;var ue=g;try{for(T(j),h=n(u);h!==null&&(!(h.expirationTime>j)||K&&!Z());){var B=h.callback;if(typeof B=="function"){h.callback=null,g=h.priorityLevel;var X=B(h.expirationTime<=j);j=e.unstable_now(),typeof X=="function"?h.callback=X:h===n(u)&&r(u),T(j)}else r(u);h=n(u)}if(h!==null)var be=!0;else{var me=n(d);me!==null&&oe(C,me.startTime-j),be=!1}return be}finally{h=null,g=ue,b=!1}}var R=!1,Q=null,V=-1,J=5,Y=-1;function Z(){return!(e.unstable_now()-Y<J)}function W(){if(Q!==null){var K=e.unstable_now();Y=K;var j=!0;try{j=Q(!0,K)}finally{j?$():(R=!1,Q=null)}}else R=!1}var $;if(typeof M=="function")$=function(){M(W)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ne=de.port2;de.port1.onmessage=W,$=function(){ne.postMessage(null)}}else $=function(){v(W,0)};function pe(K){Q=K,R||(R=!0,$())}function oe(K,j){V=v(function(){K(e.unstable_now())},j)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_continueExecution=function(){y||b||(y=!0,pe(z))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(K){switch(g){case 1:case 2:case 3:var j=3;break;default:j=g}var ue=g;g=j;try{return K()}finally{g=ue}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,j){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var ue=g;g=K;try{return j()}finally{g=ue}},e.unstable_scheduleCallback=function(K,j,ue){var B=e.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?B+ue:B):ue=B,K){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=ue+X,K={id:p++,callback:j,priorityLevel:K,startTime:ue,expirationTime:X,sortIndex:-1},ue>B?(K.sortIndex=ue,t(d,K),n(u)===null&&K===n(d)&&(x?(D(V),V=-1):x=!0,oe(C,ue-B))):(K.sortIndex=X,t(u,K),y||b||(y=!0,pe(z))),K},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(K){var j=g;return function(){var ue=g;g=j;try{return K.apply(this,arguments)}finally{g=ue}}}})(Kw)),Kw}function G4(){return Xw||(Xw=1,qw.exports=K4()),qw.exports}function X4(){if(Jw)return xr;Jw=1;var e=Qs(),t=G4();function n(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function i(a,l){s(a,l),s(a+"Capture",l)}function s(a,l){for(o[a]=l,a=0;a<l.length;a++)r.add(l[a])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function g(a){return u.call(h,a)?!0:u.call(p,a)?!1:d.test(a)?h[a]=!0:(p[a]=!0,!1)}function b(a,l,f,A){if(f!==null&&f.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return A?!1:f!==null?!f.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function y(a,l,f,A){if(l===null||typeof l>"u"||b(a,l,f,A))return!0;if(A)return!1;if(f!==null)switch(f.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function x(a,l,f,A,m,S,O){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=A,this.attributeNamespace=m,this.mustUseProperty=f,this.propertyName=a,this.type=l,this.sanitizeURL=S,this.removeEmptyString=O}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){v[a]=new x(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];v[l]=new x(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){v[a]=new x(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){v[a]=new x(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){v[a]=new x(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){v[a]=new x(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){v[a]=new x(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){v[a]=new x(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){v[a]=new x(a,5,!1,a.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function M(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var l=a.replace(D,M);v[l]=new x(l,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var l=a.replace(D,M);v[l]=new x(l,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var l=a.replace(D,M);v[l]=new x(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){v[a]=new x(a,1,!1,a.toLowerCase(),null,!1,!1)}),v.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){v[a]=new x(a,1,!1,a.toLowerCase(),null,!0,!0)});function T(a,l,f,A){var m=v.hasOwnProperty(l)?v[l]:null;(m!==null?m.type!==0:A||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(y(l,f,m,A)&&(f=null),A||m===null?g(l)&&(f===null?a.removeAttribute(l):a.setAttribute(l,""+f)):m.mustUseProperty?a[m.propertyName]=f===null?m.type===3?!1:"":f:(l=m.attributeName,A=m.attributeNamespace,f===null?a.removeAttribute(l):(m=m.type,f=m===3||m===4&&f===!0?"":""+f,A?a.setAttributeNS(A,l,f):a.setAttribute(l,f))))}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,z=Symbol.for("react.element"),R=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),Z=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),K=Symbol.iterator;function j(a){return a===null||typeof a!="object"?null:(a=K&&a[K]||a["@@iterator"],typeof a=="function"?a:null)}var ue=Object.assign,B;function X(a){if(B===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);B=l&&l[1]||""}return`
301
+ `):e}function z5(e,t){let{element:n,datasetIndex:r,index:o}=t,i=e.getDatasetMeta(r).controller,{label:s,value:c}=i.getLabelAndValue(o);return{chart:e,label:s,parsed:i.getParsed(o),raw:e.data.datasets[r].data[o],formattedValue:c,dataset:i.getDataset(),dataIndex:o,datasetIndex:r,element:n}}function ex(e,t){let n=e.chart.ctx,{body:r,footer:o,title:i}=e,{boxWidth:s,boxHeight:c}=t,u=qn(t.bodyFont),d=qn(t.titleFont),p=qn(t.footerFont),h=i.length,g=o.length,b=r.length,y=no(t.padding),x=y.height,v=0,D=r.reduce((C,z)=>C+z.before.length+z.lines.length+z.after.length,0);if(D+=e.beforeBody.length+e.afterBody.length,h&&(x+=h*d.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),D){let C=t.displayColors?Math.max(c,u.lineHeight):u.lineHeight;x+=b*C+(D-b)*u.lineHeight+(D-1)*t.bodySpacing}g&&(x+=t.footerMarginTop+g*p.lineHeight+(g-1)*t.footerSpacing);let M=0,T=function(C){v=Math.max(v,n.measureText(C).width+M)};return n.save(),n.font=d.string,Tt(e.title,T),n.font=u.string,Tt(e.beforeBody.concat(e.afterBody),T),M=t.displayColors?s+2+t.boxPadding:0,Tt(r,C=>{Tt(C.before,T),Tt(C.lines,T),Tt(C.after,T)}),M=0,n.font=p.string,Tt(e.footer,T),n.restore(),v+=y.width,{width:v,height:x}}function F5(e,t){let{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Q5(e,t,n,r){let{x:o,width:i}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&o+i+s>t.width||e==="right"&&o-i-s<0)return!0}function U5(e,t,n,r){let{x:o,width:i}=n,{width:s,chartArea:{left:c,right:u}}=e,d="center";return r==="center"?d=o<=(c+u)/2?"left":"right":o<=i/2?d="left":o>=s-i/2&&(d="right"),Q5(d,e,t,n)&&(d="center"),d}function tx(e,t,n){let r=n.yAlign||t.yAlign||F5(e,n);return{xAlign:n.xAlign||t.xAlign||U5(e,t,n,r),yAlign:r}}function H5(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function V5(e,t,n){let{y:r,height:o}=e;return t==="top"?r+=n:t==="bottom"?r-=o+n:r-=o/2,r}function nx(e,t,n,r){let{caretSize:o,caretPadding:i,cornerRadius:s}=e,{xAlign:c,yAlign:u}=n,d=o+i,{topLeft:p,topRight:h,bottomLeft:g,bottomRight:b}=qs(s),y=H5(t,c),x=V5(t,u,d);return u==="center"?c==="left"?y+=d:c==="right"&&(y-=d):c==="left"?y-=Math.max(p,g)+o:c==="right"&&(y+=Math.max(h,b)+o),{x:yo(y,0,r.width-t.width),y:yo(x,0,r.height-t.height)}}function Ed(e,t,n){let r=no(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function rx(e){return Ho([],yi(e))}function W5(e,t,n){return rl(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function ox(e,t){let n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}function mr(e,t,n,r){let o=e[t].call(n,r);return typeof o>"u"?Ew[t].call(n,r):o}function K5(e,t,n,r){let o=e.indexOf(t);if(o===-1)return q5(e,t,n,r);let i=e.lastIndexOf(t);return o!==i?n:o}function ix(e){let t=this.getLabels();return e>=0&&e<t.length?t[e]:e}function X5(e,t){let n=[],{bounds:r,step:o,min:i,max:s,precision:c,count:u,maxTicks:d,maxDigits:p,includeBounds:h}=e,g=o||1,b=d-1,{min:y,max:x}=t,v=!Nt(i),D=!Nt(s),M=!Nt(u),T=(x-y)/(p+1),C=c1((x-y)/b/g)*g,z,R,Q,V;if(C<1e-14&&!v&&!D)return[{value:y},{value:x}];V=Math.ceil(x/C)-Math.floor(y/C),V>b&&(C=c1(V*C/b/g)*g),Nt(c)||(z=Math.pow(10,c),C=Math.ceil(C*z)/z),r==="ticks"?(R=Math.floor(y/C)*C,Q=Math.ceil(x/C)*C):(R=y,Q=x),v&&D&&o&&XT((s-i)/o,C/1e3)?(V=Math.round(Math.min((s-i)/C,d)),C=(s-i)/V,R=i,Q=s):M?(R=v?i:R,Q=D?s:Q,V=u-1,C=(Q-R)/V):(V=(Q-R)/C,Bd(V,Math.round(V),C/1e3)?V=Math.round(V):V=Math.ceil(V));let J=Math.max(u1(C),u1(R));z=Math.pow(10,Nt(c)?J:c),R=Math.round(R*z)/z,Q=Math.round(Q*z)/z;let Y=0;for(v&&(h&&R!==i?(n.push({value:i}),R<i&&Y++,Bd(Math.round((R+Y*C)*z)/z,i,ax(i,T,e))&&Y++):R<i&&Y++);Y<V;++Y){let Z=Math.round((R+Y*C)*z)/z;if(D&&Z>s)break;n.push({value:Z})}return D&&h&&Q!==s?n.length&&Bd(n[n.length-1].value,s,ax(s,T,e))?n[n.length-1].value=s:n.push({value:s}):(!D||Q===s)&&n.push({value:Q}),n}function ax(e,t,{horizontal:n,minRotation:r}){let o=Yo(r),i=(n?Math.sin(o):Math.cos(o))||.001,s=.75*t*(""+e).length;return Math.min(t/i,s)}function sx(e,t){return e-t}function lx(e,t){if(Nt(t))return null;let n=e._adapter,{parser:r,round:o,isoWeekday:i}=e._parseOpts,s=t;return typeof r=="function"&&(s=r(s)),to(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(o&&(s=o==="week"&&(Hd(i)||i===!0)?n.startOf(s,"isoWeek",i):n.startOf(s,o)),+s)}function cx(e,t,n,r){let o=br.length;for(let i=br.indexOf(e);i<o-1;++i){let s=Af[br[i]],c=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(c*s.size))<=r)return br[i]}return br[o-1]}function J5(e,t,n,r,o){for(let i=br.length-1;i>=br.indexOf(n);i--){let s=br[i];if(Af[s].common&&e._adapter.diff(o,r,s)>=t-1)return s}return br[n?br.indexOf(n):0]}function Z5(e){for(let t=br.indexOf(e)+1,n=br.length;t<n;++t)if(Af[br[t]].common)return br[t]}function ux(e,t,n){if(!n)e[t]=!0;else if(n.length){let{lo:r,hi:o}=kg(n,t),i=n[r]>=t?n[r]:n[o];e[i]=!0}}function $5(e,t,n,r){let o=e._adapter,i=+o.startOf(t[0].value,r),s=t[t.length-1].value,c,u;for(c=i;c<=s;c=+o.add(c,1,r))u=n[c],u>=0&&(t[u].major=!0);return t}function dx(e,t,n){let r=[],o={},i=t.length,s,c;for(s=0;s<i;++s)c=t[s],o[c]=s,r.push({value:c,major:!1});return i===0||!n?r:$5(e,r,o,n)}function Cd(e,t,n){let r=0,o=e.length-1,i,s,c,u;n?(t>=e[r].pos&&t<=e[o].pos&&({lo:r,hi:o}=IA(e,"pos",t)),{pos:i,time:c}=e[r],{pos:s,time:u}=e[o]):(t>=e[r].time&&t<=e[o].time&&({lo:r,hi:o}=IA(e,"time",t)),{time:i,pos:c}=e[r],{time:s,pos:u}=e[o]);let d=s-i;return d?c+(u-c)*(t-i)/d:c}function e4({type:e="bar",data:t,options:n}){let r=P.useRef(null),o=P.useRef(null);return P.useLayoutEffect(()=>{o.current&&(r.current?(r.current.options=n,r.current.data=t,r.current.update()):r.current=new Bg(o.current,{type:e,data:t,options:n}))},[e,t,n]),E.jsx("div",{className:"chart",children:E.jsx("canvas",{ref:o})})}function t4({infoGroupId:e}){let[t,n]=P.useState("overview"),r=Ow(e).filter(d=>d.cider_type=="Compute"),o=Kn(r.length?r.map(d=>`https://rest-test.ccr.xdmod.org/rest/v0.1/custom_queries/wait_times/${d.info_resourceid}/`):null,{defaultValue:[]}),i=Kn(t!=="overview"?`https://rest-test.ccr.xdmod.org/rest/v0.1/custom_queries/wait_times/${t}/queue/job_walltime`:null);if(!o.length||!r.length)return;let s=o.map((d,p)=>d.error?d:{...d.data[0],...r[p]}).filter(d=>!d.error);if(!s.length)return;let c=[E.jsxs("select",{value:t,onChange:d=>n(d.target.value),children:[E.jsx("option",{value:"overview",children:"Overview"},"overview"),s.map(d=>E.jsx("option",{value:d.info_resourceid,children:Dd(d.resource_descriptive_name)},d.info_resourceid))]},"select")],u=null;if(t==="overview")u=E.jsx("div",{className:"cards",children:s.map(({info_resourceid:d,job_count:p,median_expansion_factor:h,median_wait_time:g,median_wall_time:b,resource_descriptive_name:y})=>E.jsxs("p",{className:"card metrics-overview",children:[E.jsxs("b",{children:[Dd(y),":"]})," Users ran"," ",E.jsxs("strong",{children:[E.jsx(kt,{name:"file-earmark-code"}),parseInt(p).toLocaleString("en-us")," jobs"]})," ","during the last 30 days. Waiting in the queue caused an average"," ",E.jsxs("strong",{children:[E.jsx(kt,{name:"calculator"}),((h-1)*100).toLocaleString("en-us",{maximumFractionDigits:0}),"% increase"]})," ","in the total completion time. The average job waited for"," ",E.jsxs("strong",{children:[E.jsx(kt,{name:"hourglass-split"})," ",hx(g)]})," ","and ran for"," ",E.jsxs("strong",{children:[E.jsx(kt,{name:"stopwatch"}),hx(b)]}),"."," ",E.jsx("a",{title:`Wait time chart for ${Dd(y)}`,href:"#",onClick:x=>{x.preventDefault(),n(d)},children:"View chart \xBB"})]},d))});else if(i&&i.info_resource_id===t){let d={},p=mA;for(let y of i.data)d[y.queue]=d[y.queue]||{label:y.queue,data:Array(mA.length).fill(null)},d[y.queue].data[mA.indexOf(y.job_walltime)]=y.median_wait_time/60;let h=Object.values(d);h.forEach((y,x)=>{let v=px[x%(px.length-1)];y.backgroundColor=getComputedStyle(document.body).getPropertyValue(v)});let g=s.find(y=>y.info_resourceid==i.info_resource_id),b={interaction:{intersect:!1,mode:"index"},plugins:{title:{display:!0,text:`Median Wait Time by Queue on ${Dd(g.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(e4,{type:"bar",data:{labels:p,datasets:h},options:b}),E.jsx("p",{children:E.jsx("a",{href:"#",onClick:y=>{y.preventDefault(),n("overview")},children:"\xAB Back to overview"})})]})}return E.jsxs(Ko,{title:"Wait Time",icon:"hourglass-split",headerComponents:c,children:[u,E.jsxs("p",{className:"metrics-disclaimer",children:[E.jsx(kt,{name:"info-circle"}),"These metrics describe activity from ACCESS projects. Many resources have additional projects that are not part of ACCESS."]})]})}function ki(e){return Array.isArray?Array.isArray(e):Pw(e)==="[object Array]"}function n4(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function r4(e){return e==null?"":n4(e)}function qo(e){return typeof e=="string"}function Cw(e){return typeof e=="number"}function o4(e){return e===!0||e===!1||i4(e)&&Pw(e)=="[object Boolean]"}function Dw(e){return typeof e=="object"}function i4(e){return Dw(e)&&e!==null}function Lr(e){return e!=null}function vA(e){return!e.trim().length}function Pw(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function Tw(e){let t=null,n=null,r=null,o=1,i=null;if(qo(e)||ki(e))r=e,t=gx(e),n=JA(e);else{if(!Ax.call(e,"name"))throw new Error(c4("name"));let s=e.name;if(r=s,Ax.call(e,"weight")&&(o=e.weight,o<=0))throw new Error(u4(s));t=gx(s),n=JA(s),i=e.getFn}return{path:t,id:n,weight:o,src:r,getFn:i}}function gx(e){return ki(e)?e:e.split(".")}function JA(e){return ki(e)?e.join("."):e}function d4(e,t){let n=[],r=!1,o=(i,s,c)=>{if(Lr(i))if(!s[c])n.push(i);else{let u=s[c],d=i[u];if(!Lr(d))return;if(c===s.length-1&&(qo(d)||Cw(d)||o4(d)))n.push(r4(d));else if(ki(d)){r=!0;for(let p=0,h=d.length;p<h;p+=1)o(d[p],s,c+1)}else s.length&&o(d,s,c+1)}};return o(e,qo(t)?t.split("."):t,0),r?n:n[0]}function m4(e=1,t=3){let n=new Map,r=Math.pow(10,t);return{get(o){let i=o.match(g4).length;if(n.has(i))return n.get(i);let s=1/Math.pow(i,.5*e),c=parseFloat(Math.round(s*r)/r);return n.set(i,c),c},clear(){n.clear()}}}function Iw(e,t,{getFn:n=rt.getFn,fieldNormWeight:r=rt.fieldNormWeight}={}){let o=new kc({getFn:n,fieldNormWeight:r});return o.setKeys(e.map(Tw)),o.setSources(t),o.create(),o}function b4(e,{getFn:t=rt.getFn,fieldNormWeight:n=rt.fieldNormWeight}={}){let{keys:r,records:o}=e,i=new kc({getFn:t,fieldNormWeight:n});return i.setKeys(r),i.setIndexRecords(o),i}function Pd(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:o=rt.distance,ignoreLocation:i=rt.ignoreLocation}={}){let s=t/e.length;if(i)return s;let c=Math.abs(r-n);return o?s+c/o:c?1:s}function v4(e=[],t=rt.minMatchCharLength){let n=[],r=-1,o=-1,i=0;for(let s=e.length;i<s;i+=1){let c=e[i];c&&r===-1?r=i:!c&&r!==-1&&(o=i-1,o-r+1>=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}function y4(e,t,n,{location:r=rt.location,distance:o=rt.distance,threshold:i=rt.threshold,findAllMatches:s=rt.findAllMatches,minMatchCharLength:c=rt.minMatchCharLength,includeMatches:u=rt.includeMatches,ignoreLocation:d=rt.ignoreLocation}={}){if(t.length>Xa)throw new Error(l4(Xa));let p=t.length,h=e.length,g=Math.max(0,Math.min(r,h)),b=i,y=g,x=c>1||u,v=x?Array(h):[],D;for(;(D=e.indexOf(t,y))>-1;){let Q=Pd(t,{currentLocation:D,expectedLocation:g,distance:o,ignoreLocation:d});if(b=Math.min(Q,b),y=D+p,x){let V=0;for(;V<p;)v[D+V]=1,V+=1}}y=-1;let M=[],T=1,C=p+h,z=1<<p-1;for(let Q=0;Q<p;Q+=1){let V=0,J=C;for(;V<J;)Pd(t,{errors:Q,currentLocation:g+J,expectedLocation:g,distance:o,ignoreLocation:d})<=b?V=J:C=J,J=Math.floor((C-V)/2+V);C=J;let Y=Math.max(1,g-J+1),Z=s?h:Math.min(g+J,h)+p,W=Array(Z+2);W[Z+1]=(1<<Q)-1;for(let $=Z;$>=Y;$-=1){let de=$-1,ne=n[e.charAt(de)];if(x&&(v[de]=+!!ne),W[$]=(W[$+1]<<1|1)&ne,Q&&(W[$]|=(M[$+1]|M[$])<<1|1|M[$+1]),W[$]&z&&(T=Pd(t,{errors:Q,currentLocation:de,expectedLocation:g,distance:o,ignoreLocation:d}),T<=b)){if(b=T,y=de,y<=g)break;Y=Math.max(1,2*g-y)}}if(Pd(t,{errors:Q+1,currentLocation:g,expectedLocation:g,distance:o,ignoreLocation:d})>b)break;M=W}let R={isMatch:y>=0,score:Math.max(.001,T)};if(x){let Q=v4(v,c);Q.length?u&&(R.indices=Q):R.isMatch=!1}return R}function x4(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let o=e.charAt(n);t[o]=(t[o]||0)|1<<r-n-1}return t}function mx(e,t){let n=e.match(t);return n?n[1]:null}function S4(e,t={}){return e.split(k4).map(n=>{let r=n.trim().split(w4).filter(i=>i&&!!i.trim()),o=[];for(let i=0,s=r.length;i<s;i+=1){let c=r[i],u=!1,d=-1;for(;!u&&++d<bx;){let p=og[d],h=p.isMultiMatch(c);h&&(o.push(new p(h,t)),u=!0)}if(!u)for(d=-1;++d<bx;){let p=og[d],h=p.isSingleMatch(c);if(h){o.push(new p(h,t));break}}}return o})}function C4(...e){ag.push(...e)}function sg(e,t){for(let n=0,r=ag.length;n<r;n+=1){let o=ag[n];if(o.condition(e,t))return new o(e,t)}return new ef(e,t)}function _w(e,t,{auto:n=!0}={}){let r=o=>{let i=Object.keys(o),s=D4(o);if(!s&&i.length>1&&!cg(o))return r(vx(o));if(P4(o)){let u=s?o[lg.PATH]:i[0],d=s?o[lg.PATTERN]:o[u];if(!qo(d))throw new Error(s4(u));let p={keyId:JA(u),pattern:d};return n&&(p.searcher=sg(d,t)),p}let c={children:[],operator:i[0]};return i.forEach(u=>{let d=o[u];ki(d)&&d.forEach(p=>{c.children.push(r(p))})}),c};return cg(e)||(e=vx(e)),r(e)}function T4(e,{ignoreFieldNorm:t=rt.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:o,norm:i,score:s})=>{let c=o?o.weight:null;r*=Math.pow(s===0&&c?Number.EPSILON:s,(c||1)*(t?1:i))}),n.score=r})}function I4(e,t){let n=e.matches;t.matches=[],Lr(n)&&n.forEach(r=>{if(!Lr(r.indices)||!r.indices.length)return;let{indices:o,value:i}=r,s={indices:o,value:i};r.key&&(s.key=r.key.src),r.idx>-1&&(s.refIndex=r.idx),t.matches.push(s)})}function _4(e,t){t.score=e.score}function B4(e,t,{includeMatches:n=rt.includeMatches,includeScore:r=rt.includeScore}={}){let o=[];return n&&o.push(I4),r&&o.push(_4),e.map(i=>{let{idx:s}=i,c={item:t[s],refIndex:s};return o.length&&o.forEach(u=>{u(i,c)}),c})}function M4({highlight:e,text:t}){if(!e||!e.length)return t;let n=new RegExp(e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"gi"),r=[...t.matchAll(n)];if(!r.length)return t;let o=[],i=0;for(let s of r)s.index>i&&o.push(t.substr(i,s.index)),o.push(E.jsx("span",{className:"highlight",children:s[0]})),i=s.index+s[0].length;return o.push(t.substr(i)),o}function O4({delay:e=300,placeholder:t,setSearchText:n,width:r="calc(var(--width) / 4)"}){let o=P.useRef(null),i=P.useRef(null),[s,c]=P.useState(""),u=()=>{c(""),n(""),o.current.value="",o.current.focus()};return P.useLayoutEffect(()=>{o.current&&o.current.addEventListener("keyup",()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,n(o.current.value),c(o.current.value)},e)})},[o.current]),E.jsx(E.Fragment,{children:E.jsxs("div",{className:"search",children:[E.jsx("input",{placeholder:t,style:{width:r},ref:o}),s.length?E.jsx("button",{className:"btn btn-clear",title:"Clear search",onClick:u,children:E.jsx(kt,{name:"x-lg"})}):null]})})}function L4({infoGroupId:e}){let t=Kn("https://sds-ara-api.access-ci.org/api/v1",{body:JSON.stringify({rps:[e],columns:R4}),headers:{"Content-Type":"application/json","X-API-Key":"asSuQQ0IfIEUrSRTl44aqn2ZpMPpJ_G02BgemAY4WN0"},method:"POST"}),[n,r]=P.useState(""),o=P.useMemo(()=>t?.data&&t.data.length?new ca(t.data,{keys:[{name:"software_name",weight:.6},{name:"software_description",weight:.4}]}):null,[t?.data]);if(!t?.data||!t.data.length)return;let i=d=>E.jsx(M4,{text:d,highlight:n}),s=[{key:"software_name",name:"Package",format:(d,p)=>{let h=i(d),g=p.software_web_page||p.software_documentation,b=p.software_use_link&&p.software_use_link.length?p.software_use_link[0]:"";return E.jsxs("span",{style:{lineHeight:1.3},children:[g?E.jsx("a",{href:g,children:h},"name"):h," ",p.software_documentation&&E.jsx("a",{href:p.software_documentation,title:`Documentation for ${d}`,children:E.jsx(kt,{name:"book"})},"documentation")," ",b&&b!=p.software_documentation&&E.jsx("a",{href:b,title:`Usage example for ${d}`,children:E.jsx(kt,{name:"terminal"})},"use")]})}},{key:"software_versions",name:"Versions",format:(d,p)=>p.rps[e].software_versions.join(", ")},{key:"software_description",name:"Description",format:(d,p)=>{let h=/Description Source:[ ]+(http[^ ]+)/,g=d.match(h);return E.jsxs(E.Fragment,{children:[i(d.replace(h,""))," ",g?E.jsx("a",{href:g[1],title:`Description source for ${p.software_name}`,children:E.jsx(kt,{name:"info-circle"})}):null]})}}],c=n.length?o.search(n).map(d=>d.item):t.data,u=[E.jsx(O4,{placeholder:"Search software packages...",setSearchText:r},"search")];return E.jsx(Ko,{title:"Software",icon:"terminal",headerComponents:u,children:E.jsx(sf,{columns:s,rows:c,scrollResetOnUpdate:!0})})}function j4({prompt:e="Jump To:"}){let[t,n]=P.useState([]),r=P.useRef(null),o=()=>{let s=[];for(let c of r.current.querySelectorAll("[data-section-title]"))s.push({icon:c.dataset.sectionIcon,id:c.id,title:c.dataset.sectionTitle});n(s)},i=s=>{let c=r.current.querySelector(`#${s}`);c&&c.scrollIntoView()};return P.useEffect(()=>{r.current&&(o(),document.addEventListener("accessci-update-sections",o))},[r.current]),E.jsx("div",{ref:s=>r.current=s?.parentElement,children:t.length>=2?E.jsxs("nav",{className:"section-navigation",children:[e?E.jsx("h2",{children:e}):null,E.jsx("ul",{children:t.map(({icon:s,id:c,title:u})=>E.jsx("li",{children:E.jsxs("a",{href:`#${c}`,onClick:d=>{d.preventDefault(),i(c)},children:[s?E.jsxs(E.Fragment,{children:[E.jsx(kt,{name:s})," "]}):null,u]})},c))})]}):null})}function N4({baseUri:e,showBreadcrumbs:t=!0}){let{infoGroupId:n}=Rw(),r=il(n),o=[{name:"Resources",href:e}];return r&&o.push({name:r.name}),E.jsxs(E.Fragment,{children:[t&&E.jsx(Pc,{expandWidth:!0,items:o,topBorder:!0}),E.jsxs("div",{className:"resource-group-detail",children:[E.jsx(FD,{infoGroupId:n}),E.jsx(j4,{}),E.jsx(D8,{infoGroupId:n}),E.jsx(y8,{infoGroupId:n}),E.jsx(S8,{infoGroupId:n}),E.jsx(zD,{infoGroupId:n}),E.jsx(L4,{infoGroupId:n}),E.jsx(mT,{infoGroupId:n}),E.jsx(t4,{infoGroupId:n}),E.jsx(HD,{infoGroupId:n})]})]})}var By,UD,vr,$r,eo,yr,ug,Sc,Gs,gc,VD,yx,tc,WD,My,xx,YD,qD,KD,GD,XD,JD,ZD,$D,eP,tP,wx,Ja,Rd,Xs,sP,uP,dP,hP,fd,gP,mP,bP,DP,TP,BP,OP,jP,Fy,qP,KP,GP,Ix,XP,_x,Bx,Ka,Mx,Wo,qy,c8,u8,d8,f8,vo,p8,h8,g8,m8,pd,rA,L8,z8,F8,hd,H8,Fx,J8,Z8,Qx,oA,t1,lT,bg,cT,uT,fT,pT,gT,ta,Xr,PA,bT,vT,gd,yT,wT,ST,r1,o1,md,RT,iA,Hs,zd,FT,QT,Yx,a1,yc,la,s1,wn,jr,Ud,qT,Nr,Va,l1,Kx,aa,IA,nI,Gx,Jx,Sg,Yn,aI,vd,f1,p1,hc,sI,lI,A1,fI,ew,es,_A,BA,$t,vI,yI,wI,SI,Pg,PI,pf,RI,LI,na,FI,QI,UI,MA,vi,k1,WI,OA,Yd,uA,P1,n_,tl,RA,LA,jA,NA,h_,v_,pw,Jr,qd,zA,Md,D_,L1,Aw,wc,j1,FA,ol,W_,N1,z1,nl,Ys,QA,Vo,UA,V1,vw,ac,d5,f5,h5,A5,Od,G1,Bg,WA,YA,J1,I5,$1,_5,Gd,L5,Xd,N5,cc,Ew,Jd,Y5,q5,G5,qA,KA,GA,Af,br,Zd,fx,px,mA,bA,hx,Dd,a4,s4,l4,c4,u4,Ax,XA,f4,p4,h4,A4,rt,g4,kc,Xa,$d,ef,Jo,ZA,$A,eg,tg,ng,rg,tf,nf,og,bx,w4,k4,E4,ig,ag,rf,lg,cg,D4,P4,vx,ca,R4,Mw=zl(()=>{Us();$h();By=()=>{let e=new Event("accessci-update-sections");document.dispatchEvent(e)};UD={text:QD};vr="top",$r="bottom",eo="right",yr="left",ug="auto",Sc=[vr,$r,eo,yr],Gs="start",gc="end",VD="clippingParents",yx="viewport",tc="popper",WD="reference",My=Sc.reduce(function(e,t){return e.concat([t+"-"+Gs,t+"-"+gc])},[]),xx=[].concat(Sc,[ug]).reduce(function(e,t){return e.concat([t,t+"-"+Gs,t+"-"+gc])},[]),YD="beforeRead",qD="read",KD="afterRead",GD="beforeMain",XD="main",JD="afterMain",ZD="beforeWrite",$D="write",eP="afterWrite",tP=[YD,qD,KD,GD,XD,JD,ZD,$D,eP];wx={name:"applyStyles",enabled:!0,phase:"write",fn:nP,effect:rP,requires:["computeStyles"]};Ja=Math.max,Rd=Math.min,Xs=Math.round;sP=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Cx(typeof e!="number"?e:Dx(e,Sc))};uP={name:"arrow",enabled:!0,phase:"main",fn:lP,effect:cP,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};dP={top:"auto",right:"auto",bottom:"auto",left:"auto"};hP={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:pP,data:{}},fd={passive:!0};gP={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:AP,data:{}},mP={left:"right",right:"left",bottom:"top",top:"bottom"};bP={start:"end",end:"start"};DP={name:"flip",enabled:!0,phase:"main",fn:CP,requiresIfExists:["offset"],data:{_skip:!1}};TP={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:PP};BP={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_P};OP={name:"popperOffsets",enabled:!0,phase:"read",fn:MP,data:{}};jP={name:"preventOverflow",enabled:!0,phase:"main",fn:LP,requiresIfExists:["offset"]};Fy={placement:"bottom",modifiers:[],strategy:"absolute"};qP=[gP,OP,hP,wx,BP,DP,jP,uP,TP],KP=YP({defaultModifiers:qP}),GP="tippy-box",Ix="tippy-content",XP="tippy-backdrop",_x="tippy-arrow",Bx="tippy-svg-arrow",Ka={passive:!0,capture:!0},Mx=function(){return document.body};Wo={isTouch:!1},qy=0;c8=typeof window<"u"&&typeof document<"u",u8=c8?!!window.msCrypto:!1,d8={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},f8={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},vo=Object.assign({appendTo:Mx,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},d8,f8),p8=Object.keys(vo),h8=function(e){var t=Object.keys(e);t.forEach(function(n){vo[n]=e[n]})};g8=function(){return"innerHTML"};jx.$$tippy=!0;m8=1,pd=[],rA=[];Cc.defaultProps=vo;Cc.setDefaultProps=h8;Cc.currentInput=Wo;Object.assign({},wx,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Cc.setDefaultProps({render:jx});L8={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perSwipe:"",touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(.165, .840, .440, 1)",waitForTransition:!0,throttle:10,direction:"ltr",peek:0,cloningRatio:1,breakpoints:{},classes:{swipeable:"glide--swipeable",dragging:"glide--dragging",direction:{ltr:"glide--ltr",rtl:"glide--rtl"},type:{slider:"glide--slider",carousel:"glide--carousel"},slide:{clone:"glide__slide--clone",active:"glide__slide--active"},arrow:{disabled:"glide__arrow--disabled"},nav:{active:"glide__bullet--active"}}};z8=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uf(this,e),this.events=t,this.hop=t.hasOwnProperty}return df(e,[{key:"on",value:function(t,n){if(CA(t)){for(var r=0;r<t.length;r++)this.on(t[r],n);return}this.hop.call(this.events,t)||(this.events[t]=[]);var o=this.events[t].push(n)-1;return{remove:function(){delete this.events[t][o]}}}},{key:"emit",value:function(t,n){if(CA(t)){for(var r=0;r<t.length;r++)this.emit(t[r],n);return}this.hop.call(this.events,t)&&this.events[t].forEach(function(o){o(n||{})})}}]),e})(),F8=(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};uf(this,e),this._c={},this._t=[],this._e=new z8,this.disabled=!1,this.selector=t,this.settings=$y(L8,n),this.index=this.settings.startAt}return df(e,[{key:"mount",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._e.emit("mount.before"),bc(t)?this._c=N8(this,t,this._e):oa("You need to provide a object on `mount()`"),this._e.emit("mount.after"),this}},{key:"mutate",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return CA(t)?this._t=t:oa("You need to provide a array on `mutate()`"),this}},{key:"update",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.settings=$y(this.settings,t),t.hasOwnProperty("startAt")&&(this.index=t.startAt),this._e.emit("update"),this}},{key:"go",value:function(t){return this._c.Run.make(t),this}},{key:"move",value:function(t){return this._c.Transition.disable(),this._c.Move.make(t),this}},{key:"destroy",value:function(){return this._e.emit("destroy"),this}},{key:"play",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return t&&(this.settings.autoplay=t),this._e.emit("play"),this}},{key:"pause",value:function(){return this._e.emit("pause"),this}},{key:"disable",value:function(){return this.disabled=!0,this}},{key:"enable",value:function(){return this.disabled=!1,this}},{key:"on",value:function(t,n){return this._e.on(t,n),this}},{key:"isType",value:function(t){return this.settings.type===t}},{key:"settings",get:function(){return this._o},set:function(t){bc(t)?this._o=t:oa("Options must be an `object` instance.")}},{key:"index",get:function(){return this._i},set:function(t){this._i=bo(t)}},{key:"type",get:function(){return this.settings.type}},{key:"disabled",get:function(){return this._d},set:function(t){this._d=!!t}}]),e})();hd={ltr:["marginLeft","marginRight"],rtl:["marginRight","marginLeft"]};H8='[data-glide-el="track"]';Fx=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uf(this,e),this.listeners=t}return df(e,[{key:"on",value:function(t,n,r){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;EA(t)&&(t=[t]);for(var i=0;i<t.length;i++)this.listeners[t[i]]=r,n.addEventListener(t[i],this.listeners[t[i]],o)}},{key:"off",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;EA(t)&&(t=[t]);for(var o=0;o<t.length;o++)n.removeEventListener(t[o],this.listeners[t[o]],r)}},{key:"destroy",value:function(){delete this.listeners}}]),e})();J8=["ltr","rtl"],Z8={">":"<","<":">","=":"="};Qx=!1;try{oA=Object.defineProperty({},"passive",{get:function(){Qx=!0}}),window.addEventListener("testPassive",null,oA),window.removeEventListener("testPassive",null,oA)}catch{}t1=Qx,lT='[data-glide-el="controls[nav]"]',bg='[data-glide-el^="controls"]',cT="".concat(bg,' [data-glide-dir*="<"]'),uT="".concat(bg,' [data-glide-dir*=">"]');fT={Html:V8,Translate:aT,Transition:sT,Direction:$8,Peek:W8,Sizes:q8,Gaps:U8,Move:Y8,Clones:G8,Resize:X8,Build:K8,Run:Q8},pT=(function(e){I8(n,e);var t=O8(n);function n(){return uf(this,n),t.apply(this,arguments)}return df(n,[{key:"mount",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return _d($s(n.prototype),"mount",this).call(this,Object.assign({},fT,r))}}]),n})(F8);Nd.Slide=Ux;Nd.ImageSlide=hT;gT="https://allocations.access-ci.org/current-projects.json";ta=(e,t,n)=>Math.max(Math.min(e,n),t);Xr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},PA=[..."0123456789ABCDEF"],bT=e=>PA[e&15],vT=e=>PA[(e&240)>>4]+PA[e&15],gd=e=>(e&240)>>4===(e&15),yT=e=>gd(e.r)&&gd(e.g)&&gd(e.b)&&gd(e.a);wT=(e,t)=>e<255?t(e):"";ST=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;r1={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},o1={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};RT=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;iA=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Hs=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);zd=class e{constructor(t){if(t instanceof e)return t;let n=typeof t,r;n==="object"?r=i1(t):n==="string"&&(r=xT(t)||OT(t)||zT(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=Wx(this._rgb);return t&&(t.a=xi(t.a)),t}set rgb(t){this._rgb=i1(t)}rgbString(){return this._valid?jT(this._rgb):void 0}hexString(){return this._valid?kT(this._rgb):void 0}hslString(){return this._valid?BT(this._rgb):void 0}mix(t,n){if(t){let r=this.rgb,o=t.rgb,i,s=n===i?.5:n,c=2*s-1,u=r.a-o.a,d=((c*u===-1?c:(c+u)/(1+c*u))+1)/2;i=1-d,r.r=255&d*r.r+i*o.r+.5,r.g=255&d*r.g+i*o.g+.5,r.b=255&d*r.b+i*o.b+.5,r.a=s*r.a+(1-s)*o.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=NT(this._rgb,t._rgb,n)),this}clone(){return new e(this.rgb)}alpha(t){return this._rgb.a=ia(t),this}clearer(t){let n=this._rgb;return n.a*=1-t,this}greyscale(){let t=this._rgb,n=Dc(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){let n=this._rgb;return n.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return bd(this._rgb,2,t),this}darken(t){return bd(this._rgb,2,-t),this}saturate(t){return bd(this._rgb,1,t),this}desaturate(t){return bd(this._rgb,1,-t),this}rotate(t){return _T(this._rgb,t),this}};FT=(()=>{let e=0;return()=>e++})();QT=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Yx=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;a1={"":e=>e,x:e=>e.x,y:e=>e.y};yc=e=>typeof e<"u",la=e=>typeof e=="function",s1=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};wn=Math.PI,jr=2*wn,Ud=Number.POSITIVE_INFINITY,qT=wn/180,Nr=wn/2,Va=wn/4,l1=wn*2/3,Kx=Math.log10,aa=Math.sign;IA=(e,t,n,r)=>kg(e,n,r?o=>{let i=e[o][t];return i<n||i===n&&e[o+1][t]===n}:o=>e[o][t]<n),nI=(e,t,n)=>kg(e,n,r=>e[r][t]>=n);Gx=["push","pop","shift","splice","unshift"];Jx=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();Sg=e=>e==="start"?"left":e==="end"?"right":"center",Yn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,aI=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t,vd=e=>e===0||e===1,f1=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*jr/n)),p1=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*jr/n)+1,hc={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Nr)+1,easeOutSine:e=>Math.sin(e*Nr),easeInOutSine:e=>-.5*(Math.cos(wn*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>vd(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>vd(e)?e:f1(e,.075,.3),easeOutElastic:e=>vd(e)?e:p1(e,.075,.3),easeInOutElastic(e){return vd(e)?e:e<.5?.5*f1(e*2,.1125,.45):.5+.5*p1(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-hc.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?hc.easeInBounce(e*2)*.5:hc.easeOutBounce(e*2-1)*.5+.5};sI=["x","y","borderWidth","radius","tension"],lI=["color","borderColor","backgroundColor"];A1=new Map;fI={values(e){return xn(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";let r=this.chart.options.locale,o,i=e;if(n.length>1){let d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(o="scientific"),i=pI(e,n)}let s=Kx(Math.abs(i)),c=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),u={notation:o,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(u,this.options.ticks.format),ff(e,r,u)}};ew={formatters:fI};es=Object.create(null),_A=Object.create(null);BA=class{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,o)=>aA(o.backgroundColor),this.hoverBorderColor=(r,o)=>aA(o.borderColor),this.hoverColor=(r,o)=>aA(o.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return sA(this,t,n)}get(t){return Ac(this,t)}describe(t,n){return sA(_A,t,n)}override(t,n){return sA(es,t,n)}route(t,n,r,o){let i=Ac(this,t),s=Ac(this,r),c="_"+n;Object.defineProperties(i,{[c]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){let u=this[c],d=s[o];return Et(u)?Object.assign({},d,u):Dt(u,d)},set(u){this[c]=u}}})}apply(t){t.forEach(n=>n(this))}},$t=new BA({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[cI,uI,hI]);vI=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,yI=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;wI=e=>+e||0;SI=(e,t)=>e?e+wg(t):t,Pg=(e,t)=>Et(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);PI=(e,t)=>e===!0?t:typeof e=="string"?sa(t,e):void 0;pf=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);RI=["top","right","bottom","left"];LI=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);na=e=>Math.round(e*10)/10;FI=(function(){let e=!1;try{let t={get passive(){return e=!0,!1}};Ig()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();QI=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},UI=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};MA=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,o){let i=n.listeners[o],s=n.duration;i.forEach(c=>c({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Jx.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,o)=>{if(!r.running||!r.items.length)return;let i=r.items,s=i.length-1,c=!1,u;for(;s>=0;--s)u=i[s],u._active?(u._total>r.duration&&(r.duration=u._total),u.tick(t),c=!0):(i[s]=i[i.length-1],i.pop());c&&(o.draw(),this._notify(o,r,t,"progress")),i.length||(r.running=!1,this._notify(o,r,t,"complete"),r.initial=!1),n+=i.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){let n=this._charts,r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){let n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,o)=>Math.max(r,o._duration),0),this._refresh())}running(t){if(!this._running)return!1;let n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){let n=this._charts.get(t);if(!n||!n.items.length)return;let r=n.items,o=r.length-1;for(;o>=0;--o)r[o].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},vi=new MA,k1="transparent",WI={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let r=h1(e||k1),o=r.valid&&h1(t||k1);return o&&o.valid?o.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}},OA=class{constructor(t,n,r,o){let i=n[r];o=yd([t.to,o,i,t.from]);let s=yd([t.from,i,o]);this._active=!0,this._fn=t.fn||WI[t.type||typeof s],this._easing=hc[t.easing]||hc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=o,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);let o=this._target[this._prop],i=r-this._start,s=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=yd([t.to,n,o,t.from]),this._from=yd([t.from,o,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let n=t-this._start,r=this._duration,o=this._prop,i=this._from,s=this._loop,c=this._to,u;if(this._active=i!==c&&(s||n<r),!this._active){this._target[o]=c,this._notify(!0);return}if(n<0){this._target[o]=i;return}u=n/r%2,u=s&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[o]=this._fn(i,c,u)}wait(){let t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){let n=t?"res":"rej",r=this._promises||[];for(let o=0;o<r.length;o++)r[o][n]()}},Yd=class{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Et(t))return;let n=Object.keys($t.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(o=>{let i=t[o];if(!Et(i))return;let s={};for(let c of n)s[c]=i[c];(xn(i.properties)&&i.properties||[o]).forEach(c=>{(c===o||!r.has(c))&&r.set(c,s)})})}_animateOptions(t,n){let r=n.options,o=qI(t,r);if(!o)return[];let i=this._createAnimations(o,r);return r.$shared&&YI(t.options.$animations,r).then(()=>{t.options=r},()=>{}),i}_createAnimations(t,n){let r=this._properties,o=[],i=t.$animations||(t.$animations={}),s=Object.keys(n),c=Date.now(),u;for(u=s.length-1;u>=0;--u){let d=s[u];if(d.charAt(0)==="$")continue;if(d==="options"){o.push(...this._animateOptions(t,n));continue}let p=n[d],h=i[d],g=r.get(d);if(h)if(g&&h.active()){h.update(g,p,c);continue}else h.cancel();if(!g||!g.duration){t[d]=p;continue}i[d]=h=new OA(g,t,d,p),o.push(h)}return o}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}let r=this._createAnimations(t,n);if(r.length)return vi.add(this._chart,r),!0}};uA=e=>e==="reset"||e==="none",P1=(e,t)=>t?e:Object.assign({},e),n_=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:dw(n,!0),values:null},tl=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=lA(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&nc(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,n=this._cachedMeta,r=this.getDataset(),o=(h,g,b,y)=>h==="x"?g:h==="r"?y:b,i=n.xAxisID=Dt(r.xAxisID,cA(t,"x")),s=n.yAxisID=Dt(r.yAxisID,cA(t,"y")),c=n.rAxisID=Dt(r.rAxisID,cA(t,"r")),u=n.indexAxis,d=n.iAxisID=o(u,i,s,c),p=n.vAxisID=o(u,s,i,c);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&d1(this._data,this),t._stacked&&nc(t)}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Et(n)){let o=this._cachedMeta;this._data=XI(n,o)}else if(r!==n){if(r){d1(r,this);let o=this._cachedMeta;nc(o),o._parsed=[]}n&&Object.isExtensible(n)&&oI(n,this),this._syncList=[],this._data=n}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let n=this._cachedMeta,r=this.getDataset(),o=!1;this._dataCheck();let i=n._stacked;n._stacked=lA(n.vScale,n),n.stack!==r.stack&&(o=!0,nc(n),n.stack=r.stack),this._resyncElements(t),(o||i!==n._stacked)&&(D1(this,n._parsed),n._stacked=lA(n.vScale,n))}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){let{_cachedMeta:r,_data:o}=this,{iScale:i,_stacked:s}=r,c=i.axis,u=t===0&&n===o.length?!0:r._sorted,d=t>0&&r._parsed[t-1],p,h,g;if(this._parsing===!1)r._parsed=o,r._sorted=!0,g=o;else{xn(o[t])?g=this.parseArrayData(r,o,t,n):Et(o[t])?g=this.parseObjectData(r,o,t,n):g=this.parsePrimitiveData(r,o,t,n);let b=()=>h[c]===null||d&&h[c]<d[c];for(p=0;p<n;++p)r._parsed[p+t]=h=g[p],u&&(b()&&(u=!1),d=h);r._sorted=u}s&&D1(this,g)}parsePrimitiveData(t,n,r,o){let{iScale:i,vScale:s}=t,c=i.axis,u=s.axis,d=i.getLabels(),p=i===s,h=new Array(o),g,b,y;for(g=0,b=o;g<b;++g)y=g+r,h[g]={[c]:p||i.parse(d[y],y),[u]:s.parse(n[y],y)};return h}parseArrayData(t,n,r,o){let{xScale:i,yScale:s}=t,c=new Array(o),u,d,p,h;for(u=0,d=o;u<d;++u)p=u+r,h=n[p],c[u]={x:i.parse(h[0],p),y:s.parse(h[1],p)};return c}parseObjectData(t,n,r,o){let{xScale:i,yScale:s}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,d=new Array(o),p,h,g,b;for(p=0,h=o;p<h;++p)g=p+r,b=n[g],d[p]={x:i.parse(sa(b,c),g),y:s.parse(sa(b,u),g)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){let o=this.chart,i=this._cachedMeta,s=n[t.axis],c={keys:dw(o,!0),values:n._stacks[t.axis]._visualValues};return E1(c,s,i.index,{mode:r})}updateRangeFromParsed(t,n,r,o){let i=r[n.axis],s=i===null?NaN:i,c=o&&r._stacks[n.axis];o&&c&&(o.values=c,s=E1(o,i,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){let r=this._cachedMeta,o=r._parsed,i=r._sorted&&t===r.iScale,s=o.length,c=this._getOtherScale(t),u=n_(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:h}=ZI(c),g,b;function y(){b=o[g];let x=b[c.axis];return!to(b[t.axis])||p>x||h<x}for(g=0;g<s&&!(!y()&&(this.updateRangeFromParsed(d,t,b,u),i));++g);if(i){for(g=s-1;g>=0;--g)if(!y()){this.updateRangeFromParsed(d,t,b,u);break}}return d}getAllParsedValues(t){let n=this._cachedMeta._parsed,r=[],o,i,s;for(o=0,i=n.length;o<i;++o)s=n[o][t.axis],to(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){let n=this._cachedMeta,r=n.iScale,o=n.vScale,i=this.getParsed(t);return{label:r?""+r.getLabelForValue(i[r.axis]):"",value:o?""+o.getLabelForValue(i[o.axis]):""}}_update(t){let n=this._cachedMeta;this.update(t||"default"),n._clip=GI(Dt(this.options.clip,KI(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,n=this.chart,r=this._cachedMeta,o=r.data||[],i=n.chartArea,s=[],c=this._drawStart||0,u=this._drawCount||o.length-c,d=this.options.drawActiveElementsOnTop,p;for(r.dataset&&r.dataset.draw(t,i,c,u),p=c;p<c+u;++p){let h=o[p];h.hidden||(h.active&&d?s.push(h):h.draw(t,i))}for(p=0;p<s.length;++p)s[p].draw(t,i)}getStyle(t,n){let r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){let o=this.getDataset(),i;if(t>=0&&t<this._cachedMeta.data.length){let s=this._cachedMeta.data[t];i=s.$context||(s.$context=t_(this.getContext(),t,s)),i.parsed=this.getParsed(t),i.raw=o.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=e_(this.chart.getContext(),this.index)),i.dataset=o,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=r,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){let o=n==="active",i=this._cachedDataOpts,s=t+"-"+n,c=i[s],u=this.enableOptionSharing&&yc(r);if(c)return P1(c,u);let d=this.chart.config,p=d.datasetElementScopeKeys(this._type,t),h=o?[`${t}Hover`,"hover",t,""]:[t,""],g=d.getOptionScopes(this.getDataset(),p),b=Object.keys($t.elements[t]),y=()=>this.getContext(r,o,n),x=d.resolveNamedOptions(g,b,y,h);return x.$shared&&(x.$shared=u,i[s]=Object.freeze(P1(x,u))),x}_resolveAnimations(t,n,r){let o=this.chart,i=this._cachedDataOpts,s=`animation-${n}`,c=i[s];if(c)return c;let u;if(o.options.animation!==!1){let p=this.chart.config,h=p.datasetAnimationScopeKeys(this._type,n),g=p.getOptionScopes(this.getDataset(),h);u=p.createResolver(g,this.getContext(t,r,n))}let d=new Yd(o,u&&u.animations);return u&&u._cacheable&&(i[s]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||uA(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){let r=this.resolveDataElementOptions(t,n),o=this._sharedOptions,i=this.getSharedOptions(r),s=this.includeOptions(n,i)||i!==o;return this.updateSharedOptions(i,n,r),{sharedOptions:i,includeOptions:s}}updateElement(t,n,r,o){uA(o)?Object.assign(t,r):this._resolveAnimations(n,o).update(t,r)}updateSharedOptions(t,n,r){t&&!uA(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,o){t.active=o;let i=this.getStyle(n,o);this._resolveAnimations(n,r,o).update(t,{options:!o&&this.getSharedOptions(i)||i})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let n=this._data,r=this._cachedMeta.data;for(let[c,u,d]of this._syncList)this[c](u,d);this._syncList=[];let o=r.length,i=n.length,s=Math.min(i,o);s&&this.parse(0,s),i>o?this._insertElements(o,i-o,t):i<o&&this._removeElements(i,o-i)}_insertElements(t,n,r=!0){let o=this._cachedMeta,i=o.data,s=t+n,c,u=d=>{for(d.length+=n,c=d.length-1;c>=s;c--)d[c]=d[c-n]};for(u(i),c=t;c<s;++c)i[c]=new this.dataElementType;this._parsing&&u(o._parsed),this.parse(t,n),r&&this.updateElements(i,t,n,"reset")}updateElements(t,n,r,o){}_removeElements(t,n){let r=this._cachedMeta;if(this._parsing){let o=r._parsed.splice(t,n);r._stacked&&nc(r,o)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[n,r,o]=t;this[n](r,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);let r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}};RA=class extends tl{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,o){return T1(t,n,r,o)}parseArrayData(t,n,r,o){return T1(t,n,r,o)}parseObjectData(t,n,r,o){let{iScale:i,vScale:s}=t,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,d=i.axis==="x"?c:u,p=s.axis==="x"?c:u,h=[],g,b,y,x;for(g=r,b=r+o;g<b;++g)x=n[g],y={},y[i.axis]=i.parse(sa(x,d),g),h.push(fw(sa(x,p),y,s,g));return h}updateRangeFromParsed(t,n,r,o){super.updateRangeFromParsed(t,n,r,o);let i=r._custom;i&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let n=this._cachedMeta,{iScale:r,vScale:o}=n,i=this.getParsed(t),s=i._custom,c=dA(s)?"["+s.start+", "+s.end+"]":""+o.getLabelForValue(i[o.axis]);return{label:""+r.getLabelForValue(i[r.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,o){let i=o==="reset",{index:s,_cachedMeta:{vScale:c}}=this,u=c.getBasePixel(),d=c.isHorizontal(),p=this._getRuler(),{sharedOptions:h,includeOptions:g}=this._getSharedOptions(n,o);for(let b=n;b<n+r;b++){let y=this.getParsed(b),x=i||Nt(y[c.axis])?{base:u,head:u}:this._calculateBarValuePixels(b),v=this._calculateBarIndexPixels(b,p),D=(y._stacks||{})[c.axis],M={horizontal:d,base:x.base,enableBorderRadius:!D||dA(y._custom)||s===D._top||s===D._bottom,x:d?x.head:v.center,y:d?v.center:x.head,height:d?v.size:Math.abs(x.size),width:d?Math.abs(x.size):v.size};g&&(M.options=h||this.resolveDataElementOptions(b,t[b].active?"active":o));let T=M.options||t[b].options;u_(M,T,D,s),f_(M,T,p.ratio),this.updateElement(t[b],b,M,o)}}_getStacks(t,n){let{iScale:r}=this._cachedMeta,o=r.getMatchingVisibleMetas(this._type).filter(p=>p.controller.options.grouped),i=r.options.stacked,s=[],c=this._cachedMeta.controller.getParsed(n),u=c&&c[r.axis],d=p=>{let h=p._parsed.find(b=>b[r.axis]===u),g=h&&h[p.vScale.axis];if(Nt(g)||isNaN(g))return!0};for(let p of o)if(!(n!==void 0&&d(p))&&((i===!1||s.indexOf(p.stack)===-1||i===void 0&&p.stack===void 0)&&s.push(p.stack),p.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){let t={},n=this.getFirstScaleIdForIndexAxis();for(let r of this.chart.data.datasets)t[Dt(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){let o=this._getStacks(t,r),i=n!==void 0?o.indexOf(n):-1;return i===-1?o.length-1:i}_getRuler(){let t=this.options,n=this._cachedMeta,r=n.iScale,o=[],i,s;for(i=0,s=n.data.length;i<s;++i)o.push(r.getPixelForValue(this.getParsed(i)[r.axis],i));let c=t.barThickness;return{min:c||o_(n),pixels:o,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:c?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:n,_stacked:r,index:o},options:{base:i,minBarLength:s}}=this,c=i||0,u=this.getParsed(t),d=u._custom,p=dA(d),h=u[n.axis],g=0,b=r?this.applyStack(n,u,r):h,y,x;b!==h&&(g=b-h,b=h),p&&(h=d.barStart,b=d.barEnd-d.barStart,h!==0&&aa(h)!==aa(d.barEnd)&&(g=0),g+=h);let v=!Nt(i)&&!p?i:g,D=n.getPixelForValue(v);if(this.chart.getDataVisibility(t)?y=n.getPixelForValue(g+b):y=D,x=y-D,Math.abs(x)<s){x=l_(x,n,c)*s,h===c&&(D-=x/2);let M=n.getPixelForDecimal(0),T=n.getPixelForDecimal(1),C=Math.min(M,T),z=Math.max(M,T);D=Math.max(Math.min(D,z),C),y=D+x,r&&!p&&(u._stacks[n.axis]._visualValues[o]=n.getValueForPixel(y)-n.getValueForPixel(D))}if(D===n.getPixelForValue(c)){let M=aa(x)*n.getLineWidthForValue(c)/2;D+=M,x-=M}return{size:x,base:D,head:y,center:y+x/2}}_calculateBarIndexPixels(t,n){let r=n.scale,o=this.options,i=o.skipNull,s=Dt(o.maxBarThickness,1/0),c,u,d=this._getAxisCount();if(n.grouped){let p=i?this._getStackCount(t):n.stackCount,h=o.barThickness==="flex"?a_(t,n,o,p*d):i_(t,n,o,p*d),g=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,b=this._getAxis().indexOf(Dt(g,this.getFirstScaleIdForIndexAxis())),y=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0)+b;c=h.start+h.chunk*y+h.chunk/2,u=Math.min(s,h.chunk*h.ratio)}else c=r.getPixelForValue(this.getParsed(t)[r.axis],t),u=Math.min(s,n.min*n.ratio);return{base:c-u/2,head:c+u/2,center:c,size:u}}draw(){let t=this._cachedMeta,n=t.vScale,r=t.data,o=r.length,i=0;for(;i<o;++i)this.getParsed(i)[n.axis]!==null&&!r[i].hidden&&r[i].draw(this._ctx)}};LA=class extends tl{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data,{labels:{pointStyle:r,textAlign:o,color:i,useBorderRadius:s,borderRadius:c}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((u,d)=>{let p=t.getDatasetMeta(0).controller.getStyle(d);return{text:u,fillStyle:p.backgroundColor,fontColor:i,hidden:!t.getDataVisibility(d),lineDash:p.borderDash,lineDashOffset:p.borderDashOffset,lineJoin:p.borderJoinStyle,lineWidth:p.borderWidth,strokeStyle:p.borderColor,textAlign:o,pointStyle:r,borderRadius:s&&(c||p.borderRadius),index:d}}):[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){let r=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=r;else{let i=u=>+r[u];if(Et(r[t])){let{key:u="value"}=this._parsing;i=d=>+sa(r[d],u)}let s,c;for(s=t,c=t+n;s<c;++s)o._parsed[s]=i(s)}}_getRotation(){return Yo(this.options.rotation-90)}_getCircumference(){return Yo(this.options.circumference)}_getRotationExtents(){let t=jr,n=-jr;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){let o=this.chart.getDatasetMeta(r).controller,i=o._getRotation(),s=o._getCircumference();t=Math.min(t,i),n=Math.max(n,i+s)}return{rotation:t,circumference:n-t}}update(t){let n=this.chart,{chartArea:r}=n,o=this._cachedMeta,i=o.data,s=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,c=Math.max((Math.min(r.width,r.height)-s)/2,0),u=Math.min(QT(this.options.cutout,c),1),d=this._getRingWeight(this.index),{circumference:p,rotation:h}=this._getRotationExtents(),{ratioX:g,ratioY:b,offsetX:y,offsetY:x}=p_(h,p,u),v=(r.width-s)/g,D=(r.height-s)/b,M=Math.max(Math.min(v,D)/2,0),T=Yx(this.options.radius,M),C=Math.max(T*u,0),z=(T-C)/this._getVisibleDatasetWeightTotal();this.offsetX=y*T,this.offsetY=x*T,o.total=this.calculateTotal(),this.outerRadius=T-z*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-z*d,0),this.updateElements(i,0,i.length,t)}_circumference(t,n){let r=this.options,o=this._cachedMeta,i=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||o._parsed[t]===null||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*i/jr)}updateElements(t,n,r,o){let i=o==="reset",s=this.chart,c=s.chartArea,u=s.options.animation,d=(c.left+c.right)/2,p=(c.top+c.bottom)/2,h=i&&u.animateScale,g=h?0:this.innerRadius,b=h?0:this.outerRadius,{sharedOptions:y,includeOptions:x}=this._getSharedOptions(n,o),v=this._getRotation(),D;for(D=0;D<n;++D)v+=this._circumference(D,i);for(D=n;D<n+r;++D){let M=this._circumference(D,i),T=t[D],C={x:d+this.offsetX,y:p+this.offsetY,startAngle:v,endAngle:v+M,circumference:M,outerRadius:b,innerRadius:g};x&&(C.options=y||this.resolveDataElementOptions(D,T.active?"active":o)),v+=M,this.updateElement(T,D,C,o)}}calculateTotal(){let t=this._cachedMeta,n=t.data,r=0,o;for(o=0;o<n.length;o++){let i=t._parsed[o];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(o)&&!n[o].hidden&&(r+=Math.abs(i))}return r}calculateCircumference(t){let n=this._cachedMeta.total;return n>0&&!isNaN(t)?jr*(Math.abs(t)/n):0}getLabelAndValue(t){let n=this._cachedMeta,r=this.chart,o=r.data.labels||[],i=ff(n._parsed[t],r.options.locale);return{label:o[t]||"",value:i}}getMaxBorderWidth(t){let n=0,r=this.chart,o,i,s,c,u;if(!t){for(o=0,i=r.data.datasets.length;o<i;++o)if(r.isDatasetVisible(o)){s=r.getDatasetMeta(o),t=s.data,c=s.controller;break}}if(!t)return 0;for(o=0,i=t.length;o<i;++o)u=c.resolveDataElementOptions(o),u.borderAlign!=="inner"&&(n=Math.max(n,u.borderWidth||0,u.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,o=t.length;r<o;++r){let i=this.resolveDataElementOptions(r);n=Math.max(n,i.offset||0,i.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Dt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}},jA=class extends tl{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(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:r,color:o}}=t.legend.options;return n.labels.map((i,s)=>{let c=t.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,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(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let n=this._cachedMeta,r=this.chart,o=r.data.labels||[],i=ff(n._parsed[t].r,r.options.locale);return{label:o[t]||"",value:i}}parseObjectData(t,n,r,o){return MI.bind(this)(t,n,r,o)}update(t){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){let t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,o)=>{let i=this.getParsed(o).r;!isNaN(i)&&this.chart.getDataVisibility(o)&&(i<n.min&&(n.min=i),i>n.max&&(n.max=i))}),n}_updateRadius(){let t=this.chart,n=t.chartArea,r=t.options,o=Math.min(n.right-n.left,n.bottom-n.top),i=Math.max(o/2,0),s=Math.max(r.cutoutPercentage?i/100*r.cutoutPercentage:1,0),c=(i-s)/t.getVisibleDatasetCount();this.outerRadius=i-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(t,n,r,o){let i=o==="reset",s=this.chart,c=s.options.animation,u=this._cachedMeta.rScale,d=u.xCenter,p=u.yCenter,h=u.getIndexAngle(0)-.5*wn,g=h,b,y=360/this.countVisibleElements();for(b=0;b<n;++b)g+=this._computeAngle(b,o,y);for(b=n;b<n+r;b++){let x=t[b],v=g,D=g+this._computeAngle(b,o,y),M=s.getDataVisibility(b)?u.getDistanceFromCenterForValue(this.getParsed(b).r):0;g=D,i&&(c.animateScale&&(M=0),c.animateRotate&&(v=D=h));let T={x:d,y:p,innerRadius:0,outerRadius:M,startAngle:v,endAngle:D,options:this.resolveDataElementOptions(b,x.active?"active":o)};this.updateElement(x,b,T,o)}}countVisibleElements(){let t=this._cachedMeta,n=0;return t.data.forEach((r,o)=>{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Yo(this.resolveDataElementOptions(t,n).angle||r):0}};NA=class e{static override(t){Object.assign(e.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return qa()}parse(){return qa()}format(){return qa()}add(){return qa()}diff(){return qa()}startOf(){return qa()}endOf(){return qa()}},h_={_date:NA};v_={modes:{index(e,t,n,r){let o=Ga(t,e),i=n.axis||"x",s=n.includeInvisible||!1,c=n.intersect?fA(e,o,i,r,s):pA(e,o,i,!1,r,s),u=[];return c.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{let p=c[0].index,h=d.data[p];h&&!h.skip&&u.push({element:h,datasetIndex:d.index,index:p})}),u):[]},dataset(e,t,n,r){let o=Ga(t,e),i=n.axis||"xy",s=n.includeInvisible||!1,c=n.intersect?fA(e,o,i,r,s):pA(e,o,i,!1,r,s);if(c.length>0){let u=c[0].datasetIndex,d=e.getDatasetMeta(u).data;c=[];for(let p=0;p<d.length;++p)c.push({element:d[p],datasetIndex:u,index:p})}return c},point(e,t,n,r){let o=Ga(t,e),i=n.axis||"xy",s=n.includeInvisible||!1;return fA(e,o,i,r,s)},nearest(e,t,n,r){let o=Ga(t,e),i=n.axis||"xy",s=n.includeInvisible||!1;return pA(e,o,i,n.intersect,r,s)},x(e,t,n,r){let o=Ga(t,e);return B1(e,o,"x",n.intersect,r)},y(e,t,n,r){let o=Ga(t,e);return B1(e,o,"y",n.intersect,r)}}},pw=["left","top","right","bottom"];Jr={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){let n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;let o=no(e.options.layout.padding),i=Math.max(t-o.width,0),s=Math.max(n-o.height,0),c=k_(e.boxes),u=c.vertical,d=c.horizontal;Tt(e.boxes,x=>{typeof x.beforeLayout=="function"&&x.beforeLayout()});let p=u.reduce((x,v)=>v.box.options&&v.box.options.display===!1?x:x+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:o,availableWidth:i,availableHeight:s,vBoxMaxWidth:i/2/p,hBoxMaxHeight:s/2}),g=Object.assign({},o);hw(g,no(r));let b=Object.assign({maxPadding:g,w:i,h:s,x:o.left,y:o.top},o),y=w_(u.concat(d),h);lc(c.fullSize,b,h,y),lc(u,b,h,y),lc(d,b,h,y)&&lc(u,b,h,y),E_(b),R1(c.leftAndTop,b,h,y),b.x+=b.w,b.y+=b.h,R1(c.rightAndBottom,b,h,y),e.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},Tt(c.chartArea,x=>{let v=x.box;Object.assign(v,e.chartArea),v.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}},qd=class{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,o){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,o?Math.floor(n/o):r)}}isAttached(t){return!0}updateConfig(t){}},zA=class extends qd{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},Md="$chartjs",D_={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},L1=e=>e===null||e==="";Aw=FI?{passive:!0}:!1;wc=new Map,j1=0;FA=class extends qd{acquireContext(t,n){let r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(P_(t,n),r):null}releaseContext(t){let n=t.canvas;if(!n[Md])return!1;let r=n[Md].initial;["height","width"].forEach(i=>{let s=r[i];Nt(s)?n.removeAttribute(i):n.setAttribute(i,s)});let o=r.style||{};return Object.keys(o).forEach(i=>{n.style[i]=o[i]}),n.width=n.width,delete n[Md],!0}addEventListener(t,n,r){this.removeEventListener(t,n);let o=t.$proxies||(t.$proxies={}),i={attach:B_,detach:M_,resize:L_}[n]||j_;o[n]=i(t,n,r)}removeEventListener(t,n){let r=t.$proxies||(t.$proxies={}),o=r[n];o&&(({attach:hA,detach:hA,resize:hA}[n]||I_)(t,n,o),r[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,o){return zI(t,n,r,o)}isAttached(t){let n=t&&_g(t);return!!(n&&n.isConnected)}};ol=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return Hd(this.x)&&Hd(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(o=>{r[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),r}};W_=e=>e==="left"?"right":e==="right"?"left":e,N1=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,z1=(e,t)=>Math.min(t||e,e);nl=class e extends ol{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:o}=this;return t=Uo(t,Number.POSITIVE_INFINITY),n=Uo(n,Number.NEGATIVE_INFINITY),r=Uo(r,Number.POSITIVE_INFINITY),o=Uo(o,Number.NEGATIVE_INFINITY),{min:Uo(t,r),max:Uo(n,o),minDefined:to(t),maxDefined:to(n)}}getMinMax(t){let{min:n,max:r,minDefined:o,maxDefined:i}=this.getUserBounds(),s;if(o&&i)return{min:n,max:r};let c=this.getMatchingVisibleMetas();for(let u=0,d=c.length;u<d;++u)s=c[u].controller.getMinMax(this,t),o||(n=Math.min(n,s.min)),i||(r=Math.max(r,s.max));return n=i&&n>r?r:n,r=o&&n>r?n:r,{min:Uo(n,Uo(r,n)),max:Uo(r,Uo(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(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Wt(this.options.beforeUpdate,[this])}update(t,n,r){let{beginAtZero:o,grace:i,ticks:s}=this.options,c=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,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=kI(this,i,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let u=c<this.ticks.length;this._convertTicksToLabels(u?F1(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=z_(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Wt(this.options.afterUpdate,[this])}beforeSetDimensions(){Wt(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(){Wt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Wt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Wt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let n=this.options.ticks,r,o,i;for(r=0,o=t.length;r<o;r++)i=t[r],i.label=Wt(n.callback,[i.value,r,t],this)}afterTickToLabelConversion(){Wt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Wt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t=this.options,n=t.ticks,r=z1(this.ticks.length,t.ticks.maxTicksLimit),o=n.minRotation||0,i=n.maxRotation,s=o,c,u,d;if(!this._isVisible()||!n.display||o>=i||r<=1||!this.isHorizontal()){this.labelRotation=o;return}let p=this._getLabelSizes(),h=p.widest.width,g=p.highest.height,b=yo(this.chart.width-h,0,this.maxWidth);c=t.offset?this.maxWidth/r:b/(r-1),h+6>c&&(c=b/(r-(t.offset?.5:1)),u=this.maxHeight-ic(t.grid)-n.padding-Q1(t.title,this.chart.options.font),d=Math.sqrt(h*h+g*g),s=ZT(Math.min(Math.asin(yo((p.highest.height+6)/c,-1,1)),Math.asin(yo(u/d,-1,1))-Math.asin(yo(g/d,-1,1)))),s=Math.max(o,Math.min(i,s))),this.labelRotation=s}afterCalculateLabelRotation(){Wt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Wt(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:n,options:{ticks:r,title:o,grid:i}}=this,s=this._isVisible(),c=this.isHorizontal();if(s){let u=Q1(o,n.options.font);if(c?(t.width=this.maxWidth,t.height=ic(i)+u):(t.height=this.maxHeight,t.width=ic(i)+u),r.display&&this.ticks.length){let{first:d,last:p,widest:h,highest:g}=this._getLabelSizes(),b=r.padding*2,y=Yo(this.labelRotation),x=Math.cos(y),v=Math.sin(y);if(c){let D=r.mirror?0:v*h.width+x*g.height;t.height=Math.min(this.maxHeight,t.height+D+b)}else{let D=r.mirror?0:x*h.width+v*g.height;t.width=Math.min(this.maxWidth,t.width+D+b)}this._calculatePadding(d,p,v,x)}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,o){let{ticks:{align:i,padding:s},position:c}=this.options,u=this.labelRotation!==0,d=c!=="top"&&this.axis==="x";if(this.isHorizontal()){let p=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1),g=0,b=0;u?d?(g=o*t.width,b=r*n.height):(g=r*t.height,b=o*n.width):i==="start"?b=n.width:i==="end"?g=t.width:i!=="inner"&&(g=t.width/2,b=n.width/2),this.paddingLeft=Math.max((g-p+s)*this.width/(this.width-p),0),this.paddingRight=Math.max((b-h+s)*this.width/(this.width-h),0)}else{let p=n.height/2,h=t.height/2;i==="start"?(p=0,h=t.height):i==="end"&&(p=n.height,h=0),this.paddingTop=p+s,this.paddingBottom=h+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Wt(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Nt(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let n=this.options.ticks.sampleSize,r=this.ticks;n<r.length&&(r=F1(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){let{ctx:o,_longestTextCache:i}=this,s=[],c=[],u=Math.floor(n/z1(n,r)),d=0,p=0,h,g,b,y,x,v,D,M,T,C,z;for(h=0;h<n;h+=u){if(y=t[h].label,x=this._resolveTickFontOptions(h),o.font=v=x.string,D=i[v]=i[v]||{data:{},gc:[]},M=x.lineHeight,T=C=0,!Nt(y)&&!xn(y))T=g1(o,D.data,D.gc,T,y),C=M;else if(xn(y))for(g=0,b=y.length;g<b;++g)z=y[g],!Nt(z)&&!xn(z)&&(T=g1(o,D.data,D.gc,T,z),C+=M);s.push(T),c.push(C),d=Math.max(T,d),p=Math.max(C,p)}q_(i,n);let R=s.indexOf(d),Q=c.indexOf(p),V=J=>({width:s[J]||0,height:c[J]||0});return{first:V(0),last:V(n-1),widest:V(R),highest:V(Q),widths:s,heights:c}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let n=this._startPixel+t*this._length;return tI(this._alignToPixels?Ya(this.chart,n,0):n)}getDecimalForPixel(t){let n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){let n=this.ticks||[];if(t>=0&&t<n.length){let r=n[t];return r.$context||(r.$context=G_(this.getContext(),t,r))}return this.$context||(this.$context=K_(this.chart.getContext(),this))}_tickSize(){let t=this.options.ticks,n=Yo(this.labelRotation),r=Math.abs(Math.cos(n)),o=Math.abs(Math.sin(n)),i=this._getLabelSizes(),s=t.autoSkipPadding||0,c=i?i.widest.width+s:0,u=i?i.highest.height+s:0;return this.isHorizontal()?u*r>c*o?c/r:u/o:u*o<c*r?u/r:c/o}_isVisible(){let t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let n=this.axis,r=this.chart,o=this.options,{grid:i,position:s,border:c}=o,u=i.offset,d=this.isHorizontal(),p=this.ticks.length+(u?1:0),h=ic(i),g=[],b=c.setContext(this.getContext()),y=b.display?b.width:0,x=y/2,v=function(ne){return Ya(r,ne,y)},D,M,T,C,z,R,Q,V,J,Y,Z,W;if(s==="top")D=v(this.bottom),R=this.bottom-h,V=D-x,Y=v(t.top)+x,W=t.bottom;else if(s==="bottom")D=v(this.top),Y=t.top,W=v(t.bottom)-x,R=D+x,V=this.top+h;else if(s==="left")D=v(this.right),z=this.right-h,Q=D-x,J=v(t.left)+x,Z=t.right;else if(s==="right")D=v(this.left),J=t.left,Z=v(t.right)-x,z=D+x,Q=this.left+h;else if(n==="x"){if(s==="center")D=v((t.top+t.bottom)/2+.5);else if(Et(s)){let ne=Object.keys(s)[0],pe=s[ne];D=v(this.chart.scales[ne].getPixelForValue(pe))}Y=t.top,W=t.bottom,R=D+x,V=R+h}else if(n==="y"){if(s==="center")D=v((t.left+t.right)/2);else if(Et(s)){let ne=Object.keys(s)[0],pe=s[ne];D=v(this.chart.scales[ne].getPixelForValue(pe))}z=D-x,Q=z-h,J=t.left,Z=t.right}let $=Dt(o.ticks.maxTicksLimit,p),de=Math.max(1,Math.ceil(p/$));for(M=0;M<p;M+=de){let ne=this.getContext(M),pe=i.setContext(ne),oe=c.setContext(ne),K=pe.lineWidth,j=pe.color,ue=oe.dash||[],B=oe.dashOffset,X=pe.tickWidth,be=pe.tickColor,me=pe.tickBorderDash||[],xe=pe.tickBorderDashOffset;T=Y_(this,M,u),T!==void 0&&(C=Ya(r,T,K),d?z=Q=J=Z=C:R=V=Y=W=C,g.push({tx1:z,ty1:R,tx2:Q,ty2:V,x1:J,y1:Y,x2:Z,y2:W,width:K,color:j,borderDash:ue,borderDashOffset:B,tickWidth:X,tickColor:be,tickBorderDash:me,tickBorderDashOffset:xe}))}return this._ticksLength=p,this._borderValue=D,g}_computeLabelItems(t){let n=this.axis,r=this.options,{position:o,ticks:i}=r,s=this.isHorizontal(),c=this.ticks,{align:u,crossAlign:d,padding:p,mirror:h}=i,g=ic(r.grid),b=g+p,y=h?-p:b,x=-Yo(this.labelRotation),v=[],D,M,T,C,z,R,Q,V,J,Y,Z,W,$="middle";if(o==="top")R=this.bottom-y,Q=this._getXAxisLabelAlignment();else if(o==="bottom")R=this.top+y,Q=this._getXAxisLabelAlignment();else if(o==="left"){let ne=this._getYAxisLabelAlignment(g);Q=ne.textAlign,z=ne.x}else if(o==="right"){let ne=this._getYAxisLabelAlignment(g);Q=ne.textAlign,z=ne.x}else if(n==="x"){if(o==="center")R=(t.top+t.bottom)/2+b;else if(Et(o)){let ne=Object.keys(o)[0],pe=o[ne];R=this.chart.scales[ne].getPixelForValue(pe)+b}Q=this._getXAxisLabelAlignment()}else if(n==="y"){if(o==="center")z=(t.left+t.right)/2-b;else if(Et(o)){let ne=Object.keys(o)[0],pe=o[ne];z=this.chart.scales[ne].getPixelForValue(pe)}Q=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(u==="start"?$="top":u==="end"&&($="bottom"));let de=this._getLabelSizes();for(D=0,M=c.length;D<M;++D){T=c[D],C=T.label;let ne=i.setContext(this.getContext(D));V=this.getPixelForTick(D)+i.labelOffset,J=this._resolveTickFontOptions(D),Y=J.lineHeight,Z=xn(C)?C.length:1;let pe=Z/2,oe=ne.color,K=ne.textStrokeColor,j=ne.textStrokeWidth,ue=Q;s?(z=V,Q==="inner"&&(D===M-1?ue=this.options.reverse?"left":"right":D===0?ue=this.options.reverse?"right":"left":ue="center"),o==="top"?d==="near"||x!==0?W=-Z*Y+Y/2:d==="center"?W=-de.highest.height/2-pe*Y+Y:W=-de.highest.height+Y/2:d==="near"||x!==0?W=Y/2:d==="center"?W=de.highest.height/2-pe*Y:W=de.highest.height-Z*Y,h&&(W*=-1),x!==0&&!ne.showLabelBackdrop&&(z+=Y/2*Math.sin(x))):(R=V,W=(1-Z)*Y/2);let B;if(ne.showLabelBackdrop){let X=no(ne.backdropPadding),be=de.heights[D],me=de.widths[D],xe=W-X.top,_e=0-X.left;switch($){case"middle":xe-=be/2;break;case"bottom":xe-=be;break}switch(Q){case"center":_e-=me/2;break;case"right":_e-=me;break;case"inner":D===M-1?_e-=me:D>0&&(_e-=me/2);break}B={left:_e,top:xe,width:me+X.width,height:be+X.height,color:ne.backdropColor}}v.push({label:C,font:J,textOffset:W,options:{rotation:x,color:oe,strokeColor:K,strokeWidth:j,textAlign:ue,textBaseline:$,translation:[z,R],backdrop:B}})}return v}_getXAxisLabelAlignment(){let{position:t,ticks:n}=this.options;if(-Yo(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){let{position:n,ticks:{crossAlign:r,mirror:o,padding:i}}=this.options,s=this._getLabelSizes(),c=t+i,u=s.widest.width,d,p;return n==="left"?o?(p=this.right+i,r==="near"?d="left":r==="center"?(d="center",p+=u/2):(d="right",p+=u)):(p=this.right-c,r==="near"?d="right":r==="center"?(d="center",p-=u/2):(d="left",p=this.left)):n==="right"?o?(p=this.left+i,r==="near"?d="right":r==="center"?(d="center",p-=u/2):(d="left",p-=u)):(p=this.left+c,r==="near"?d="left":r==="center"?(d="center",p+=u/2):(d="right",p=this.right)):d="right",{textAlign:d,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:n},left:r,top:o,width:i,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,o,i,s),t.restore())}getLineWidthForValue(t){let n=this.options.grid;if(!this._isVisible()||!n.display)return 0;let r=this.ticks.findIndex(o=>o.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){let n=this.options.grid,r=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),i,s,c=(u,d,p)=>{!p.width||!p.color||(r.save(),r.lineWidth=p.width,r.strokeStyle=p.color,r.setLineDash(p.borderDash||[]),r.lineDashOffset=p.borderDashOffset,r.beginPath(),r.moveTo(u.x,u.y),r.lineTo(d.x,d.y),r.stroke(),r.restore())};if(n.display)for(i=0,s=o.length;i<s;++i){let u=o[i];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(){let{chart:t,ctx:n,options:{border:r,grid:o}}=this,i=r.setContext(this.getContext()),s=r.display?i.width:0;if(!s)return;let c=o.setContext(this.getContext(0)).lineWidth,u=this._borderValue,d,p,h,g;this.isHorizontal()?(d=Ya(t,this.left,s)-s/2,p=Ya(t,this.right,c)+c/2,h=g=u):(h=Ya(t,this.top,s)-s/2,g=Ya(t,this.bottom,c)+c/2,d=p=u),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(d,h),n.lineTo(p,g),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;let n=this.ctx,r=this._computeLabelArea();r&&Eg(n,r);let o=this.getLabelItems(t);for(let i of o){let s=i.options,c=i.font,u=i.label,d=i.textOffset;xc(n,u,0,d,c,s)}r&&Cg(n)}drawTitle(){let{ctx:t,options:{position:n,title:r,reverse:o}}=this;if(!r.display)return;let i=qn(r.font),s=no(r.padding),c=r.align,u=i.lineHeight/2;n==="bottom"||n==="center"||Et(n)?(u+=s.bottom,xn(r.text)&&(u+=i.lineHeight*(r.text.length-1))):u+=s.top;let{titleX:d,titleY:p,maxWidth:h,rotation:g}=J_(this,u,n,c);xc(t,r.text,0,0,i,{color:r.color,maxWidth:h,rotation:g,textAlign:X_(c,n,o),textBaseline:"middle",translation:[d,p]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){let t=this.options,n=t.ticks&&t.ticks.z||0,r=Dt(t.grid&&t.grid.z,-1),o=Dt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==e.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){let n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",o=[],i,s;for(i=0,s=n.length;i<s;++i){let c=n[i];c[r]===this.id&&(!t||c.type===t)&&o.push(c)}return o}_resolveTickFontOptions(t){let n=this.options.ticks.setContext(this.getContext(t));return qn(n.font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}},Ys=class{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){let n=Object.getPrototypeOf(t),r;e5(n)&&(r=this.register(n));let o=this.items,i=t.id,s=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+t);return i in o||(o[i]=t,Z_(t,s,r),this.override&&$t.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){let n=this.items,r=t.id,o=this.scope;r in n&&delete n[r],o&&r in $t[o]&&(delete $t[o][r],this.override&&delete es[r])}};QA=class{constructor(){this.controllers=new Ys(tl,"datasets",!0),this.elements=new Ys(ol,"elements"),this.plugins=new Ys(Object,"plugins"),this.scales=new Ys(nl,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(o=>{let i=r||this._getRegistryForType(o);r||i.isForType(o)||i===this.plugins&&o.id?this._exec(t,i,o):Tt(o,s=>{let c=r||this._getRegistryForType(s);this._exec(t,c,s)})})}_exec(t,n,r){let o=wg(t);Wt(r["before"+o],[],r),n[t](r),Wt(r["after"+o],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){let r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){let o=n.get(t);if(o===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return o}},Vo=new QA,UA=class{constructor(){this._init=void 0}notify(t,n,r,o){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;let i=o?this._descriptors(t).filter(o):this._descriptors(t),s=this._notify(i,t,n,r);return n==="afterDestroy"&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),s}_notify(t,n,r,o){o=o||{};for(let i of t){let s=i.plugin,c=s[r],u=[n,o,i.options];if(Wt(c,u,s)===!1&&o.cancelable)return!1}return!0}invalidate(){Nt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){let r=t&&t.config,o=Dt(r.options&&r.options.plugins,{}),i=t5(r);return o===!1&&!n?[]:r5(t,i,o,n)}_notifyStateChanges(t){let n=this._oldCache||[],r=this._cache,o=(i,s)=>i.filter(c=>!s.some(u=>c.plugin.id===u.plugin.id));this._notify(o(n,r),t,"stop"),this._notify(o(r,n),t,"start")}};V1=new Map,vw=new Set;ac=(e,t,n)=>{let r=sa(t,n);r!==void 0&&e.add(r)},d5=class{constructor(e){this._config=u5(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=bw(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),mw(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Sd(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Sd(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Sd(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){let t=e.id,n=this.type;return Sd(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){let{options:r,type:o}=this,i=this._cachedScopes(e,n),s=i.get(t);if(s)return s;let c=new Set;t.forEach(d=>{e&&(c.add(e),d.forEach(p=>ac(c,e,p))),d.forEach(p=>ac(c,r,p)),d.forEach(p=>ac(c,es[o]||{},p)),d.forEach(p=>ac(c,$t,p)),d.forEach(p=>ac(c,_A,p))});let u=Array.from(c);return u.length===0&&u.push(Object.create(null)),vw.has(t)&&i.set(t,u),u}chartOptionScopes(){let{options:e,type:t}=this;return[e,es[t]||{},$t.datasets[t]||{},{type:t},$t,_A]}resolveNamedOptions(e,t,n,r=[""]){let o={$shared:!0},{resolver:i,subPrefixes:s}=W1(this._resolverCache,e,r),c=i;if(p5(i,t)){o.$shared=!1,n=la(n)?n():n;let u=this.createResolver(e,n,s);c=el(i,n,u)}for(let u of t)o[u]=c[u];return o}createResolver(e,t,n=[""],r){let{resolver:o}=W1(this._resolverCache,e,n);return Et(t)?el(o,t,void 0,r):o}};f5=e=>Et(e)&&Object.getOwnPropertyNames(e).some(t=>la(e[t]));h5="4.5.1",A5=["top","bottom","left","right","chartArea"];Od={},G1=e=>{let t=yw(e);return Object.values(Od).filter(n=>n.canvas===t).pop()};Bg=class{static defaults=$t;static instances=Od;static overrides=es;static registry=Vo;static version=h5;static getChart=G1;static register(...e){Vo.add(...e),X1()}static unregister(...e){Vo.remove(...e),X1()}constructor(e,t){let n=this.config=new d5(t),r=yw(e),o=G1(r);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.");let i=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||N_(r)),this.platform.updateConfig(n);let s=this.platform.acquireContext(r,i.aspectRatio),c=s&&s.canvas,u=c&&c.height,d=c&&c.width;if(this.id=FT(),this.ctx=s,this.canvas=c,this.width=d,this.height=u,this._options=i,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 UA,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=iI(p=>this.update(p),i.resizeDelay||0),this._dataChanges=[],Od[this.id]=this,!s||!c){console.error("Failed to create chart: can't acquire context from the given item");return}vi.listen(this,"complete",K1),vi.listen(this,"progress",g5),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:o}=this;return Nt(e)?t&&o?o:r?n/r: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 Vo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():x1(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return m1(this.canvas,this.ctx),this}stop(){return vi.stop(this),this}resize(e,t){vi.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(r,e,t,o),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,x1(this,s,!0)&&(this.notifyPlugins("resize",{size:i}),Wt(n.onResize,[this,i],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};Tt(e,(t,n)=>{t.id=n})}buildOrUpdateScales(){let e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((i,s)=>(i[s]=!1,i),{}),o=[];t&&(o=o.concat(Object.keys(t).map(i=>{let s=t[i],c=VA(i,s),u=c==="r",d=c==="x";return{options:s,dposition:u?"chartArea":d?"bottom":"left",dtype:u?"radialLinear":d?"category":"linear"}}))),Tt(o,i=>{let s=i.options,c=s.id,u=VA(c,s),d=Dt(s.type,i.dtype);(s.position===void 0||Y1(s.position,u)!==Y1(i.dposition))&&(s.position=i.dposition),r[c]=!0;let p=null;if(c in n&&n[c].type===d)p=n[c];else{let h=Vo.getScale(d);p=new h({id:c,type:d,ctx:this.ctx,chart:this}),n[p.id]=p}p.init(s,e)}),Tt(r,(i,s)=>{i||delete n[s]}),Tt(n,i=>{Jr.configure(this,i,i.options),Jr.addBox(this,i)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((r,o)=>r.index-o.index),n>t){for(let r=t;r<n;++r)this._destroyDatasetMeta(r);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(q1("order","index"))}_removeUnreferencedMetasets(){let{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((n,r)=>{t.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){let e=[],t=this.data.datasets,n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n<r;n++){let o=t[n],i=this.getDatasetMeta(n),s=o.type||this.config.type;if(i.type&&i.type!==s&&(this._destroyDatasetMeta(n),i=this.getDatasetMeta(n)),i.type=s,i.indexAxis=o.indexAxis||HA(s,this.options),i.order=o.order||0,i.index=n,i.label=""+o.label,i.visible=this.isDatasetVisible(n),i.controller)i.controller.updateIndex(n),i.controller.linkScales();else{let c=Vo.getController(s),{datasetElementType:u,dataElementType:d}=$t.datasets[s];Object.assign(c,{dataElementType:Vo.getElement(d),datasetElementType:u&&Vo.getElement(u)}),i.controller=new c(this,n),e.push(i.controller)}}return this._updateMetasets(),e}_resetElements(){Tt(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let t=this.config;t.update();let n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let u=0,d=this.data.datasets.length;u<d;u++){let{controller:p}=this.getDatasetMeta(u),h=!r&&o.indexOf(p)===-1;p.buildOrUpdateElements(h),i=Math.max(+p.getMaxOverflow(),i)}i=this._minPadding=n.layout.autoPadding?i:0,this._updateLayout(i),r||Tt(o,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(q1("z","_idx"));let{_active:s,_lastEvent:c}=this;c?this._eventHandler(c,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Tt(this.scales,e=>{Jr.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!s1(t,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:n,start:r,count:o}of t){let i=n==="_removeElements"?-o:o;m5(e,r,i)}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,n=o=>new Set(e.filter(i=>i[0]===o).map((i,s)=>s+","+i.splice(1).join(","))),r=n(0);for(let o=1;o<t;o++)if(!s1(r,n(o)))return;return Array.from(r).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;Jr.update(this,this.width,this.height,e);let t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],Tt(this.boxes,r=>{n&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,o)=>{r._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,n=this.data.datasets.length;t<n;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,la(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){let n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(vi.has(this)?this.attached&&!vi.running(this)&&vi.start(this):(this.draw(),K1({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){let{width:n,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){let t=this._sortedMetasets,n=[],r,o;for(r=0,o=t.length;r<o;++r){let i=t[r];(!e||i.visible)&&n.push(i)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=VI(this,e);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(r&&Eg(t,r),e.controller.draw(),r&&Cg(t),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(e){return nw(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){let o=v_.modes[t];return typeof o=="function"?o(this,e,n,r):[]}getDatasetMeta(e){let t=this.data.datasets[e],n=this._metasets,r=n.filter(o=>o&&o._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=rl(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!t.hidden}setDatasetVisibility(e,t){let n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){let r=n?"show":"hide",o=this.getDatasetMeta(e),i=o.controller._resolveAnimations(void 0,r);yc(t)?(o.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),i.update(o,{visible:n}),this.update(s=>s.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),vi.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),m1(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Od[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let e=this._listeners,t=this.platform,n=(o,i)=>{t.addEventListener(this,o,i),e[o]=i},r=(o,i,s)=>{o.offsetX=i,o.offsetY=s,this._eventHandler(o)};Tt(this.options.events,o=>n(o,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,t=this.platform,n=(c,u)=>{t.addEventListener(this,c,u),e[c]=u},r=(c,u)=>{e[c]&&(t.removeEventListener(this,c,u),delete e[c])},o=(c,u)=>{this.canvas&&this.resize(c,u)},i,s=()=>{r("attach",s),this.attached=!0,this.resize(),n("resize",o),n("detach",i)};i=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),n("attach",s)},t.isAttached(this.canvas)?s():i()}unbindEvents(){Tt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},Tt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){let r=n?"set":"remove",o,i,s,c;for(t==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),s=0,c=e.length;s<c;++s){i=e[s];let u=i&&this.getDatasetMeta(i.datasetIndex).controller;u&&u[r+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){let t=this._active||[],n=e.map(({datasetIndex:r,index:o})=>{let i=this.getDatasetMeta(r);if(!i)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:i.data[o],index:o}});!Fd(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){let r=this.options.hover,o=(c,u)=>c.filter(d=>!u.some(p=>d.datasetIndex===p.datasetIndex&&d.index===p.index)),i=o(t,e),s=n?e:o(e,t);i.length&&this.updateHoverStyle(i,r.mode,!1),s.length&&r.mode&&this.updateHoverStyle(s,r.mode,!0)}_eventHandler(e,t){let n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=i=>(i.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,r)===!1)return;let o=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(o||n.changed)&&this.render(),this}_handleEvent(e,t,n){let{_active:r=[],options:o}=this,i=t,s=this._getActiveElements(e,r,n,i),c=YT(e),u=b5(e,this._lastEvent,n,c);n&&(this._lastEvent=null,Wt(o.onHover,[e,s,this],this),c&&Wt(o.onClick,[e,s,this],this));let d=!Fd(s,r);return(d||t)&&(this._active=s,this._updateHoverStyles(s,r,t)),this._lastEvent=u,d}_getActiveElements(e,t,n,r){if(e.type==="mouseout")return[];if(!n)return t;let o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,r)}};WA=class extends ol{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){let{inflateAmount:n,options:{borderColor:r,backgroundColor:o}}=this,{inner:i,outer:s}=x5(this),c=w5(s.radius)?Vd:k5;t.save(),(s.w!==i.w||s.h!==i.h)&&(t.beginPath(),c(t,gA(s,n,i)),t.clip(),c(t,gA(i,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),c(t,gA(i,n)),t.fillStyle=o,t.fill(),t.restore()}inRange(t,n,r){return AA(this,t,n,r)}inXRange(t,n){return AA(this,t,null,n)}inYRange(t,n){return AA(this,null,t,n)}getCenterPoint(t){let{x:n,y:r,base:o,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(n+o)/2:n,y:i?r:(r+o)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}},YA=["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)"],J1=YA.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));I5={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;let{data:{datasets:r},options:o}=e.config,{elements:i}=o,s=Z1(r)||P5(o)||i&&Z1(i)||T5();if(!n.forceOverride&&s)return;let c=D5(e);r.forEach(c)}},$1=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},_5=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,Gd=class extends ol{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,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(){let t=this.options.labels||{},n=Wt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,o)=>t.sort(r,o,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){let{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}let r=t.labels,o=qn(r.font),i=o.size,s=this._computeTitleHeight(),{boxWidth:c,itemHeight:u}=$1(r,i),d,p;n.font=o.string,this.isHorizontal()?(d=this.maxWidth,p=this._fitRows(s,i,c,u)+10):(p=this.maxHeight,d=this._fitCols(s,o,c,u)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(p,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,o){let{ctx:i,maxWidth:s,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],d=this.lineWidths=[0],p=o+c,h=t;i.textAlign="left",i.textBaseline="middle";let g=-1,b=-p;return this.legendItems.forEach((y,x)=>{let v=r+n/2+i.measureText(y.text).width;(x===0||d[d.length-1]+v+2*c>s)&&(h+=p,d[d.length-(x>0?0:1)]=0,b+=p,g++),u[x]={left:0,top:b,row:g,width:v,height:o},d[d.length-1]+=v+c}),h}_fitCols(t,n,r,o){let{ctx:i,maxHeight:s,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],d=this.columnSizes=[],p=s-t,h=c,g=0,b=0,y=0,x=0;return this.legendItems.forEach((v,D)=>{let{itemWidth:M,itemHeight:T}=B5(r,n,i,v,o);D>0&&b+T+2*c>p&&(h+=g+c,d.push({width:g,height:b}),y+=g+c,x++,g=b=0),u[D]={left:y,top:b,col:x,width:M,height:T},g=Math.max(g,M),b+=T+c}),h+=g,d.push({width:g,height:b}),h}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:o},rtl:i}}=this,s=Ks(i,this.left,this.width);if(this.isHorizontal()){let c=0,u=Yn(r,this.left+o,this.right-this.lineWidths[c]);for(let d of n)c!==d.row&&(c=d.row,u=Yn(r,this.left+o,this.right-this.lineWidths[c])),d.top+=this.top+t+o,d.left=s.leftForLtr(s.x(u),d.width),u+=d.width+o}else{let c=0,u=Yn(r,this.top+t+o,this.bottom-this.columnSizes[c].height);for(let d of n)d.col!==c&&(c=d.col,u=Yn(r,this.top+t+o,this.bottom-this.columnSizes[c].height)),d.top=u,d.left+=this.left+o,d.left=s.leftForLtr(s.x(d.left),d.width),u+=d.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;Eg(t,this),this._draw(),Cg(t)}}_draw(){let{options:t,columnSizes:n,lineWidths:r,ctx:o}=this,{align:i,labels:s}=t,c=$t.color,u=Ks(t.rtl,this.left,this.width),d=qn(s.font),{padding:p}=s,h=d.size,g=h/2,b;this.drawTitle(),o.textAlign=u.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=d.string;let{boxWidth:y,boxHeight:x,itemHeight:v}=$1(s,h),D=function(R,Q,V){if(isNaN(y)||y<=0||isNaN(x)||x<0)return;o.save();let J=Dt(V.lineWidth,1);if(o.fillStyle=Dt(V.fillStyle,c),o.lineCap=Dt(V.lineCap,"butt"),o.lineDashOffset=Dt(V.lineDashOffset,0),o.lineJoin=Dt(V.lineJoin,"miter"),o.lineWidth=J,o.strokeStyle=Dt(V.strokeStyle,c),o.setLineDash(Dt(V.lineDash,[])),s.usePointStyle){let Y={radius:x*Math.SQRT2/2,pointStyle:V.pointStyle,rotation:V.rotation,borderWidth:J},Z=u.xPlus(R,y/2),W=Q+g;tw(o,Y,Z,W,s.pointStyleWidth&&y)}else{let Y=Q+Math.max((h-x)/2,0),Z=u.leftForLtr(R,y),W=qs(V.borderRadius);o.beginPath(),Object.values(W).some($=>$!==0)?Vd(o,{x:Z,y:Y,w:y,h:x,radius:W}):o.rect(Z,Y,y,x),o.fill(),J!==0&&o.stroke()}o.restore()},M=function(R,Q,V){xc(o,V.text,R,Q+v/2,d,{strikethrough:V.hidden,textAlign:u.textAlign(V.textAlign)})},T=this.isHorizontal(),C=this._computeTitleHeight();T?b={x:Yn(i,this.left+p,this.right-r[0]),y:this.top+p+C,line:0}:b={x:this.left+p,y:Yn(i,this.top+C+p,this.bottom-n[0].height),line:0},cw(this.ctx,t.textDirection);let z=v+p;this.legendItems.forEach((R,Q)=>{o.strokeStyle=R.fontColor,o.fillStyle=R.fontColor;let V=o.measureText(R.text).width,J=u.textAlign(R.textAlign||(R.textAlign=s.textAlign)),Y=y+g+V,Z=b.x,W=b.y;u.setWidth(this.width),T?Q>0&&Z+Y+p>this.right&&(W=b.y+=z,b.line++,Z=b.x=Yn(i,this.left+p,this.right-r[b.line])):Q>0&&W+z>this.bottom&&(Z=b.x=Z+n[b.line].width+p,b.line++,W=b.y=Yn(i,this.top+C+p,this.bottom-n[b.line].height));let $=u.x(Z);if(D($,W,R),Z=aI(J,Z+y+g,T?Z+Y:this.right,t.rtl),M(u.x(Z),W,R),T)b.x+=Y+p;else if(typeof R.text!="string"){let de=d.lineHeight;b.y+=Sw(R,de)+p}else b.y+=z}),uw(this.ctx,t.textDirection)}drawTitle(){let t=this.options,n=t.title,r=qn(n.font),o=no(n.padding);if(!n.display)return;let i=Ks(t.rtl,this.left,this.width),s=this.ctx,c=n.position,u=r.size/2,d=o.top+u,p,h=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),p=this.top+d,h=Yn(t.align,h,this.right-g);else{let y=this.columnSizes.reduce((x,v)=>Math.max(x,v.height),0);p=d+Yn(t.align,this.top,this.bottom-y-t.labels.padding-this._computeTitleHeight())}let b=Yn(c,h,h+g);s.textAlign=i.textAlign(Sg(c)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,xc(s,n.text,b,p,r)}_computeTitleHeight(){let t=this.options.title,n=qn(t.font),r=no(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,o,i;if(Ws(t,this.left,this.right)&&Ws(n,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(o=i[r],Ws(t,o.left,o.left+o.width)&&Ws(n,o.top,o.top+o.height))return this.legendItems[r]}return null}handleEvent(t){let n=this.options;if(!R5(t.type,n))return;let r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){let o=this._hoveredItem,i=_5(o,r);o&&!i&&Wt(n.onLeave,[t,o,this],this),this._hoveredItem=r,r&&!i&&Wt(n.onHover,[t,r,this],this)}else r&&Wt(n.onClick,[t,r,this],this)}};L5={id:"legend",_element:Gd,start(e,t,n){let r=e.legend=new Gd({ctx:e.ctx,options:n,chart:e});Jr.configure(e,r,n),Jr.addBox(e,r)},stop(e){Jr.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let r=e.legend;Jr.configure(e,r,n),r.options=n},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){let r=t.datasetIndex,o=n.chart;o.isDatasetVisible(r)?(o.hide(r),t.hidden=!0):(o.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:i,useBorderRadius:s,borderRadius:c}}=e.legend.options;return e._getSortedDatasetMetas().map(u=>{let d=u.controller.getStyle(n?0:void 0),p=no(d.borderWidth);return{text:t[u.index].label,fillStyle:d.backgroundColor,fontColor:i,hidden:!u.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:d.borderColor,pointStyle:r||d.pointStyle,rotation:d.rotation,textAlign:o||d.textAlign,borderRadius:s&&(c||d.borderRadius),datasetIndex:u.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}},Xd=class extends ol{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){let 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=t,this.height=this.bottom=n;let o=xn(r.text)?r.text.length:1;this._padding=no(r.padding);let i=o*qn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:n,left:r,bottom:o,right:i,options:s}=this,c=s.align,u=0,d,p,h;return this.isHorizontal()?(p=Yn(c,r,i),h=n+t,d=i-r):(s.position==="left"?(p=r+t,h=Yn(c,o,n),u=wn*-.5):(p=i-t,h=Yn(c,n,o),u=wn*.5),d=o-n),{titleX:p,titleY:h,maxWidth:d,rotation:u}}draw(){let t=this.ctx,n=this.options;if(!n.display)return;let r=qn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:i,titleY:s,maxWidth:c,rotation:u}=this._drawArgs(o);xc(t,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:u,textAlign:Sg(n.align),textBaseline:"middle",translation:[i,s]})}};N5={id:"title",_element:Xd,start(e,t,n){j5(e,n)},stop(e){let t=e.titleBlock;Jr.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){let r=e.titleBlock;Jr.configure(e,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}},cc={average(e){if(!e.length)return!1;let t,n,r=new Set,o=0,i=0;for(t=0,n=e.length;t<n;++t){let s=e[t].element;if(s&&s.hasValue()){let c=s.tooltipPosition();r.add(c.x),o+=c.y,++i}}return i===0||r.size===0?!1:{x:[...r].reduce((s,c)=>s+c)/r.size,y:o/i}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,o=Number.POSITIVE_INFINITY,i,s,c;for(i=0,s=e.length;i<s;++i){let u=e[i].element;if(u&&u.hasValue()){let d=u.getCenterPoint(),p=eI(t,d);p<o&&(o=p,c=u)}}if(c){let u=c.tooltipPosition();n=u.x,r=u.y}return{x:n,y:r}}};Ew={beforeTitle:bi,title(e){if(e.length>0){let t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:bi,beforeBody:bi,beforeLabel:bi,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");let n=e.formattedValue;return Nt(n)||(t+=n),t},labelColor(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:bi,afterBody:bi,beforeFooter:bi,footer:bi,afterFooter:bi};Jd=class extends ol{static positioners=cc;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let n=this.chart,r=this.options.setContext(this.getContext()),o=r.enabled&&n.options.animation&&r.animations,i=new Yd(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=W5(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){let{callbacks:r}=n,o=mr(r,"beforeTitle",this,t),i=mr(r,"title",this,t),s=mr(r,"afterTitle",this,t),c=[];return c=Ho(c,yi(o)),c=Ho(c,yi(i)),c=Ho(c,yi(s)),c}getBeforeBody(t,n){return rx(mr(n.callbacks,"beforeBody",this,t))}getBody(t,n){let{callbacks:r}=n,o=[];return Tt(t,i=>{let s={before:[],lines:[],after:[]},c=ox(r,i);Ho(s.before,yi(mr(c,"beforeLabel",this,i))),Ho(s.lines,mr(c,"label",this,i)),Ho(s.after,yi(mr(c,"afterLabel",this,i))),o.push(s)}),o}getAfterBody(t,n){return rx(mr(n.callbacks,"afterBody",this,t))}getFooter(t,n){let{callbacks:r}=n,o=mr(r,"beforeFooter",this,t),i=mr(r,"footer",this,t),s=mr(r,"afterFooter",this,t),c=[];return c=Ho(c,yi(o)),c=Ho(c,yi(i)),c=Ho(c,yi(s)),c}_createItems(t){let n=this._active,r=this.chart.data,o=[],i=[],s=[],c=[],u,d;for(u=0,d=n.length;u<d;++u)c.push(z5(this.chart,n[u]));return t.filter&&(c=c.filter((p,h,g)=>t.filter(p,h,g,r))),t.itemSort&&(c=c.sort((p,h)=>t.itemSort(p,h,r))),Tt(c,p=>{let h=ox(t.callbacks,p);o.push(mr(h,"labelColor",this,p)),i.push(mr(h,"labelPointStyle",this,p)),s.push(mr(h,"labelTextColor",this,p))}),this.labelColors=o,this.labelPointStyles=i,this.labelTextColors=s,this.dataPoints=c,c}update(t,n){let r=this.options.setContext(this.getContext()),o=this._active,i,s=[];if(!o.length)this.opacity!==0&&(i={opacity:0});else{let c=cc[r.position].call(this,o,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);let u=this._size=ex(this,r),d=Object.assign({},c,u),p=tx(this.chart,r,d),h=nx(r,d,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,i={opacity:1,x:h.x,y:h.y,width:u.width,height:u.height,caretX:c.x,caretY:c.y}}this._tooltipItems=s,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,o){let i=this.getCaretPosition(t,r,o);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(t,n,r){let{xAlign:o,yAlign:i}=this,{caretSize:s,cornerRadius:c}=r,{topLeft:u,topRight:d,bottomLeft:p,bottomRight:h}=qs(c),{x:g,y:b}=t,{width:y,height:x}=n,v,D,M,T,C,z;return i==="center"?(C=b+x/2,o==="left"?(v=g,D=v-s,T=C+s,z=C-s):(v=g+y,D=v+s,T=C-s,z=C+s),M=v):(o==="left"?D=g+Math.max(u,p)+s:o==="right"?D=g+y-Math.max(d,h)-s:D=this.caretX,i==="top"?(T=b,C=T-s,v=D-s,M=D+s):(T=b+x,C=T+s,v=D+s,M=D-s),z=T),{x1:v,x2:D,x3:M,y1:T,y2:C,y3:z}}drawTitle(t,n,r){let o=this.title,i=o.length,s,c,u;if(i){let d=Ks(r.rtl,this.x,this.width);for(t.x=Ed(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",s=qn(r.titleFont),c=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,u=0;u<i;++u)n.fillText(o[u],d.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+c,u+1===i&&(t.y+=r.titleMarginBottom-c)}}_drawColorBox(t,n,r,o,i){let s=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:u,boxWidth:d}=i,p=qn(i.bodyFont),h=Ed(this,"left",i),g=o.x(h),b=u<p.lineHeight?(p.lineHeight-u)/2:0,y=n.y+b;if(i.usePointStyle){let x={radius:Math.min(d,u)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},v=o.leftForLtr(g,d)+d/2,D=y+u/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,b1(t,x,v,D),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,b1(t,x,v,D)}else{t.lineWidth=Et(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;let x=o.leftForLtr(g,d),v=o.leftForLtr(o.xPlus(g,1),d-2),D=qs(s.borderRadius);Object.values(D).some(M=>M!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,Vd(t,{x,y,w:d,h:u,radius:D}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Vd(t,{x:v,y:y+1,w:d-2,h:u-2,radius:D}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(x,y,d,u),t.strokeRect(x,y,d,u),t.fillStyle=s.backgroundColor,t.fillRect(v,y+1,d-2,u-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){let{body:o}=this,{bodySpacing:i,bodyAlign:s,displayColors:c,boxHeight:u,boxWidth:d,boxPadding:p}=r,h=qn(r.bodyFont),g=h.lineHeight,b=0,y=Ks(r.rtl,this.x,this.width),x=function(V){n.fillText(V,y.x(t.x+b),t.y+g/2),t.y+=g+i},v=y.textAlign(s),D,M,T,C,z,R,Q;for(n.textAlign=s,n.textBaseline="middle",n.font=h.string,t.x=Ed(this,v,r),n.fillStyle=r.bodyColor,Tt(this.beforeBody,x),b=c&&v!=="right"?s==="center"?d/2+p:d+2+p:0,C=0,R=o.length;C<R;++C){for(D=o[C],M=this.labelTextColors[C],n.fillStyle=M,Tt(D.before,x),T=D.lines,c&&T.length&&(this._drawColorBox(n,t,C,y,r),g=Math.max(h.lineHeight,u)),z=0,Q=T.length;z<Q;++z)x(T[z]),g=h.lineHeight;Tt(D.after,x)}b=0,g=h.lineHeight,Tt(this.afterBody,x),t.y-=i}drawFooter(t,n,r){let o=this.footer,i=o.length,s,c;if(i){let u=Ks(r.rtl,this.x,this.width);for(t.x=Ed(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=u.textAlign(r.footerAlign),n.textBaseline="middle",s=qn(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,c=0;c<i;++c)n.fillText(o[c],u.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,o){let{xAlign:i,yAlign:s}=this,{x:c,y:u}=t,{width:d,height:p}=r,{topLeft:h,topRight:g,bottomLeft:b,bottomRight:y}=qs(o.cornerRadius);n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.beginPath(),n.moveTo(c+h,u),s==="top"&&this.drawCaret(t,n,r,o),n.lineTo(c+d-g,u),n.quadraticCurveTo(c+d,u,c+d,u+g),s==="center"&&i==="right"&&this.drawCaret(t,n,r,o),n.lineTo(c+d,u+p-y),n.quadraticCurveTo(c+d,u+p,c+d-y,u+p),s==="bottom"&&this.drawCaret(t,n,r,o),n.lineTo(c+b,u+p),n.quadraticCurveTo(c,u+p,c,u+p-b),s==="center"&&i==="left"&&this.drawCaret(t,n,r,o),n.lineTo(c,u+h),n.quadraticCurveTo(c,u,c+h,u),n.closePath(),n.fill(),o.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){let n=this.chart,r=this.$animations,o=r&&r.x,i=r&&r.y;if(o||i){let s=cc[t.position].call(this,this._active,this._eventPosition);if(!s)return;let c=this._size=ex(this,t),u=Object.assign({},s,this._size),d=tx(n,t,u),p=nx(t,u,d,n);(o._to!==p.x||i._to!==p.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=c.width,this.height=c.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(t){let n=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(n);let o={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;let s=no(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(t.save(),t.globalAlpha=r,this.drawBackground(i,t,o,n),cw(t,n.textDirection),i.y+=s.top,this.drawTitle(i,t,n),this.drawBody(i,t,n),this.drawFooter(i,t,n),uw(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){let r=this._active,o=t.map(({datasetIndex:c,index:u})=>{let 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}}),i=!Fd(r,o),s=this._positionChanged(o,n);(i||s)&&(this._active=o,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,i=this._active||[],s=this._getActiveElements(t,i,n,r),c=this._positionChanged(s,t),u=n||!Fd(s,i)||c;return u&&(this._active=s,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),u}_getActiveElements(t,n,r,o){let i=this.options;if(t.type==="mouseout")return[];if(!o)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);let s=this.chart.getElementsAtEventForMode(t,i.mode,i,r);return i.reverse&&s.reverse(),s}_positionChanged(t,n){let{caretX:r,caretY:o,options:i}=this,s=cc[i.position].call(this,t,n);return s!==!1&&(r!==s.x||o!==s.y)}},Y5={id:"tooltip",_element:Jd,positioners:cc,afterInit(e,t,n){n&&(e.tooltip=new Jd({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){let t=e.tooltip;if(t&&t._willRender()){let n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){let n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Ew},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},q5=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);G5=(e,t)=>e===null?null:yo(Math.round(e),0,t);qA=class extends nl{static id="category";static defaults={ticks:{callback:ix}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let n=this._addedLabels;if(n.length){let r=this.getLabels();for(let{index:o,label:i}of n)r[o]===i&&r.splice(o,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Nt(t))return null;let r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:K5(r,t,Dt(n,t),this._addedLabels),G5(n,r.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:r,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(o=this.getLabels().length-1)),this.min=r,this.max=o}buildTicks(){let t=this.min,n=this.max,r=this.options.offset,o=[],i=this.getLabels();i=t===0&&n===i.length-1?i:i.slice(t,n+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)o.push({value:s});return o}getLabelForValue(t){return ix.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};KA=class extends nl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Nt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds(),{min:o,max:i}=this,s=u=>o=n?o:u,c=u=>i=r?i:u;if(t){let u=aa(o),d=aa(i);u<0&&d<0?c(0):u>0&&d>0&&s(0)}if(o===i){let u=i===0?1:Math.abs(i*.05);c(i+u),t||s(o-u)}this.min=o,this.max=i}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:n,stepSize:r}=t,o;return r?(o=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),n=n||11),n&&(o=Math.min(n,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,n=t.ticks,r=this.getTickLimit();r=Math.max(2,r);let o={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,s=X5(o,i);return t.bounds==="ticks"&&JT(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){let t=this.ticks,n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){let o=(r-n)/Math.max(t.length-1,1)/2;n-=o,r+=o}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return ff(t,this.chart.options.locale,this.options.ticks.format)}},GA=class extends KA{static id="linear";static defaults={ticks:{callback:ew.formatters.numeric}};determineDataLimits(){let{min:t,max:n}=this.getMinMax(!0);this.min=to(t)?t:0,this.max=to(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),n=t?this.width:this.height,r=Yo(this.options.ticks.minRotation),o=(t?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/o))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}},Af={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}},br=Object.keys(Af);Zd=class extends nl{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){let r=t.time||(t.time={}),o=this._adapter=new h_._date(t.adapters.date);o.init(n),pc(r.displayFormats,o.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:lx(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,n=this._adapter,r=t.time.unit||"day",{min:o,max:i,minDefined:s,maxDefined:c}=this.getUserBounds();function u(d){!s&&!isNaN(d.min)&&(o=Math.min(o,d.min)),!c&&!isNaN(d.max)&&(i=Math.max(i,d.max))}(!s||!c)&&(u(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&u(this.getMinMax(!1))),o=to(o)&&!isNaN(o)?o:+n.startOf(Date.now(),r),i=to(i)&&!isNaN(i)?i:+n.endOf(Date.now(),r)+1,this.min=Math.min(o,i-1),this.max=Math.max(o+1,i)}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){let t=this.options,n=t.time,r=t.ticks,o=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let i=this.min,s=this.max,c=rI(o,i,s);return this._unit=n.unit||(r.autoSkip?cx(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):J5(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Z5(this._unit),this.initOffsets(o),t.reverse&&c.reverse(),dx(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,o,i;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?n=1-o:n=(this.getDecimalForValue(t[1])-o)/2,i=this.getDecimalForValue(t[t.length-1]),t.length===1?r=i:r=(i-this.getDecimalForValue(t[t.length-2]))/2);let s=t.length<3?.5:.25;n=yo(n,0,s),r=yo(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){let t=this._adapter,n=this.min,r=this.max,o=this.options,i=o.time,s=i.unit||cx(i.minUnit,n,r,this._getLabelCapacity(n)),c=Dt(o.ticks.stepSize,1),u=s==="week"?i.isoWeekday:!1,d=Hd(u)||u===!0,p={},h=n,g,b;if(d&&(h=+t.startOf(h,"isoWeek",u)),h=+t.startOf(h,d?"day":s),t.diff(r,n,s)>1e5*c)throw new Error(n+" and "+r+" are too far apart with stepSize of "+c+" "+s);let y=o.ticks.source==="data"&&this.getDataTimestamps();for(g=h,b=0;g<r;g=+t.add(g,c,s),b++)ux(p,g,y);return(g===r||o.bounds==="ticks"||b===1)&&ux(p,g,y),Object.keys(p).sort(sx).map(x=>+x)}getLabelForValue(t){let n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){let r=this.options.time.displayFormats,o=this._unit,i=n||r[o];return this._adapter.format(t,i)}_tickFormatFunction(t,n,r,o){let i=this.options,s=i.ticks.callback;if(s)return Wt(s,[t,n,r],this);let c=i.time.displayFormats,u=this._unit,d=this._majorUnit,p=u&&c[u],h=d&&c[d],g=r[n],b=d&&h&&g&&g.major;return this._adapter.format(t,o||(b?h:p))}generateTickLabels(t){let n,r,o;for(n=0,r=t.length;n<r;++n)o=t[n],o.label=this._tickFormatFunction(o.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){let n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){let n=this.options.ticks,r=this.ctx.measureText(t).width,o=Yo(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(o),s=Math.sin(o),c=this._resolveTickFontOptions(0).size;return{w:r*i+c*s,h:r*s+c*i}}_getLabelCapacity(t){let n=this.options.time,r=n.displayFormats,o=r[n.unit]||r.millisecond,i=this._tickFormatFunction(t,0,dx(this,[t],this._majorUnit),o),s=this._getLabelSize(i),c=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return c>0?c:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,r=o.length;n<r;++n)t=t.concat(o[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],n,r;if(t.length)return t;let o=this.getLabels();for(n=0,r=o.length;n<r;++n)t.push(lx(this,o[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Xx(t.sort(sx))}};fx=class extends Zd{static id="timeseries";static defaults=Zd.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Cd(n,this.min),this._tableRange=Cd(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:n,max:r}=this,o=[],i=[],s,c,u,d,p;for(s=0,c=t.length;s<c;++s)d=t[s],d>=n&&d<=r&&o.push(d);if(o.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,c=o.length;s<c;++s)p=o[s+1],u=o[s-1],d=o[s],Math.round((p+u)/2)!==d&&i.push({time:d,pos:s/(c-1)});return i}_generate(){let t=this.min,n=this.max,r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((o,i)=>o-i)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Cd(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Cd(this._table,r*this._tableRange+this._minPos,!0)}};Bg.register(I5,RA,WA,qA,GA,L5,N5,Y5);px=["--teal-700","--yellow-400","--teal-400","--orange-400","--green-400","--red-400"],mA=["0 - 1s","1 - 30s","30s - 30min","30 - 60min","1 - 5hr","5 - 10hr","10 - 18hr","18+hr"],bA=(e,t,n=0)=>`${e.toFixed(n)} ${t}${e==1?"":"s"}`,hx=e=>{let t=e/3600;if(t>=1)return bA(t,"hour",1);let n=e/60;return n>=1?bA(n,"minute",0):bA(e,"second",0)},Dd=e=>e.replace(/ \([^)]+\)/,"");a4="Incorrect 'index' type",s4=e=>`Invalid value for key ${e}`,l4=e=>`Pattern length exceeds max of ${e}.`,c4=e=>`Missing ${e} property in key`,u4=e=>`Property 'weight' in key '${e}' must be a positive integer`,Ax=Object.prototype.hasOwnProperty,XA=class{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let o=Tw(r);this._keys.push(o),this._keyMap[o.id]=o,n+=o.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};f4={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},p4={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},h4={location:0,threshold:.6,distance:100},A4={useExtendedSearch:!1,getFn:d4,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},rt={...p4,...f4,...h4,...A4},g4=/[^ ]+/g;kc=class{constructor({getFn:t=rt.getFn,fieldNormWeight:n=rt.fieldNormWeight}={}){this.norm=m4(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,qo(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){let n=this.size();qo(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Lr(t)||vA(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((o,i)=>{let s=o.getFn?o.getFn(t):this.getFn(t,o.path);if(Lr(s)){if(ki(s)){let c=[],u=[{nestedArrIndex:-1,value:s}];for(;u.length;){let{nestedArrIndex:d,value:p}=u.pop();if(Lr(p))if(qo(p)&&!vA(p)){let h={v:p,i:d,n:this.norm.get(p)};c.push(h)}else ki(p)&&p.forEach((h,g)=>{u.push({nestedArrIndex:g,value:h})})}r.$[i]=c}else if(qo(s)&&!vA(s)){let c={v:s,n:this.norm.get(s)};r.$[i]=c}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}};Xa=32;$d=String.prototype.normalize?(e=>e.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,"")):(e=>e),ef=class{constructor(t,{location:n=rt.location,threshold:r=rt.threshold,distance:o=rt.distance,includeMatches:i=rt.includeMatches,findAllMatches:s=rt.findAllMatches,minMatchCharLength:c=rt.minMatchCharLength,isCaseSensitive:u=rt.isCaseSensitive,ignoreDiacritics:d=rt.ignoreDiacritics,ignoreLocation:p=rt.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:o,includeMatches:i,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:p},t=u?t:t.toLowerCase(),t=d?$d(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;let h=(b,y)=>{this.chunks.push({pattern:b,alphabet:x4(b),startIndex:y})},g=this.pattern.length;if(g>Xa){let b=0,y=g%Xa,x=g-y;for(;b<x;)h(this.pattern.substr(b,Xa),b),b+=Xa;if(y){let v=g-Xa;h(this.pattern.substr(v),v)}}else h(this.pattern,0)}searchIn(t){let{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:o}=this.options;if(t=n?t:t.toLowerCase(),t=r?$d(t):t,this.pattern===t){let x={isMatch:!0,score:0};return o&&(x.indices=[[0,t.length-1]]),x}let{location:i,distance:s,threshold:c,findAllMatches:u,minMatchCharLength:d,ignoreLocation:p}=this.options,h=[],g=0,b=!1;this.chunks.forEach(({pattern:x,alphabet:v,startIndex:D})=>{let{isMatch:M,score:T,indices:C}=y4(t,x,v,{location:i+D,distance:s,threshold:c,findAllMatches:u,minMatchCharLength:d,includeMatches:o,ignoreLocation:p});M&&(b=!0),g+=T,M&&C&&(h=[...h,...C])});let y={isMatch:b,score:b?g/this.chunks.length:1};return b&&o&&(y.indices=h),y}},Jo=class{constructor(t){this.pattern=t}static isMultiMatch(t){return mx(t,this.multiRegex)}static isSingleMatch(t){return mx(t,this.singleRegex)}search(){}};ZA=class extends Jo{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){let n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}},$A=class extends Jo{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){let n=t.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}},eg=class extends Jo{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){let n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}},tg=class extends Jo{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){let n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}},ng=class extends Jo{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){let n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},rg=class extends Jo{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){let n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}},tf=class extends Jo{constructor(t,{location:n=rt.location,threshold:r=rt.threshold,distance:o=rt.distance,includeMatches:i=rt.includeMatches,findAllMatches:s=rt.findAllMatches,minMatchCharLength:c=rt.minMatchCharLength,isCaseSensitive:u=rt.isCaseSensitive,ignoreDiacritics:d=rt.ignoreDiacritics,ignoreLocation:p=rt.ignoreLocation}={}){super(t),this._bitapSearch=new ef(t,{location:n,threshold:r,distance:o,includeMatches:i,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:p})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}},nf=class extends Jo{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r,o=[],i=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+i,o.push([r,n-1]);let s=!!o.length;return{isMatch:s,score:s?0:1,indices:o}}},og=[ZA,nf,eg,tg,rg,ng,$A,tf],bx=og.length,w4=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,k4="|";E4=new Set([tf.type,nf.type]),ig=class{constructor(t,{isCaseSensitive:n=rt.isCaseSensitive,ignoreDiacritics:r=rt.ignoreDiacritics,includeMatches:o=rt.includeMatches,minMatchCharLength:i=rt.minMatchCharLength,ignoreLocation:s=rt.ignoreLocation,findAllMatches:c=rt.findAllMatches,location:u=rt.location,threshold:d=rt.threshold,distance:p=rt.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:o,minMatchCharLength:i,findAllMatches:c,ignoreLocation:s,location:u,threshold:d,distance:p},t=n?t:t.toLowerCase(),t=r?$d(t):t,this.pattern=t,this.query=S4(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){let n=this.query;if(!n)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:o,ignoreDiacritics:i}=this.options;t=o?t:t.toLowerCase(),t=i?$d(t):t;let s=0,c=[],u=0;for(let d=0,p=n.length;d<p;d+=1){let h=n[d];c.length=0,s=0;for(let g=0,b=h.length;g<b;g+=1){let y=h[g],{isMatch:x,indices:v,score:D}=y.search(t);if(x){if(s+=1,u+=D,r){let M=y.constructor.type;E4.has(M)?c=[...c,...v]:c.push(v)}}else{u=0,s=0,c.length=0;break}}if(s){let g={isMatch:!0,score:u/s};return r&&(g.indices=c),g}}return{isMatch:!1,score:1}}},ag=[];rf={AND:"$and",OR:"$or"},lg={PATH:"$path",PATTERN:"$val"},cg=e=>!!(e[rf.AND]||e[rf.OR]),D4=e=>!!e[lg.PATH],P4=e=>!ki(e)&&Dw(e)&&!cg(e),vx=e=>({[rf.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});ca=class{constructor(t,n={},r){this.options={...rt,...n},this.options.useExtendedSearch,this._keyStore=new XA(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof kc))throw new Error(a4);this._myIndex=n||Iw(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Lr(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){let n=[];for(let r=0,o=this._docs.length;r<o;r+=1){let i=this._docs[r];t(i,r)&&(this.removeAt(r),r-=1,o-=1,n.push(i))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){let{includeMatches:r,includeScore:o,shouldSort:i,sortFn:s,ignoreFieldNorm:c}=this.options,u=qo(t)?qo(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return T4(u,{ignoreFieldNorm:c}),i&&u.sort(s),Cw(n)&&n>-1&&(u=u.slice(0,n)),B4(u,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(t){let n=sg(t,this.options),{records:r}=this._myIndex,o=[];return r.forEach(({v:i,i:s,n:c})=>{if(!Lr(i))return;let{isMatch:u,score:d,indices:p}=n.searchIn(i);u&&o.push({item:i,idx:s,matches:[{score:d,value:i,norm:c,indices:p}]})}),o}_searchLogical(t){let n=_w(t,this.options),r=(c,u,d)=>{if(!c.children){let{keyId:h,searcher:g}=c,b=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(u,h),searcher:g});return b&&b.length?[{idx:d,item:u,matches:b}]:[]}let p=[];for(let h=0,g=c.children.length;h<g;h+=1){let b=c.children[h],y=r(b,u,d);if(y.length)p.push(...y);else if(c.operator===rf.AND)return[]}return p},o=this._myIndex.records,i={},s=[];return o.forEach(({$:c,i:u})=>{if(Lr(c)){let d=r(n,c,u);d.length&&(i[u]||(i[u]={idx:u,item:c,matches:[]},s.push(i[u])),d.forEach(({matches:p})=>{i[u].matches.push(...p)}))}}),s}_searchObjectList(t){let n=sg(t,this.options),{keys:r,records:o}=this._myIndex,i=[];return o.forEach(({$:s,i:c})=>{if(!Lr(s))return;let u=[];r.forEach((d,p)=>{u.push(...this._findMatches({key:d,value:s[p],searcher:n}))}),u.length&&i.push({idx:c,item:s,matches:u})}),i}_findMatches({key:t,value:n,searcher:r}){if(!Lr(n))return[];let o=[];if(ki(n))n.forEach(({v:i,i:s,n:c})=>{if(!Lr(i))return;let{isMatch:u,score:d,indices:p}=r.searchIn(i);u&&o.push({score:d,key:t,value:i,idx:s,norm:c,indices:p})});else{let{v:i,n:s}=n,{isMatch:c,score:u,indices:d}=r.searchIn(i);c&&o.push({score:u,key:t,value:i,norm:s,indices:d})}return o}};ca.version="7.1.0";ca.createIndex=Iw;ca.parseIndex=b4;ca.config=rt;ca.parseQuery=_w;C4(ig);R4=["software_name","software_description","software_web_page","software_documentation","software_use_link","software_versions"]});var Nw={};Lu(Nw,{default:()=>V4});function Lw({active:e,tagCategory:t,tagId:n,iconUri:r,name:o,toggleTag:i}){let s=r||z4[o]||"tag";return E.jsx("li",{className:`tag tag-category-${t.name.toLowerCase().replace(/[^a-z]+/g,"-")}${e.tagIds.has(n)?" active":""}`,children:E.jsxs("button",{href:"#",disabled:e.disabledTagIds.has(n),onClick:c=>{c.preventDefault(),i(n)},children:[s.startsWith("http")?E.jsx(kt,{alt:o,src:s}):E.jsx(kt,{name:s}),o]})})}function jw({children:e}){return E.jsx("ul",{className:"tags",children:e})}function F4({active:e,baseUri:t,description:n,imageType:r,imageUri:o,name:i,infoGroupId:s,parentInfoGroupId:c,tags:u,toggleTag:d}){let p=`${t}/${c||s}`;return E.jsxs("div",{className:"resource-group",children:[E.jsx("a",{className:`resource-group-image image-type-${r}`,href:p,children:o?E.jsx("img",{src:o}):E.jsx(kt,{name:"motherboard"})}),E.jsxs("div",{className:"resource-group-text",children:[E.jsx("h3",{children:E.jsx("a",{href:p,children:i})}),E.jsx(jw,{children:u.map(h=>E.jsx(Lw,{...h,active:e,toggleTag:d},h.tagId))}),E.jsxs("p",{children:[n&&n,E.jsx("br",{}),E.jsxs("a",{href:p,children:["Learn more about ",i," \xBB"]})]})]})]})}function Q4({active:e,baseUri:t,name:n,resourceGroups:r,toggleTag:o}){return E.jsxs(E.Fragment,{children:[E.jsx("h2",{children:n}),r.filter(({infoGroupId:i})=>e.infoGroupIds.has(i)).map(i=>E.jsx(F4,{...i,baseUri:t,active:e,toggleTag:o},i.infoGroupId))]})}function U4({active:e,clearTags:t,tagCategories:n,toggleTag:r}){let[o,i]=P.useState(!1),s=P.useRef(null);return P.useEffect(()=>{let c=()=>i(!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:s,onClick:()=>i(!o),className:`btn-filters btn ${o?"active":""}`,children:[E.jsx(kt,{name:"filter"})," Filters",e.tagIds.size>0?E.jsx("span",{className:"active-tag-count",children:e.tagIds.size}):null]}),o?E.jsxs("div",{className:"filters-inner",children:[n.map(c=>E.jsxs(E.Fragment,{children:[E.jsx("h2",{children:c.name}),E.jsx(jw,{children:c.tags.map(u=>E.jsx(Lw,{...u,active:e,toggleTag:r}))})]})),E.jsxs("button",{onClick:t,disabled:e.tagIds.size==0,className:"btn danger",children:[E.jsx(kt,{name:"trash"})," Clear Filters"]})]}):null]})}function H4({setBotOpen:e}){let t=P.useRef(null),n=[{title:"Browse resources",icon:"filter-square",description:"Filter resources to find the best match for your research.",onClick:r=>{r.preventDefault(),t.current&&t.current.nextSibling.scrollIntoView({bahavior:"smooth"})}},{title:"Ask a question",icon:"question-circle",onClick:r=>{r.preventDefault(),e(!0)},description:"You have resource questions. Our Q&A bot has answers!"},{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:t,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:o,href:i,description:s,onClick:c},u)=>E.jsx("li",{className:`resource-pathway-${u}`,children:E.jsxs("a",{href:i||"#",onClick:c,children:[o?E.jsx(kt,{name:o}):null," ",E.jsxs("span",{className:"detail",children:[E.jsx("span",{className:"title",children:r}),E.jsx("span",{className:"description",children:s})]})]})},r))})]})}function V4({baseUri:e,title:t,setBotOpen:n,showBreadcrumbs:r=!0,showTitle:o=!0}){let[i,s]=P.useState([]),c=Og(),u=P.useMemo(()=>c?Fw(c,i):null,[c,i]),d=h=>s(i.includes(h)?i.filter(g=>g!=h):[...i,h]),p=()=>s([]);return E.jsxs(E.Fragment,{children:[r&&E.jsx(Pc,{expandWidth:!0,items:[{name:"Resources"}],topBorder:!0}),t&&E.jsx("h1",{className:o?"":"visually-hidden",children:t}),E.jsx(H4,{setBotOpen:n}),E.jsxs("div",{id:"browse-resources",children:[u?E.jsx(U4,{tagCategories:c.tagCategories,active:u,clearTags:p,toggleTag:d}):null,c?c.resourceCategories.filter(({resourceCategoryId:h})=>u.resourceCategoryIds.has(h)).map(h=>E.jsx(Q4,{...h,active:u,baseUri:e,clearTags:p,toggleTag:d},h.name)):null]})]})}var z4,zw=zl(()=>{Us();$h();z4={"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 dd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function W4(){if(Hw)return bt;Hw=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=h&&B[h]||B["@@iterator"],typeof B=="function"?B:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,x={};function v(B,X,be){this.props=B,this.context=X,this.refs=x,this.updater=be||b}v.prototype.isReactComponent={},v.prototype.setState=function(B,X){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,X,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function D(){}D.prototype=v.prototype;function M(B,X,be){this.props=B,this.context=X,this.refs=x,this.updater=be||b}var T=M.prototype=new D;T.constructor=M,y(T,v.prototype),T.isPureReactComponent=!0;var C=Array.isArray,z=Object.prototype.hasOwnProperty,R={current:null},Q={key:!0,ref:!0,__self:!0,__source:!0};function V(B,X,be){var me,xe={},_e=null,Oe=null;if(X!=null)for(me in X.ref!==void 0&&(Oe=X.ref),X.key!==void 0&&(_e=""+X.key),X)z.call(X,me)&&!Q.hasOwnProperty(me)&&(xe[me]=X[me]);var Ve=arguments.length-2;if(Ve===1)xe.children=be;else if(1<Ve){for(var Ue=Array(Ve),Ze=0;Ze<Ve;Ze++)Ue[Ze]=arguments[Ze+2];xe.children=Ue}if(B&&B.defaultProps)for(me in Ve=B.defaultProps,Ve)xe[me]===void 0&&(xe[me]=Ve[me]);return{$$typeof:e,type:B,key:_e,ref:Oe,props:xe,_owner:R.current}}function J(B,X){return{$$typeof:e,type:B.type,key:X,ref:B.ref,props:B.props,_owner:B._owner}}function Y(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function Z(B){var X={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(be){return X[be]})}var W=/\/+/g;function $(B,X){return typeof B=="object"&&B!==null&&B.key!=null?Z(""+B.key):X.toString(36)}function de(B,X,be,me,xe){var _e=typeof B;(_e==="undefined"||_e==="boolean")&&(B=null);var Oe=!1;if(B===null)Oe=!0;else switch(_e){case"string":case"number":Oe=!0;break;case"object":switch(B.$$typeof){case e:case t:Oe=!0}}if(Oe)return Oe=B,xe=xe(Oe),B=me===""?"."+$(Oe,0):me,C(xe)?(be="",B!=null&&(be=B.replace(W,"$&/")+"/"),de(xe,X,be,"",function(Ze){return Ze})):xe!=null&&(Y(xe)&&(xe=J(xe,be+(!xe.key||Oe&&Oe.key===xe.key?"":(""+xe.key).replace(W,"$&/")+"/")+B)),X.push(xe)),1;if(Oe=0,me=me===""?".":me+":",C(B))for(var Ve=0;Ve<B.length;Ve++){_e=B[Ve];var Ue=me+$(_e,Ve);Oe+=de(_e,X,be,Ue,xe)}else if(Ue=g(B),typeof Ue=="function")for(B=Ue.call(B),Ve=0;!(_e=B.next()).done;)_e=_e.value,Ue=me+$(_e,Ve++),Oe+=de(_e,X,be,Ue,xe);else if(_e==="object")throw X=String(B),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.");return Oe}function ne(B,X,be){if(B==null)return B;var me=[],xe=0;return de(B,me,"","",function(_e){return X.call(be,_e,xe++)}),me}function pe(B){if(B._status===-1){var X=B._result;X=X(),X.then(function(be){(B._status===0||B._status===-1)&&(B._status=1,B._result=be)},function(be){(B._status===0||B._status===-1)&&(B._status=2,B._result=be)}),B._status===-1&&(B._status=0,B._result=X)}if(B._status===1)return B._result.default;throw B._result}var oe={current:null},K={transition:null},j={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:K,ReactCurrentOwner:R};function ue(){throw Error("act(...) is not supported in production builds of React.")}return bt.Children={map:ne,forEach:function(B,X,be){ne(B,function(){X.apply(this,arguments)},be)},count:function(B){var X=0;return ne(B,function(){X++}),X},toArray:function(B){return ne(B,function(X){return X})||[]},only:function(B){if(!Y(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},bt.Component=v,bt.Fragment=n,bt.Profiler=o,bt.PureComponent=M,bt.StrictMode=r,bt.Suspense=u,bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,bt.act=ue,bt.cloneElement=function(B,X,be){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var me=y({},B.props),xe=B.key,_e=B.ref,Oe=B._owner;if(X!=null){if(X.ref!==void 0&&(_e=X.ref,Oe=R.current),X.key!==void 0&&(xe=""+X.key),B.type&&B.type.defaultProps)var Ve=B.type.defaultProps;for(Ue in X)z.call(X,Ue)&&!Q.hasOwnProperty(Ue)&&(me[Ue]=X[Ue]===void 0&&Ve!==void 0?Ve[Ue]:X[Ue])}var Ue=arguments.length-2;if(Ue===1)me.children=be;else if(1<Ue){Ve=Array(Ue);for(var Ze=0;Ze<Ue;Ze++)Ve[Ze]=arguments[Ze+2];me.children=Ve}return{$$typeof:e,type:B.type,key:xe,ref:_e,props:me,_owner:Oe}},bt.createContext=function(B){return B={$$typeof:s,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:i,_context:B},B.Consumer=B},bt.createElement=V,bt.createFactory=function(B){var X=V.bind(null,B);return X.type=B,X},bt.createRef=function(){return{current:null}},bt.forwardRef=function(B){return{$$typeof:c,render:B}},bt.isValidElement=Y,bt.lazy=function(B){return{$$typeof:p,_payload:{_status:-1,_result:B},_init:pe}},bt.memo=function(B,X){return{$$typeof:d,type:B,compare:X===void 0?null:X}},bt.startTransition=function(B){var X=K.transition;K.transition={};try{B()}finally{K.transition=X}},bt.unstable_act=ue,bt.useCallback=function(B,X){return oe.current.useCallback(B,X)},bt.useContext=function(B){return oe.current.useContext(B)},bt.useDebugValue=function(){},bt.useDeferredValue=function(B){return oe.current.useDeferredValue(B)},bt.useEffect=function(B,X){return oe.current.useEffect(B,X)},bt.useId=function(){return oe.current.useId()},bt.useImperativeHandle=function(B,X,be){return oe.current.useImperativeHandle(B,X,be)},bt.useInsertionEffect=function(B,X){return oe.current.useInsertionEffect(B,X)},bt.useLayoutEffect=function(B,X){return oe.current.useLayoutEffect(B,X)},bt.useMemo=function(B,X){return oe.current.useMemo(B,X)},bt.useReducer=function(B,X,be){return oe.current.useReducer(B,X,be)},bt.useRef=function(B){return oe.current.useRef(B)},bt.useState=function(B){return oe.current.useState(B)},bt.useSyncExternalStore=function(B,X,be){return oe.current.useSyncExternalStore(B,X,be)},bt.useTransition=function(){return oe.current.useTransition()},bt.version="18.3.1",bt}function Qs(){return Vw||(Vw=1,Uw.exports=W4()),Uw.exports}function Y4(){if(Ww)return Tc;Ww=1;var e=Qs(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(c,u,d){var p,h={},g=null,b=null;d!==void 0&&(g=""+d),u.key!==void 0&&(g=""+u.key),u.ref!==void 0&&(b=u.ref);for(p in u)r.call(u,p)&&!i.hasOwnProperty(p)&&(h[p]=u[p]);if(c&&c.defaultProps)for(p in u=c.defaultProps,u)h[p]===void 0&&(h[p]=u[p]);return{$$typeof:t,type:c,key:g,ref:b,props:h,_owner:o.current}}return Tc.Fragment=n,Tc.jsx=s,Tc.jsxs=s,Tc}function q4(){return Yw||(Yw=1,Qw.exports=Y4()),Qw.exports}function K4(){return Gw||(Gw=1,(function(e){function t(K,j){var ue=K.length;K.push(j);e:for(;0<ue;){var B=ue-1>>>1,X=K[B];if(0<o(X,j))K[B]=j,K[ue]=X,ue=B;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var j=K[0],ue=K.pop();if(ue!==j){K[0]=ue;e:for(var B=0,X=K.length,be=X>>>1;B<be;){var me=2*(B+1)-1,xe=K[me],_e=me+1,Oe=K[_e];if(0>o(xe,ue))_e<X&&0>o(Oe,xe)?(K[B]=Oe,K[_e]=ue,B=_e):(K[B]=xe,K[me]=ue,B=me);else if(_e<X&&0>o(Oe,ue))K[B]=Oe,K[_e]=ue,B=_e;else break e}}return j}function o(K,j){var ue=K.sortIndex-j.sortIndex;return ue!==0?ue:K.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,c=s.now();e.unstable_now=function(){return s.now()-c}}var u=[],d=[],p=1,h=null,g=3,b=!1,y=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(K){for(var j=n(d);j!==null;){if(j.callback===null)r(d);else if(j.startTime<=K)r(d),j.sortIndex=j.expirationTime,t(u,j);else break;j=n(d)}}function C(K){if(x=!1,T(K),!y)if(n(u)!==null)y=!0,pe(z);else{var j=n(d);j!==null&&oe(C,j.startTime-K)}}function z(K,j){y=!1,x&&(x=!1,D(V),V=-1),b=!0;var ue=g;try{for(T(j),h=n(u);h!==null&&(!(h.expirationTime>j)||K&&!Z());){var B=h.callback;if(typeof B=="function"){h.callback=null,g=h.priorityLevel;var X=B(h.expirationTime<=j);j=e.unstable_now(),typeof X=="function"?h.callback=X:h===n(u)&&r(u),T(j)}else r(u);h=n(u)}if(h!==null)var be=!0;else{var me=n(d);me!==null&&oe(C,me.startTime-j),be=!1}return be}finally{h=null,g=ue,b=!1}}var R=!1,Q=null,V=-1,J=5,Y=-1;function Z(){return!(e.unstable_now()-Y<J)}function W(){if(Q!==null){var K=e.unstable_now();Y=K;var j=!0;try{j=Q(!0,K)}finally{j?$():(R=!1,Q=null)}}else R=!1}var $;if(typeof M=="function")$=function(){M(W)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ne=de.port2;de.port1.onmessage=W,$=function(){ne.postMessage(null)}}else $=function(){v(W,0)};function pe(K){Q=K,R||(R=!0,$())}function oe(K,j){V=v(function(){K(e.unstable_now())},j)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_continueExecution=function(){y||b||(y=!0,pe(z))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(K){switch(g){case 1:case 2:case 3:var j=3;break;default:j=g}var ue=g;g=j;try{return K()}finally{g=ue}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,j){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var ue=g;g=K;try{return j()}finally{g=ue}},e.unstable_scheduleCallback=function(K,j,ue){var B=e.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?B+ue:B):ue=B,K){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=ue+X,K={id:p++,callback:j,priorityLevel:K,startTime:ue,expirationTime:X,sortIndex:-1},ue>B?(K.sortIndex=ue,t(d,K),n(u)===null&&K===n(d)&&(x?(D(V),V=-1):x=!0,oe(C,ue-B))):(K.sortIndex=X,t(u,K),y||b||(y=!0,pe(z))),K},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(K){var j=g;return function(){var ue=g;g=j;try{return K.apply(this,arguments)}finally{g=ue}}}})(Kw)),Kw}function G4(){return Xw||(Xw=1,qw.exports=K4()),qw.exports}function X4(){if(Jw)return xr;Jw=1;var e=Qs(),t=G4();function n(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,f=1;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+a+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function i(a,l){s(a,l),s(a+"Capture",l)}function s(a,l){for(o[a]=l,a=0;a<l.length;a++)r.add(l[a])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function g(a){return u.call(h,a)?!0:u.call(p,a)?!1:d.test(a)?h[a]=!0:(p[a]=!0,!1)}function b(a,l,f,A){if(f!==null&&f.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return A?!1:f!==null?!f.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function y(a,l,f,A){if(l===null||typeof l>"u"||b(a,l,f,A))return!0;if(A)return!1;if(f!==null)switch(f.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function x(a,l,f,A,m,S,O){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=A,this.attributeNamespace=m,this.mustUseProperty=f,this.propertyName=a,this.type=l,this.sanitizeURL=S,this.removeEmptyString=O}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){v[a]=new x(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];v[l]=new x(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){v[a]=new x(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){v[a]=new x(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){v[a]=new x(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){v[a]=new x(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){v[a]=new x(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){v[a]=new x(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){v[a]=new x(a,5,!1,a.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function M(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var l=a.replace(D,M);v[l]=new x(l,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var l=a.replace(D,M);v[l]=new x(l,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var l=a.replace(D,M);v[l]=new x(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){v[a]=new x(a,1,!1,a.toLowerCase(),null,!1,!1)}),v.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){v[a]=new x(a,1,!1,a.toLowerCase(),null,!0,!0)});function T(a,l,f,A){var m=v.hasOwnProperty(l)?v[l]:null;(m!==null?m.type!==0:A||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(y(l,f,m,A)&&(f=null),A||m===null?g(l)&&(f===null?a.removeAttribute(l):a.setAttribute(l,""+f)):m.mustUseProperty?a[m.propertyName]=f===null?m.type===3?!1:"":f:(l=m.attributeName,A=m.attributeNamespace,f===null?a.removeAttribute(l):(m=m.type,f=m===3||m===4&&f===!0?"":""+f,A?a.setAttributeNS(A,l,f):a.setAttribute(l,f))))}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,z=Symbol.for("react.element"),R=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),Z=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),K=Symbol.iterator;function j(a){return a===null||typeof a!="object"?null:(a=K&&a[K]||a["@@iterator"],typeof a=="function"?a:null)}var ue=Object.assign,B;function X(a){if(B===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);B=l&&l[1]||""}return`
302
302
  `+B+a}var be=!1;function me(a,l){if(!a||be)return"";be=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(ce){var A=ce}Reflect.construct(a,[],l)}else{try{l.call()}catch(ce){A=ce}a.call(l.prototype)}else{try{throw Error()}catch(ce){A=ce}a()}}catch(ce){if(ce&&A&&typeof ce.stack=="string"){for(var m=ce.stack.split(`
303
303
  `),S=A.stack.split(`
304
304
  `),O=m.length-1,H=S.length-1;1<=O&&0<=H&&m[O]!==S[H];)H--;for(;1<=O&&0<=H;O--,H--)if(m[O]!==S[H]){if(O!==1||H!==1)do if(O--,H--,0>H||m[O]!==S[H]){var q=`