/*! For license information please see 290.0640644c.js.LICENSE.txt */ (self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[290],{14:t=>{t.exports=function(){return!1}},45:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(8587);function o(t,e){if(null==t)return{};var n,o,i=(0,r.A)(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o{var r=n(7937)(n(6552),"DataView");t.exports=r},67:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=(0,n(7784).A)("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]])},86:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=(0,n(7784).A)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},116:(t,e,n)=>{"use strict";n.d(e,{$:()=>c,s:()=>l});var r=n(9379),o=n(685),i=n(9939),a=n(7264),s=n(7988);class l extends a.k{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||o.U,this.observers=[],this.state=t.state||c(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=(0,r.A)((0,r.A)({},this.defaultOptions),t),this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(e=>e!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,e;return null!=(t=null==(e=this.retryer)?void 0:e.continue())?t:this.execute()}async execute(){const t=()=>{var t;return this.retryer=(0,s.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(t,e)=>{this.dispatch({type:"failed",failureCount:t,error:e})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(t=this.options.retry)?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},e="loading"===this.state.status;try{var n,r,o,i,a,l,c,u;if(!e){var d,h,f,p;this.dispatch({type:"loading",variables:this.options.variables}),await(null==(d=(h=this.mutationCache.config).onMutate)?void 0:d.call(h,this.state.variables,this));const t=await(null==(f=(p=this.options).onMutate)?void 0:f.call(p,this.state.variables));t!==this.state.context&&this.dispatch({type:"loading",context:t,variables:this.state.variables})}const s=await t();return await(null==(n=(r=this.mutationCache.config).onSuccess)?void 0:n.call(r,s,this.state.variables,this.state.context,this)),await(null==(o=(i=this.options).onSuccess)?void 0:o.call(i,s,this.state.variables,this.state.context)),await(null==(a=(l=this.mutationCache.config).onSettled)?void 0:a.call(l,s,null,this.state.variables,this.state.context,this)),await(null==(c=(u=this.options).onSettled)?void 0:c.call(u,s,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:s}),s}catch(_){try{var m,g,v,y,b,x,w,k;throw await(null==(m=(g=this.mutationCache.config).onError)?void 0:m.call(g,_,this.state.variables,this.state.context,this)),await(null==(v=(y=this.options).onError)?void 0:v.call(y,_,this.state.variables,this.state.context)),await(null==(b=(x=this.mutationCache.config).onSettled)?void 0:b.call(x,void 0,_,this.state.variables,this.state.context,this)),await(null==(w=(k=this.options).onSettled)?void 0:w.call(k,void 0,_,this.state.variables,this.state.context)),_}finally{this.dispatch({type:"error",error:_})}}}dispatch(t){this.state=(e=>{switch(t.type){case"failed":return(0,r.A)((0,r.A)({},e),{},{failureCount:t.failureCount,failureReason:t.error});case"pause":return(0,r.A)((0,r.A)({},e),{},{isPaused:!0});case"continue":return(0,r.A)((0,r.A)({},e),{},{isPaused:!1});case"loading":return(0,r.A)((0,r.A)({},e),{},{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!(0,s.v_)(this.options.networkMode),status:"loading",variables:t.variables});case"success":return(0,r.A)((0,r.A)({},e),{},{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return(0,r.A)((0,r.A)({},e),{},{data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"});case"setState":return(0,r.A)((0,r.A)({},e),t.state)}})(this.state),i.j.batch(()=>{this.observers.forEach(e=>{e.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function c(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}},139:t=>{t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r{"use strict";n.d(e,{Td:()=>u});var r=n(9379),o=n(45),i=n(579),a=n(511),s=n(5003),l=n(2695);const c=["isNumeric"],u=(0,s.R)((t,e)=>{let{isNumeric:n}=t,s=(0,o.A)(t,c);const u=(0,a.k)();return(0,i.jsx)(l.B.td,(0,r.A)((0,r.A)({},s),{},{ref:e,__css:u.td,"data-is-numeric":n}))})},202:(t,e,n)=>{"use strict";n.d(e,{T:()=>a});var r=n(9379),o=n(579),i=n(9904);const a=(0,n(5003).R)((t,e)=>(0,o.jsx)(i.B,(0,r.A)((0,r.A)({align:"center"},t),{},{direction:"column",ref:e})));a.displayName="VStack"},219:(t,e,n)=>{"use strict";var r=n(3763),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(t){return r.isMemo(t)?a:s[t.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(p){var o=f(n);o&&o!==p&&t(e,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(e),m=l(n),g=0;g{"use strict";n.d(e,{U:()=>o});var r=n(5043);const o=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?r.useLayoutEffect:r.useEffect},227:(t,e,n)=>{"use strict";n.d(e,{K:()=>u});var r=n(9379),o=n(579),i=n(4844),a=n(3109),s=n(7547),l=n(5003),c=n(2695);const u=(0,l.R)(function(t,e){const n=(0,s.Jn)((0,r.A)((0,r.A)({},t),{},{ref:e})),l=(0,a.e)();return(0,o.jsx)(c.B.div,(0,r.A)((0,r.A)({outline:"0"},n),{},{className:(0,i.cx)("chakra-tabs__tab-panel",t.className),__css:l.tabpanel}))});u.displayName="TabPanel"},293:(t,e,n)=>{"use strict";n.d(e,{E:()=>o});var r=n(5043);const o=n(4735).B?r.useLayoutEffect:r.useEffect},349:(t,e,n)=>{"use strict";n.d(e,{R:()=>r});const r=(0,n(4010).w)({d:"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z",displayName:"AddIcon"})},359:(t,e,n)=>{"use strict";n.d(e,{s:()=>D});var r=n(5772),o=n(9379),i=n(45),a=n(579),s=n(7558),l=n(2432),c=n(5043),u=n(4093);const d="chakra-ui-light",h="chakra-ui-dark";const f="chakra-ui-color-mode";const p=(m=f,{ssr:!1,type:"localStorage",get(t){if(null===globalThis||void 0===globalThis||!globalThis.document)return t;let e;try{e=localStorage.getItem(m)||t}catch(n){}return e||t},set(t){try{localStorage.setItem(m,t)}catch(e){}}});var m;function g(t,e){const n=t.match(new RegExp("(^| )".concat(e,"=([^;]+)")));return null===n||void 0===n?void 0:n[2]}function v(t,e){return{ssr:!!e,type:"cookie",get:n=>e?g(e,t):null!==globalThis&&void 0!==globalThis&&globalThis.document&&g(document.cookie,t)||n,set(e){document.cookie="".concat(t,"=").concat(e,"; max-age=31536000; path=/")}}}v(f);const y=()=>{},b=(0,s.Bd)()?c.useLayoutEffect:c.useEffect;function x(t,e){return"cookie"===t.type&&t.ssr?t.get(e):e}const w=function(t){const{value:e,children:n,options:{useSystemColorMode:r,initialColorMode:o,disableTransitionOnChange:i}={},colorModeManager:s=p}=t,f=(0,l._)(),m="dark"===o?"dark":"light",[g,v]=(0,c.useState)(()=>x(s,m)),[w,k]=(0,c.useState)(()=>x(s)),{getSystemTheme:_,setClassName:A,setDataset:S,addListener:C}=(0,c.useMemo)(()=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{preventTransition:e=!0,nonce:n}=t,r={setDataset:t=>{const n=e?r.preventTransition():void 0;document.documentElement.dataset.theme=t,document.documentElement.style.colorScheme=t,null===n||void 0===n||n()},setClassName(t){document.body.classList.add(t?h:d),document.body.classList.remove(t?d:h)},query:()=>window.matchMedia("(prefers-color-scheme: dark)"),getSystemTheme(t){var e;return(null!==(e=r.query().matches)&&void 0!==e?e:"dark"===t)?"dark":"light"},addListener(t){const e=r.query(),n=e=>{t(e.matches?"dark":"light")};return"function"===typeof e.addListener?e.addListener(n):e.addEventListener("change",n),()=>{"function"===typeof e.removeListener?e.removeListener(n):e.removeEventListener("change",n)}},preventTransition(){const t=document.createElement("style");return t.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),void 0!==n&&(t.nonce=n),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(t)})})}}};return r}({preventTransition:i,nonce:null===f||void 0===f?void 0:f.nonce}),[i,null===f||void 0===f?void 0:f.nonce]),E="system"!==o||g?g:w,O=(0,c.useCallback)(t=>{const e="system"===t?_():t;v(e),A("dark"===e),S(e),s.set(e)},[s,_,A,S]);b(()=>{"system"===o&&k(_())},[]),(0,c.useEffect)(()=>{const t=s.get();O(t||("system"!==o?m:"system"))},[s,m,o,O]);const P=(0,c.useCallback)(()=>{O("dark"===E?"light":"dark")},[E,O]);(0,c.useEffect)(()=>{if(r)return C(O)},[r,C,O]);const M=(0,c.useMemo)(()=>({colorMode:null!==e&&void 0!==e?e:E,toggleColorMode:e?y:P,setColorMode:e?y:O,forced:void 0!==e}),[E,P,O,e]);return(0,a.jsx)(u.Ig.Provider,{value:M,children:n})};function k(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}w.displayName="ColorModeProvider";var _,A,S=n(3290);const C=String.raw,E=C(_||(_=k(["\n :root,\n :host {\n --chakra-vh: 100vh;\n }\n\n @supports (height: -webkit-fill-available) {\n :root,\n :host {\n --chakra-vh: -webkit-fill-available;\n }\n }\n\n @supports (height: -moz-fill-available) {\n :root,\n :host {\n --chakra-vh: -moz-fill-available;\n }\n }\n\n @supports (height: 100dvh) {\n :root,\n :host {\n --chakra-vh: 100dvh;\n }\n }\n"]))),O=()=>(0,a.jsx)(S.mL,{styles:E}),P=t=>{let{scope:e=""}=t;return(0,a.jsx)(S.mL,{styles:C(A||(A=k(['\n html {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n font-family: system-ui, sans-serif;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n -moz-osx-font-smoothing: grayscale;\n touch-action: manipulation;\n }\n\n body {\n position: relative;\n min-height: 100%;\n margin: 0;\n font-feature-settings: "kern";\n }\n\n '," :where(*, *::before, *::after) {\n border-width: 0;\n border-style: solid;\n box-sizing: border-box;\n word-wrap: break-word;\n }\n\n main {\n display: block;\n }\n\n "," hr {\n border-top-width: 1px;\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n "," :where(pre, code, kbd,samp) {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 1em;\n }\n\n "," a {\n background-color: transparent;\n color: inherit;\n text-decoration: inherit;\n }\n\n "," abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n\n "," :where(b, strong) {\n font-weight: bold;\n }\n\n "," small {\n font-size: 80%;\n }\n\n "," :where(sub,sup) {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n "," sub {\n bottom: -0.25em;\n }\n\n "," sup {\n top: -0.5em;\n }\n\n "," img {\n border-style: none;\n }\n\n "," :where(button, input, optgroup, select, textarea) {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n\n "," :where(button, input) {\n overflow: visible;\n }\n\n "," :where(button, select) {\n text-transform: none;\n }\n\n ",' :where(\n button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner\n ) {\n border-style: none;\n padding: 0;\n }\n\n '," fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n\n "," legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n\n "," progress {\n vertical-align: baseline;\n }\n\n "," textarea {\n overflow: auto;\n }\n\n ",' :where([type="checkbox"], [type="radio"]) {\n box-sizing: border-box;\n padding: 0;\n }\n\n ',' input[type="number"]::-webkit-inner-spin-button,\n ',' input[type="number"]::-webkit-outer-spin-button {\n -webkit-appearance: none !important;\n }\n\n ',' input[type="number"] {\n -moz-appearance: textfield;\n }\n\n ',' input[type="search"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n\n ',' input[type="search"]::-webkit-search-decoration {\n -webkit-appearance: none !important;\n }\n\n '," ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n\n "," details {\n display: block;\n }\n\n "," summary {\n display: list-item;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n "," :where(\n blockquote,\n dl,\n dd,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n hr,\n figure,\n p,\n pre\n ) {\n margin: 0;\n }\n\n "," button {\n background: transparent;\n padding: 0;\n }\n\n "," fieldset {\n margin: 0;\n padding: 0;\n }\n\n "," :where(ol, ul) {\n margin: 0;\n padding: 0;\n }\n\n "," textarea {\n resize: vertical;\n }\n\n ",' :where(button, [role="button"]) {\n cursor: pointer;\n }\n\n '," button::-moz-focus-inner {\n border: 0 !important;\n }\n\n "," table {\n border-collapse: collapse;\n }\n\n "," :where(h1, h2, h3, h4, h5, h6) {\n font-size: inherit;\n font-weight: inherit;\n }\n\n "," :where(button, input, optgroup, select, textarea) {\n padding: 0;\n line-height: inherit;\n color: inherit;\n }\n\n "," :where(img, svg, video, canvas, audio, iframe, embed, object) {\n display: block;\n }\n\n "," :where(img, video) {\n max-width: 100%;\n height: auto;\n }\n\n [data-js-focus-visible]\n :focus:not([data-focus-visible-added]):not(\n [data-focus-visible-disabled]\n ) {\n outline: none;\n box-shadow: none;\n }\n\n "," select::-ms-expand {\n display: none;\n }\n\n ","\n "])),e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,E)})};var M=n(523),T=n(1271),N=n(2923);const R=t=>{const{children:e,colorModeManager:n,portalZIndex:r,resetScope:o,resetCSS:i=!0,theme:s={},environment:l,cssVarsRoot:c,disableEnvironment:u,disableGlobalStyle:d}=t,h=(0,a.jsx)(N.v,{environment:l,disabled:u,children:e});return(0,a.jsx)(M.NP,{theme:s,cssVarsRoot:c,children:(0,a.jsxs)(w,{colorModeManager:n,options:s.config,children:[i?(0,a.jsx)(P,{scope:o}):(0,a.jsx)(O,{}),!d&&(0,a.jsx)(M.zy,{}),r?(0,a.jsx)(T.w,{zIndex:r,children:h}):h]})})};var j=n(2325);const L=["children","theme","toastOptions"],D=(z=r.w4,function(t){let{children:e,theme:n=z,toastOptions:r}=t,s=(0,i.A)(t,L);return(0,a.jsxs)(R,(0,o.A)((0,o.A)({theme:n},s),{},{children:[(0,a.jsx)(j.ym,{value:null===r||void 0===r?void 0:r.defaultOptions,children:e}),(0,a.jsx)(j.tE,(0,o.A)({},r))]}))});var z},438:(t,e,n)=>{var r=n(2622);t.exports=function(t){return r(this,t).get(t)}},461:(t,e,n)=>{"use strict";n.d(e,{E8:()=>si,PP:()=>Ti,t1:()=>zo,s$:()=>di,kc:()=>Li,hE:()=>fi,m_:()=>Oi});var r=n(9379),o=n(4705);function i(t){return t+.5|0}const a=(t,e,n)=>Math.max(Math.min(t,n),e);function s(t){return a(i(2.55*t),0,255)}function l(t){return a(i(255*t),0,255)}function c(t){return a(i(t/2.55)/100,0,1)}function u(t){return a(i(100*t),0,100)}const d={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},h=[..."0123456789ABCDEF"],f=t=>h[15&t],p=t=>h[(240&t)>>4]+h[15&t],m=t=>(240&t)>>4===(15&t);function g(t){var e=(t=>m(t.r)&&m(t.g)&&m(t.b)&&m(t.a))(t)?f:p;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const v=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function y(t,e,n){const r=e*Math.min(n,1-n),o=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return n-r*Math.max(Math.min(o-3,9-o,1),-1)};return[o(0),o(8),o(4)]}function b(t,e,n){const r=function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(r+t/60)%6;return n-n*e*Math.max(Math.min(o,4-o,1),0)};return[r(5),r(3),r(1)]}function x(t,e,n){const r=y(t,1,.5);let o;for(e+n>1&&(o=1/(e+n),e*=o,n*=o),o=0;o<3;o++)r[o]*=1-e-n,r[o]+=e;return r}function w(t){const e=t.r/255,n=t.g/255,r=t.b/255,o=Math.max(e,n,r),i=Math.min(e,n,r),a=(o+i)/2;let s,l,c;return o!==i&&(c=o-i,l=a>.5?c/(2-o-i):c/(o+i),s=function(t,e,n,r,o){return t===o?(e-n)/r+(e>16&255,i>>8&255,255&i]}return t}(),O.transparent=[0,0,0,0]);const e=O[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const M=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const T=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,N=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function R(t,e,n){if(t){let r=w(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,0===e?360:1)),r=_(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function j(t,e){return t?Object.assign(e||{},t):t}function L(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=l(t[3]))):(e=j(t,{r:0,g:0,b:0,a:1})).a=l(e.a),e}function D(t){return"r"===t.charAt(0)?function(t){const e=M.exec(t);let n,r,o,i=255;if(e){if(e[7]!==n){const t=+e[7];i=e[8]?s(t):a(255*t,0,255)}return n=+e[1],r=+e[3],o=+e[5],n=255&(e[2]?s(n):a(n,0,255)),r=255&(e[4]?s(r):a(r,0,255)),o=255&(e[6]?s(o):a(o,0,255)),{r:n,g:r,b:o,a:i}}}(t):S(t)}class z{constructor(t){if(t instanceof z)return t;const e=typeof t;let n;"object"===e?n=L(t):"string"===e&&(n=function(t){var e,n=t.length;return"#"===t[0]&&(4===n||5===n?e={r:255&17*d[t[1]],g:255&17*d[t[2]],b:255&17*d[t[3]],a:5===n?17*d[t[4]]:255}:7!==n&&9!==n||(e={r:d[t[1]]<<4|d[t[2]],g:d[t[3]]<<4|d[t[4]],b:d[t[5]]<<4|d[t[6]],a:9===n?d[t[7]]<<4|d[t[8]]:255})),e}(t)||P(t)||D(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=j(this._rgb);return t&&(t.a=c(t.a)),t}set rgb(t){this._rgb=L(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?"rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", ").concat(c(t.a),")"):"rgb(".concat(t.r,", ").concat(t.g,", ").concat(t.b,")")):void 0;var t}hexString(){return this._valid?g(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=w(t),n=e[0],r=u(e[1]),o=u(e[2]);return t.a<255?"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(c(t.a),")"):"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)")}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,r=t.rgb;let o;const i=e===o?.5:e,a=2*i-1,s=n.a-r.a,l=((a*s===-1?a:(a+s)/(1+a*s))+1)/2;o=1-l,n.r=255&l*n.r+o*r.r+.5,n.g=255&l*n.g+o*r.g+.5,n.b=255&l*n.b+o*r.b+.5,n.a=i*n.a+(1-i)*r.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const r=N(c(t.r)),o=N(c(t.g)),i=N(c(t.b));return{r:l(T(r+n*(N(c(e.r))-r))),g:l(T(o+n*(N(c(e.g))-o))),b:l(T(i+n*(N(c(e.b))-i))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new z(this.rgb)}alpha(t){return this._rgb.a=l(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=i(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return R(this._rgb,2,t),this}darken(t){return R(this._rgb,2,-t),this}saturate(t){return R(this._rgb,1,t),this}desaturate(t){return R(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=w(t);n[0]=A(n[0]+e),n=_(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function I(){}const B=(()=>{let t=0;return()=>t++})();function F(t){return null===t||"undefined"===typeof t}function V(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function H(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function q(t){return("number"===typeof t||t instanceof Number)&&isFinite(+t)}function W(t,e){return q(t)?t:e}function U(t,e){return"undefined"===typeof t?e:t}const Y=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function K(t,e,n){if(t&&"function"===typeof t.call)return t.apply(n,e)}function $(t,e,n,r){let o,i,a;if(V(t))if(i=t.length,r)for(o=i-1;o>=0;o--)e.call(n,t[o],o);else for(o=0;ot,x:t=>t.x,y:t=>t.y};function rt(t,e){const n=nt[e]||(nt[e]=function(t){const e=function(t){const e=t.split("."),n=[];let r="";for(const o of e)r+=o,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function ot(t){return t.charAt(0).toUpperCase()+t.slice(1)}const it=t=>"undefined"!==typeof t,at=t=>"function"===typeof t,st=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};const lt=Math.PI,ct=2*lt,ut=ct+lt,dt=Number.POSITIVE_INFINITY,ht=lt/180,ft=lt/2,pt=lt/4,mt=2*lt/3,gt=Math.log10,vt=Math.sign;function yt(t,e,n){return Math.abs(t-e)l&&c3&&void 0!==arguments[3]?arguments[3]:1e-6;return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function Nt(t,e,n){n=n||(n=>t[n]1;)r=i+o>>1,n(r)?i=r:o=r;return{lo:i,hi:o}}const Rt=(t,e,n,r)=>Nt(t,n,r?r=>{const o=t[r][e];return ot[r][e]Nt(t,n,r=>t[r][e]>=n);const Lt=["push","pop","shift","splice","unshift"];function Dt(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,o=r.indexOf(e);-1!==o&&r.splice(o,1),r.length>0||(Lt.forEach(e=>{delete t[e]}),delete t._chartjs)}function zt(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const It="undefined"===typeof window?function(t){return t()}:window.requestAnimationFrame;function Bt(t,e){let n=[],r=!1;return function(){for(var o=arguments.length,i=new Array(o),a=0;a{r=!1,t.apply(e,n)}))}}const Ft=t=>"start"===t?"left":"end"===t?"right":"center",Vt=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function Ht(t,e,n){const r=e.length;let o=0,i=r;if(t._sorted){const{iScale:a,_parsed:s}=t,l=a.axis,{min:c,max:u,minDefined:d,maxDefined:h}=a.getUserBounds();d&&(o=Mt(Math.min(Rt(s,l,c).lo,n?r:Rt(e,l,a.getPixelForValue(c)).lo),0,r-1)),i=h?Mt(Math.max(Rt(s,a.axis,u,!0).hi+1,n?0:Rt(e,l,a.getPixelForValue(u),!0).hi+1),o,r)-o:r-o}return{start:o,count:i}}function qt(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,o={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=o,!0;const i=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,o),i}const Wt=t=>0===t||1===t,Ut=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*ct/n),Yt=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*ct/n)+1,Kt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*ft),easeOutSine:t=>Math.sin(t*ft),easeInOutSine:t=>-.5*(Math.cos(lt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Wt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Wt(t)?t:Ut(t,.075,.3),easeOutElastic:t=>Wt(t)?t:Yt(t,.075,.3),easeInOutElastic(t){const e=.1125;return Wt(t)?t:t<.5?.5*Ut(2*t,e,.45):.5+.5*Yt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Kt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*Kt.easeInBounce(2*t):.5*Kt.easeOutBounce(2*t-1)+.5};function $t(t){if(t&&"object"===typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Gt(t){return $t(t)?t:new z(t)}function Qt(t){return $t(t)?t:new z(t).saturate(.5).darken(.1).hexString()}const Xt=["x","y","borderWidth","radius","tension"],Zt=["color","borderColor","backgroundColor"];const Jt=new Map;function te(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let r=Jt.get(n);return r||(r=new Intl.NumberFormat(t,e),Jt.set(n,r)),r}(e,n).format(t)}const ee={values:t=>V(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const r=this.chart.options.locale;let o,i=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),i=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t));return n}(t,n)}const a=gt(Math.abs(i)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),te(t,r,l)},logarithmic(t,e,n){if(0===t)return"0";const r=n[e].significand||t/Math.pow(10,Math.floor(gt(t)));return[1,2,3,5,10,15].includes(r)||e>.8*n.length?ee.numeric.call(this,t,e,n):""}};var ne={formatters:ee};const re=Object.create(null),oe=Object.create(null);function ie(t,e){if(!e)return t;const n=e.split(".");for(let r=0,o=n.length;rt.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Qt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Qt(e.borderColor),this.hoverColor=(t,e)=>Qt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ae(this,t,e)}get(t){return ie(this,t)}describe(t,e){return ae(oe,t,e)}override(t,e){return ae(re,t,e)}route(t,e,n,r){const o=ie(this,t),i=ie(this,n),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=i[r];return H(t)?Object.assign({},e,t):U(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach(t=>t(this))}}var le=new se({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Zt},numbers:{type:"number",properties:Xt}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ne.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function ce(t,e,n,r,o){let i=e[o];return i||(i=e[o]=t.measureText(o).width,n.push(o)),i>r&&(r=i),r}function ue(t,e,n,r){let o=(r=r||{}).data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(o=r.data={},i=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let a=0;const s=n.length;let l,c,u,d,h;for(l=0;ln.length){for(l=0;l0&&t.stroke()}}function me(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y5&&void 0!==arguments[5]?arguments[5]:{};const a=V(e)?e:[e],s=i.strokeWidth>0&&""!==i.strokeColor;let l,c;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),F(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,i),l=0;l+t||0;function Oe(t,e){const n={},r=H(e),o=r?Object.keys(e):e,i=H(t)?r?n=>U(t[n],t[e[n]]):e=>t[e]:()=>t;for(const a of o)n[a]=Ee(i(a));return n}function Pe(t){return Oe(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Me(t){return Oe(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Te(t){const e=Pe(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ne(t,e){t=t||{},e=e||le.font;let n=U(t.size,e.size);"string"===typeof n&&(n=parseInt(n,10));let r=U(t.style,e.style);r&&!(""+r).match(Se)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const o={family:U(t.family,e.family),lineHeight:Ce(U(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:U(t.weight,e.weight),string:""};return o.string=function(t){return!t||F(t.size)||F(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(o),o}function Re(t,e,n,r){let o,i,a,s=!0;for(o=0,i=t.length;o1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>t[0];const o=(arguments.length>2?arguments[2]:void 0)||t;"undefined"===typeof n&&(n=Ye("_fallback",t));const i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:n,_getTarget:r,override:r=>Le([r,...t],e,o,n)};return new Proxy(i,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,r)=>Fe(n,r,()=>function(t,e,n,r){let o;for(const i of e)if(o=Ye(Ie(i,t),n),"undefined"!==typeof o)return Be(t,o)?We(n,r,t,o):o}(r,e,t,n)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ke(t).includes(e),ownKeys:t=>Ke(t),set(t,e,n){const o=t._storage||(t._storage=r());return t[e]=o[e]=n,delete t._keys,!0}})}function De(t,e,n,r){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:ze(t,r),setContext:e=>De(t,e,n,r),override:o=>De(t.override(o),e,n,r)};return new Proxy(o,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>Fe(t,e,()=>function(t,e,n){const{_proxy:r,_context:o,_subProxy:i,_descriptors:a}=t;let s=r[e];at(s)&&a.isScriptable(e)&&(s=function(t,e,n,r){const{_proxy:o,_context:i,_subProxy:a,_stack:s}=n;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t);let l=e(i,a||r);s.delete(t),Be(t,l)&&(l=We(o._scopes,o,t,l));return l}(e,s,t,n));V(s)&&s.length&&(s=function(t,e,n,r){const{_proxy:o,_context:i,_subProxy:a,_descriptors:s}=n;if("undefined"!==typeof i.index&&r(t))return e[i.index%e.length];if(H(e[0])){const n=e,r=o._scopes.filter(t=>t!==n);e=[];for(const l of n){const n=We(r,o,t,l);e.push(De(n,i,a&&a[t],s))}}return e}(e,s,t,a.isIndexable));Be(e,s)&&(s=De(s,o,i&&i[e],a));return s}(t,e,n)),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,r)=>(t[n]=r,delete e[n],!0)})}function ze(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0};const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:n,indexable:r,isScriptable:at(n)?n:()=>n,isIndexable:at(r)?r:()=>r}}const Ie=(t,e)=>t?t+ot(e):e,Be=(t,e)=>H(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Fe(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const r=n();return t[e]=r,r}function Ve(t,e,n){return at(t)?t(e,n):t}const He=(t,e)=>!0===t?e:"string"===typeof t?rt(e,t):void 0;function qe(t,e,n,r,o){for(const i of e){const e=He(n,i);if(e){t.add(e);const i=Ve(e._fallback,n,o);if("undefined"!==typeof i&&i!==n&&i!==r)return i}else if(!1===e&&"undefined"!==typeof r&&n!==r)return null}return!1}function We(t,e,n,r){const o=e._rootScopes,i=Ve(e._fallback,n,r),a=[...t,...o],s=new Set;s.add(r);let l=Ue(s,a,n,i||n,r);return null!==l&&(("undefined"===typeof i||i===n||(l=Ue(s,a,i,l,r),null!==l))&&Le(Array.from(s),[""],o,i,()=>function(t,e,n){const r=t._getTarget();e in r||(r[e]={});const o=r[e];if(V(o)&&H(n))return n;return o||{}}(e,n,r)))}function Ue(t,e,n,r,o){for(;n;)n=qe(t,e,n,r,o);return n}function Ye(t,e){for(const n of e){if(!n)continue;const e=n[t];if("undefined"!==typeof e)return e}}function Ke(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function $e(t,e,n,r){const{iScale:o}=t,{key:i="r"}=this._parsing,a=new Array(r);let s,l,c,u;for(s=0,l=r;se"x"===t?"y":"x";function Ze(t,e,n,r){const o=t.skip?e:t,i=e,a=n.skip?e:n,s=Ct(i,o),l=Ct(a,i);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,h=r*u;return{previous:{x:i.x-d*(a.x-o.x),y:i.y-d*(a.y-o.y)},next:{x:i.x+h*(a.x-o.x),y:i.y+h*(a.y-o.y)}}}function Je(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";const n=Xe(e),r=t.length,o=Array(r).fill(0),i=Array(r);let a,s,l,c=Qe(t,0);for(a=0;a2&&void 0!==arguments[2]?arguments[2]:"x";const r=Xe(n),o=t.length;let i,a,s,l=Qe(t,0);for(let c=0;c!t.skip)),"monotone"===e.cubicInterpolationMode)Je(t,o);else{let n=r?t[t.length-1]:t[0];for(i=0,a=t.length;it.ownerDocument.defaultView.getComputedStyle(t,null);const sn=["top","right","bottom","left"];function ln(t,e,n){const r={};n=n?"-"+n:"";for(let o=0;o<4;o++){const i=sn[o];r[i]=parseFloat(t[e+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function cn(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,o=an(n),i="border-box"===o.boxSizing,a=ln(o,"padding"),s=ln(o,"border","width"),{x:l,y:c,box:u}=function(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:o,offsetY:i}=r;let a,s,l=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(o,i,t.target))a=o,s=i;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,s=r.clientY-t.top,l=!0}return{x:a,y:s,box:l}}(t,n),d=a.left+(u&&s.left),h=a.top+(u&&s.top);let{width:f,height:p}=e;return i&&(f-=a.width+s.width,p-=a.height+s.height),{x:Math.round((l-d)/f*n.width/r),y:Math.round((c-h)/p*n.height/r)}}const un=t=>Math.round(10*t)/10;function dn(t,e,n,r){const o=an(t),i=ln(o,"margin"),a=on(o.maxWidth,t,"clientWidth")||dt,s=on(o.maxHeight,t,"clientHeight")||dt,l=function(t,e,n){let r,o;if(void 0===e||void 0===n){const i=rn(t);if(i){const t=i.getBoundingClientRect(),a=an(i),s=ln(a,"border","width"),l=ln(a,"padding");e=t.width-l.width-s.width,n=t.height-l.height-s.height,r=on(a.maxWidth,i,"clientWidth"),o=on(a.maxHeight,i,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:r||dt,maxHeight:o||dt}}(t,e,n);let{width:c,height:u}=l;if("content-box"===o.boxSizing){const t=ln(o,"border","width"),e=ln(o,"padding");c-=e.width+t.width,u-=e.height+t.height}c=Math.max(0,c-i.width),u=Math.max(0,r?c/r:u-i.height),c=un(Math.min(c,a,l.maxWidth)),u=un(Math.min(u,s,l.maxHeight)),c&&!u&&(u=un(c/2));return(void 0!==e||void 0!==n)&&r&&l.height&&u>l.height&&(u=l.height,c=un(Math.floor(u*r))),{width:c,height:u}}function hn(t,e,n){const r=e||1,o=Math.floor(t.height*r),i=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height="".concat(t.height,"px"),a.style.width="".concat(t.width,"px")),(t.currentDevicePixelRatio!==r||a.height!==o||a.width!==i)&&(t.currentDevicePixelRatio=r,a.height=o,a.width=i,t.ctx.setTransform(r,0,0,r,0,0),!0)}const fn=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};nn()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function pn(t,e){const n=function(t,e){return an(t).getPropertyValue(e)}(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function mn(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function gn(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:"middle"===r?n<.5?t.y:e.y:"after"===r?n<1?t.y:e.y:n>0?e.y:t.y}}function vn(t,e,n,r){const o={x:t.cp2x,y:t.cp2y},i={x:e.cp1x,y:e.cp1y},a=mn(t,o,n),s=mn(o,i,n),l=mn(i,e,n),c=mn(a,s,n),u=mn(s,l,n);return mn(c,u,n)}function yn(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function bn(t,e){let n,r;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function xn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function wn(t){return"angle"===t?{between:Pt,compare:Et,normalize:Ot}:{between:Tt,compare:(t,e)=>t-e,normalize:t=>t}}function kn(t){let{start:e,end:n,count:r,loop:o,style:i}=t;return{start:e%r,end:n%r,loop:o&&(n-e+1)%r===0,style:i}}function _n(t,e,n){if(!n)return[t];const{property:r,start:o,end:i}=n,a=e.length,{compare:s,between:l,normalize:c}=wn(r),{start:u,end:d,loop:h,style:f}=function(t,e,n){const{property:r,start:o,end:i}=n,{between:a,normalize:s}=wn(r),l=e.length;let c,u,{start:d,end:h,loop:f}=t;if(f){for(d+=l,h+=l,c=0,u=l;cy||l(o,v,m)&&0!==s(o,v),w=()=>!y||0===s(i,m)||l(i,v,m);for(let k=u,_=u;k<=d;++k)g=e[k%a],g.skip||(m=c(g[r]),m!==v&&(y=l(m,o,i),null===b&&x()&&(b=0===s(m,o)?k:_),null!==b&&w()&&(p.push(kn({start:b,end:k,loop:h,count:a,style:f})),b=null),_=k,v=m));return null!==b&&p.push(kn({start:b,end:d,loop:h,count:a,style:f})),p}function An(t,e){const n=[],r=t.segments;for(let o=0;or({chart:t,initial:e.initial,numSteps:i,currentStep:Math.min(n-e.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=It.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),e=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;const o=n.items;let i,a=o.length-1,s=!1;for(;a>=0;--a)i=o[a],i._active?(i._total>n.duration&&(n.duration=i._total),i.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(r.draw(),this._notify(r,n,t,"progress")),o.length||(n.running=!1,this._notify(r,n,t,"complete"),n.initial=!1),e+=o.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Pn=new On;const Mn="transparent",Tn={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const r=Gt(t||Mn),o=r.valid&&Gt(e||Mn);return o&&o.valid?o.mix(r,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Nn{constructor(t,e,n,r){const o=e[n];r=Re([t.to,r,o,t.from]);const i=Re([t.from,o,r]);this._active=!0,this._fn=t.fn||Tn[t.type||typeof i],this._easing=Kt[t.easing]||Kt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=i,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const r=this._target[this._prop],o=n-this._start,i=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(i,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Re([t.to,e,r,t.from]),this._from=Re([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,r=this._prop,o=this._from,i=this._loop,a=this._to;let s;if(this._active=o!==a&&(i||e1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(o,a,s))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let r=0;r{const o=t[r];if(!H(o))return;const i={};for(const t of e)i[t]=o[t];(V(o.properties)&&o.properties||[r]).forEach(t=>{t!==r&&n.has(t)||n.set(t,i)})})}_animateOptions(t,e){const n=e.options,r=function(t,e){if(!e)return;let n=t.options;if(!n)return void(t.options=e);n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(t,n);if(!r)return[];const o=this._createAnimations(r,n);return n.$shared&&function(t,e){const n=[],r=Object.keys(e);for(let o=0;o{t.options=n},()=>{}),o}_createAnimations(t,e){const n=this._properties,r=[],o=t.$animations||(t.$animations={}),i=Object.keys(e),a=Date.now();let s;for(s=i.length-1;s>=0;--s){const l=i[s];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(t,e));continue}const c=e[l];let u=o[l];const d=n.get(l);if(u){if(d&&u.active()){u.update(d,c,a);continue}u.cancel()}d&&d.duration?(o[l]=u=new Nn(d,t,l,c),r.push(u)):t[l]=c}return r}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(Pn.add(this._chart,n),!0):void 0}}function jn(t,e){const n=t&&t.options||{},r=n.reverse,o=void 0===n.min?e:0,i=void 0===n.max?e:0;return{start:r?i:o,end:r?o:i}}function Ln(t,e){const n=[],r=t._getSortedDatasetMetas(e);let o,i;for(o=0,i=r.length;o3&&void 0!==arguments[3]?arguments[3]:{};const o=t.keys,i="single"===r.mode;let a,s,l,c;if(null!==e){for(a=0,s=o.length;a0||!n&&e<0)return o.index}return null}function Fn(t,e){const{chart:n,_cachedMeta:r}=t,o=n._stacks||(n._stacks={}),{iScale:i,vScale:a,index:s}=r,l=i.axis,c=a.axis,u=function(t,e,n){return"".concat(t.id,".").concat(e.id,".").concat(n.stack||n.type)}(i,a,r),d=e.length;let h;for(let f=0;fn[t].axis===e).shift()}function Hn(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[r]||void 0===e[r][n])return;delete e[r][n],void 0!==e[r]._visualValues&&void 0!==e[r]._visualValues[n]&&delete e[r]._visualValues[n]}}}const qn=t=>"reset"===t||"none"===t,Wn=(t,e)=>e?t:Object.assign({},t);class Un{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=zn(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&&Hn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),r=(t,e,n,r)=>"x"===t?e:"r"===t?r:n,o=e.xAxisID=U(n.xAxisID,Vn(t,"x")),i=e.yAxisID=U(n.yAxisID,Vn(t,"y")),a=e.rAxisID=U(n.rAxisID,Vn(t,"r")),s=e.indexAxis,l=e.iAxisID=r(s,o,i,a),c=e.vAxisID=r(s,i,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(i),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Dt(this._data,this),t._stacked&&Hn(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(H(e))this._data=function(t){const e=Object.keys(t),n=new Array(e.length);let r,o,i;for(r=0,o=e.length;r{const e="_onData"+ot(t),n=r[t];Object.defineProperty(r,t,{configurable:!0,enumerable:!1,value(){for(var t=arguments.length,o=new Array(t),i=0;i{"function"===typeof t[e]&&t[e](...o)}),a}})}))),this._syncList=[],this._data=e}var r,o}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const o=e._stacked;e._stacked=zn(e.vScale,e),e.stack!==n.stack&&(r=!0,Hn(e),e.stack=n.stack),this._resyncElements(t),(r||o!==e._stacked)&&Fn(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:r}=this,{iScale:o,_stacked:i}=n,a=o.axis;let s,l,c,u=0===t&&e===r.length||n._sorted,d=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,c=r;else{c=V(r[t])?this.parseArrayData(n,r,t,e):H(r[t])?this.parseObjectData(n,r,t,e):this.parsePrimitiveData(n,r,t,e);const o=()=>null===l[a]||d&&l[a]t&&!e.hidden&&e._stacked&&{keys:Ln(n,!0),values:null})(e,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=function(t){const{min:e,max:n,minDefined:r,maxDefined:o}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}(a);let d,h;function f(){h=r[d];const e=h[a.axis];return!q(h[t.axis])||c>e||u=0;--d)if(!f()){this.updateRangeFromParsed(l,t,h,s);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let r,o,i;for(r=0,o=e.length;r=0&&t1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0;const r="active"===e,o=this._cachedDataOpts,i=t+"-"+e,a=o[i],s=this.enableOptionSharing&&it(n);if(a)return Wn(a,s);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),u=r?["".concat(t,"Hover"),"hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),c),h=Object.keys(le.elements[t]),f=l.resolveNamedOptions(d,h,()=>this.getContext(n,r,e),u);return f.$shared&&(f.$shared=s,o[i]=Object.freeze(Wn(f,s))),f}_resolveAnimations(t,e,n){const r=this.chart,o=this._cachedDataOpts,i="animation-".concat(e),a=o[i];if(a)return a;let s;if(!1!==r.options.animation){const r=this.chart.config,o=r.datasetAnimationScopeKeys(this._type,e),i=r.getOptionScopes(this.getDataset(),o);s=r.createResolver(i,this.getContext(t,n,e))}const l=new Rn(r,s&&s.animations);return s&&s._cacheable&&(o[i]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||qn(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),r=this._sharedOptions,o=this.getSharedOptions(n),i=this.includeOptions(e,o)||o!==r;return this.updateSharedOptions(o,e,n),{sharedOptions:o,includeOptions:i}}updateElement(t,e,n,r){qn(r)?Object.assign(t,n):this._resolveAnimations(e,r).update(t,n)}updateSharedOptions(t,e,n){t&&!qn(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,r){t.active=r;const o=this.getStyle(e,r);this._resolveAnimations(e,n,r).update(t,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[a,s,l]of this._syncList)this[a](s,l);this._syncList=[];const r=n.length,o=e.length,i=Math.min(o,r);i&&this.parse(0,i),o>r?this._insertElements(r,o-r,t):o2&&void 0!==arguments[2])||arguments[2];const r=this._cachedMeta,o=r.data,i=t+e;let a;const s=t=>{for(t.length+=e,a=t.length-1;a>=i;a--)t[a]=t[a-e]};for(s(o),a=t;at-e))}return t._cache.$bar}(e,t.type);let r,o,i,a,s=e._length;const l=()=>{32767!==i&&-32768!==i&&(it(a)&&(s=Math.min(s,Math.abs(i-a)||s)),a=i)};for(r=0,o=n.length;rMath.abs(s)&&(l=s,c=a),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:i,min:a,max:s}}(t,e,n,r):e[n.axis]=n.parse(t,r),e}function $n(t,e,n,r){const o=t.iScale,i=t.vScale,a=o.getLabels(),s=o===i,l=[];let c,u,d,h;for(c=n,u=n+r;ct.x,n="left",r="right"):(e=t.baset.controller.options.grouped),o=n.options.stacked,i=[],a=t=>{const n=t.controller.getParsed(e),r=n&&n[t.vScale.axis];if(F(r)||isNaN(r))return!0};for(const s of r)if((void 0===e||!a(s))&&((!1===o||-1===i.indexOf(s.stack)||void 0===o&&void 0===s.stack)&&i.push(s.stack),s.index===t))break;return i.length||i.push(void 0),i}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const r=this._getStacks(t,n),o=void 0!==e?r.indexOf(e):-1;return-1===o?r.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,r=[];let o,i;for(o=0,i=e.data.length;o=n?1:-1)}(d,e,a)*i,h===a&&(g-=d/2);const t=e.getPixelForDecimal(0),o=e.getPixelForDecimal(1),l=Math.min(t,o),f=Math.max(t,o);g=Math.max(Math.min(g,f),l),u=g+d,n&&!c&&(s._stacks[e.axis]._visualValues[r]=e.getValueForPixel(u)-e.getValueForPixel(g))}if(g===e.getPixelForValue(a)){const t=vt(d)*e.getLineWidthForValue(a)/2;g+=t,d-=t}return{size:d,base:g,head:u,center:u+d/2}}_calculateBarIndexPixels(t,e){const n=e.scale,r=this.options,o=r.skipNull,i=U(r.maxBarThickness,1/0);let a,s;if(e.grouped){const n=o?this._getStackCount(t):e.stackCount,l="flex"===r.barThickness?function(t,e,n,r){const o=e.pixels,i=o[t];let a=t>0?o[t-1]:null,s=t=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:o}=e,i=this.getParsed(t),a=r.getLabelForValue(i.x),s=o.getLabelForValue(i.y),l=i._custom;return{label:n[t]||"",value:"("+a+", "+s+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,r){const o="reset"===r,{iScale:i,vScale:a}=this._cachedMeta,{sharedOptions:s,includeOptions:l}=this._getSharedOptions(e,r),c=i.axis,u=a.axis;for(let d=e;d+n[t];if(H(n[t])){const{key:t="value"}=this._parsing;a=e=>+rt(n[e],t)}for(o=t,i=t+e;oPt(t,s,l,!0)?1:Math.max(e,e*n,r,r*n),p=(t,e,r)=>Pt(t,s,l,!0)?-1:Math.min(e,e*n,r,r*n),m=f(0,c,d),g=f(ft,u,h),v=p(lt,c,d),y=p(lt+ft,u,h);r=(m-v)/2,o=(g-y)/2,i=-(m+v)/2,a=-(g+y)/2}return{ratioX:r,ratioY:o,offsetX:i,offsetY:a}}(h,d,s),v=(n.width-i)/f,y=(n.height-i)/p,b=Math.max(Math.min(v,y)/2,0),x=Y(this.options.radius,b),w=(x-Math.max(x*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*x,this.offsetY=g*x,r.total=this.calculateTotal(),this.outerRadius=x-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*u,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const n=this.options,r=this._cachedMeta,o=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===r._parsed[t]||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*o/ct)}updateElements(t,e,n,r){const o="reset"===r,i=this.chart,a=i.chartArea,s=i.options.animation,l=(a.left+a.right)/2,c=(a.top+a.bottom)/2,u=o&&s.animateScale,d=u?0:this.innerRadius,h=u?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,r);let m,g=this._getRotation();for(m=0;m0&&!isNaN(t)?ct*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=te(e._parsed[t],n.options.locale);return{label:r[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const n=this.chart;let r,o,i,a,s;if(!t)for(r=0,o=n.data.datasets.length;r"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),(0,o.A)(nr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:r}}=t.legend.options;return e.labels.map((e,o)=>{const i=t.getDatasetMeta(0).controller.getStyle(o);return{text:e,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}});class rr extends Un{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:r=[],_dataset:o}=e,i=this.chart._animationsDisabled;let{start:a,count:s}=Ht(e,r,i);this._drawStart=a,this._drawCount=s,qt(e)&&(a=0,s=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=r;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!i,options:l},t),this.updateElements(r,a,s,t)}updateElements(t,e,n,r){const o="reset"===r,{iScale:i,vScale:a,_stacked:s,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,r),d=i.axis,h=a.axis,{spanGaps:f,segment:p}=this.options,m=xt(f)?f:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||o||"none"===r,v=e+n,y=t.length;let b=e>0&&this.getParsed(e-1);for(let x=0;x=v){f.skip=!0;continue}const y=this.getParsed(x),w=F(y[h]),k=f[d]=i.getPixelForValue(y[d],x),_=f[h]=o||w?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,y,s):y[h],x);f.skip=isNaN(k)||isNaN(_)||w,f.stop=x>0&&Math.abs(y[d]-b[d])>m,p&&(f.parsed=y,f.raw=l.data[x]),u&&(f.options=c||this.resolveDataElementOptions(x,n.active?"active":r)),g||this.updateElement(n,x,f,r),b=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return n;const o=r[0].size(this.resolveDataElementOptions(0)),i=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,o,i)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}(0,o.A)(rr,"id","line"),(0,o.A)(rr,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),(0,o.A)(rr,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class or extends Un{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=te(e._parsed[t].r,n.options.locale);return{label:r[t]||"",value:o}}parseObjectData(t,e,n,r){return $e.bind(this)(t,e,n,r)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,n)=>{const r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(re.max&&(e.max=r))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(r/2,0),i=(o-Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-i*this.index,this.innerRadius=this.outerRadius-i}updateElements(t,e,n,r){const o="reset"===r,i=this.chart,a=i.options.animation,s=this._cachedMeta.rScale,l=s.xCenter,c=s.yCenter,u=s.getIndexAngle(0)-.5*lt;let d,h=u;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?kt(this.resolveDataElementOptions(t,e).angle||n):0}}(0,o.A)(or,"id","polarArea"),(0,o.A)(or,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),(0,o.A)(or,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:r}}=t.legend.options;return e.labels.map((e,o)=>{const i=t.getDatasetMeta(0).controller.getStyle(o);return{text:e,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ir extends nr{}(0,o.A)(ir,"id","pie"),(0,o.A)(ir,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class ar extends Un{getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,r){return $e.bind(this)(t,e,n,r)}update(t){const e=this._cachedMeta,n=e.dataset,r=e.data||[],o=e.iScale.getLabels();if(n.points=r,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const i={_loop:!0,_fullLoop:o.length===r.length,options:e};this.updateElement(n,void 0,i,t)}this.updateElements(r,0,r.length,t)}updateElements(t,e,n,r){const o=this._cachedMeta.rScale,i="reset"===r;for(let a=e;a0&&this.getParsed(e-1);for(let b=e;b0&&Math.abs(n[h]-y[h])>g,m&&(c.parsed=n,c.raw=l.data[b]),d&&(c.options=u||this.resolveDataElementOptions(b,e.active?"active":r)),v||this.updateElement(e,b,c,r),y=n}this.updateSharedOptions(u,r,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}const n=t.dataset,r=n.options&&n.options.borderWidth||0;if(!e.length)return r;const o=e[0].size(this.resolveDataElementOptions(0)),i=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,o,i)/2}}(0,o.A)(sr,"id","scatter"),(0,o.A)(sr,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),(0,o.A)(sr,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function lr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class cr{static override(t){Object.assign(cr.prototype,t)}constructor(t){(0,o.A)(this,"options",void 0),this.options=t||{}}init(){}formats(){return lr()}parse(){return lr()}format(){return lr()}add(){return lr()}diff(){return lr()}startOf(){return lr()}endOf(){return lr()}}var ur=cr;function dr(t,e,n,r){const{controller:o,data:i,_sorted:a}=t,s=o._cachedMeta.iScale;if(s&&e===s.axis&&"r"!==e&&a&&i.length){const t=s._reversePixels?jt:Rt;if(!r)return t(i,e,n);if(o._sharedOptions){const r=i[0],o="function"===typeof r.getRange&&r.getRange(e);if(o){const r=t(i,e,n-o),a=t(i,e,n+o);return{lo:r.lo,hi:a.hi}}}}return{lo:0,hi:i.length-1}}function hr(t,e,n,r,o){const i=t.getSortedVisibleDatasetMetas(),a=n[e];for(let s=0,l=i.length;s{t[a](e[n],o)&&(i.push({element:t,datasetIndex:r,index:l}),s=s||t.inRange(e.x,e.y,o))}),r&&!s?[]:i}var vr={evaluateInteractionItems:hr,modes:{index(t,e,n,r){const o=cn(e,t),i=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?fr(t,o,i,r,a):mr(t,o,i,!1,r,a),l=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=s[0].index,n=t.data[e];n&&!n.skip&&l.push({element:n,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,n,r){const o=cn(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?fr(t,o,i,r,a):mr(t,o,i,!1,r,a);if(s.length>0){const e=s[0].datasetIndex,n=t.getDatasetMeta(e).data;s=[];for(let t=0;tfr(t,cn(e,t),n.axis||"xy",r,n.includeInvisible||!1),nearest(t,e,n,r){const o=cn(e,t),i=n.axis||"xy",a=n.includeInvisible||!1;return mr(t,o,i,n.intersect,r,a)},x:(t,e,n,r)=>gr(t,cn(e,t),"x",n.intersect,r),y:(t,e,n,r)=>gr(t,cn(e,t),"y",n.intersect,r)}};const yr=["left","top","right","bottom"];function br(t,e){return t.filter(t=>t.pos===e)}function xr(t,e){return t.filter(t=>-1===yr.indexOf(t.pos)&&t.box.axis===e)}function wr(t,e){return t.sort((t,n)=>{const r=e?n:t,o=e?t:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight})}function kr(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:r,stackWeight:o}=n;if(!t||!yr.includes(r))continue;const i=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=o}return e}(t),{vBoxMaxWidth:r,hBoxMaxHeight:o}=e;let i,a,s;for(i=0,a=t.length;i{r[t]=Math.max(e[t],n[t])}),r}return r(t?["left","right"]:["top","bottom"])}function Er(t,e,n,r){const o=[];let i,a,s,l,c,u;for(i=0,a=t.length,c=0;it.box.fullSize),!0),r=wr(br(e,"left"),!0),o=wr(br(e,"right")),i=wr(br(e,"top"),!0),a=wr(br(e,"bottom")),s=xr(e,"x"),l=xr(e,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:o.concat(l).concat(a).concat(s),chartArea:br(e,"chartArea"),vertical:r.concat(o).concat(l),horizontal:i.concat(a).concat(s)}}(t.boxes),l=s.vertical,c=s.horizontal;$(t.boxes,t=>{"function"===typeof t.beforeLayout&&t.beforeLayout()});const u=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:o,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/u,hBoxMaxHeight:a/2}),h=Object.assign({},o);Ar(h,Te(r));const f=Object.assign({maxPadding:h,w:i,h:a,x:o.left,y:o.top},o),p=kr(l.concat(c),d);Er(s.fullSize,f,d,p),Er(l,f,d,p),Er(c,f,d,p)&&Er(l,f,d,p),function(t){const e=t.maxPadding;function n(n){const r=Math.max(e[n]-t[n],0);return t[n]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(f),Pr(s.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,Pr(s.rightAndBottom,f,d,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},$(s.chartArea,e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Tr{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,r){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):n)}}isAttached(t){return!0}updateConfig(t){}}class Nr extends Tr{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Rr="$chartjs",jr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Lr=t=>null===t||""===t;const Dr=!!fn&&{passive:!0};function zr(t,e,n){t.canvas.removeEventListener(e,n,Dr)}function Ir(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Br(t,e,n){const r=t.canvas,o=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||Ir(n.addedNodes,r),e=e&&!Ir(n.removedNodes,r);e&&n()});return o.observe(document,{childList:!0,subtree:!0}),o}function Fr(t,e,n){const r=t.canvas,o=new MutationObserver(t=>{let e=!1;for(const n of t)e=e||Ir(n.removedNodes,r),e=e&&!Ir(n.addedNodes,r);e&&n()});return o.observe(document,{childList:!0,subtree:!0}),o}const Vr=new Map;let Hr=0;function qr(){const t=window.devicePixelRatio;t!==Hr&&(Hr=t,Vr.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Wr(t,e,n){const r=t.canvas,o=r&&rn(r);if(!o)return;const i=Bt((t,e)=>{const r=o.clientWidth;n(t,e),r{const e=t[0],n=e.contentRect.width,r=e.contentRect.height;0===n&&0===r||i(n,r)});return a.observe(o),function(t,e){Vr.size||window.addEventListener("resize",qr),Vr.set(t,e)}(t,i),a}function Ur(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){Vr.delete(t),Vr.size||window.removeEventListener("resize",qr)}(t)}function Yr(t,e,n){const r=t.canvas,o=Bt(e=>{null!==t.ctx&&n(function(t,e){const n=jr[t.type]||t.type,{x:r,y:o}=cn(t,e);return{type:n,chart:e,native:t,x:void 0!==r?r:null,y:void 0!==o?o:null}}(e,t))},t);return function(t,e,n){t.addEventListener(e,n,Dr)}(r,e,o),o}class Kr extends Tr{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,r=t.getAttribute("height"),o=t.getAttribute("width");if(t[Rr]={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",Lr(o)){const e=pn(t,"width");void 0!==e&&(t.width=e)}if(Lr(r))if(""===t.style.height)t.height=t.width/(e||2);else{const e=pn(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[Rr])return!1;const n=e[Rr].initial;["height","width"].forEach(t=>{const r=n[t];F(r)?e.removeAttribute(t):e.setAttribute(t,r)});const r=n.style||{};return Object.keys(r).forEach(t=>{e.style[t]=r[t]}),e.width=e.width,delete e[Rr],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),o={attach:Br,detach:Fr,resize:Wr}[e]||Yr;r[e]=o(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),r=n[e];if(!r)return;({attach:Ur,detach:Ur,resize:Ur}[e]||zr)(t,e,r),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,r){return dn(t,e,n,r)}isAttached(t){const e=rn(t);return!(!e||!e.isConnected)}}class $r{constructor(){(0,o.A)(this,"x",void 0),(0,o.A)(this,"y",void 0),(0,o.A)(this,"active",!1),(0,o.A)(this,"options",void 0),(0,o.A)(this,"$animations",void 0)}tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return xt(this.x)&&xt(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const r={};return t.forEach(t=>{r[t]=n[t]&&n[t].active()?n[t]._to:this[t]}),r}}function Gr(t,e){const n=t.options.ticks,r=function(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),o=t._maxLength/n;return Math.floor(Math.min(r,o))}(t),o=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?function(t){const e=[];let n,r;for(n=0,r=t.length;no)return function(t,e,n,r){let o,i=0,a=n[0];for(r=Math.ceil(r),o=0;ot-e).pop(),e}(r);for(let a=0,s=i.length-1;ao)return t}return Math.max(o,1)}(i,e,o);if(a>0){let t,n;const r=a>1?Math.round((l-s)/(a-1)):null;for(Qr(e,c,u,F(r)?0:s-r,s),t=0,n=a-1;t"top"===e||"left"===e?t[e]+n:t[e]-n,Zr=(t,e)=>Math.min(e||t,t);function Jr(t,e){const n=[],r=t.length/e,o=t.length;let i=0;for(;ia+s)))return c}function eo(t){return t.drawTicks?t.tickLength:0}function no(t,e){if(!t.display)return 0;const n=Ne(t.font,e),r=Te(t.padding);return(V(t.text)?t.text.length:1)*n.lineHeight+r.height}function ro(t,e,n){let r=Ft(t);return(n&&"right"!==e||!n&&"right"===e)&&(r=(t=>"left"===t?"right":"right"===t?"left":t)(r)),r}class oo extends $r{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:r}=this;return t=W(t,Number.POSITIVE_INFINITY),e=W(e,Number.NEGATIVE_INFINITY),n=W(n,Number.POSITIVE_INFINITY),r=W(r,Number.NEGATIVE_INFINITY),{min:W(t,n),max:W(e,r),minDefined:q(t),maxDefined:q(e)}}getMinMax(t){let e,{min:n,max:r,minDefined:o,maxDefined:i}=this.getUserBounds();if(o&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let s=0,l=a.length;sr?r:n,r=o&&n>r?n:r,{min:W(n,W(r,n)),max:W(r,W(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){K(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:r,grace:o,ticks:i}=this.options,a=i.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){const{min:r,max:o}=t,i=Y(e,(o-r)/2),a=(t,e)=>n&&0===t?0:t+e;return{min:a(r,-Math.abs(i)),max:a(o,i)}}(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=a=o||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const c=this._getLabelSizes(),u=c.widest.width,d=c.highest.height,h=Mt(this.chart.width-u,0,this.maxWidth);i=t.offset?this.maxWidth/n:h/(n-1),u+6>i&&(i=h/(n-(t.offset?.5:1)),a=this.maxHeight-eo(t.grid)-e.padding-no(t.title,this.chart.options.font),s=Math.sqrt(u*u+d*d),l=_t(Math.min(Math.asin(Mt((c.highest.height+6)/i,-1,1)),Math.asin(Mt(a/s,-1,1))-Math.asin(Mt(d/s,-1,1)))),l=Math.max(r,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){K(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){K(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:r,grid:o}}=this,i=this._isVisible(),a=this.isHorizontal();if(i){const i=no(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=eo(o)+i):(t.height=this.maxHeight,t.width=eo(o)+i),n.display&&this.ticks.length){const{first:e,last:r,widest:o,highest:i}=this._getLabelSizes(),s=2*n.padding,l=kt(this.labelRotation),c=Math.cos(l),u=Math.sin(l);if(a){const e=n.mirror?0:u*o.width+c*i.height;t.height=Math.min(this.maxHeight,t.height+e+s)}else{const e=n.mirror?0:c*o.width+u*i.height;t.width=Math.min(this.maxWidth,t.width+e+s)}this._calculatePadding(e,r,u,c)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,r){const{ticks:{align:o,padding:i},position:a}=this.options,s=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,d=0;s?l?(u=r*t.width,d=n*e.height):(u=n*t.height,d=r*e.width):"start"===o?d=e.width:"end"===o?u=t.width:"inner"!==o&&(u=t.width/2,d=e.width/2),this.paddingLeft=Math.max((u-a+i)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-c+i)*this.width/(this.width-c),0)}else{let n=e.height/2,r=t.height/2;"start"===o?(n=0,r=t.height):"end"===o&&(n=e.height,r=0),this.paddingTop=n+i,this.paddingBottom=r+i}}_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(){K(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e{const n=t.gc,r=n.length/2;let o;if(r>e){for(o=0;o({width:i[t]||0,height:a[t]||0});return{first:_(0),last:_(e-1),widest:_(w),highest:_(k),widths:i,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Mt(this._alignToPixels?de(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*r?a/n:s/r:s*r0}_computeGridLineItems(t){const e=this.axis,n=this.chart,r=this.options,{grid:o,position:i,border:a}=r,s=o.offset,l=this.isHorizontal(),c=this.ticks.length+(s?1:0),u=eo(o),d=[],h=a.setContext(this.getContext()),f=h.display?h.width:0,p=f/2,m=function(t){return de(n,t,f)};let g,v,y,b,x,w,k,_,A,S,C,E;if("top"===i)g=m(this.bottom),w=this.bottom-u,_=g-p,S=m(t.top)+p,E=t.bottom;else if("bottom"===i)g=m(this.top),S=t.top,E=m(t.bottom)-p,w=g+p,_=this.top+u;else if("left"===i)g=m(this.right),x=this.right-u,k=g-p,A=m(t.left)+p,C=t.right;else if("right"===i)g=m(this.left),A=t.left,C=m(t.right)-p,x=g+p,k=this.left+u;else if("x"===e){if("center"===i)g=m((t.top+t.bottom)/2+.5);else if(H(i)){const t=Object.keys(i)[0],e=i[t];g=m(this.chart.scales[t].getPixelForValue(e))}S=t.top,E=t.bottom,w=g+p,_=w+u}else if("y"===e){if("center"===i)g=m((t.left+t.right)/2);else if(H(i)){const t=Object.keys(i)[0],e=i[t];g=m(this.chart.scales[t].getPixelForValue(e))}x=g-p,k=x-u,A=t.left,C=t.right}const O=U(r.ticks.maxTicksLimit,c),P=Math.max(1,Math.ceil(c/O));for(v=0;v0&&(i-=r/2)}d={left:i,top:o,width:r+e.width,height:n+e.height,color:t.backdropColor}}m.push({label:b,font:A,textOffset:E,options:{rotation:p,color:n,strokeColor:s,strokeWidth:c,textAlign:h,textBaseline:O,translation:[x,w],backdrop:d}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-kt(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:r,padding:o}}=this.options,i=t+o,a=this._getLabelSizes().widest.width;let s,l;return"left"===e?r?(l=this.right+o,"near"===n?s="left":"center"===n?(s="center",l+=a/2):(s="right",l+=a)):(l=this.right-i,"near"===n?s="right":"center"===n?(s="center",l-=a/2):(s="left",l=this.left)):"right"===e?r?(l=this.left+o,"near"===n?s="right":"center"===n?(s="center",l-=a/2):(s="left",l-=a)):(l=this.left+i,"near"===n?s="left":"center"===n?(s="center",l+=a/2):(s="right",l=this.right)):s="right",{textAlign:s,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:r,width:o,height:i}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,r,o,i),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(e=>e.value===t);if(n>=0){return e.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,i;const a=(t,e,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(o=0,i=r.length;o{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let o,i;for(o=0,i=e.length;o{const r=n.split("."),o=r.pop(),i=[t].concat(r).join("."),a=e[n].split("."),s=a.pop(),l=a.join(".");le.route(i,o,l,s)})}(e,t.defaultRoutes);t.descriptors&&le.describe(e,t.descriptors)}(t,i,n),this.override&&le.override(t.id,t.overrides)),i}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,r=this.scope;n in e&&delete e[n],r&&n in le[r]&&(delete le[r][n],this.override&&delete re[n])}}class ao{constructor(){this.controllers=new io(Un,"datasets",!0),this.elements=new io($r,"elements"),this.plugins=new io(Object,"plugins"),this.scales=new io(oo,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(){for(var t=arguments.length,e=new Array(t),n=0;n{const r=n||this._getRegistryForType(e);n||r.isForType(e)||r===this.plugins&&e.id?this._exec(t,r,e):$(e,e=>{const r=n||this._getRegistryForType(e);this._exec(t,r,e)})})}_exec(t,e,n){const r=ot(t);K(n["before"+r],[],n),e[t](n),K(n["after"+r],[],n)}_getRegistryForType(t){for(let e=0;et.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(r(e,n),t,"stop"),this._notify(r(n,e),t,"start")}}function co(t,e){return e||!1!==t?!0===t?{}:t:null}function uo(t,e,n,r){let{plugin:o,local:i}=e;const a=t.pluginScopeKeys(o),s=t.getOptionScopes(n,a);return i&&o.defaults&&s.push(o.defaults),t.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ho(t,e){const n=le.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function fo(t){if("x"===t||"y"===t||"r"===t)return t}function po(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function mo(t){if(fo(t))return t;for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r1&&fo(t[0].toLowerCase());if(e)return e}throw new Error("Cannot determine type of '".concat(t,"' axis. Please provide 'axis' or 'position' option."))}function go(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function vo(t,e){const n=re[t.type]||{scales:{}},r=e.scales||{},o=ho(t.type,e),i=Object.create(null);return Object.keys(r).forEach(e=>{const a=r[e];if(!H(a))return console.error("Invalid scale configuration for scale: ".concat(e));if(a._proxy)return console.warn("Ignoring resolver passed as options for scale: ".concat(e));const s=mo(e,a,function(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(n.length)return go(t,"x",n[0])||go(t,"y",n[0])}return{}}(e,t),le.scales[a.type]),l=function(t,e){return t===e?"_index_":"_value_"}(s,o),c=n.scales||{};i[e]=tt(Object.create(null),[{axis:s},a,c[s],c[l]])}),t.data.datasets.forEach(n=>{const o=n.type||t.type,a=n.indexAxis||ho(o,e),s=(re[o]||{}).scales||{};Object.keys(s).forEach(t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,a),o=n[e+"AxisID"]||e;i[o]=i[o]||Object.create(null),tt(i[o],[{axis:e},r[o],s[t]])})}),Object.keys(i).forEach(t=>{const e=i[t];tt(e,[le.scales[e.type],le.scale])}),i}function yo(t){const e=t.options||(t.options={});e.plugins=U(e.plugins,{}),e.scales=vo(t,e)}function bo(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const xo=new Map,wo=new Set;function ko(t,e){let n=xo.get(t);return n||(n=e(),xo.set(t,n),wo.add(n)),n}const _o=(t,e,n)=>{const r=rt(e,n);void 0!==r&&t.add(r)};class Ao{constructor(t){this._config=function(t){return(t=t||{}).data=bo(t.data),yo(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=bo(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),yo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ko(t,()=>[["datasets.".concat(t),""]])}datasetAnimationScopeKeys(t,e){return ko("".concat(t,".transition.").concat(e),()=>[["datasets.".concat(t,".transitions.").concat(e),"transitions.".concat(e)],["datasets.".concat(t),""]])}datasetElementScopeKeys(t,e){return ko("".concat(t,"-").concat(e),()=>[["datasets.".concat(t,".elements.").concat(e),"datasets.".concat(t),"elements.".concat(e),""]])}pluginScopeKeys(t){const e=t.id,n=this.type;return ko("".concat(n,"-plugin-").concat(e),()=>[["plugins.".concat(e),...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const n=this._scopeCache;let r=n.get(t);return r&&!e||(r=new Map,n.set(t,r)),r}getOptionScopes(t,e,n){const{options:r,type:o}=this,i=this._cachedScopes(t,n),a=i.get(e);if(a)return a;const s=new Set;e.forEach(e=>{t&&(s.add(t),e.forEach(e=>_o(s,t,e))),e.forEach(t=>_o(s,r,t)),e.forEach(t=>_o(s,re[o]||{},t)),e.forEach(t=>_o(s,le,t)),e.forEach(t=>_o(s,oe,t))});const l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),wo.has(e)&&i.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,re[e]||{},le.datasets[e]||{},{type:e},le,oe]}resolveNamedOptions(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""];const o={$shared:!0},{resolver:i,subPrefixes:a}=So(this._resolverCache,t,r);let s=i;if(function(t,e){const{isScriptable:n,isIndexable:r}=ze(t);for(const o of e){const e=n(o),i=r(o),a=(i||e)&&t[o];if(e&&(at(a)||Co(a))||i&&V(a))return!0}return!1}(i,e)){o.$shared=!1;s=De(i,n=at(n)?n():n,this.createResolver(t,n,a))}for(const l of e)o[l]=s[l];return o}createResolver(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],r=arguments.length>3?arguments[3]:void 0;const{resolver:o}=So(this._resolverCache,t,n);return H(e)?De(o,e,void 0,r):o}}function So(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const o=n.join();let i=r.get(o);if(!i){i={resolver:Le(e,n),subPrefixes:n.filter(t=>!t.toLowerCase().includes("hover"))},r.set(o,i)}return i}const Co=t=>H(t)&&Object.getOwnPropertyNames(t).some(e=>at(t[e]));const Eo=["top","bottom","left","right","chartArea"];function Oo(t,e){return"top"===t||"bottom"===t||-1===Eo.indexOf(t)&&"x"===e}function Po(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function Mo(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),K(n&&n.onComplete,[t],e)}function To(t){const e=t.chart,n=e.options.animation;K(n&&n.onProgress,[t],e)}function No(t){return nn()&&"string"===typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Ro={},jo=t=>{const e=No(t);return Object.values(Ro).filter(t=>t.canvas===e).pop()};function Lo(t,e,n){const r=Object.keys(t);for(const o of r){const r=+o;if(r>=e){const i=t[o];delete t[o],(n>0||r>e)&&(t[r+n]=i)}}}function Do(t,e,n){return t.options.clip?t[n]:e[n]}class zo{static register(){so.add(...arguments),Io()}static unregister(){so.remove(...arguments),Io()}constructor(t,e){const n=this.config=new Ao(e),r=No(t),o=jo(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.");const i=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!nn()||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Nr:Kr}(r)),this.platform.updateConfig(n);const a=this.platform.acquireContext(r,i.aspectRatio),s=a&&a.canvas,l=s&&s.height,c=s&&s.width;this.id=B(),this.ctx=a,this.canvas=s,this.width=c,this.height=l,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 lo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(){for(var r=arguments.length,o=new Array(r),i=0;ithis.update(t),i.resizeDelay||0),this._dataChanges=[],Ro[this.id]=this,a&&s?(Pn.listen(this,"complete",Mo),Pn.listen(this,"progress",To),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:r,_aspectRatio:o}=this;return F(t)?e&&o?o:r?n/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return so}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():hn(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return he(this.canvas,this.ctx),this}stop(){return Pn.stop(this),this}resize(t,e){Pn.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(r,t,e,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,hn(this,a,!0)&&(this.notifyPlugins("resize",{size:i}),K(n.onResize,[this,i],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){$(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,r=Object.keys(n).reduce((t,e)=>(t[e]=!1,t),{});let o=[];e&&(o=o.concat(Object.keys(e).map(t=>{const n=e[t],r=mo(t,n),o="r"===r,i="x"===r;return{options:n,dposition:o?"chartArea":i?"bottom":"left",dtype:o?"radialLinear":i?"category":"linear"}}))),$(o,e=>{const o=e.options,i=o.id,a=mo(i,o),s=U(o.type,e.dtype);void 0!==o.position&&Oo(o.position,a)===Oo(e.dposition)||(o.position=e.dposition),r[i]=!0;let l=null;if(i in n&&n[i].type===s)l=n[i];else{l=new(so.getScale(s))({id:i,type:s,ctx:this.ctx,chart:this}),n[l.id]=l}l.init(o,t)}),$(r,(t,e)=>{t||delete n[e]}),$(n,t=>{Mr.configure(this,t,t.options),Mr.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((t,e)=>t.index-e.index),n>e){for(let t=e;te.length&&delete this._stacks,t.forEach((t,n)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=e.length;n{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let l=0,c=this.data.datasets.length;l{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Po("z","_idx"));const{_active:a,_lastEvent:s}=this;s?this._eventHandler(s,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){$(this.scales,t=>{Mr.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);st(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:r,count:o}of e){Lo(t,r,"_removeElements"===n?-o:o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),r=n(0);for(let o=1;ot.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Mr.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],$(this.boxes,t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,r=!n.disabled,o=function(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:Do(n,e,"left"),right:Do(n,e,"right"),top:Do(r,e,"top"),bottom:Do(r,e,"bottom")}:e}(t,this.chartArea),i={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(r&&ge(e,{left:!1===n.left?0:o.left-n.left,right:!1===n.right?this.width:o.right+n.right,top:!1===n.top?0:o.top-n.top,bottom:!1===n.bottom?this.height:o.bottom+n.bottom}),t.controller.draw(),r&&ve(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return me(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,r){const o=vr.modes[e];return"function"===typeof o?o(this,t,n,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let r=n.filter(t=>t&&t._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=je(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"===typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const r=n?"show":"hide",o=this.getDatasetMeta(t),i=o.controller._resolveAnimations(void 0,r);it(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),i.update(o,{visible:n}),this.update(e=>e.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Pn.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,n,r),t[n]=r},r=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};$(this.options.events,t=>n(t,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,r)=>{e.addEventListener(this,n,r),t[n]=r},r=(n,r)=>{t[n]&&(e.removeEventListener(this,n,r),delete t[n])},o=(t,e)=>{this.canvas&&this.resize(t,e)};let i;const a=()=>{r("attach",a),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",a)},e.isAttached(this.canvas)?a():i()}unbindEvents(){$(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},$(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const r=n?"set":"remove";let o,i,a,s;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),a=0,s=t.length;a{let{datasetIndex:e,index:n}=t;const r=this.getDatasetMeta(e);if(!r)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:r.data[n],index:n}});!G(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,n){const r=this.options.hover,o=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),i=o(e,t),a=n?t:o(t,e);i.length&&this.updateHoverStyle(i,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,r))return;const o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:r=[],options:o}=this,i=e,a=this._getActiveElements(t,r,n,i),s=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,n,r){return n&&"mouseout"!==t.type?r?e:t:null}(t,this._lastEvent,n,s);n&&(this._lastEvent=null,K(o.onHover,[t,a,this],this),s&&K(o.onClick,[t,a,this],this));const c=!G(a,r);return(c||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=l,c}_getActiveElements(t,e,n,r){if("mouseout"===t.type)return[];if(!n)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,r)}}function Io(){return $(zo.instances,t=>t._plugins.invalidate())}function Bo(t,e,n,r){const o=Oe(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const i=(n-e)/2,a=Math.min(i,r*e/2),s=t=>{const e=(n-Math.min(i,t))*r/2;return Mt(t,0,Math.min(i,e))};return{outerStart:s(o.outerStart),outerEnd:s(o.outerEnd),innerStart:Mt(o.innerStart,0,a),innerEnd:Mt(o.innerEnd,0,a)}}function Fo(t,e,n,r){return{x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function Vo(t,e,n,r,o,i){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=e,d=Math.max(e.outerRadius+r+n-c,0),h=u>0?u+r+n+c:0;let f=0;const p=o-l;if(r){const t=((u>0?u-r:0)+(d>0?d-r:0))/2;f=(p-(0!==t?p*t/(t+r):p))/2}const m=(p-Math.max(.001,p*d-n/lt)/d)/2,g=l+m+f,v=o-m-f,{outerStart:y,outerEnd:b,innerStart:x,innerEnd:w}=Bo(e,h,d,v-g),k=d-y,_=d-b,A=g+y/k,S=v-b/_,C=h+x,E=h+w,O=g+x/C,P=v-w/E;if(t.beginPath(),i){const e=(A+S)/2;if(t.arc(a,s,d,A,e),t.arc(a,s,d,e,S),b>0){const e=Fo(_,S,a,s);t.arc(e.x,e.y,b,S,v+ft)}const n=Fo(E,v,a,s);if(t.lineTo(n.x,n.y),w>0){const e=Fo(E,P,a,s);t.arc(e.x,e.y,w,v+ft,P+Math.PI)}const r=(v-w/h+(g+x/h))/2;if(t.arc(a,s,h,v-w/h,r,!0),t.arc(a,s,h,r,g+x/h,!0),x>0){const e=Fo(C,O,a,s);t.arc(e.x,e.y,x,O+Math.PI,g-ft)}const o=Fo(k,g,a,s);if(t.lineTo(o.x,o.y),y>0){const e=Fo(k,A,a,s);t.arc(e.x,e.y,y,g-ft,A)}}else{t.moveTo(a,s);const e=Math.cos(A)*d+a,n=Math.sin(A)*d+s;t.lineTo(e,n);const r=Math.cos(S)*d+a,o=Math.sin(S)*d+s;t.lineTo(r,o)}t.closePath()}function Ho(t,e,n,r,o){const{fullCircles:i,startAngle:a,circumference:s,options:l}=e,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,f="inner"===l.borderAlign;if(!c)return;t.setLineDash(d||[]),t.lineDashOffset=h,f?(t.lineWidth=2*c,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let p=e.endAngle;if(i){Vo(t,e,n,r,p,o);for(let e=0;eo?(c=o/l,t.arc(i,a,l,n+c,r-c,!0)):t.arc(i,a,o,n+ft,r-ft),t.closePath(),t.clip()}(t,e,p),i||(Vo(t,e,n,r,p,o),t.stroke())}(0,o.A)(zo,"defaults",le),(0,o.A)(zo,"instances",Ro),(0,o.A)(zo,"overrides",re),(0,o.A)(zo,"registry",so),(0,o.A)(zo,"version","4.4.1"),(0,o.A)(zo,"getChart",jo);class qo extends $r{constructor(t){super(),(0,o.A)(this,"circumference",void 0),(0,o.A)(this,"endAngle",void 0),(0,o.A)(this,"fullCircles",void 0),(0,o.A)(this,"innerRadius",void 0),(0,o.A)(this,"outerRadius",void 0),(0,o.A)(this,"pixelMargin",void 0),(0,o.A)(this,"startAngle",void 0),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){const r=this.getProps(["x","y"],n),{angle:o,distance:i}=St(r,{x:t,y:e}),{startAngle:a,endAngle:s,innerRadius:l,outerRadius:c,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=(this.options.spacing+this.options.borderWidth)/2,h=U(u,s-a)>=ct||Pt(o,a,s),f=Tt(i,l+d,c+d);return h&&f}getCenterPoint(t){const{x:e,y:n,startAngle:r,endAngle:o,innerRadius:i,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:s,spacing:l}=this.options,c=(r+o)/2,u=(i+a+l+s)/2;return{x:e+Math.cos(c)*u,y:n+Math.sin(c)*u}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,r=(e.offset||0)/4,o=(e.spacing||0)/2,i=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>ct?Math.floor(n/ct):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*r,Math.sin(a)*r);const s=r*(1-Math.sin(Math.min(lt,n||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,n,r,o){const{fullCircles:i,startAngle:a,circumference:s}=e;let l=e.endAngle;if(i){Vo(t,e,n,r,l,o);for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=U(n.borderCapStyle,e.borderCapStyle),t.setLineDash(U(n.borderDash,e.borderDash)),t.lineDashOffset=U(n.borderDashOffset,e.borderDashOffset),t.lineJoin=U(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=U(n.borderWidth,e.borderWidth),t.strokeStyle=U(n.borderColor,e.borderColor)}function Uo(t,e,n){t.lineTo(n.x,n.y)}function Yo(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.length,{start:o=0,end:i=r-1}=n,{start:a,end:s}=e,l=Math.max(o,a),c=Math.min(i,s),u=os&&i>s;return{count:r,start:l,loop:e.loop,ilen:c(a+(c?s-t:t))%i,b=()=>{f!==p&&(t.lineTo(g,p),t.lineTo(g,f),t.lineTo(g,m))};for(l&&(d=o[y(0)],t.moveTo(d.x,d.y)),u=0;u<=s;++u){if(d=o[y(u)],d.skip)continue;const e=d.x,n=d.y,r=0|e;r===h?(np&&(p=n),g=(v*g+e)/++v):(b(),t.lineTo(e,n),h=r,v=0,f=p=n),m=n}b()}function Go(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!n?$o:Ko}(0,o.A)(qo,"id","arc"),(0,o.A)(qo,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),(0,o.A)(qo,"defaultRoutes",{backgroundColor:"backgroundColor"}),(0,o.A)(qo,"descriptors",{_scriptable:!0,_indexable:t=>"borderDash"!==t});const Qo="function"===typeof Path2D;function Xo(t,e,n,r){Qo&&!e.options.segment?function(t,e,n,r){let o=e._path;o||(o=e._path=new Path2D,e.path(o,n,r)&&o.closePath()),Wo(t,e.options),t.stroke(o)}(t,e,n,r):function(t,e,n,r){const{segments:o,options:i}=e,a=Go(e);for(const s of o)Wo(t,i,s.style),t.beginPath(),a(t,e,s,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}(t,e,n,r)}class Zo extends $r{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;en(this._points,n,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const n=t.points,r=t.options.spanGaps,o=n.length;if(!o)return[];const i=!!t._loop,{start:a,end:s}=function(t,e,n,r){let o=0,i=e-1;if(n&&!r)for(;oo&&t[i%e].skip;)i--;return i%=e,{start:o,end:i}}(n,o,i,r);return Sn(t,!0===r?[{start:a,end:s,loop:i}]:function(t,e,n,r){const o=t.length,i=[];let a,s=e,l=t[e];for(a=e+1;a<=n;++a){const n=t[a%o];n.skip||n.stop?l.skip||(r=!1,i.push({start:e%o,end:(a-1)%o,loop:r}),e=s=n.stop?a:null):(s=a,l.skip&&(e=a)),l=n}return null!==s&&i.push({start:e%o,end:s%o,loop:r}),i}(n,a,s"borderDash"!==t&&"fill"!==t});class ti extends $r{constructor(t){super(),(0,o.A)(this,"parsed",void 0),(0,o.A)(this,"skip",void 0),(0,o.A)(this,"stop",void 0),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const r=this.options,{x:o,y:i}=this.getProps(["x","y"],n);return Math.pow(t-o,2)+Math.pow(e-i,2)2&&void 0!==arguments[2]?arguments[2]:{};const r=t.x!==n.x?-e:0,o=t.y!==n.y?-e:0,i=(t.x+t.w!==n.x+n.w?e:0)-r,a=(t.y+t.h!==n.y+n.h?e:0)-o;return{x:t.x+r,y:t.y+o,w:t.w+i,h:t.h+a,radius:t.radius}}(0,o.A)(ti,"id","point"),(0,o.A)(ti,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),(0,o.A)(ti,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class si extends $r{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){const{inflateAmount:e,options:{borderColor:n,backgroundColor:r}}=this,{inner:o,outer:i}=ri(this),a=(s=i.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?_e:ii;var s;t.save(),i.w===o.w&&i.h===o.h||(t.beginPath(),a(t,ai(i,e,o)),t.clip(),a(t,ai(o,-e,i)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,ai(o,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,n){return oi(this,t,e,n)}inXRange(t,e){return oi(this,t,null,e)}inYRange(t,e){return oi(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:r,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+r)/2:e,y:o?n:(n+r)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}(0,o.A)(si,"id","bar"),(0,o.A)(si,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),(0,o.A)(si,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const li=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}};class ci extends $r{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=K(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,n)=>t.sort(e,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,r=Ne(n.font),o=r.size,i=this._computeTitleHeight(),{boxWidth:a,itemHeight:s}=li(n,o);let l,c;e.font=r.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(i,o,a,s)+10):(c=this.maxHeight,l=this._fitCols(i,r,a,s)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,r){const{ctx:o,maxWidth:i,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.lineWidths=[0],c=r+a;let u=t;o.textAlign="left",o.textBaseline="middle";let d=-1,h=-c;return this.legendItems.forEach((t,f)=>{const p=n+e/2+o.measureText(t.text).width;(0===f||l[l.length-1]+p+2*a>i)&&(u+=c,l[l.length-(f>0?0:1)]=0,h+=c,d++),s[f]={left:0,top:h,row:d,width:p,height:r},l[l.length-1]+=p+a}),u}_fitCols(t,e,n,r){const{ctx:o,maxHeight:i,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],c=i-t;let u=a,d=0,h=0,f=0,p=0;return this.legendItems.forEach((t,i)=>{const{itemWidth:m,itemHeight:g}=function(t,e,n,r,o){const i=function(t,e,n,r){let o=t.text;o&&"string"!==typeof o&&(o=o.reduce((t,e)=>t.length>e.length?t:e));return e+n.size/2+r.measureText(o).width}(r,t,e,n),a=function(t,e,n){let r=t;"string"!==typeof e.text&&(r=ui(e,n));return r}(o,r,e.lineHeight);return{itemWidth:i,itemHeight:a}}(n,e,o,t,r);i>0&&h+g+2*a>c&&(u+=d+a,l.push({width:d,height:h}),f+=d+a,p++,d=h=0),s[i]={left:f,top:h,col:p,width:m,height:g},d=Math.max(d,m),h+=g+a}),u+=d,l.push({width:d,height:h}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:r},rtl:o}}=this,i=yn(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=Vt(n,this.left+r,this.right-this.lineWidths[o]);for(const s of e)o!==s.row&&(o=s.row,a=Vt(n,this.left+r,this.right-this.lineWidths[o])),s.top+=this.top+t+r,s.left=i.leftForLtr(i.x(a),s.width),a+=s.width+r}else{let o=0,a=Vt(n,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const s of e)s.col!==o&&(o=s.col,a=Vt(n,this.top+t+r,this.bottom-this.columnSizes[o].height)),s.top=a,s.left+=this.left+r,s.left=i.leftForLtr(i.x(s.left),s.width),a+=s.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ge(t,this),this._draw(),ve(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:r}=this,{align:o,labels:i}=t,a=le.color,s=yn(t.rtl,this.left,this.width),l=Ne(i.font),{padding:c}=i,u=l.size,d=u/2;let h;this.drawTitle(),r.textAlign=s.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:f,boxHeight:p,itemHeight:m}=li(i,u),g=this.isHorizontal(),v=this._computeTitleHeight();h=g?{x:Vt(o,this.left+c,this.right-n[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:Vt(o,this.top+v+c,this.bottom-e[0].height),line:0},bn(this.ctx,t.textDirection);const y=m+c;this.legendItems.forEach((b,x)=>{r.strokeStyle=b.fontColor,r.fillStyle=b.fontColor;const w=r.measureText(b.text).width,k=s.textAlign(b.textAlign||(b.textAlign=i.textAlign)),_=f+d+w;let A=h.x,S=h.y;s.setWidth(this.width),g?x>0&&A+_+c>this.right&&(S=h.y+=y,h.line++,A=h.x=Vt(o,this.left+c,this.right-n[h.line])):x>0&&S+y>this.bottom&&(A=h.x=A+e[h.line].width+c,h.line++,S=h.y=Vt(o,this.top+v+c,this.bottom-e[h.line].height));if(function(t,e,n){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;r.save();const o=U(n.lineWidth,1);if(r.fillStyle=U(n.fillStyle,a),r.lineCap=U(n.lineCap,"butt"),r.lineDashOffset=U(n.lineDashOffset,0),r.lineJoin=U(n.lineJoin,"miter"),r.lineWidth=o,r.strokeStyle=U(n.strokeStyle,a),r.setLineDash(U(n.lineDash,[])),i.usePointStyle){const a={radius:p*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},l=s.xPlus(t,f/2);pe(r,a,l,e+d,i.pointStyleWidth&&f)}else{const i=e+Math.max((u-p)/2,0),a=s.leftForLtr(t,f),l=Me(n.borderRadius);r.beginPath(),Object.values(l).some(t=>0!==t)?_e(r,{x:a,y:i,w:f,h:p,radius:l}):r.rect(a,i,f,p),r.fill(),0!==o&&r.stroke()}r.restore()}(s.x(A),S,b),A=((t,e,n,r)=>t===(r?"left":"right")?n:"center"===t?(e+n)/2:e)(k,A+f+d,g?A+_:this.right,t.rtl),function(t,e,n){ke(r,n.text,t,e+m/2,l,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})}(s.x(A),S,b),g)h.x+=_+c;else if("string"!==typeof b.text){const t=l.lineHeight;h.y+=ui(b,t)+c}else h.y+=y}),xn(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=Ne(e.font),r=Te(e.padding);if(!e.display)return;const o=yn(t.rtl,this.left,this.width),i=this.ctx,a=e.position,s=n.size/2,l=r.top+s;let c,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),c=this.top+l,u=Vt(t.align,u,this.right-d);else{const e=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);c=l+Vt(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const h=Vt(a,u,u+d);i.textAlign=o.textAlign(Ft(a)),i.textBaseline="middle",i.strokeStyle=e.color,i.fillStyle=e.color,i.font=n.string,ke(i,e.text,h,c,n)}_computeTitleHeight(){const t=this.options.title,e=Ne(t.font),n=Te(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,r,o;if(Tt(t,this.left,this.right)&&Tt(e,this.top,this.bottom))for(o=this.legendHitBoxes,n=0;nt.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:i,useBorderRadius:a,borderRadius:s}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{const l=t.controller.getStyle(n?0:void 0),c=Te(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:i,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:o||l.textAlign,borderRadius:a&&(s||l.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class hi extends $r{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const r=V(n.text)?n.text.length:1;this._padding=Te(n.padding);const o=r*Ne(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:r,right:o,options:i}=this,a=i.align;let s,l,c,u=0;return this.isHorizontal()?(l=Vt(a,n,o),c=e+t,s=o-n):("left"===i.position?(l=n+t,c=Vt(a,r,e),u=-.5*lt):(l=o-t,c=Vt(a,e,r),u=.5*lt),s=r-e),{titleX:l,titleY:c,maxWidth:s,rotation:u}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=Ne(e.font),r=n.lineHeight/2+this._padding.top,{titleX:o,titleY:i,maxWidth:a,rotation:s}=this._drawArgs(r);ke(t,e.text,0,0,n,{color:e.color,maxWidth:a,rotation:s,textAlign:Ft(e.align),textBaseline:"middle",translation:[o,i]})}}var fi={id:"title",_element:hi,start(t,e,n){!function(t,e){const n=new hi({ctx:t.ctx,options:e,chart:t});Mr.configure(t,n,e),Mr.addBox(t,n),t.titleBlock=n}(t,n)},stop(t){const e=t.titleBlock;Mr.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const r=t.titleBlock;Mr.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const pi={average(t){if(!t.length)return!1;let e,n,r=0,o=0,i=0;for(e=0,n=t.length;e-1?t.split("\n"):t}function vi(t,e){const{element:n,datasetIndex:r,index:o}=e,i=t.getDatasetMeta(r).controller,{label:a,value:s}=i.getLabelAndValue(o);return{chart:t,label:a,parsed:i.getParsed(o),raw:t.data.datasets[r].data[o],formattedValue:s,dataset:i.getDataset(),dataIndex:o,datasetIndex:r,element:n}}function yi(t,e){const n=t.chart.ctx,{body:r,footer:o,title:i}=t,{boxWidth:a,boxHeight:s}=e,l=Ne(e.bodyFont),c=Ne(e.titleFont),u=Ne(e.footerFont),d=i.length,h=o.length,f=r.length,p=Te(e.padding);let m=p.height,g=0,v=r.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),v){m+=f*(e.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(v-f)*l.lineHeight+(v-1)*e.bodySpacing}h&&(m+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let y=0;const b=function(t){g=Math.max(g,n.measureText(t).width+y)};return n.save(),n.font=c.string,$(t.title,b),n.font=l.string,$(t.beforeBody.concat(t.afterBody),b),y=e.displayColors?a+2+e.boxPadding:0,$(r,t=>{$(t.before,b),$(t.lines,b),$(t.after,b)}),y=0,n.font=u.string,$(t.footer,b),n.restore(),g+=p.width,{width:g,height:m}}function bi(t,e,n,r){const{x:o,width:i}=n,{width:a,chartArea:{left:s,right:l}}=t;let c="center";return"center"===r?c=o<=(s+l)/2?"left":"right":o<=i/2?c="left":o>=a-i/2&&(c="right"),function(t,e,n,r){const{x:o,width:i}=r,a=n.caretSize+n.caretPadding;return"left"===t&&o+i+a>e.width||"right"===t&&o-i-a<0||void 0}(c,t,e,n)&&(c="center"),c}function xi(t,e,n){const r=n.yAlign||e.yAlign||function(t,e){const{y:n,height:r}=e;return nt.height-r/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||bi(t,e,n,r),yAlign:r}}function wi(t,e,n,r){const{caretSize:o,caretPadding:i,cornerRadius:a}=t,{xAlign:s,yAlign:l}=n,c=o+i,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=Me(a);let p=function(t,e){let{x:n,width:r}=t;return"right"===e?n-=r:"center"===e&&(n-=r/2),n}(e,s);const m=function(t,e,n){let{y:r,height:o}=t;return"top"===e?r+=n:r-="bottom"===e?o+n:o/2,r}(e,l,c);return"center"===l?"left"===s?p+=c:"right"===s&&(p-=c):"left"===s?p-=Math.max(u,h)+o:"right"===s&&(p+=Math.max(d,f)+o),{x:Mt(p,0,r.width-e.width),y:Mt(m,0,r.height-e.height)}}function ki(t,e,n){const r=Te(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-r.right:t.x+r.left}function _i(t){return mi([],gi(t))}function Ai(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Si={beforeTitle:I,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex{const e={before:[],lines:[],after:[]},o=Ai(n,t);mi(e.before,gi(Ci(o,"beforeLabel",this,t))),mi(e.lines,Ci(o,"label",this,t)),mi(e.after,gi(Ci(o,"afterLabel",this,t))),r.push(e)}),r}getAfterBody(t,e){return _i(Ci(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,r=Ci(n,"beforeFooter",this,t),o=Ci(n,"footer",this,t),i=Ci(n,"afterFooter",this,t);let a=[];return a=mi(a,gi(r)),a=mi(a,gi(o)),a=mi(a,gi(i)),a}_createItems(t){const e=this._active,n=this.chart.data,r=[],o=[],i=[];let a,s,l=[];for(a=0,s=e.length;at.filter(e,r,o,n))),t.itemSort&&(l=l.sort((e,r)=>t.itemSort(e,r,n))),$(l,e=>{const n=Ai(t.callbacks,e);r.push(Ci(n,"labelColor",this,e)),o.push(Ci(n,"labelPointStyle",this,e)),i.push(Ci(n,"labelTextColor",this,e))}),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=i,this.dataPoints=l,l}update(t,e){const n=this.options.setContext(this.getContext()),r=this._active;let o,i=[];if(r.length){const t=pi[n.position].call(this,r,this._eventPosition);i=this._createItems(n),this.title=this.getTitle(i,n),this.beforeBody=this.getBeforeBody(i,n),this.body=this.getBody(i,n),this.afterBody=this.getAfterBody(i,n),this.footer=this.getFooter(i,n);const e=this._size=yi(this,n),a=Object.assign({},t,e),s=xi(this.chart,n,a),l=wi(n,a,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,o={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=i,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,r){const o=this.getCaretPosition(t,n,r);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,n){const{xAlign:r,yAlign:o}=this,{caretSize:i,cornerRadius:a}=n,{topLeft:s,topRight:l,bottomLeft:c,bottomRight:u}=Me(a),{x:d,y:h}=t,{width:f,height:p}=e;let m,g,v,y,b,x;return"center"===o?(b=h+p/2,"left"===r?(m=d,g=m-i,y=b+i,x=b-i):(m=d+f,g=m+i,y=b-i,x=b+i),v=m):(g="left"===r?d+Math.max(s,c)+i:"right"===r?d+f-Math.max(l,u)-i:this.caretX,"top"===o?(y=h,b=y-i,m=g-i,v=g+i):(y=h+p,b=y+i,m=g+i,v=g-i),x=y),{x1:m,x2:g,x3:v,y1:y,y2:b,y3:x}}drawTitle(t,e,n){const r=this.title,o=r.length;let i,a,s;if(o){const l=yn(n.rtl,this.x,this.width);for(t.x=ki(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",i=Ne(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=i.string,s=0;s0!==t)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,_e(t,{x:e,y:f,w:l,h:s,radius:a}),t.fill(),t.stroke(),t.fillStyle=i.backgroundColor,t.beginPath(),_e(t,{x:n,y:f+1,w:l-2,h:s-2,radius:a}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,f,l,s),t.strokeRect(e,f,l,s),t.fillStyle=i.backgroundColor,t.fillRect(n,f+1,l-2,s-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:r}=this,{bodySpacing:o,bodyAlign:i,displayColors:a,boxHeight:s,boxWidth:l,boxPadding:c}=n,u=Ne(n.bodyFont);let d=u.lineHeight,h=0;const f=yn(n.rtl,this.x,this.width),p=function(n){e.fillText(n,f.x(t.x+h),t.y+d/2),t.y+=d+o},m=f.textAlign(i);let g,v,y,b,x,w,k;for(e.textAlign=i,e.textBaseline="middle",e.font=u.string,t.x=ki(this,m,n),e.fillStyle=n.bodyColor,$(this.beforeBody,p),h=a&&"right"!==m?"center"===i?l/2+c:l+2+c:0,b=0,w=r.length;b0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,r=n&&n.x,o=n&&n.y;if(r||o){const n=pi[t.position].call(this,this._active,this._eventPosition);if(!n)return;const i=this._size=yi(this,t),a=Object.assign({},n,this._size),s=xi(e,t,a),l=wi(t,a,s,e);r._to===l.x&&o._to===l.y||(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=i.width,this.height=i.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const i=Te(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,r,e),bn(t,e.textDirection),o.y+=i.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),xn(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,r=t.map(t=>{let{datasetIndex:e,index:n}=t;const r=this.chart.getDatasetMeta(e);if(!r)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:r.data[n],index:n}}),o=!G(n,r),i=this._positionChanged(r,e);(o||i)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],i=this._getActiveElements(t,o,e,n),a=this._positionChanged(i,t),s=e||!G(i,o)||a;return s&&(this._active=i,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),s}_getActiveElements(t,e,n,r){const o=this.options;if("mouseout"===t.type)return[];if(!r)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const i=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&i.reverse(),i}_positionChanged(t,e){const{caretX:n,caretY:r,options:o}=this,i=pi[o.position].call(this,t,e);return!1!==i&&(n!==i.x||r!==i.y)}}(0,o.A)(Ei,"positioners",pi);var Oi={id:"tooltip",_element:Ei,positioners:pi,afterInit(t,e,n){n&&(t.tooltip=new Ei({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",(0,r.A)((0,r.A)({},n),{},{cancelable:!0})))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Si},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function Pi(t,e,n,r){const o=t.indexOf(e);if(-1===o)return((t,e,n,r)=>("string"===typeof e?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,r);return o!==t.lastIndexOf(e)?n:o}function Mi(t){const e=this.getLabels();return t>=0&&tnull===t?null:Mt(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:Pi(n,t,U(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(r=this.getLabels().length-1)),this.min=n,this.max=r}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,r=[];let o=this.getLabels();o=0===t&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let i=t;i<=e;i++)r.push({value:i});return r}getLabelForValue(t){return Mi.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!==typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ni(t,e){const n=[],{bounds:r,step:o,min:i,max:a,precision:s,count:l,maxTicks:c,maxDigits:u,includeBounds:d}=t,h=o||1,f=c-1,{min:p,max:m}=e,g=!F(i),v=!F(a),y=!F(l),b=(m-p)/(u+1);let x,w,k,_,A=bt((m-p)/f/h)*h;if(A<1e-14&&!g&&!v)return[{value:p},{value:m}];_=Math.ceil(m/A)-Math.floor(p/A),_>f&&(A=bt(_*A/f/h)*h),F(s)||(x=Math.pow(10,s),A=Math.ceil(A*x)/x),"ticks"===r?(w=Math.floor(p/A)*A,k=Math.ceil(m/A)*A):(w=p,k=m),g&&v&&o&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((a-i)/o,A/1e3)?(_=Math.round(Math.min((a-i)/A,c)),A=(a-i)/_,w=i,k=a):y?(w=g?i:w,k=v?a:k,_=l-1,A=(k-w)/_):(_=(k-w)/A,_=yt(_,Math.round(_),A/1e3)?Math.round(_):Math.ceil(_));const S=Math.max(At(A),At(w));x=Math.pow(10,F(s)?S:s),w=Math.round(w*x)/x,k=Math.round(k*x)/x;let C=0;for(g&&(d&&w!==i?(n.push({value:i}),wa)break;n.push({value:t})}return v&&d&&k!==a?n.length&&yt(n[n.length-1].value,a,Ri(a,b,t))?n[n.length-1].value=a:n.push({value:a}):v&&k!==a||n.push({value:k}),n}function Ri(t,e,n){let{horizontal:r,minRotation:o}=n;const i=kt(o),a=(r?Math.sin(i):Math.cos(i))||.001,s=.75*e*(""+t).length;return Math.min(e/a,s)}(0,o.A)(Ti,"id","category"),(0,o.A)(Ti,"defaults",{ticks:{callback:Mi}});class ji extends oo{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return F(t)||("number"===typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:o}=this;const i=t=>r=e?r:t,a=t=>o=n?o:t;if(t){const t=vt(r),e=vt(o);t<0&&e<0?a(0):t>0&&e>0&&i(0)}if(r===o){let e=0===o?1:Math.abs(.05*o);a(o+e),t||i(r-e)}this.min=r,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:r}=t;return r?(e=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,e>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(r," would result generating up to ").concat(e," ticks. Limiting to 1000.")),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r=Ni({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&wt(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const r=(n-e)/Math.max(t.length-1,1)/2;e-=r,n+=r}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return te(t,this.chart.options.locale,this.options.ticks.format)}}class Li extends ji{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=q(t)?t:0,this.max=q(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=kt(this.options.ticks.minRotation),r=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/r))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}(0,o.A)(Li,"id","linear"),(0,o.A)(Li,"defaults",{ticks:{callback:ne.formatters.numeric}});const Di=t=>Math.floor(gt(t)),zi=(t,e)=>Math.pow(10,Di(t)+e);function Ii(t){return 1===t/Math.pow(10,Di(t))}function Bi(t,e,n){const r=Math.pow(10,n),o=Math.floor(t/r);return Math.ceil(e/r)-o}function Fi(t,e){let{min:n,max:r}=e;n=W(t.min,n);const o=[],i=Di(n);let a=function(t,e){let n=Di(e-t);for(;Bi(t,e,n)>10;)n++;for(;Bi(t,e,n)<10;)n--;return Math.min(n,Di(t))}(n,r),s=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),c=i>a?Math.pow(10,i):0,u=Math.round((n-c)*s)/s,d=Math.floor((n-c)/l/10)*l*10;let h=Math.floor((u-d)/Math.pow(10,a)),f=W(t.min,Math.round((c+d+h*Math.pow(10,a))*s)/s);for(;f=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,s=a>=0?1:s),f=Math.round((c+d+h*Math.pow(10,a))*s)/s;const p=W(t.max,f);return o.push({value:p,major:Ii(p),significand:h}),o}class Vi extends oo{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=ji.prototype.parse.apply(this,[t,e]);if(0!==n)return q(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=q(t)?Math.max(0,t):null,this.max=q(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!q(this._userMin)&&(this.min=t===zi(this.min,0)?zi(this.min,-1):zi(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,r=this.max;const o=e=>n=t?n:e,i=t=>r=e?r:t;n===r&&(n<=0?(o(1),i(10)):(o(zi(n,-1)),i(zi(r,1)))),n<=0&&o(zi(r,-1)),r<=0&&i(zi(n,1)),this.min=n,this.max=r}buildTicks(){const t=this.options,e=Fi({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&wt(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":te(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=gt(t),this._valueRange=gt(this.max)-gt(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(gt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Hi(t){const e=t.ticks;if(e.display&&t.display){const t=Te(e.backdropPadding);return U(e.font&&e.font.size,le.font.size)+t.height}return 0}function qi(t,e,n){return n=V(n)?n:[n],{w:ue(t,e.string,n),h:n.length*e.lineHeight}}function Wi(t,e,n,r,o){return t===r||t===o?{start:e-n/2,end:e+n/2}:to?{start:e-n,end:e}:{start:e,end:e+n}}function Ui(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],o=[],i=t._pointLabels.length,a=t.options.pointLabels,s=a.centerPointLabels?lt/i:0;for(let l=0;le.r&&(s=(r.end-e.r)/i,t.r=Math.max(t.r,e.r+s)),o.starte.b&&(l=(o.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function Ki(t,e,n){const r=t.drawingArea,{extra:o,additionalAngle:i,padding:a,size:s}=n,l=t.getPointPosition(e,r+o+a,i),c=Math.round(_t(Ot(l.angle+ft))),u=function(t,e,n){90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e);return t}(l.y,s.h,c),d=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(c),h=function(t,e,n){"right"===n?t-=e:"center"===n&&(t-=e/2);return t}(l.x,s.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+s.w,bottom:u+s.h}}function $i(t,e){if(!e)return!0;const{left:n,top:r,right:o,bottom:i}=t;return!(me({x:n,y:r},e)||me({x:n,y:i},e)||me({x:o,y:r},e)||me({x:o,y:i},e))}function Gi(t,e,n){const{left:r,top:o,right:i,bottom:a}=n,{backdropColor:s}=e;if(!F(s)){const n=Me(e.borderRadius),l=Te(e.backdropPadding);t.fillStyle=s;const c=r-l.left,u=o-l.top,d=i-r+l.width,h=a-o+l.height;Object.values(n).some(t=>0!==t)?(t.beginPath(),_e(t,{x:c,y:u,w:d,h:h,radius:n}),t.fill()):t.fillRect(c,u,d,h)}}function Qi(t,e,n,r){const{ctx:o}=t;if(n)o.arc(t.xCenter,t.yCenter,e,0,ct);else{let n=t.getPointPosition(0,e);o.moveTo(n.x,n.y);for(let i=1;i{const n=K(this.options.pointLabels.callback,[t,e],this);return n||0===n?n:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?Ui(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,r){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,r))}getIndexAngle(t){return Ot(t*(ct/(this._pointLabels.length||1))+kt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(F(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(F(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t2&&void 0!==arguments[2]?arguments[2]:0;const r=this.getIndexAngle(t)-ft+n;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:r,bottom:o}=this._pointLabelItems[t];return{left:e,top:n,right:r,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),Qi(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:r,border:o}=e,i=this._pointLabels.length;let a,s,l;if(e.pointLabels.display&&function(t,e){const{ctx:n,options:{pointLabels:r}}=t;for(let o=e-1;o>=0;o--){const e=t._pointLabelItems[o];if(!e.visible)continue;const i=r.setContext(t.getPointLabelContext(o));Gi(n,i,e);const a=Ne(i.font),{x:s,y:l,textAlign:c}=e;ke(n,t._pointLabels[o],s,l+a.lineHeight/2,a,{color:i.color,textAlign:c,textBaseline:"middle"})}}(this,i),r.display&&this.ticks.forEach((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);const n=this.getContext(e),a=r.setContext(n),l=o.setContext(n);!function(t,e,n,r,o){const i=t.ctx,a=e.circular,{color:s,lineWidth:l}=e;!a&&!r||!s||!l||n<0||(i.save(),i.strokeStyle=s,i.lineWidth=l,i.setLineDash(o.dash),i.lineDashOffset=o.dashOffset,i.beginPath(),Qi(t,n,a,r),i.closePath(),i.stroke(),i.restore())}(this,a,s,i,l)}}),n.display){for(t.save(),a=i-1;a>=0;a--){const r=n.setContext(this.getPointLabelContext(a)),{color:o,lineWidth:i}=r;i&&o&&(t.lineWidth=i,t.strokeStyle=o,t.setLineDash(r.borderDash),t.lineDashOffset=r.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const r=this.getIndexAngle(0);let o,i;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((r,a)=>{if(0===a&&!e.reverse)return;const s=n.setContext(this.getContext(a)),l=Ne(s.font);if(o=this.getDistanceFromCenterForValue(this.ticks[a].value),s.showLabelBackdrop){t.font=l.string,i=t.measureText(r.label).width,t.fillStyle=s.backdropColor;const e=Te(s.backdropPadding);t.fillRect(-i/2-e.left,-o-l.size/2-e.top,i+e.width,l.size+e.height)}ke(t,r.label,0,-o,l,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})}),t.restore()}drawTitle(){}}(0,o.A)(Xi,"id","radialLinear"),(0,o.A)(Xi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ne.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}}),(0,o.A)(Xi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),(0,o.A)(Xi,"descriptors",{angleLines:{_fallback:"grid"}});const Zi={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}},Ji=Object.keys(Zi);function ta(t,e){return t-e}function ea(t,e){if(F(e))return null;const n=t._adapter,{parser:r,round:o,isoWeekday:i}=t._parseOpts;let a=e;return"function"===typeof r&&(a=r(a)),q(a)||(a="string"===typeof r?n.parse(a,r):n.parse(a)),null===a?null:(o&&(a="week"!==o||!xt(i)&&!0!==i?n.startOf(a,o):n.startOf(a,"isoWeek",i)),+a)}function na(t,e,n,r){const o=Ji.length;for(let i=Ji.indexOf(t);i=e?n[r]:n[o]]=!0}}else t[e]=!0}function oa(t,e,n){const r=[],o={},i=e.length;let a,s;for(a=0;a=0&&(e[l].major=!0);return e}(t,r,o,n):r}class ia extends oo{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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.time||(t.time={}),r=this._adapter=new ur(t.adapters.date);r.init(e),tt(n.displayFormats,r.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:ea(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:r,max:o,minDefined:i,maxDefined:a}=this.getUserBounds();function s(t){i||isNaN(t.min)||(r=Math.min(r,t.min)),a||isNaN(t.max)||(o=Math.max(o,t.max))}i&&a||(s(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||s(this.getMinMax(!1))),r=q(r)&&!isNaN(r)?r:+e.startOf(Date.now(),n),o=q(o)&&!isNaN(o)?o:+e.endOf(Date.now(),n)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,r="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const o=this.min,i=function(t,e,n){let r=0,o=t.length;for(;rr&&t[o-1]>n;)o--;return r>0||o=Ji.indexOf(n);i--){const n=Ji[i];if(Zi[n].common&&t._adapter.diff(o,r,n)>=e-1)return n}return Ji[n?Ji.indexOf(n):0]}(this,i.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=Ji.indexOf(t)+1,n=Ji.length;e+t.value))}initOffsets(){let t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=0,o=0;this.options.offset&&n.length&&(t=this.getDecimalForValue(n[0]),r=1===n.length?1-t:(this.getDecimalForValue(n[1])-t)/2,e=this.getDecimalForValue(n[n.length-1]),o=1===n.length?e:(e-this.getDecimalForValue(n[n.length-2]))/2);const i=n.length<3?.5:.25;r=Mt(r,0,i),o=Mt(o,0,i),this._offsets={start:r,end:o,factor:1/(r+1+o)}}_generate(){const t=this._adapter,e=this.min,n=this.max,r=this.options,o=r.time,i=o.unit||na(o.minUnit,e,n,this._getLabelCapacity(e)),a=U(r.ticks.stepSize,1),s="week"===i&&o.isoWeekday,l=xt(s)||!0===s,c={};let u,d,h=e;if(l&&(h=+t.startOf(h,"isoWeek",s)),h=+t.startOf(h,l?"day":i),t.diff(n,e,i)>1e5*a)throw new Error(e+" and "+n+" are too far apart with stepSize of "+a+" "+i);const f="data"===r.ticks.source&&this.getDataTimestamps();for(u=h,d=0;u+t)}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,r=this._unit,o=e||n[r];return this._adapter.format(t,o)}_tickFormatFunction(t,e,n,r){const o=this.options,i=o.ticks.callback;if(i)return K(i,[t,e,n],this);const a=o.time.displayFormats,s=this._unit,l=this._majorUnit,c=s&&a[s],u=l&&a[l],d=n[e],h=l&&u&&d&&d.major;return this._adapter.format(t,r||(h?u:c))}generateTickLabels(t){let e,n,r;for(e=0,n=t.length;e0?a:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(t=0,e=r.length;t=t[s].pos&&e<=t[l].pos&&({lo:s,hi:l}=Rt(t,"pos",e)),({pos:r,time:i}=t[s]),({pos:o,time:a}=t[l])):(e>=t[s].time&&e<=t[l].time&&({lo:s,hi:l}=Rt(t,"time",e)),({time:r,pos:i}=t[s]),({time:o,pos:a}=t[l]));const c=o-r;return c?i+(a-i)*(e-r)/c:i}(0,o.A)(ia,"id","time"),(0,o.A)(ia,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});class sa extends ia{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=aa(e,this.min),this._tableRange=aa(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,r=[],o=[];let i,a,s,l,c;for(i=0,a=t.length;i=e&&l<=n&&r.push(l);if(r.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(i=0,a=r.length;it-e)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return t=e.length&&n.length?this.normalize(e.concat(n)):e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(aa(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return aa(this._table,n*this._tableRange+this._minPos,!0)}}(0,o.A)(sa,"id","timeseries"),(0,o.A)(sa,"defaults",ia.defaults)},464:(t,e,n)=>{"use strict";n.d(e,{c:()=>M,M:()=>T});var r=n(9379),o=n(45),i=n(579),a=n(6294),s=n(1432),l=n(4844),c=n(5043),u=n(7212),d=n(3194),h=n(2970),f=n(3464),p=n(6219),m=n(2315);const g=["index"],[v,y,b,x]=(0,m.D)(),[w,k]=(0,h.q)({name:"PinInputContext",errorMessage:"usePinInputContext: `context` is undefined. Seems you forgot to place all pin input fields within ``"}),_=t=>null===t||void 0===t?void 0:t.split("");function A(t,e){return("alphanumeric"===e?/^[a-zA-Z0-9]+$/i:/^[0-9]+$/).test(t)}var S=n(5003),C=n(6059),E=n(2695);const O=["children"],P=["descendants"];function M(t){const e=(0,C.V)("PinInput",t),n=(0,a.M)(t),{children:l}=n,d=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoFocus:e,value:n,defaultValue:i,onChange:a,onComplete:s,placeholder:l="\u25cb",manageFocus:d=!0,otp:h=!1,id:m,isDisabled:v,isInvalid:y,type:x="number",mask:w}=t,k=(0,c.useId)(),S=null!==m&&void 0!==m?m:"pin-input-".concat(k),C=b(),[E,O]=(0,c.useState)(!0),[P,M]=(0,c.useState)(-1),[T,N]=(0,u.i)({defaultValue:_(i)||[],value:_(n),onChange:t=>null===a||void 0===a?void 0:a(t.join(""))});(0,c.useEffect)(()=>{if(e){const t=C.first();t&&requestAnimationFrame(()=>{t.node.focus()})}},[C]);const R=(0,c.useCallback)(t=>{if(!E||!d)return;const e=C.next(t,!1);e&&requestAnimationFrame(()=>{e.node.focus()})},[C,E,d]),j=(0,c.useCallback)(function(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[...T];r[e]=t,N(r),""!==t&&r.length===C.count()&&r.every(t=>null!=t&&""!==t)?null===s||void 0===s||s(r.join("")):n&&R(e)},[T,N,R,s,C]),L=(0,c.useCallback)(()=>{var t;const e=Array(C.count()).fill("");N(e);const n=C.first();null===n||void 0===n||null===(t=n.node)||void 0===t||t.focus()},[C,N]),D=(0,c.useCallback)((t,e)=>{let n=e;return(null===t||void 0===t?void 0:t.length)>0&&(t[0]===e.charAt(0)?n=e.charAt(1):t[0]===e.charAt(1)&&(n=e.charAt(0))),n},[]);return{getInputProps:(0,c.useCallback)(t=>{const{index:e}=t,n=(0,o.A)(t,g),i=P===e,a="number"===x?"tel":"text";return(0,r.A)((0,r.A)({"aria-label":"Please enter your pin code",inputMode:"number"===x?"numeric":"text",type:w?"password":a},n),{},{id:"".concat(S,"-").concat(e),disabled:v,"aria-invalid":(0,f.r)(y),onChange:(0,p.H)(n.onChange,t=>{const n=t.currentTarget.value,r=T[e],o=D(r,n);if(""!==o)if(n.length>2){if(A(n,x)){const t=n.split("").filter((t,e)=>e{if("Backspace"===t.key&&d)if(""===t.currentTarget.value){const t=C.prev(e,!1);var n;t&&(j("",e-1,!1),null===(n=t.node)||void 0===n||n.focus(),O(!0))}else O(!1)}),onFocus:(0,p.H)(n.onFocus,()=>{M(e)}),onBlur:(0,p.H)(n.onBlur,()=>{M(-1)}),value:T[e]||"",autoComplete:h?"one-time-code":"off",placeholder:i?"":l})},[C,P,D,S,v,w,y,d,s,h,l,j,N,x,T]),id:S,descendants:C,values:T,setValue:j,setValues:N,clear:L}}((0,o.A)(n,O)),{descendants:h}=d,m=(0,o.A)(d,P),y=(0,s.a)(l).map(t=>(0,c.cloneElement)(t,{__css:e}));return(0,i.jsx)(v,{value:h,children:(0,i.jsx)(w,{value:m,children:y})})}M.displayName="PinInput";const T=(0,S.R)(function(t,e){const n=function(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const{getInputProps:o}=k(),{index:i,register:a}=x();return o((0,r.A)((0,r.A)({},e),{},{ref:(0,d.Px)(a,n),index:null!==(t=e.index)&&void 0!==t?t:i}))}(t,e);return(0,i.jsx)(E.B.input,(0,r.A)((0,r.A)({},n),{},{className:(0,l.cx)("chakra-pin-input",t.className)}))});T.displayName="PinInputField"},482:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(9379),o=n(6827),i=n(834);const a=function(t){let e=t;const n=new Set,l=t=>{e=t(e),n.forEach(t=>t())};return{getState:()=>e,subscribe:e=>(n.add(e),()=>{l(()=>t),n.delete(e)}),removeToast:(t,e)=>{l(n=>(0,r.A)((0,r.A)({},n),{},{[e]:n[e].filter(e=>e.id!=t)}))},notify:(t,e)=>{const n=function(t){var e,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s+=1;const o=null!==(e=r.id)&&void 0!==e?e:s,i=null!==(n=r.position)&&void 0!==n?n:"bottom";return{id:o,message:t,position:i,duration:r.duration,onCloseComplete:r.onCloseComplete,onRequestRemove:()=>a.removeToast(String(o),i),status:r.status,requestClose:!1,containerStyle:r.containerStyle}}(t,e),{position:o,id:i}=n;return l(t=>{var e,i;const a=o.includes("top")?[n,...null!==(e=t[o])&&void 0!==e?e:[]]:[...null!==(i=t[o])&&void 0!==i?i:[],n];return(0,r.A)((0,r.A)({},t),{},{[o]:a})}),i},update:(t,e)=>{t&&l(n=>{const a=(0,r.A)({},n),{position:s,index:l}=(0,i.xi)(a,t);return s&&-1!==l&&(a[s][l]=(0,r.A)((0,r.A)((0,r.A)({},a[s][l]),e),{},{message:(0,o.q)(e)})),a})},closeAll:function(){let{positions:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(e=>(null!==t&&void 0!==t?t:["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((t,n)=>(t[n]=e[n].map(t=>(0,r.A)((0,r.A)({},t),{},{requestClose:!0})),t),(0,r.A)({},e)))},close:t=>{l(e=>{const n=(0,i.r3)(e,t);return n?(0,r.A)((0,r.A)({},e),{},{[n]:e[n].map(e=>e.id==t?(0,r.A)((0,r.A)({},e),{},{requestClose:!0}):e)}):e})},isActive:t=>Boolean((0,i.xi)(a.getState(),t).position)}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]});let s=0},493:(t,e,n)=>{"use strict";n.d(e,{AV:()=>l,C3:()=>c,EF:()=>a,Of:()=>d,TG:()=>s,gm:()=>i,v3:()=>h});var r=n(2970),o=n(2315);const[i,a]=(0,r.q)({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[s,l]=(0,r.q)({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[c,u,d,h]=(0,o.D)()},502:(t,e,n)=>{"use strict";n.d(e,{d:()=>d});var r=n(9379),o=n(5043),i=n(2157),a=n(6827);function s(t,e){var n;const r=null!==t&&void 0!==t?t:"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return null!==(n=null===o||void 0===o?void 0:o[e])&&void 0!==n?n:r}var l=n(482);var c=n(2325),u=n(6448);function d(t){const{theme:e}=(0,u.UQ)(),n=(0,c.NU)();return(0,o.useMemo)(()=>function(t,e){const n=n=>{var o;return(0,r.A)((0,r.A)((0,r.A)({},e),n),{},{position:s(null!==(o=null===n||void 0===n?void 0:n.position)&&void 0!==o?o:null===e||void 0===e?void 0:e.position,t)})},o=t=>{const e=n(t),r=(0,a.q)(e);return l.Z.notify(r,e)};return o.update=(t,e)=>{l.Z.update(t,n(e))},o.promise=(t,e)=>{const n=o((0,r.A)((0,r.A)({},e.loading),{},{status:"loading",duration:null}));t.then(t=>o.update(n,(0,r.A)({status:"success",duration:5e3},(0,i.J)(e.success,t)))).catch(t=>o.update(n,(0,r.A)({status:"error",duration:5e3},(0,i.J)(e.error,t))))},o.closeAll=l.Z.closeAll,o.close=l.Z.close,o.isActive=l.Z.isActive,o}(e.direction,(0,r.A)((0,r.A)({},n),t)),[t,e.direction,n])}},511:(t,e,n)=>{"use strict";n.d(e,{X:()=>m,k:()=>p});var r=n(9379),o=n(45),i=n(579),a=n(6294),s=n(2970),l=n(4844),c=n(5003),u=n(6059),d=n(2695);const h=["className","layout"],[f,p]=(0,s.q)({name:"TableStylesContext",errorMessage:"useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),m=(0,c.R)((t,e)=>{const n=(0,u.o)("Table",t),s=(0,a.M)(t),{className:c,layout:p}=s,m=(0,o.A)(s,h);return(0,i.jsx)(f,{value:n,children:(0,i.jsx)(d.B.table,(0,r.A)({ref:e,__css:(0,r.A)({tableLayout:p},n.table),className:(0,l.cx)("chakra-table",c)},m))})});m.displayName="Table"},516:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=(0,n(7784).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},523:(t,e,n)=>{"use strict";n.d(e,{zy:()=>F,NP:()=>L,Wh:()=>B});var r=n(579),o=n(9379),i=n(9676),a=n(2041),s=n(9611);function l(t){return(0,a.Gv)(t)&&t.reference?t.reference:String(t)}const c=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r{const e=l(t);return null==e||Number.isNaN(parseFloat(e))?h(e,-1):String(e).startsWith("-")?String(e).slice(1):"-".concat(e)},m=Object.assign(t=>({add:function(){for(var e=arguments.length,n=new Array(e),r=0;rm(p(t)),toString:()=>t.toString()}),{add:u,subtract:d,multiply:h,divide:f,negate:p});var g=n(4258);function v(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{stop:r,getKey:o}=n;return function t(n){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if((0,a.Gv)(n)||Array.isArray(n)){const a={};for(const[l,c]of Object.entries(n)){var s;const u=null!==(s=null===o||void 0===o?void 0:o(l))&&void 0!==s?s:l,d=[...i,u];if(null!==r&&void 0!==r&&r(n,d))return e(n,i);a[u]=t(c,d)}return a}return e(n,i)}(t)}var y=n(9468),b=n(45),x=n(974);const w=["__cssMap","__cssVars","__breakpoints"],k=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function _(t){const e=k;return(0,x.U)(t,e)}function A(t,e){return(0,g.Vg)(String(t).replace(/\./g,"-"),void 0,e)}function S(t){var e;const n=function(t){const e=_(t),n=function(t){return t.semanticTokens}(t),r=t=>y.s.includes(t)||"default"===t,o={};return v(e,(t,e)=>{null!=t&&(o[e.join(".")]={isSemantic:!1,value:t})}),v(n,(t,e)=>{null!=t&&(o[e.join(".")]={isSemantic:!0,value:t})},{stop:t=>Object.keys(t).every(r)}),o}(t),r=null===(e=t.config)||void 0===e?void 0:e.cssVarPrefix;let o={};const i={};function l(t,e){const o=[String(t).split(".")[0],e].join(".");if(!n[o])return e;const{reference:i}=A(o,r);return i}for(const[c,u]of Object.entries(n)){const{isSemantic:t,value:e}=u,{variable:n,reference:d}=A(c,r);if(!t){if(c.startsWith("space")){const t=c.split("."),[r,...o]=t,a="".concat(r,".-").concat(o.join(".")),s=m.negate(e),l=m.negate(d);i[a]={value:s,var:n,varRef:l}}o[n]=e,i[c]={value:e,var:n,varRef:d};continue}const h=(0,a.Gv)(e)?e:{default:e};o=s(o,Object.entries(h).reduce((t,e)=>{var r;let[o,i]=e;if(!i)return t;const a=l(c,"".concat(i));if("default"===o)return t[n]=a,t;return t[null!==(r=null===y.T||void 0===y.T?void 0:y.T[o])&&void 0!==r?r:o]={[n]:a},t},{})),i[c]={value:d,var:n,varRef:d}}return{cssVars:o,cssMap:i}}function C(t){const e=function(t){const{__cssMap:e,__cssVars:n,__breakpoints:r}=t;return(0,b.A)(t,w)}(t),{cssMap:n,cssVars:r}=S(e);return Object.assign(e,{__cssVars:(0,o.A)((0,o.A)({},{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"}),r),__cssMap:n,__breakpoints:(0,i.d)(e.breakpoints)}),e}var E=n(4975),O=n(2970),P=n(4011),M=n(2157),T=n(2432),N=n(3290),R=n(5043),j=n(4093);function L(t){const{cssVarsRoot:e,theme:n,children:o}=t,i=(0,R.useMemo)(()=>C(n),[n]);return(0,r.jsxs)(T.a,{theme:i,children:[(0,r.jsx)(D,{root:e}),o]})}function D(t){let{root:e=":host, :root"}=t;const n=[e,"[data-theme]"].join(",");return(0,r.jsx)(N.mL,{styles:t=>({[n]:t.__cssVars})})}const[z,I]=(0,O.q)({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function B(t){return(0,O.q)({name:"".concat(t,"StylesContext"),errorMessage:'useStyles: "styles" is undefined. Seems you forgot to wrap the components in "<'.concat(t,' />" ')})}function F(){const{colorMode:t}=(0,j.G6)();return(0,r.jsx)(N.mL,{styles:e=>{const n=(0,P.r)(e,"styles.global"),r=(0,M.J)(n,{theme:e,colorMode:t});if(!r)return;return(0,E.A)(r)(e)}})}},579:(t,e,n)=>{"use strict";t.exports=n(1153)},585:(t,e,n)=>{"use strict";n.d(e,{t:()=>s});var r=n(2078),o=n(8664);const i=["online","offline"];class a extends r.Q{constructor(){super(),this.setup=t=>{if(!o.S$&&window.addEventListener){const e=()=>t();return i.forEach(t=>{window.addEventListener(t,e,!1)}),()=>{i.forEach(t=>{window.removeEventListener(t,e)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var t;this.hasListeners()||(null==(t=this.cleanup)||t.call(this),this.cleanup=void 0)}setEventListener(t){var e;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t(t=>{"boolean"===typeof t?this.setOnline(t):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(t=>{let{listener:e}=t;e()})}isOnline(){return"boolean"===typeof this.online?this.online:"undefined"===typeof navigator||"undefined"===typeof navigator.onLine||navigator.onLine}}const s=new a},614:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=(0,n(7784).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},685:(t,e,n)=>{"use strict";n.d(e,{U:()=>r});const r=console},705:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},764:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=(0,n(7784).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},765:(t,e,n)=>{"use strict";n.d(e,{$:()=>d});var r=n(9379),o=n(45),i=n(8664),a=n(9939),s=n(2540),l=n(2078),c=n(7988);const u=["refetchPage"];class d extends l.Q{constructor(t,e){super(),this.client=t,this.options=e,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),h(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return f(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return f(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,e){const n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),(0,i.f8)(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),"undefined"!==typeof this.options.enabled&&"boolean"!==typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const o=this.hasListeners();o&&p(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(e),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();const a=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&a===this.currentRefetchInterval||this.updateRefetchInterval(a)}getOptimisticResult(t){const e=this.client.getQueryCache().build(this.client,t),n=this.createResult(e,t);return function(t,e,n){if(n.keepPreviousData)return!1;if(void 0!==n.placeholderData)return e.isPlaceholderData;if(!(0,i.f8)(t.getCurrentResult(),e))return!0;return!1}(this,n,t)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(t){const e={};return Object.keys(t).forEach(n=>{Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),t[n])})}),e}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{refetchPage:e}=t,n=(0,o.A)(t,u);return this.fetch((0,r.A)((0,r.A)({},n),{},{meta:{refetchPage:e}}))}fetchOptimistic(t){const e=this.client.defaultQueryOptions(t),n=this.client.getQueryCache().build(this.client,e);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,e))}fetch(t){var e;return this.executeFetch((0,r.A)((0,r.A)({},t),{},{cancelRefetch:null==(e=t.cancelRefetch)||e})).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let e=this.currentQuery.fetch(this.options,t);return null!=t&&t.throwOnError||(e=e.catch(i.lQ)),e}updateStaleTimeout(){if(this.clearStaleTimeout(),i.S$||this.currentResult.isStale||!(0,i.gn)(this.options.staleTime))return;const t=(0,i.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var t;return"function"===typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(t=this.options.refetchInterval)&&t}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!i.S$&&!1!==this.options.enabled&&(0,i.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||s.m.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,e){const n=this.currentQuery,r=this.options,o=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,l=t!==n,u=l?t.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=t;let g,{dataUpdatedAt:v,error:y,errorUpdatedAt:b,fetchStatus:x,status:w}=f,k=!1,_=!1;if(e._optimisticResults){const o=this.hasListeners(),i=!o&&h(t,e),a=o&&p(t,n,e,r);(i||a)&&(x=(0,c.v_)(t.options.networkMode)?"fetching":"paused",v||(w="loading")),"isRestoring"===e._optimisticResults&&(x="idle")}if(e.keepPreviousData&&!f.dataUpdatedAt&&null!=d&&d.isSuccess&&"error"!==w)g=d.data,v=d.dataUpdatedAt,w=d.status,k=!0;else if(e.select&&"undefined"!==typeof f.data)if(o&&f.data===(null==a?void 0:a.data)&&e.select===this.selectFn)g=this.selectResult;else try{this.selectFn=e.select,g=e.select(f.data),g=(0,i.pl)(null==o?void 0:o.data,g,e),this.selectResult=g,this.selectError=null}catch(E){0,this.selectError=E}else g=f.data;if("undefined"!==typeof e.placeholderData&&"undefined"===typeof g&&"loading"===w){let t;if(null!=o&&o.isPlaceholderData&&e.placeholderData===(null==s?void 0:s.placeholderData))t=o.data;else if(t="function"===typeof e.placeholderData?e.placeholderData():e.placeholderData,e.select&&"undefined"!==typeof t)try{t=e.select(t),this.selectError=null}catch(E){0,this.selectError=E}"undefined"!==typeof t&&(w="success",g=(0,i.pl)(null==o?void 0:o.data,t,e),_=!0)}this.selectError&&(y=this.selectError,g=this.selectResult,b=Date.now(),w="error");const A="fetching"===x,S="loading"===w,C="error"===w;return{status:w,fetchStatus:x,isLoading:S,isSuccess:"success"===w,isError:C,isInitialLoading:S&&A,data:g,dataUpdatedAt:v,error:y,errorUpdatedAt:b,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:A,isRefetching:A&&!S,isLoadingError:C&&0===f.dataUpdatedAt,isPaused:"paused"===x,isPlaceholderData:_,isPreviousData:k,isRefetchError:C&&0!==f.dataUpdatedAt,isStale:m(t,e),refetch:this.refetch,remove:this.remove}}updateResult(t){const e=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,(0,i.f8)(n,e))return;this.currentResult=n;const o={cache:!0};!1!==(null==t?void 0:t.listeners)&&(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"===typeof t?t():t;if("all"===n||!n&&!this.trackedProps.size)return!0;const r=new Set(null!=n?n:this.trackedProps);return this.options.useErrorBoundary&&r.add("error"),Object.keys(this.currentResult).some(t=>{const n=t;return this.currentResult[n]!==e[n]&&r.has(n)})})()&&(o.listeners=!0),this.notify((0,r.A)((0,r.A)({},o),t))}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const e=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==e||e.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const e={};"success"===t.type?e.onSuccess=!t.manual:"error"!==t.type||(0,c.wm)(t.error)||(e.onError=!0),this.updateResult(e),this.hasListeners()&&this.updateTimers()}notify(t){a.j.batch(()=>{var e,n,r,o;if(t.onSuccess)null==(e=(n=this.options).onSuccess)||e.call(n,this.currentResult.data),null==(r=(o=this.options).onSettled)||r.call(o,this.currentResult.data,null);else if(t.onError){var i,a,s,l;null==(i=(a=this.options).onError)||i.call(a,this.currentResult.error),null==(s=(l=this.options).onSettled)||s.call(l,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(t=>{let{listener:e}=t;e(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function h(t,e){return function(t,e){return!1!==e.enabled&&!t.state.dataUpdatedAt&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||t.state.dataUpdatedAt>0&&f(t,e,e.refetchOnMount)}function f(t,e,n){if(!1!==e.enabled){const r="function"===typeof n?n(t):n;return"always"===r||!1!==r&&m(t,e)}return!1}function p(t,e,n,r){return!1!==n.enabled&&(t!==e||!1===r.enabled)&&(!n.suspense||"error"!==t.state.status)&&m(t,n)}function m(t,e){return t.isStaleByTime(e.staleTime)}},793:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},804:(t,e,n)=>{"use strict";n.d(e,{Wt:()=>m});var r=n(9379),o=n(579),i=n(6294),a=n(2970),s=n(4844),l=n(3225),c=n(5011),u=n(5003),d=n(6059),h=n(2695);const[f,p]=(0,a.q)({name:"FormErrorStylesContext",errorMessage:"useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),m=(0,u.R)((t,e)=>{const n=(0,d.o)("FormError",t),a=(0,i.M)(t),c=(0,l.Uc)();return null!==c&&void 0!==c&&c.isInvalid?(0,o.jsx)(f,{value:n,children:(0,o.jsx)(h.B.div,(0,r.A)((0,r.A)({},null===c||void 0===c?void 0:c.getErrorMessageProps(a,e)),{},{className:(0,s.cx)("chakra-form__error-message",t.className),__css:(0,r.A)({display:"flex",alignItems:"center"},n.text)}))}):null});m.displayName="FormErrorMessage";(0,u.R)((t,e)=>{const n=p(),i=(0,l.Uc)();if(null===i||void 0===i||!i.isInvalid)return null;const a=(0,s.cx)("chakra-form__error-icon",t.className);return(0,o.jsx)(c.I,(0,r.A)((0,r.A)({ref:e,"aria-hidden":!0},t),{},{__css:n.icon,className:a,children:(0,o.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})}))}).displayName="FormErrorIcon"},810:(t,e,n)=>{"use strict";n.d(e,{T:()=>r});const r=(0,n(4010).w)({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"})},834:(t,e,n)=>{"use strict";n.d(e,{Tc:()=>a,V1:()=>s,r3:()=>i,xi:()=>o});const r=(t,e)=>t.find(t=>t.id===e);function o(t,e){const n=i(t,e);return{position:n,index:n?t[n].findIndex(t=>t.id===e):-1}}function i(t,e){for(const[n,o]of Object.entries(t))if(r(o,e))return n}function a(t){let e="center";return t.includes("right")&&(e="flex-end"),t.includes("left")&&(e="flex-start"),{display:"flex",flexDirection:"column",alignItems:e}}function s(t){return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:"top"===t||"bottom"===t?"0 auto":void 0,top:t.includes("top")?"env(safe-area-inset-top, 0px)":void 0,bottom:t.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,right:t.includes("left")?void 0:"env(safe-area-inset-right, 0px)",left:t.includes("right")?void 0:"env(safe-area-inset-left, 0px)"}}},849:(t,e,n)=>{"use strict";n.d(e,{q:()=>o});let r={};function o(){return r}},918:(t,e,n)=>{"use strict";function r(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}n.d(e,{A:()=>r})},940:(t,e,n)=>{"use strict";n.d(e,{c:()=>o});var r=n(5043);function o(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(0,r.useRef)(t);return(0,r.useEffect)(()=>{n.current=t}),(0,r.useCallback)(function(){for(var t,e=arguments.length,r=new Array(e),o=0;o{"use strict";function r(t,e){const n={};for(const r of e)r in t&&(n[r]=t[r]);return n}n.d(e,{U:()=>r})},1009:(t,e,n)=>{"use strict";n.d(e,{$Mw:()=>q,A3x:()=>d,B88:()=>ot,Bc_:()=>G,CKj:()=>Q,Dw7:()=>x,E19:()=>J,F5$:()=>I,FrA:()=>ut,GGD:()=>Y,HaR:()=>E,HzC:()=>F,IXo:()=>nt,Iy6:()=>D,JXP:()=>it,MRc:()=>rt,Ohp:()=>y,Ojn:()=>k,PCV:()=>tt,PfQ:()=>H,Pj4:()=>S,PjK:()=>b,QFc:()=>U,QPV:()=>R,QuH:()=>T,S8s:()=>L,SG1:()=>C,VSk:()=>X,Vap:()=>P,VeH:()=>N,WXf:()=>A,YrT:()=>h,_NO:()=>O,a4x:()=>_,ayE:()=>z,blI:()=>ct,cfS:()=>at,cnX:()=>et,dyV:()=>s,eHT:()=>a,fK4:()=>f,fOo:()=>m,fTJ:()=>W,fZZ:()=>j,iHs:()=>Z,irw:()=>p,jH2:()=>M,jTZ:()=>$,nxz:()=>w,pHD:()=>B,pVQ:()=>st,qdV:()=>l,ufi:()=>V,vQY:()=>c,wAb:()=>g,wIk:()=>u,wO2:()=>K,y3G:()=>i,yGN:()=>lt,ydS:()=>v,z1n:()=>o});var r=n(6688);function o(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"22 12 18 12 15 21 9 3 6 12 2 12"}}]})(t)}function i(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"}},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"}}]})(t)}function a(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}},{tag:"line",attr:{x1:"12",y1:"9",x2:"12",y2:"13"}},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"}}]})(t)}function s(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"}},{tag:"polyline",attr:{points:"12 5 19 12 12 19"}}]})(t)}function l(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"7",y1:"17",x2:"17",y2:"7"}},{tag:"polyline",attr:{points:"7 7 17 7 17 17"}}]})(t)}function c(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"20",x2:"18",y2:"10"}},{tag:"line",attr:{x1:"12",y1:"20",x2:"12",y2:"4"}},{tag:"line",attr:{x1:"6",y1:"20",x2:"6",y2:"14"}}]})(t)}function u(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}},{tag:"line",attr:{x1:"16",y1:"2",x2:"16",y2:"6"}},{tag:"line",attr:{x1:"8",y1:"2",x2:"8",y2:"6"}},{tag:"line",attr:{x1:"3",y1:"10",x2:"21",y2:"10"}}]})(t)}function d(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"}}]})(t)}function h(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"}}]})(t)}function f(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"}}]})(t)}function p(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 18 9 12 15 6"}}]})(t)}function m(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"}}]})(t)}function g(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"}}]})(t)}function v(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}},{tag:"rect",attr:{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}}]})(t)}function y(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"polyline",attr:{points:"12 6 12 12 16 14"}}]})(t)}function b(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 18 22 12 16 6"}},{tag:"polyline",attr:{points:"8 6 2 12 8 18"}}]})(t)}function x(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"}}]})(t)}function w(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}}]})(t)}function k(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"}},{tag:"rect",attr:{x:"9",y:"9",width:"6",height:"6"}},{tag:"line",attr:{x1:"9",y1:"1",x2:"9",y2:"4"}},{tag:"line",attr:{x1:"15",y1:"1",x2:"15",y2:"4"}},{tag:"line",attr:{x1:"9",y1:"20",x2:"9",y2:"23"}},{tag:"line",attr:{x1:"15",y1:"20",x2:"15",y2:"23"}},{tag:"line",attr:{x1:"20",y1:"9",x2:"23",y2:"9"}},{tag:"line",attr:{x1:"20",y1:"14",x2:"23",y2:"14"}},{tag:"line",attr:{x1:"1",y1:"9",x2:"4",y2:"9"}},{tag:"line",attr:{x1:"1",y1:"14",x2:"4",y2:"14"}}]})(t)}function _(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}},{tag:"polyline",attr:{points:"7 10 12 15 17 10"}},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"}}]})(t)}function A(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"}}]})(t)}function S(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20h9"}},{tag:"path",attr:{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"}}]})(t)}function C(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}},{tag:"path",attr:{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}}]})(t)}function E(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}},{tag:"polyline",attr:{points:"15 3 21 3 21 9"}},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"}}]})(t)}function O(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}},{tag:"line",attr:{x1:"1",y1:"1",x2:"23",y2:"23"}}]})(t)}function P(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}},{tag:"circle",attr:{cx:"12",cy:"12",r:"3"}}]})(t)}function M(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}},{tag:"polyline",attr:{points:"14 2 14 8 20 8"}},{tag:"line",attr:{x1:"16",y1:"13",x2:"8",y2:"13"}},{tag:"line",attr:{x1:"16",y1:"17",x2:"8",y2:"17"}},{tag:"polyline",attr:{points:"10 9 9 9 8 9"}}]})(t)}function T(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"}},{tag:"polyline",attr:{points:"13 2 13 9 20 9"}}]})(t)}function N(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"2",y1:"12",x2:"22",y2:"12"}},{tag:"path",attr:{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"}}]})(t)}function R(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"7",height:"7"}},{tag:"rect",attr:{x:"14",y:"3",width:"7",height:"7"}},{tag:"rect",attr:{x:"14",y:"14",width:"7",height:"7"}},{tag:"rect",attr:{x:"3",y:"14",width:"7",height:"7"}}]})(t)}function j(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}},{tag:"circle",attr:{cx:"8.5",cy:"8.5",r:"1.5"}},{tag:"polyline",attr:{points:"21 15 16 10 5 21"}}]})(t)}function L(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"}},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"}}]})(t)}function D(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}},{tag:"line",attr:{x1:"3",y1:"9",x2:"21",y2:"9"}},{tag:"line",attr:{x1:"9",y1:"21",x2:"9",y2:"9"}}]})(t)}function z(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}},{tag:"path",attr:{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}}]})(t)}function I(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}},{tag:"path",attr:{d:"M7 11V7a5 5 0 0 1 10 0v4"}}]})(t)}function B(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}},{tag:"polyline",attr:{points:"22,6 12,13 2,6"}}]})(t)}function F(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}},{tag:"circle",attr:{cx:"12",cy:"10",r:"3"}}]})(t)}function V(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2"}},{tag:"line",attr:{x1:"8",y1:"21",x2:"16",y2:"21"}},{tag:"line",attr:{x1:"12",y1:"17",x2:"12",y2:"21"}}]})(t)}function H(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"5 9 2 12 5 15"}},{tag:"polyline",attr:{points:"9 5 12 2 15 5"}},{tag:"polyline",attr:{points:"15 19 12 22 9 19"}},{tag:"polyline",attr:{points:"19 9 22 12 19 15"}},{tag:"line",attr:{x1:"2",y1:"12",x2:"22",y2:"12"}},{tag:"line",attr:{x1:"12",y1:"2",x2:"12",y2:"22"}}]})(t)}function q(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 18V5l12-2v13"}},{tag:"circle",attr:{cx:"6",cy:"18",r:"3"}},{tag:"circle",attr:{cx:"18",cy:"16",r:"3"}}]})(t)}function W(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"5",x2:"5",y2:"19"}},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"2.5"}},{tag:"circle",attr:{cx:"17.5",cy:"17.5",r:"2.5"}}]})(t)}function U(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"}}]})(t)}function Y(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"}},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"}}]})(t)}function K(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"1 4 1 10 7 10"}},{tag:"polyline",attr:{points:"23 20 23 14 17 14"}},{tag:"path",attr:{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"}}]})(t)}function $(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"}},{tag:"polyline",attr:{points:"1 20 1 14 7 14"}},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"}}]})(t)}function G(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}},{tag:"polyline",attr:{points:"17 21 17 13 7 13 7 21"}},{tag:"polyline",attr:{points:"7 3 7 8 15 8"}}]})(t)}function Q(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"}},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}}]})(t)}function X(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"}},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}}]})(t)}function Z(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"9",cy:"21",r:"1"}},{tag:"circle",attr:{cx:"20",cy:"21",r:"1"}},{tag:"path",attr:{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"}}]})(t)}function J(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}},{tag:"line",attr:{x1:"9",y1:"3",x2:"9",y2:"21"}}]})(t)}function tt(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"}},{tag:"line",attr:{x1:"12",y1:"18",x2:"12.01",y2:"18"}}]})(t)}function et(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"}},{tag:"line",attr:{x1:"7",y1:"7",x2:"7.01",y2:"7"}}]})(t)}function nt(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"}},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"}},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"}}]})(t)}function rt(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"4 7 4 4 20 4 20 7"}},{tag:"line",attr:{x1:"9",y1:"20",x2:"15",y2:"20"}},{tag:"line",attr:{x1:"12",y1:"4",x2:"12",y2:"20"}}]})(t)}function ot(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}},{tag:"polyline",attr:{points:"17 8 12 3 7 8"}},{tag:"line",attr:{x1:"12",y1:"3",x2:"12",y2:"15"}}]})(t)}function it(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"}}]})(t)}function at(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}},{tag:"circle",attr:{cx:"9",cy:"7",r:"4"}},{tag:"path",attr:{d:"M23 21v-2a4 4 0 0 0-3-3.87"}},{tag:"path",attr:{d:"M16 3.13a4 4 0 0 1 0 7.75"}}]})(t)}function st(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"23 7 16 12 23 17 23 7"}},{tag:"rect",attr:{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"}}]})(t)}function lt(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"}},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"}}]})(t)}function ct(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"}},{tag:"polygon",attr:{points:"9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"}}]})(t)}function ut(t){return(0,r.k5)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}}]})(t)}},1054:(t,e,n)=>{"use strict";n.d(e,{m:()=>y});var r=n(9379),o=n(45),i=n(579),a=n(4844),s=n(3729),l=n(8460),c=n(6938),u=n(5043),d=n(2615);const h=["unmountOnExit","in","className","transition","transitionEnd","delay","animatePresenceProps"],f={initial:"exit",animate:"enter",exit:"exit",variants:{enter:function(){var t;let{transition:e,transitionEnd:n,delay:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{opacity:1,transition:null!==(t=null===e||void 0===e?void 0:e.enter)&&void 0!==t?t:d.yA.enter(d.jd.enter,r),transitionEnd:null===n||void 0===n?void 0:n.enter}},exit:function(){var t;let{transition:e,transitionEnd:n,delay:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{opacity:0,transition:null!==(t=null===e||void 0===e?void 0:e.exit)&&void 0!==t?t:d.yA.exit(d.jd.exit,r),transitionEnd:null===n||void 0===n?void 0:n.exit}}}};(0,u.forwardRef)(function(t,e){const{unmountOnExit:n,in:l,className:u,transition:d,transitionEnd:p,delay:m,animatePresenceProps:g}=t,v=(0,o.A)(t,h),y=l||n?"enter":"exit",b=!n||l&&n,x={transition:d,transitionEnd:p,delay:m};return(0,i.jsx)(c.N,(0,r.A)((0,r.A)({},g),{},{custom:x,children:b&&(0,i.jsx)(s.P.div,(0,r.A)((0,r.A)({ref:e,className:(0,a.cx)("chakra-fade",u),custom:x},f),{},{animate:y},v))}))}).displayName="Fade";var p=n(2695),m=n(5003);const g=["className","transition","motionProps"],v=(0,p.B)(s.P.div),y=(0,m.R)((t,e)=>{const{className:n,transition:s,motionProps:c}=t,u=(0,o.A)(t,g),d=(0,a.cx)("chakra-modal__overlay",n),h=(0,l.x5)(),p=(0,r.A)({pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh"},h.overlay),{motionPreset:m}=(0,l.k3)(),y=c||("none"===m?{}:f);return(0,i.jsx)(v,(0,r.A)((0,r.A)({},y),{},{__css:p,ref:e,className:d},u))});y.displayName="ModalOverlay"},1100:(t,e,n)=>{"use strict";n.d(e,{q:()=>h});var r=n(8664),o=n(45),i=n(9379),a=n(765),s=n(7685);const l=["pageParam"],c=["pageParam"];class u extends a.${constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t,e){super.setOptions((0,i.A)((0,i.A)({},t),{},{behavior:(0,s.PL)()}),e)}getOptimisticResult(t){return t.behavior=(0,s.PL)(),super.getOptimisticResult(t)}fetchNextPage(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pageParam:e}=t,n=(0,o.A)(t,l);return this.fetch((0,i.A)((0,i.A)({},n),{},{meta:{fetchMore:{direction:"forward",pageParam:e}}}))}fetchPreviousPage(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pageParam:e}=t,n=(0,o.A)(t,c);return this.fetch((0,i.A)((0,i.A)({},n),{},{meta:{fetchMore:{direction:"backward",pageParam:e}}}))}createResult(t,e){var n,r,o,a,l,c;const{state:u}=t,d=super.createResult(t,e),{isFetching:h,isRefetching:f}=d,p=h&&"forward"===(null==(n=u.fetchMeta)||null==(r=n.fetchMore)?void 0:r.direction),m=h&&"backward"===(null==(o=u.fetchMeta)||null==(a=o.fetchMore)?void 0:a.direction);return(0,i.A)((0,i.A)({},d),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,s.rB)(e,null==(l=u.data)?void 0:l.pages),hasPreviousPage:(0,s.RQ)(e,null==(c=u.data)?void 0:c.pages),isFetchingNextPage:p,isFetchingPreviousPage:m,isRefetching:f&&!p&&!m})}}var d=n(1129);function h(t,e,n){const o=(0,r.vh)(t,e,n);return(0,d.t)(o,u)}},1129:(t,e,n)=>{"use strict";n.d(e,{t:()=>b});var r=n(5043),o=n(9939),i=n(8873);function a(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const s=r.createContext(a()),l=()=>r.useContext(s);var c=n(9781);const u=r.createContext(!1),d=()=>r.useContext(u);u.Provider;var h=n(4084);const f=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},p=t=>{r.useEffect(()=>{t.clearReset()},[t])},m=t=>{let{result:e,errorResetBoundary:n,useErrorBoundary:r,query:o}=t;return e.isError&&!n.isReset()&&!e.isFetching&&(0,h.G)(r,[e.error,o])},g=t=>{t.suspense&&"number"!==typeof t.staleTime&&(t.staleTime=1e3)},v=(t,e,n)=>(null==t?void 0:t.suspense)&&((t,e)=>t.isLoading&&t.isFetching&&!e)(e,n),y=(t,e,n)=>e.fetchOptimistic(t).then(e=>{let{data:n}=e;null==t.onSuccess||t.onSuccess(n),null==t.onSettled||t.onSettled(n,null)}).catch(e=>{n.clearReset(),null==t.onError||t.onError(e),null==t.onSettled||t.onSettled(void 0,e)});function b(t,e){const n=(0,c.jE)({context:t.context}),a=d(),s=l(),u=n.defaultQueryOptions(t);u._optimisticResults=a?"isRestoring":"optimistic",u.onError&&(u.onError=o.j.batchCalls(u.onError)),u.onSuccess&&(u.onSuccess=o.j.batchCalls(u.onSuccess)),u.onSettled&&(u.onSettled=o.j.batchCalls(u.onSettled)),g(u),f(u,s),p(s);const[h]=r.useState(()=>new e(n,u)),b=h.getOptimisticResult(u);if((0,i.r)(r.useCallback(t=>{const e=a?()=>{}:h.subscribe(o.j.batchCalls(t));return h.updateResult(),e},[h,a]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),r.useEffect(()=>{h.setOptions(u,{listeners:!1})},[u,h]),v(u,b,a))throw y(u,h,s);if(m({result:b,errorResetBoundary:s,useErrorBoundary:u.useErrorBoundary,query:h.getCurrentQuery()}))throw b.error;return u.notifyOnChangeProps?b:h.trackResult(b)}},1143:(t,e,n)=>{var r=n(3028)(Object.keys,Object);t.exports=r},1153:(t,e,n)=>{"use strict";var r=n(5043),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(u=e.ref),e)a.call(e,r)&&!l.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===i[r]&&(i[r]=e[r]);return{$$typeof:o,type:t,key:c,ref:u,props:i,_owner:s.current}}e.Fragment=i,e.jsx=c,e.jsxs=c},1176:(t,e,n)=>{"use strict";n.d(e,{o:()=>o});var r=n(2316);function o(t,e){const n=(0,r.a)(t,null===e||void 0===e?void 0:e.in);return n.setHours(0,0,0,0),n}},1268:(t,e,n)=>{var r=n(5428),o=n(7574),i=n(6832),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},1271:(t,e,n)=>{"use strict";n.d(e,{T:()=>a,w:()=>s});var r=n(579),o=n(2970);const[i,a]=(0,o.q)({strict:!1,name:"PortalManagerContext"});function s(t){const{children:e,zIndex:n}=t;return(0,r.jsx)(i,{value:{zIndex:n},children:e})}s.displayName="PortalManager"},1282:(t,e,n)=>{"use strict";n.d(e,{Xu:()=>_,BV:()=>E,b:()=>M,db:()=>T,KZ:()=>O,Os:()=>L,jy:()=>R,F9:()=>j});var r=n(9379),o=n(45),i=n(6870),a=n(1401),s=n(3804),l=n(7265),c=n(5043);function u(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;rt||[e,n].filter(Boolean).join("-"),[t,e,n])}(t);return(0,c.useMemo)(()=>n.map(t=>"".concat(t,"-").concat(o)),[o,n])}var d=n(2980),h=n(3194),f=n(2970),p=n(3464),m=n(6219),g=n(3107);function v(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{timeout:e=300,preventDefault:n=()=>!0}=t,[r,o]=(0,c.useState)([]),i=(0,c.useRef)(void 0),a=()=>{i.current&&(clearTimeout(i.current),i.current=null)};return(0,c.useEffect)(()=>a,[]),function(t){return s=>{if("Backspace"===s.key){const t=[...r];return t.pop(),void o(t)}if(function(t){const{key:e}=t;return 1===e.length||e.length>1&&/[^a-zA-Z0-9]/.test(e)}(s)){const l=r.concat(s.key);n(s)&&(s.preventDefault(),s.stopPropagation()),o(l),t(l.join("")),a(),i.current=setTimeout(()=>{o([]),i.current=null},e)}}}}var y=n(2315),b=n(1992),x=n(6814);const w=["id","closeOnSelect","closeOnBlur","initialFocusRef","autoSelect","isLazy","isOpen","defaultIsOpen","onClose","onOpen","placement","lazyBehavior","direction","computePositionOnMount"],k=["onMouseEnter","onMouseMove","onMouseLeave","onClick","onFocus","isDisabled","isFocusable","closeOnSelect","type"],[_,A,S,C]=(0,y.D)(),[E,O]=(0,f.q)({strict:!1,name:"MenuContext"});function P(t){var e;return null!==(e=null===t||void 0===t?void 0:t.ownerDocument)&&void 0!==e?e:document}function M(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:e,closeOnSelect:n=!0,closeOnBlur:h=!0,initialFocusRef:f,autoSelect:p=!0,isLazy:m,isOpen:g,defaultIsOpen:v,onClose:y,onOpen:x,placement:k="bottom-start",lazyBehavior:_="unmount",direction:A,computePositionOnMount:C=!1}=t,E=(0,o.A)(t,w),O=(0,c.useRef)(null),M=(0,c.useRef)(null),T=(0,c.useRef)(!0),N=S(),R=(0,c.useCallback)(()=>{requestAnimationFrame(()=>{var t;null===(t=O.current)||void 0===t||t.focus({preventScroll:!1})})},[]),j=(0,c.useCallback)(()=>{const t=setTimeout(()=>{var t;if(f)null===(t=f.current)||void 0===t||t.focus();else if(N.count()){const t=N.firstEnabled();t&&q(t.index)}else{var e;null===(e=O.current)||void 0===e||e.focus({preventScroll:!1})}});$.current.add(t)},[N,f]),L=(0,c.useCallback)(()=>{const t=setTimeout(()=>{if(N.count()){const t=N.lastEnabled();t&&q(t.index)}else{var t;null===(t=O.current)||void 0===t||t.focus({preventScroll:!1})}});$.current.add(t)},[N]),D=(0,c.useCallback)(()=>{null===x||void 0===x||x(),p?j():R()},[p,j,R,x]),{isOpen:z,onOpen:I,onClose:B,onToggle:F}=(0,i.j)({isOpen:g,defaultIsOpen:v,onClose:y,onOpen:D});(0,a.j)({enabled:z&&h,ref:O,handler:t=>{var e,n,r;const o=null!==(e=null===(n=t.composedPath)||void 0===n||null===(n=n.call(t))||void 0===n?void 0:n[0])&&void 0!==e?e:t.target;null!==(r=M.current)&&void 0!==r&&r.contains(o)||B()}});const V=(0,b.E)((0,r.A)((0,r.A)({},E),{},{enabled:z||C,placement:k,direction:A})),[H,q]=(0,c.useState)(-1);(0,s.X)(O,{focusRef:M,visible:z,shouldFocus:!0});const W=(0,l.v)({isOpen:z,ref:O}),[U,Y]=u(e,"menu-button","menu-list"),K=(0,c.useCallback)(()=>{I(),R()},[I,R]),$=(0,c.useRef)(new Set([]));(0,c.useEffect)(()=>{const t=$.current;return()=>{t.forEach(t=>clearTimeout(t)),t.clear()}},[]),(0,d.w)(()=>{var t;z||(q(-1),null===(t=O.current)||void 0===t||t.scrollTo(0,0))},[z]),(0,d.w)(()=>{z&&-1===H&&R()},[H,z]),(0,c.useEffect)(()=>{var t;if(!z)return;const e=N.item(H);null===e||void 0===e||null===(t=e.node)||void 0===t||t.focus({preventScroll:!T.current})},[N,H,z]);return{openAndFocusMenu:K,openAndFocusFirstItem:(0,c.useCallback)(()=>{I(),j()},[j,I]),openAndFocusLastItem:(0,c.useCallback)(()=>{T.current=!0,I(),L()},[I,L]),onTransitionEnd:(0,c.useCallback)(()=>{var t,e;const n=P(O.current),r=null===(t=O.current)||void 0===t?void 0:t.contains(n.activeElement);if(!(z&&!r))return;const o=null===(e=N.item(H))||void 0===e?void 0:e.node;null===o||void 0===o||o.focus({preventScroll:!T.current})},[z,H,N]),unstable__animationState:W,descendants:N,popper:V,buttonId:U,menuId:Y,forceUpdate:V.forceUpdate,orientation:"vertical",isOpen:z,onToggle:F,onOpen:I,onClose:B,menuRef:O,buttonRef:M,focusedIndex:H,closeOnSelect:n,closeOnBlur:h,autoSelect:p,setFocusedIndex:q,isLazy:m,lazyBehavior:_,initialFocusRef:f,scrollIntoViewRef:T}}function T(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=O(),{onToggle:o,popper:i,openAndFocusFirstItem:a,openAndFocusLastItem:s,scrollIntoViewRef:l}=n,u=(0,c.useCallback)(t=>{const e=t.key,n={Enter:a,ArrowDown:a,ArrowUp:s}[e];n&&(l.current=!0,t.preventDefault(),t.stopPropagation(),n(t))},[a,s,l]);return(0,r.A)((0,r.A)({},t),{},{ref:(0,h.Px)(n.buttonRef,e,i.referenceRef),id:n.buttonId,"data-active":(0,p.s)(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:(0,m.H)(t.onClick,o),onKeyDown:(0,m.H)(t.onKeyDown,u)})}function N(t){var e;return function(t){var e;if(!function(t){return null!=t&&"object"==typeof t&&"nodeType"in t&&t.nodeType===Node.ELEMENT_NODE}(t))return!1;const n=null!==(e=t.ownerDocument.defaultView)&&void 0!==e?e:window;return t instanceof n.HTMLElement}(t)&&!(null===t||void 0===t||null===(e=t.getAttribute("role"))||void 0===e||!e.startsWith("menuitem"))}function R(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=O();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:o,setFocusedIndex:i,menuRef:a,isOpen:s,onClose:l,menuId:u,isLazy:d,lazyBehavior:f,scrollIntoViewRef:p,unstable__animationState:y}=n,b=A(),x=v({preventDefault:t=>" "!==t.key&&N(t.target)}),w=(0,c.useCallback)(t=>{if(!t.currentTarget.contains(t.target))return;const e={Tab:t=>t.preventDefault(),Escape:t=>{t.stopPropagation(),l()},ArrowDown:()=>{var t;p.current=!0;const e=null!==(t=b.nextEnabled(o))&&void 0!==t?t:b.firstEnabled();e&&i(e.index)},ArrowUp:()=>{var t;p.current=!0;const e=null!==(t=b.prevEnabled(o))&&void 0!==t?t:b.firstEnabled();e&&i(e.index)}}[t.key];if(e)return t.preventDefault(),void e(t);const n=x(t=>{const e=function(t,e,n,r){if(null==e)return r;if(!r)return t.find(t=>n(t).toLowerCase().startsWith(e.toLowerCase()));const o=t.filter(t=>n(t).toLowerCase().startsWith(e.toLowerCase()));if(o.length>0){let e;return o.includes(r)?(e=o.indexOf(r)+1,e===o.length&&(e=0),o[e]):(e=t.indexOf(o[0]),t[e])}return r}(b.values(),t,t=>{var e,n;return null!==(e=null===t||void 0===t||null===(n=t.node)||void 0===n?void 0:n.textContent)&&void 0!==e?e:""},b.item(o));if(e){const t=b.indexOf(e.node);i(t)}});N(t.target)&&n(t)},[b,o,x,l,i,p]),k=(0,c.useRef)(!1);s&&(k.current=!0);const _=(0,g.q)({wasSelected:k.current,enabled:d,mode:f,isSelected:y.present});return(0,r.A)((0,r.A)({},t),{},{ref:(0,h.Px)(a,e),children:_?t.children:null,tabIndex:-1,role:"menu",id:u,style:(0,r.A)((0,r.A)({},t.style),{},{transformOrigin:"var(--popper-transform-origin)"}),"aria-orientation":"vertical",onKeyDown:(0,m.H)(t.onKeyDown,w)})}function j(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{popper:e,isOpen:n}=O();return e.getPopperProps((0,r.A)((0,r.A)({},t),{},{style:(0,r.A)({visibility:n?"visible":"hidden"},t.style)}))}function L(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const{onMouseEnter:n,onMouseMove:i,onMouseLeave:a,onClick:s,onFocus:l,isDisabled:u,isFocusable:d,closeOnSelect:f,type:p}=t,m=(0,o.A)(t,k),g=O(),{setFocusedIndex:v,focusedIndex:y,closeOnSelect:b,onClose:w,menuId:_,scrollIntoViewRef:A}=g,S=(0,c.useRef)(null),E="".concat(_,"-menuitem-").concat((0,c.useId)()),{index:M,register:T}=C({disabled:u&&!d}),R=(0,c.useCallback)(t=>{null===n||void 0===n||n(t),u||(A.current=!1,v(M))},[v,M,u,n,A]),j=(0,c.useCallback)(t=>{var e;null===i||void 0===i||i(t),S.current&&P(e=S.current).activeElement!==e&&R(t)},[R,i]),L=(0,c.useCallback)(t=>{null===a||void 0===a||a(t),u||v(-1)},[v,u,a]),D=(0,c.useCallback)(t=>{null===s||void 0===s||s(t),N(t.currentTarget)&&(null!==f&&void 0!==f?f:b)&&w()},[w,s,b,f]),z=(0,c.useCallback)(t=>{null===l||void 0===l||l(t),v(M)},[v,l,M]),I=M===y,B=(0,x.I)({onClick:D,onFocus:z,onMouseEnter:R,onMouseMove:j,onMouseLeave:L,ref:(0,h.Px)(T,S,e),isDisabled:u,isFocusable:d});return(0,r.A)((0,r.A)((0,r.A)({},m),B),{},{type:null!==p&&void 0!==p?p:B.type,id:E,role:"menuitem",tabIndex:I?0:-1})}},1340:(t,e,n)=>{var r=n(3211);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},1387:(t,e,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;ed,Gh:()=>j,HS:()=>L,Oi:()=>s,Rr:()=>h,pX:()=>F,pb:()=>M,rc:()=>o,tH:()=>B,ue:()=>m,yD:()=>R,zR:()=>a}),function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(o||(o={}));const i="popstate";function a(t){return void 0===t&&(t={}),f(function(t,e){let{pathname:n,search:r,hash:o}=t.location;return u("",{pathname:n,search:r,hash:o},e.state&&e.state.usr||null,e.state&&e.state.key||"default")},function(t,e){return"string"===typeof e?e:d(e)},null,t)}function s(t,e){if(!1===t||null===t||"undefined"===typeof t)throw new Error(e)}function l(t,e){if(!t){"undefined"!==typeof console&&console.warn(e);try{throw new Error(e)}catch(n){}}}function c(t,e){return{usr:t.state,key:t.key,idx:e}}function u(t,e,n,o){return void 0===n&&(n=null),r({pathname:"string"===typeof t?t:t.pathname,search:"",hash:""},"string"===typeof e?h(e):e,{state:n,key:e&&e.key||o||Math.random().toString(36).substr(2,8)})}function d(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function h(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function f(t,e,n,a){void 0===a&&(a={});let{window:l=document.defaultView,v5Compat:h=!1}=a,f=l.history,p=o.Pop,m=null,g=v();function v(){return(f.state||{idx:null}).idx}function y(){p=o.Pop;let t=v(),e=null==t?null:t-g;g=t,m&&m({action:p,location:x.location,delta:e})}function b(t){let e="null"!==l.location.origin?l.location.origin:l.location.href,n="string"===typeof t?t:d(t);return n=n.replace(/ $/,"%20"),s(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==g&&(g=0,f.replaceState(r({},f.state,{idx:g}),""));let x={get action(){return p},get location(){return t(l,f)},listen(t){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(i,y),m=t,()=>{l.removeEventListener(i,y),m=null}},createHref:t=>e(l,t),createURL:b,encodeLocation(t){let e=b(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){p=o.Push;let r=u(x.location,t,e);n&&n(r,t),g=v()+1;let i=c(r,g),a=x.createHref(r);try{f.pushState(i,"",a)}catch(s){if(s instanceof DOMException&&"DataCloneError"===s.name)throw s;l.location.assign(a)}h&&m&&m({action:p,location:x.location,delta:1})},replace:function(t,e){p=o.Replace;let r=u(x.location,t,e);n&&n(r,t),g=v();let i=c(r,g),a=x.createHref(r);f.replaceState(i,"",a),h&&m&&m({action:p,location:x.location,delta:0})},go:t=>f.go(t)};return x}var p;!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(p||(p={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function m(t,e,n){return void 0===n&&(n="/"),g(t,e,n,!1)}function g(t,e,n,r){let o=M(("string"===typeof e?h(e):e).pathname||"/",n);if(null==o)return null;let i=v(t);!function(t){t.sort((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){let n=t.length===e.length&&t.slice(0,-1).every((t,n)=>t===e[n]);return n?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map(t=>t.childrenIndex),e.routesMeta.map(t=>t.childrenIndex)))}(i);let a=null;for(let s=0;null==a&&s{let a={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};a.relativePath.startsWith("/")&&(s(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let l=L([r,a.relativePath]),c=n.concat(a);t.children&&t.children.length>0&&(s(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),v(t.children,e,c,l)),(null!=t.path||t.index)&&e.push({path:l,score:C(l,t.index),routesMeta:c})};return t.forEach((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let r of y(t.path))o(t,e,r);else o(t,e)}),e}function y(t){let e=t.split("/");if(0===e.length)return[];let[n,...r]=e,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=y(r.join("/")),s=[];return s.push(...a.map(t=>""===t?i:[i,t].join("/"))),o&&s.push(...a),s.map(e=>t.startsWith("/")&&""===e?"/":e)}const b=/^:[\w-]+$/,x=3,w=2,k=1,_=10,A=-2,S=t=>"*"===t;function C(t,e){let n=t.split("/"),r=n.length;return n.some(S)&&(r+=A),e&&(r+=w),n.filter(t=>!S(t)).reduce((t,e)=>t+(b.test(e)?x:""===e?k:_),r)}function E(t,e,n){void 0===n&&(n=!1);let{routesMeta:r}=t,o={},i="/",a=[];for(let s=0;s(r.push({paramName:e,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));t.endsWith("*")?(r.push({paramName:"*"}),o+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==t&&"/"!==t&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,e?void 0:"i");return[i,r]}(t.path,t.caseSensitive,t.end),o=e.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((t,e,n)=>{let{paramName:r,isOptional:o}=e;if("*"===r){let t=s[n]||"";a=i.slice(0,i.length-t.length).replace(/(.)\/+$/,"$1")}const l=s[n];return t[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),t},{}),pathname:i,pathnameBase:a,pattern:t}}function P(t){try{return t.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(e){return l(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function M(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&"/"!==r?null:t.slice(n)||"/"}function T(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function N(t){return t.filter((t,e)=>0===e||t.route.path&&t.route.path.length>0)}function R(t,e){let n=N(t);return e?n.map((t,e)=>e===n.length-1?t.pathname:t.pathnameBase):n.map(t=>t.pathnameBase)}function j(t,e,n,o){let i;void 0===o&&(o=!1),"string"===typeof t?i=h(t):(i=r({},t),s(!i.pathname||!i.pathname.includes("?"),T("?","pathname","search",i)),s(!i.pathname||!i.pathname.includes("#"),T("#","pathname","hash",i)),s(!i.search||!i.search.includes("#"),T("#","search","hash",i)));let a,l=""===t||""===i.pathname,c=l?"/":i.pathname;if(null==c)a=n;else{let t=e.length-1;if(!o&&c.startsWith("..")){let e=c.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}a=t>=0?e[t]:"/"}let u=function(t,e){void 0===e&&(e="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof t?h(t):t,i=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)}),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:i,search:z(r),hash:I(o)}}(i,a),d=c&&"/"!==c&&c.endsWith("/"),f=(l||"."===c)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!f||(u.pathname+="/"),u}const L=t=>t.join("/").replace(/\/\/+/g,"/"),D=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),z=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",I=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";class B extends Error{}function F(t){return null!=t&&"number"===typeof t.status&&"string"===typeof t.statusText&&"boolean"===typeof t.internal&&"data"in t}const V=["post","put","patch","delete"],H=(new Set(V),["get",...V]);new Set(H),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred")},1401:(t,e,n)=>{"use strict";n.d(e,{j:()=>i});var r=n(5043),o=n(940);function i(t){const{ref:e,handler:n,enabled:i=!0}=t,l=(0,o.c)(n),c=(0,r.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;(0,r.useEffect)(()=>{if(!i)return;const t=t=>{a(t,e)&&(c.isPointerDown=!0)},r=t=>{c.ignoreEmulatedMouseEvents?c.ignoreEmulatedMouseEvents=!1:c.isPointerDown&&n&&a(t,e)&&(c.isPointerDown=!1,l(t))},o=t=>{c.ignoreEmulatedMouseEvents=!0,n&&c.isPointerDown&&a(t,e)&&(c.isPointerDown=!1,l(t))},u=s(e.current);return u.addEventListener("mousedown",t,!0),u.addEventListener("mouseup",r,!0),u.addEventListener("touchstart",t,!0),u.addEventListener("touchend",o,!0),()=>{u.removeEventListener("mousedown",t,!0),u.removeEventListener("mouseup",r,!0),u.removeEventListener("touchstart",t,!0),u.removeEventListener("touchend",o,!0)}},[n,e,l,c,i])}function a(t,e){var n,r,o;const i=null!==(n=null===(r=t.composedPath)||void 0===r?void 0:r.call(t)[0])&&void 0!==n?n:t.target;if(i){if(!s(i).contains(i))return!1}return!(null!==(o=e.current)&&void 0!==o&&o.contains(i))}function s(t){var e;return null!==(e=null===t||void 0===t?void 0:t.ownerDocument)&&void 0!==e?e:document}},1411:(t,e,n)=>{"use strict";n.d(e,{w:()=>d});var r=n(9379),o=n(579),i=n(9953),a=n(4844),s=n(3109),l=n(7547),c=n(5003),u=n(2695);const d=(0,c.R)(function(t,e){const n=(0,l.$c)((0,r.A)((0,r.A)({},t),{},{ref:e})),c=(0,s.e)(),d=(0,i.H2)((0,r.A)({display:"flex"},c.tablist));return(0,o.jsx)(u.B.div,(0,r.A)((0,r.A)({},n),{},{className:(0,a.cx)("chakra-tabs__tablist",t.className),__css:d}))});d.displayName="TabList"},1425:(t,e,n)=>{"use strict";n.d(e,{p:()=>a});var r=n(2440),o=n(9415),i=n(2316);function a(t,e){const n=(0,i.a)(t,null===e||void 0===e?void 0:e.in),a=n.getFullYear(),s=(0,r.w)(n,0);s.setFullYear(a+1,0,4),s.setHours(0,0,0,0);const l=(0,o.b)(s),c=(0,r.w)(n,0);c.setFullYear(a,0,4),c.setHours(0,0,0,0);const u=(0,o.b)(c);return n.getTime()>=l.getTime()?a+1:n.getTime()>=u.getTime()?a:a-1}},1432:(t,e,n)=>{"use strict";n.d(e,{a:()=>o});var r=n(5043);function o(t){return r.Children.toArray(t).filter(t=>(0,r.isValidElement)(t))}},1441:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});const r=(0,n(7784).A)("AlignCenter",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"17",x2:"7",y1:"12",y2:"12",key:"rsh8ii"}],["line",{x1:"19",x2:"5",y1:"18",y2:"18",key:"1t0tuv"}]])},1562:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(2440);function o(t){return(0,r.w)(t,Date.now())}},1586:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>g});var r=n(9379),o=n(5043),i=Object.defineProperty,a=(t,e,n)=>((t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n);const s={x:0,y:0,width:0,height:0,unit:"px"},l=(t,e,n)=>Math.min(Math.max(t,e),n),c=(t,e)=>t===e||t.width===e.width&&t.height===e.height&&t.x===e.x&&t.y===e.y&&t.unit===e.unit;function u(t,e,n){return"%"===t.unit?(0,r.A)((0,r.A)((0,r.A)({},s),t),{},{unit:"%"}):{unit:"%",x:t.x?t.x/e*100:0,y:t.y?t.y/n*100:0,width:t.width?t.width/e*100:0,height:t.height?t.height/n*100:0}}function d(t,e,n){return t.unit?"px"===t.unit?(0,r.A)((0,r.A)((0,r.A)({},s),t),{},{unit:"px"}):{unit:"px",x:t.x?t.x*e/100:0,y:t.y?t.y*n/100:0,width:t.width?t.width*e/100:0,height:t.height?t.height*n/100:0}:(0,r.A)((0,r.A)((0,r.A)({},s),t),{},{unit:"px"})}function h(t,e,n,o,i){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:o,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:i;const u=(0,r.A)({},t);let d=Math.min(a,o),h=Math.min(s,i),f=Math.min(l,o),p=Math.min(c,i);e&&(e>1?(d=s?s*e:d,h=d/e,f=l*e):(h=a?a/e:h,d=h*e,p=c/e)),u.y<0&&(u.height=Math.max(u.height+u.y,h),u.y=0),u.x<0&&(u.width=Math.max(u.width+u.x,d),u.x=0);const m=o-(u.x+u.width);m<0&&(u.x=Math.min(u.x,o-d),u.width+=m);const g=i-(u.y+u.height);if(g<0&&(u.y=Math.min(u.y,i-h),u.height+=g),u.widthf&&(("sw"===n||"nw"==n)&&(u.x-=f-u.width),u.width=f),u.height>p&&(("nw"===n||"ne"==n)&&(u.y-=p-u.height),u.height=p),e){const t=u.width/u.height;if(te){const t=Math.max(u.height*e,d);("sw"===n||"nw"==n)&&(u.x-=t-u.width),u.width=t}}return u}const f={capture:!0,passive:!1};let p=0;const m=class t extends o.PureComponent{constructor(){super(...arguments),a(this,"docMoveBound",!1),a(this,"mouseDownOnCrop",!1),a(this,"dragStarted",!1),a(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),a(this,"componentRef",(0,o.createRef)()),a(this,"mediaRef",(0,o.createRef)()),a(this,"resizeObserver"),a(this,"initChangeCalled",!1),a(this,"instanceId","rc-".concat(p++)),a(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),a(this,"onCropPointerDown",t=>{const{crop:e,disabled:n}=this.props,r=this.getBox();if(!e)return;const o=d(e,r.width,r.height);if(n)return;t.cancelable&&t.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const i=t.target.dataset.ord,a=!!i;let s=t.clientX,l=t.clientY,c=o.x,u=o.y;if(i){const e=t.clientX-r.x,n=t.clientY-r.y;let a=0,d=0;"ne"===i||"e"==i?(a=e-(o.x+o.width),d=n-o.y,c=o.x,u=o.y+o.height):"se"===i||"s"===i?(a=e-(o.x+o.width),d=n-(o.y+o.height),c=o.x,u=o.y):"sw"===i||"w"==i?(a=e-o.x,d=n-(o.y+o.height),c=o.x+o.width,u=o.y):("nw"===i||"n"==i)&&(a=e-o.x,d=n-o.y,c=o.x+o.width,u=o.y+o.height),s=c+r.x+a,l=u+r.y+d}this.evData={startClientX:s,startClientY:l,startCropX:c,startCropY:u,clientX:t.clientX,clientY:t.clientY,isResize:a,ord:i},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),a(this,"onComponentPointerDown",t=>{const{crop:e,disabled:n,locked:r,keepSelection:o,onChange:i}=this.props,a=this.getBox();if(n||r||o&&e)return;t.cancelable&&t.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const s=t.clientX-a.x,l=t.clientY-a.y,c={unit:"px",x:s,y:l,width:0,height:0};this.evData={startClientX:t.clientX,startClientY:t.clientY,startCropX:s,startCropY:l,clientX:t.clientX,clientY:t.clientY,isResize:!0},this.mouseDownOnCrop=!0,i(d(c,a.width,a.height),u(c,a.width,a.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),a(this,"onDocPointerMove",t=>{const{crop:e,disabled:n,onChange:r,onDragStart:o}=this.props,i=this.getBox();if(n||!e||!this.mouseDownOnCrop)return;t.cancelable&&t.preventDefault(),this.dragStarted||(this.dragStarted=!0,o&&o(t));const{evData:a}=this;let s;a.clientX=t.clientX,a.clientY=t.clientY,s=a.isResize?this.resizeCrop():this.dragCrop(),c(e,s)||r(d(s,i.width,i.height),u(s,i.width,i.height))}),a(this,"onComponentKeyDown",e=>{const{crop:n,disabled:r,onChange:o,onComplete:i}=this.props;if(r)return;const a=e.key;let s=!1;if(!n)return;const c=this.getBox(),h=this.makePixelCrop(c),f=(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)?t.nudgeStepLarge:e.shiftKey?t.nudgeStepMedium:t.nudgeStep;if("ArrowLeft"===a?(h.x-=f,s=!0):"ArrowRight"===a?(h.x+=f,s=!0):"ArrowUp"===a?(h.y-=f,s=!0):"ArrowDown"===a&&(h.y+=f,s=!0),s){e.cancelable&&e.preventDefault(),h.x=l(h.x,0,c.width-h.width),h.y=l(h.y,0,c.height-h.height);const t=d(h,c.width,c.height),n=u(h,c.width,c.height);o(t,n),i&&i(t,n)}}),a(this,"onHandlerKeyDown",(e,n)=>{const{aspect:o=0,crop:i,disabled:a,minWidth:s=0,minHeight:l=0,maxWidth:f,maxHeight:p,onChange:m,onComplete:g}=this.props,v=this.getBox();if(a||!i)return;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key)return;e.stopPropagation(),e.preventDefault();const y=(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)?t.nudgeStepLarge:e.shiftKey?t.nudgeStepMedium:t.nudgeStep,b=function(t,e,n,o){const i=(0,r.A)({},t);return"ArrowLeft"===e?"nw"===o?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):"w"===o?(i.x-=n,i.width+=n):"sw"===o?(i.x-=n,i.width+=n,i.height+=n):"ne"===o?(i.y+=n,i.width-=n,i.height-=n):"e"===o?i.width-=n:"se"===o&&(i.width-=n,i.height-=n):"ArrowRight"===e&&("nw"===o?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):"w"===o?(i.x+=n,i.width-=n):"sw"===o?(i.x+=n,i.width-=n,i.height-=n):"ne"===o?(i.y-=n,i.width+=n,i.height+=n):"e"===o?i.width+=n:"se"===o&&(i.width+=n,i.height+=n)),"ArrowUp"===e?"nw"===o?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):"n"===o?(i.y-=n,i.height+=n):"ne"===o?(i.y-=n,i.width+=n,i.height+=n):"sw"===o?(i.x+=n,i.width-=n,i.height-=n):"s"===o?i.height-=n:"se"===o&&(i.width-=n,i.height-=n):"ArrowDown"===e&&("nw"===o?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):"n"===o?(i.y+=n,i.height-=n):"ne"===o?(i.y+=n,i.width-=n,i.height-=n):"sw"===o?(i.x-=n,i.width+=n,i.height+=n):"s"===o?i.height+=n:"se"===o&&(i.width+=n,i.height+=n)),i}(d(i,v.width,v.height),e.key,y,n),x=h(b,o,n,v.width,v.height,s,l,f,p);if(!c(i,x)){const t=u(x,v.width,v.height);m(x,t),g&&g(x,t)}}),a(this,"onDocPointerDone",t=>{const{crop:e,disabled:n,onComplete:r,onDragEnd:o}=this.props,i=this.getBox();this.unbindDocMove(),!n&&e&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,o&&o(t),r&&r(d(e,i.width,i.height),u(e,i.width,i.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),a(this,"onDragFocus",()=>{var t;null==(t=this.componentRef.current)||t.scrollTo(0,0)})}get document(){return document}getBox(){const t=this.mediaRef.current;if(!t)return{x:0,y:0,width:0,height:0};const{x:e,y:n,width:r,height:o}=t.getBoundingClientRect();return{x:e,y:n,width:r,height:o}}componentDidUpdate(t){const{crop:e,onComplete:n}=this.props;if(n&&!t.crop&&e){const{width:t,height:r}=this.getBox();t&&r&&n(d(e,t,r),u(e,t,r))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,f),this.document.addEventListener("pointerup",this.onDocPointerDone,f),this.document.addEventListener("pointercancel",this.onDocPointerDone,f),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,f),this.document.removeEventListener("pointerup",this.onDocPointerDone,f),this.document.removeEventListener("pointercancel",this.onDocPointerDone,f),this.docMoveBound=!1)}getCropStyle(){const{crop:t}=this.props;if(t)return{top:"".concat(t.y).concat(t.unit),left:"".concat(t.x).concat(t.unit),width:"".concat(t.width).concat(t.unit),height:"".concat(t.height).concat(t.unit)}}dragCrop(){const{evData:t}=this,e=this.getBox(),n=this.makePixelCrop(e),r=t.clientX-t.startClientX,o=t.clientY-t.startClientY;return n.x=l(t.startCropX+r,0,e.width-n.width),n.y=l(t.startCropY+o,0,e.height-n.height),n}getPointRegion(t,e,n,r){const{evData:o}=this,i=o.clientX-t.x,a=o.clientY-t.y;let s,l;return s=r&&e?"nw"===e||"n"===e||"ne"===e:a2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const o=Math.min(n,t.width),i=Math.min(r,t.height);return e&&(o||i)?e>1?o?[o,o/e]:[i*e,i]:i?[i*e,i]:[o,o/e]:[o,i]}resizeCrop(){const{evData:e}=this,{aspect:n=0,maxWidth:r,maxHeight:o}=this.props,i=this.getBox(),[a,s]=this.resolveMinDimensions(i,n,this.props.minWidth,this.props.minHeight);let c=this.makePixelCrop(i);const u=this.getPointRegion(i,e.ord,a,s),d=e.ord||u;let f=e.clientX-e.startClientX,p=e.clientY-e.startClientY;(a&&"nw"===d||"w"===d||"sw"===d)&&(f=Math.min(f,-a)),(s&&"nw"===d||"n"===d||"ne"===d)&&(p=Math.min(p,-s));const m={unit:"px",x:0,y:0,width:0,height:0};"ne"===u?(m.x=e.startCropX,m.width=f,n?(m.height=m.width/n,m.y=e.startCropY-m.height):(m.height=Math.abs(p),m.y=e.startCropY-m.height)):"se"===u?(m.x=e.startCropX,m.y=e.startCropY,m.width=f,m.height=n?m.width/n:p):"sw"===u?(m.x=e.startCropX+f,m.y=e.startCropY,m.width=Math.abs(f),m.height=n?m.width/n:p):"nw"===u&&(m.x=e.startCropX+f,m.width=Math.abs(f),n?(m.height=m.width/n,m.y=e.startCropY-m.height):(m.height=Math.abs(p),m.y=e.startCropY+p));const g=h(m,n,u,i.width,i.height,a,s,r,o);return n||t.xyOrds.indexOf(d)>-1?c=g:t.xOrds.indexOf(d)>-1?(c.x=g.x,c.width=g.width):t.yOrds.indexOf(d)>-1&&(c.y=g.y,c.height=g.height),c.x=l(c.x,0,i.width-c.width),c.y=l(c.y,0,i.height-c.height),c}renderCropSelection(){const{ariaLabels:e=t.defaultProps.ariaLabels,disabled:n,locked:r,renderSelectionAddon:i,ruleOfThirds:a,crop:s}=this.props,l=this.getCropStyle();if(s)return o.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":e.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!r&&o.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},o.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),o.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),o.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),o.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),o.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":e.nwDragHandle,onKeyDown:t=>this.onHandlerKeyDown(t,"nw"),role:"button"}),o.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":e.nDragHandle,onKeyDown:t=>this.onHandlerKeyDown(t,"n"),role:"button"}),o.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":e.neDragHandle,onKeyDown:t=>this.onHandlerKeyDown(t,"ne"),role:"button"}),o.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":e.eDragHandle,onKeyDown:t=>this.onHandlerKeyDown(t,"e"),role:"button"}),o.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":e.seDragHandle,onKeyDown:t=>this.onHandlerKeyDown(t,"se"),role:"button"}),o.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":e.sDragHandle,onKeyDown:t=>this.onHandlerKeyDown(t,"s"),role:"button"}),o.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":e.swDragHandle,onKeyDown:t=>this.onHandlerKeyDown(t,"sw"),role:"button"}),o.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":e.wDragHandle,onKeyDown:t=>this.onHandlerKeyDown(t,"w"),role:"button"})),i&&o.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:t=>t.stopPropagation()},i(this.state)),a&&o.createElement(o.Fragment,null,o.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),o.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(t){return d((0,r.A)((0,r.A)({},s),this.props.crop||{}),t.width,t.height)}render(){const{aspect:t,children:e,circularCrop:n,className:r,crop:i,disabled:a,locked:s,style:l,ruleOfThirds:c}=this.props,{cropIsActive:u,newCropIsBeingDrawn:d}=this.state,h=i?this.renderCropSelection():null,f=function(){for(var t=arguments.length,e=new Array(t),n=0;nt&&"string"==typeof t).join(" ")}("ReactCrop",r,u&&"ReactCrop--active",a&&"ReactCrop--disabled",s&&"ReactCrop--locked",d&&"ReactCrop--new-crop",i&&t&&"ReactCrop--fixed-aspect",i&&n&&"ReactCrop--circular-crop",i&&c&&"ReactCrop--rule-of-thirds",!this.dragStarted&&i&&!i.width&&!i.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return o.createElement("div",{ref:this.componentRef,className:f,style:l},o.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},e),i?o.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},o.createElement("defs",null,o.createElement("mask",{id:"hole-".concat(this.instanceId)},o.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?o.createElement("ellipse",{cx:"".concat(i.x+i.width/2).concat(i.unit),cy:"".concat(i.y+i.height/2).concat(i.unit),rx:"".concat(i.width/2).concat(i.unit),ry:"".concat(i.height/2).concat(i.unit),fill:"black"}):o.createElement("rect",{x:"".concat(i.x).concat(i.unit),y:"".concat(i.y).concat(i.unit),width:"".concat(i.width).concat(i.unit),height:"".concat(i.height).concat(i.unit),fill:"black"}))),o.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:"url(#hole-".concat(this.instanceId,")")})):void 0,h)}};a(m,"xOrds",["e","w"]),a(m,"yOrds",["n","s"]),a(m,"xyOrds",["nw","ne","se","sw"]),a(m,"nudgeStep",1),a(m,"nudgeStepMedium",10),a(m,"nudgeStepLarge",100),a(m,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let g=m},1620:(t,e,n)=>{"use strict";n.d(e,{k:()=>i});var r=n(849),o=n(2316);function i(t,e){var n,i,a,s,l,c;const u=(0,r.q)(),d=null!==(n=null!==(i=null!==(a=null!==(s=null===e||void 0===e?void 0:e.weekStartsOn)&&void 0!==s?s:null===e||void 0===e||null===(l=e.locale)||void 0===l||null===(l=l.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==a?a:u.weekStartsOn)&&void 0!==i?i:null===(c=u.locale)||void 0===c||null===(c=c.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0,h=(0,o.a)(t,null===e||void 0===e?void 0:e.in),f=h.getDay(),p=(f{var r=n(6913),o=n(4305);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1714:(t,e,n)=>{var r=n(1340);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},1722:(t,e,n)=>{"use strict";n.d(e,{Rk:()=>r,SF:()=>o,sk:()=>i});function r(t,e,n){var r="";return n.split(" ").forEach(function(n){void 0!==t[n]?e.push(t[n]+";"):n&&(r+=n+" ")}),r}var o=function(t,e,n){var r=t.key+"-"+e.name;!1===n&&void 0===t.registered[r]&&(t.registered[r]=e.styles)},i=function(t,e,n){o(t,e,n);var r=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?"."+r:"",i,t.sheet,!0),i=i.next}while(void 0!==i)}}},1724:(t,e,n)=>{"use strict";n.d(e,{l:()=>x});var r=n(9379),o=n(45),i=n(579),a=n(6294),s=n(2206),l=n(5663),c=n(3464),u=n(5043),d=n(4844),h=n(5003),f=n(2695);const p=["children","placeholder","className"],m=(0,h.R)(function(t,e){const{children:n,placeholder:a,className:s}=t,l=(0,o.A)(t,p);return(0,i.jsxs)(f.B.select,(0,r.A)((0,r.A)({},l),{},{ref:e,className:(0,d.cx)("chakra-select",s),children:[a&&(0,i.jsx)("option",{value:"",children:a}),n]}))});m.displayName="SelectField";var g=n(3635),v=n(6059);const y=["rootProps","placeholder","icon","color","height","h","minH","minHeight","iconColor","iconSize"],b=["children"],x=(0,h.R)((t,e)=>{var n;const u=(0,v.o)("Select",t),d=(0,a.M)(t),{rootProps:h,placeholder:p,icon:b,color:x,height:w,h:k,minH:A,minHeight:S,iconColor:C,iconSize:E}=d,O=(0,o.A)(d,y),[P,M]=(0,l.l)(O,s.GF),T=(0,g.t)(M),N={width:"100%",height:"fit-content",position:"relative",color:x},R=(0,r.A)((0,r.A)({paddingEnd:"2rem"},u.field),{},{_focus:(0,r.A)({zIndex:"unset"},null===(n=u.field)||void 0===n?void 0:n._focus)});return(0,i.jsxs)(f.B.div,(0,r.A)((0,r.A)((0,r.A)({className:"chakra-select__wrapper",__css:N},P),h),{},{children:[(0,i.jsx)(m,(0,r.A)((0,r.A)({ref:e,height:null!==k&&void 0!==k?k:w,minH:null!==A&&void 0!==A?A:S,placeholder:p},T),{},{__css:R,children:t.children})),(0,i.jsx)(_,(0,r.A)((0,r.A)((0,r.A)({"data-disabled":(0,c.s)(T.disabled)},(C||x)&&{color:C||x}),{},{__css:u.icon},E&&{fontSize:E}),{},{children:b}))]}))});x.displayName="Select";const w=t=>(0,i.jsx)("svg",(0,r.A)((0,r.A)({viewBox:"0 0 24 24"},t),{},{children:(0,i.jsx)("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})),k=(0,f.B)("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),_=t=>{const{children:e=(0,i.jsx)(w,{})}=t,n=(0,o.A)(t,b),a=(0,u.cloneElement)(e,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return(0,i.jsx)(k,(0,r.A)((0,r.A)({},n),{},{className:"chakra-select__icon-wrapper",children:(0,u.isValidElement)(e)?a:null}))};_.displayName="SelectIcon"},1751:(t,e,n)=>{"use strict";n.d(e,{C:()=>h});var r=n(9379),o=n(45),i=n(579),a=n(6294),s=n(4844),l=n(5003),c=n(6059),u=n(2695);const d=["className"],h=(0,l.R)(function(t,e){const n=(0,c.V)("Code",t),l=(0,a.M)(t),{className:h}=l,f=(0,o.A)(l,d);return(0,i.jsx)(u.B.code,(0,r.A)((0,r.A)({ref:e,className:(0,s.cx)("chakra-code",t.className)},f),{},{__css:(0,r.A)({display:"inline-block"},n)}))});h.displayName="Code"},1765:(t,e,n)=>{"use strict";n.d(e,{h:()=>b});var r=n(9379),o=n(45),i=n(579),a=n(9953),s=n(6219),l=n(4844),c=n(9957),u=n(3729),d=n(2695),h=n(5003);const f=["variants"];function p(t){if(t)return{enter:(0,r.A)((0,r.A)({},t.enter),{},{visibility:"visible"}),exit:(0,r.A)((0,r.A)({},t.exit),{},{transitionEnd:{visibility:"hidden"}})}}const m={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},g=(0,d.B)(u.P.section),v=(0,h.R)(function(t,e){const{variants:n=m}=t,a=(0,o.A)(t,f),{isOpen:s}=(0,c.C_)();return(0,i.jsx)(g,(0,r.A)({ref:e,variants:p(n),initial:!1,animate:s?"enter":"exit"},a))});v.displayName="PopoverTransition";const y=["rootProps","motionProps"],b=(0,h.R)(function(t,e){const{rootProps:n,motionProps:u}=t,h=(0,o.A)(t,y),{getPopoverProps:f,getPopoverPositionerProps:p,onAnimationComplete:m}=(0,c.C_)(),g=(0,c.jm)(),b=(0,a.H2)((0,r.A)({position:"relative",display:"flex",flexDirection:"column"},g.content));return(0,i.jsx)(d.B.div,(0,r.A)((0,r.A)({},p(n)),{},{__css:g.popper,className:"chakra-popover__popper",children:(0,i.jsx)(v,(0,r.A)((0,r.A)((0,r.A)({},u),f(h,e)),{},{onAnimationComplete:(0,s.O)(m,h.onAnimationComplete),className:(0,l.cx)("chakra-popover__content",t.className),__css:b}))}))});b.displayName="PopoverContent"},1794:(t,e,n)=>{"use strict";n.d(e,{T:()=>u});var r=n(9379),o=n(579),i=n(4844),a=n(3109),s=n(7547),l=n(5003),c=n(2695);const u=(0,l.R)(function(t,e){const n=(0,s.uo)(t),l=(0,a.e)();return(0,o.jsx)(c.B.div,(0,r.A)((0,r.A)({},n),{},{width:"100%",ref:e,className:(0,i.cx)("chakra-tabs__tab-panels",t.className),__css:l.tabpanels}))});u.displayName="TabPanels"},1811:(t,e,n)=>{"use strict";n.d(e,{u:()=>Ue});var r=n(579),o=n(8917),i=n(5043);var a=function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n